Commits on Source (2)
......@@ -33,8 +33,8 @@ function usage(){
echo -e " -A <VCA apiproxy> use VCA/juju API proxy"
echo -e " --pla: install the PLA module for placement support"
echo -e " --old-sa: install old Service Assurance framework (MON, POL); do not install Airflow and Pushgateway"
echo -e " --ng-sa: install new Service Assurance framework (Airflow, AlertManager and Pushgateway) (enabled by default)"
echo -e " -o <ADDON>: ONLY (un)installs one of the addons (k8s_monitor, ng-sa)"
echo -e " --ng-sa: install new Service Assurance framework (Airflow, AlertManager and Pushgateway) (enabled by default)"
echo -e " -o <COMPONENT>: ONLY installs the specified component (k8s_monitor, ng-sa, k8scluster, docker, deploy-osm)"
echo -e " -O <openrc file path/cloud name>: Install OSM to an OpenStack infrastructure. <openrc file/cloud name> is required. If a <cloud name> is used, the clouds.yaml file should be under ~/.config/openstack/ or /etc/openstack/"
echo -e " -N <openstack public network name/ID>: Public network name required to setup OSM to OpenStack"
echo -e " -f <path to SSH public key>: Public SSH key to use to deploy OSM to OpenStack"
......@@ -625,6 +625,10 @@ function dump_vars(){
echo "INSTALL_NGSA=$INSTALL_NGSA"
echo "INSTALL_DOCKER=$INSTALL_DOCKER"
echo "INSTALL_ONLY=$INSTALL_ONLY"
echo "INSTALL_ONLY_DEPLOY_OSM=$INSTALL_ONLY_DEPLOY_OSM"
echo "INSTALL_ONLY_DOCKER_CE=$INSTALL_ONLY_DOCKER_CE"
echo "INSTALL_ONLY_K8S_CLUSTER=$INSTALL_ONLY_K8S_CLUSTER"
echo "INSTALL_ONLY_NGSA=$INSTALL_ONLY_NGSA"
echo "INSTALL_PLA=$INSTALL_PLA"
echo "INSTALL_TO_OPENSTACK=$INSTALL_TO_OPENSTACK"
echo "INSTALL_VIMEMU=$INSTALL_VIMEMU"
......@@ -698,6 +702,10 @@ OPENSTACK_USERDATA_FILE=""
OPENSTACK_VM_NAME="server-osm"
OPENSTACK_PYTHON_VENV="$HOME/.virtual-envs/osm"
INSTALL_ONLY=""
INSTALL_ONLY_DEPLOY_OSM=""
INSTALL_ONLY_DOCKER_CE=""
INSTALL_ONLY_K8S_CLUSTER=""
INSTALL_ONLY_NGSA=""
INSTALL_DOCKER=""
INSTALL_JUJU=""
INSTALL_NOHOSTCLIENT=""
......@@ -772,7 +780,10 @@ while getopts ":a:c:r:n:k:u:R:D:o:O:N:H:S:s:t:U:P:A:l:L:K:d:p:T:f:F:-: hy" o; do
o)
INSTALL_ONLY="y"
[ "${OPTARG}" == "k8s_monitor" ] && INSTALL_K8S_MONITOR="y" && continue
[ "${OPTARG}" == "ng-sa" ] && INSTALL_NGSA="y" && continue
[ "${OPTARG}" == "ng-sa" ] && INSTALL_ONLY_NGSA="y" && continue
[ "${OPTARG}" == "docker" ] && INSTALL_ONLY_DOCKER_CE="y" && continue
[ "${OPTARG}" == "k8scluster" ] && INSTALL_ONLY_K8S_CLUSTER="y" && continue
[ "${OPTARG}" == "deploy-osm" ] && INSTALL_ONLY_DEPLOY_OSM="y" && continue
;;
O)
INSTALL_TO_OPENSTACK="y"
......@@ -940,8 +951,11 @@ else
# Community_installer
# Special cases go first
if [ -n "$INSTALL_ONLY" ]; then
[ -n "$INSTALL_ONLY_DOCKER_CE" ] && install_docker_ce
[ -n "$INSTALL_ONLY_K8S_CLUSTER" ] && install_k8s_cluster
[ -n "$INSTALL_K8S_MONITOR" ] && install_k8s_monitoring
[ -n "$INSTALL_NGSA" ] && install_osm_ngsa_service
[ -n "$INSTALL_ONLY_DEPLOY_OSM" ] && deploy_osm
[ -n "$INSTALL_ONLY_NGSA" ] && install_osm_ngsa_service
echo -e "\nDONE" && exit 0
fi
# This is where installation starts
......
......@@ -17,6 +17,7 @@ set +eux
K8S_VERSION=1.30
K8S_PACKAGE_VERSION="$K8S_VERSION".1-1.1
K8S_METRICS_VERSION="v0.7.1"
# installs kubernetes packages
function install_kube() {
......@@ -108,6 +109,15 @@ function check_and_track_k8s_ready_before_helm() {
[ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
}
# removes osm deployments and services
function install_k8s_metrics() {
[ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
echo "Installing Kubernetes metrics"
kubectl apply -f "https://github.com/kubernetes-sigs/metrics-server/releases/${K8S_METRICS_VERSION}/download/components.yaml"
kubectl -n kube-system patch deployment metrics-server --type=json -p '[{"op":"add","path":"/spec/template/spec/containers/0/args/-","value":"--kubelet-insecure-tls"}]'
[ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
}
# removes osm deployments and services
function remove_k8s_namespace() {
[ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function
......@@ -115,7 +125,6 @@ function remove_k8s_namespace() {
kubectl delete ns $1 2>/dev/null
[ -z "${DEBUG_INSTALL}" ] || DEBUG end of function
}
# main
while getopts ":D:d:i:-: " o; do
case "${o}" in
......@@ -171,6 +180,8 @@ deploy_cni_provider
taint_master_node
check_and_track_k8s_ready_before_helm
install_k8s_metrics
remove_k8s_namespace osm
# install_helm has been moved to install_helm_client.sh, run from full_install_osm.sh,
......
......@@ -36,8 +36,8 @@ function usage(){
echo -e " -A <VCA apiproxy> use VCA/juju API proxy"
echo -e " --pla: install the PLA module for placement support"
echo -e " --old-sa: install old Service Assurance framework (MON, POL); do not install Airflow and Pushgateway"
echo -e " --ng-sa: install new Service Assurance framework (Airflow, AlertManager and Pushgateway) (enabled by default)"
echo -e " -o <ADDON>: ONLY (un)installs one of the addons (k8s_monitor, ng-sa)"
echo -e " --ng-sa: install new Service Assurance framework (Airflow, AlertManager and Pushgateway) (enabled by default)"
echo -e " -o <COMPONENT>: ONLY installs the specified component (k8s_monitor, ng-sa, k8scluster, docker, deploy-osm)"
echo -e " -O <openrc file path/cloud name>: Install OSM to an OpenStack infrastructure. <openrc file/cloud name> is required. If a <cloud name> is used, the clouds.yaml file should be under ~/.config/openstack/ or /etc/openstack/"
echo -e " -N <openstack public network name/ID>: Public network name required to setup OSM to OpenStack"
echo -e " -f <path to SSH public key>: Public SSH key to use to deploy OSM to OpenStack"
......