Fix bug 1559 to update installers and manifests for Release TEN
[osm/devops.git] / installers / full_install_osm.sh
index d7c1c6b..79dc474 100755 (executable)
@@ -29,7 +29,6 @@ function usage(){
     echo -e "                     -b tags/v1.1.0     (a specific tag)"
     echo -e "                     ..."
     echo -e "     -c <orchestrator> deploy osm services using container <orchestrator>. Valid values are <k8s> or <swarm>.  If -c is not used then osm will be deployed using default orchestrator. When used with --uninstall, osm services deployed by the orchestrator will be uninstalled"
-    echo -e "     -n <ui> install OSM with Next Gen UI. Valid values are <lwui> or <ngui>. If -n is not specified osm will be installed with light-ui. When used with uninstall, osm along with the UI specified will be uninstalled"
     echo -e "     -s <stack name> or <namespace>  user defined stack name when installed using swarm or namespace when installed using k8s, default is osm"
     echo -e "     -H <VCA host>   use specific juju host controller IP"
     echo -e "     -S <VCA secret> use VCA/juju secret key"
@@ -39,7 +38,7 @@ function usage(){
     echo -e "     --vimemu:       additionally deploy the VIM emulator as a docker container"
     echo -e "     --elk_stack:    additionally deploy an ELK docker stack for event logging"
     echo -e "     --pla:          install the PLA module for placement support"
-    echo -e "     -m <MODULE>:    install OSM but only rebuild or pull the specified docker images (LW-UI, NG-UI, NBI, LCM, RO, MON, POL, PLA, KAFKA, MONGO, PROMETHEUS, PROMETHEUS-CADVISOR, KEYSTONE-DB, NONE)"
+    echo -e "     -m <MODULE>:    install OSM but only rebuild or pull the specified docker images (NG-UI, NBI, LCM, RO, MON, POL, PLA, KAFKA, MONGO, PROMETHEUS, PROMETHEUS-CADVISOR, KEYSTONE-DB, NONE)"
     echo -e "     -o <ADDON>:     ONLY (un)installs one of the addons (vimemu, elk_stack, k8s_monitor)"
     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"
@@ -54,6 +53,7 @@ function usage(){
     echo -e "     -d <docker registry URL> use docker registry URL instead of dockerhub"
     echo -e "     -p <docker proxy URL> set docker proxy URL as part of docker CE configuration"
     echo -e "     -T <docker tag> specify docker tag for the modules specified with option -m"
+    echo -e "     --nocachelxdimages:  do not cache local lxd images, do not create cronjob for that cache (will save installation time, might affect instantiation time)"
     echo -e "     --nolxd:        do not install and configure LXD, allowing unattended installations (assumes LXD is already installed and confifured)"
     echo -e "     --nodocker:     do not install docker, do not initialize a swarm (assumes docker is already installed and a swarm has been initialized)"
     echo -e "     --nojuju:       do not juju, assumes already installed"
@@ -76,6 +76,7 @@ function usage(){
     echo -e "     [--lxd <yaml path>]:         Takes a YAML file as a parameter with the LXD Cloud information (--charmed option)"
     echo -e "     [--lxd-cred <yaml path>]:    Takes a YAML file as a parameter with the LXD Credentials information (--charmed option)"
     echo -e "     [--microstack]:              Installs microstack as a vim. (--charmed option)"
+    echo -e "     [--overlay]:                 Add an overlay to override some defaults of the default bundle (--charmed option)"
     echo -e "     [--ha]:                      Installs High Availability bundle. (--charmed option)"
     echo -e "     [--tag]:                     Docker image tag. (--charmed option)"
     echo -e "     [--registry]:                Docker registry with optional credentials as user:pass@hostname:port (--charmed option)"
@@ -137,7 +138,7 @@ function remove_iptables() {
 
     if [ -z "$DEFAULT_IP" ]; then
         DEFAULT_IF=$(ip route list|awk '$1=="default" {print $5; exit}')
-        [ -z "$DEFAULT_IF" ] && DEFAULT_IF=$(route -n |awk '$1~/^0.0.0.0/ {print $8; exit}')
+        [ -z "$DEFAULT_IF" ] && DEFAULT_IF=$(ip route list|awk '$1=="default" {print $5; exit}')
         [ -z "$DEFAULT_IF" ] && FATAL "Not possible to determine the interface with the default route 0.0.0.0"
         DEFAULT_IP=`ip -o -4 a |grep ${DEFAULT_IF}|awk '{split($4,a,"/"); print a[1]}'`
         [ -z "$DEFAULT_IP" ] && FATAL "Not possible to determine the IP address of the interface with the default route"
@@ -220,18 +221,14 @@ function uninstall_lightweight() {
             remove_stack osm_elk
         fi
         echo "Now osm docker images and volumes will be deleted"
-       # TODO: clean-up of images should take into account if other tags were used for specific modules
+        # TODO: clean-up of images should take into account if other tags were used for specific modules
         newgrp docker << EONG
 for module in ro lcm keystone nbi mon pol pla osmclient; do
     docker image rm ${DOCKER_REGISTRY_URL}${DOCKER_USER}/${module}:${OSM_DOCKER_TAG}
 done
 EONG
 
-        if [ -n "$NGUI" ]; then
-            sg docker -c "docker image rm ${DOCKER_REGISTRY_URL}${DOCKER_USER}/ng-ui:${OSM_DOCKER_TAG}"
-        else
-            sg docker -c "docker image rm ${DOCKER_REGISTRY_URL}${DOCKER_USER}/light-ui:${OSM_DOCKER_TAG}"
-        fi
+        sg docker -c "docker image rm ${DOCKER_REGISTRY_URL}${DOCKER_USER}/ng-ui:${OSM_DOCKER_TAG}"
 
         if [ -n "$KUBERNETES" ]; then
             OSM_NAMESPACE_VOL="${OSM_HOST_VOL}/${OSM_STACK_NAME}"
@@ -339,6 +336,13 @@ function install_osmclient(){
     sudo -H LC_ALL=C python3 -m pip install -U pip
     sudo -H LC_ALL=C python3 -m pip install -U python-magic pyangbind verboselogs
     sudo apt-get install -y python3-osm-im python3-osmclient
+    if [ -f /usr/lib/python3/dist-packages/osm_im/requirements.txt ]; then
+        python3 -m pip install -r /usr/lib/python3/dist-packages/osm_im/requirements.txt
+    fi
+    if [ -f /usr/lib/python3/dist-packages/osmclient/requirements.txt ]; then
+        sudo apt-get install -y libcurl4-openssl-dev libssl-dev
+        python3 -m pip install -r /usr/lib/python3/dist-packages/osmclient/requirements.txt
+    fi
     #sed 's,OSM_SOL005=[^$]*,OSM_SOL005=True,' -i ${HOME}/.bashrc
     #echo 'export OSM_HOSTNAME=localhost' >> ${HOME}/.bashrc
     #echo 'export OSM_SOL005=True' >> ${HOME}/.bashrc
@@ -412,18 +416,18 @@ function install_docker_ce() {
         echo "Configuring docker proxy ..."
         if [ -f /etc/docker/daemon.json ]; then
             if grep -q registry-mirrors /etc/docker/daemon.json; then
-                sudo sed -Ei 's/("registry-mirrors".*\[)(.*)\]/\1\2, \"'"${DOCKER_PROXY_URL}"'\"\]/' /etc/docker/daemon.json
+                sudo sed -i "s|registry-mirrors.*|registry-mirrors\": [\"${DOCKER_PROXY_URL}\"] |" /etc/docker/daemon.json
             else
-                sudo sed -i 's/{/{\n  "registry-mirrors": [\"'"${DOCKER_PROXY_URL}"'\"]",/' /etc/docker/daemon.json
+                sudo sed -i "s|{|{\n  \"registry-mirrors\": [\"${DOCKER_PROXY_URL}\"],|" /etc/docker/daemon.json
             fi
         else
-            sudo cat << EOF > /etc/docker/daemon.json
+            sudo bash -c "cat << EOF > /etc/docker/daemon.json
 {
-  "registry-mirrors": ["${DOCKER_PROXY_URL}"]
+  \"registry-mirrors\": [\"${DOCKER_PROXY_URL}\"]
 }
-EOF
+EOF"
         fi
-       sudo systemctl daemon-reload
+        sudo systemctl daemon-reload
         sudo service docker restart
         echo "... restarted Docker service again"
     fi
@@ -444,7 +448,7 @@ function install_juju() {
     echo "Installing juju"
     sudo snap install juju --classic --channel=2.8/stable
     [[ ":$PATH": != *":/snap/bin:"* ]] && PATH="/snap/bin:${PATH}"
-    update_juju_images
+    [ -n "$INSTALL_NOCACHELXDIMAGES" ] || update_juju_images
     echo "Finished installation of juju"
     return 0
 }
@@ -563,26 +567,16 @@ function generate_docker_images() {
 
     if [ -n "$PULL_IMAGES" ]; then
         echo "Pulling OSM docker images"
-        for module in MON POL NBI KEYSTONE RO LCM NG-UI LW-UI PLA osmclient; do
+        for module in MON POL NBI KEYSTONE RO LCM NG-UI PLA osmclient; do
             module_lower=${module,,}
-            if [ $module == "LW-UI" ]; then
-                if [ -n "$NGUI" ]; then
-                    continue
-                else
-                    module_lower="light-ui"
-                fi
-            fi
-            if [ $module == "NG-UI" -a ! -n "$NGUI" ]; then
-                continue
-            fi
             if [ $module == "PLA" -a ! -n "$INSTALL_PLA" ]; then
                 continue
             fi
-           module_tag="${OSM_DOCKER_TAG}"
+            module_tag="${OSM_DOCKER_TAG}"
             if [ -n "${MODULE_DOCKER_TAG}" ] && echo $TO_REBUILD | grep -q $module ; then
                 module_tag="${MODULE_DOCKER_TAG}"
             fi
-           echo "Pulling ${DOCKER_REGISTRY_URL}${DOCKER_USER}/${module_lower}:${module_tag} docker image"
+            echo "Pulling ${DOCKER_REGISTRY_URL}${DOCKER_USER}/${module_lower}:${module_tag} docker image"
             sg docker -c "docker pull ${DOCKER_REGISTRY_URL}${DOCKER_USER}/${module_lower}:${module_tag}" || FATAL "cannot pull $module docker image"
         done
     else
@@ -590,19 +584,9 @@ function generate_docker_images() {
         [ -z "$_build_from" ] && _build_from="latest"
         echo "OSM Docker images generated from $_build_from"
 
-        for module in MON POL NBI KEYSTONE RO LCM NG-UI LW-UI PLA; do
+        for module in MON POL NBI KEYSTONE RO LCM NG-UI PLA; do
             if [ -z "$TO_REBUILD" ] || echo $TO_REBUILD | grep -q ${module} ; then
                 module_lower=${module,,}
-                if [ $module == "LW-UI" ]; then
-                    if [ -n "$NGUI" ]; then
-                        continue
-                    else
-                        module_lower="light-ui"
-                    fi
-                fi
-                if [ $module == "NG-UI" -a ! -n "$NGUI" ]; then
-                    continue
-                fi
                 if [ $module == "PLA" -a ! -n "$INSTALL_PLA" ]; then
                     continue
                 fi
@@ -638,13 +622,7 @@ function cmp_overwrite() {
 
 function generate_docker_compose_files() {
     $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/docker-compose.yaml $OSM_DOCKER_WORK_DIR/docker-compose.yaml
-    if [ -n "$NGUI" ]; then
-        # For NG-UI
-        $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/docker-compose-ngui.yaml $OSM_DOCKER_WORK_DIR/docker-compose-ui.yaml
-    else
-        # Docker-compose
-        $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/docker-compose-lightui.yaml $OSM_DOCKER_WORK_DIR/docker-compose-ui.yaml
-    fi
+    $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/docker-compose-ngui.yaml $OSM_DOCKER_WORK_DIR/docker-compose-ui.yaml
     if [ -n "$INSTALL_PLA" ]; then
         $WORKDIR_SUDO cp -b ${OSM_DEVOPS}/installers/docker/osm_pla/docker-compose.yaml $OSM_DOCKER_WORK_DIR/osm_pla/docker-compose.yaml
     fi
@@ -654,11 +632,7 @@ function generate_k8s_manifest_files() {
     #Kubernetes resources
     $WORKDIR_SUDO cp -bR ${OSM_DEVOPS}/installers/docker/osm_pods $OSM_DOCKER_WORK_DIR
     $WORKDIR_SUDO rm -f $OSM_K8S_WORK_DIR/mongo.yaml
-    if [ -n "$NGUI" ]; then
-        $WORKDIR_SUDO rm -f $OSM_K8S_WORK_DIR/light-ui.yaml
-    else
-        $WORKDIR_SUDO rm -f $OSM_K8S_WORK_DIR/ng-ui.yaml
-    fi
+    $WORKDIR_SUDO rm -f $OSM_K8S_WORK_DIR/ng-ui.yaml
 }
 
 function generate_prometheus_grafana_files() {
@@ -684,7 +658,6 @@ function generate_docker_env_files() {
     $WORKDIR_SUDO cp $OSM_DOCKER_WORK_DIR/keystone-db.env{,~}
     $WORKDIR_SUDO cp $OSM_DOCKER_WORK_DIR/keystone.env{,~}
     $WORKDIR_SUDO cp $OSM_DOCKER_WORK_DIR/lcm.env{,~}
-    $WORKDIR_SUDO cp $OSM_DOCKER_WORK_DIR/lwui.env{,~}
     $WORKDIR_SUDO cp $OSM_DOCKER_WORK_DIR/mon.env{,~}
     $WORKDIR_SUDO cp $OSM_DOCKER_WORK_DIR/nbi.env{,~}
     $WORKDIR_SUDO cp $OSM_DOCKER_WORK_DIR/pol.env{,~}
@@ -781,6 +754,7 @@ function generate_docker_env_files() {
 
     # MON
     if [ ! -f $OSM_DOCKER_WORK_DIR/mon.env ]; then
+        echo "OSMMON_KEYSTONE_SERVICE_PASSWORD=${SERVICE_PASSWORD}" | $WORKDIR_SUDO tee -a $OSM_DOCKER_WORK_DIR/mon.env
         echo "OSMMON_DATABASE_COMMONKEY=${OSM_DATABASE_COMMONKEY}" | $WORKDIR_SUDO tee -a $OSM_DOCKER_WORK_DIR/mon.env
         echo "OSMMON_SQL_DATABASE_URI=mysql://root:${MYSQL_ROOT_PASSWORD}@mysql:3306/mon" | $WORKDIR_SUDO tee -a $OSM_DOCKER_WORK_DIR/mon.env
     fi
@@ -815,11 +789,6 @@ function generate_docker_env_files() {
         echo "OSMPOL_SQL_DATABASE_URI=mysql://root:${MYSQL_ROOT_PASSWORD}@mysql:3306/pol" | $WORKDIR_SUDO tee -a $OSM_DOCKER_WORK_DIR/pol.env
     fi
 
-    # LW-UI
-    if [ ! -f $OSM_DOCKER_WORK_DIR/lwui.env ]; then
-        echo "OSMUI_SQL_DATABASE_URI=mysql://root:${MYSQL_ROOT_PASSWORD}@mysql:3306/lwui" | $WORKDIR_SUDO tee -a $OSM_DOCKER_WORK_DIR/lwui.env
-    fi
-
     echo "Finished generation of docker env files"
 }
 
@@ -837,11 +806,13 @@ function install_kube() {
     sudo apt-get update
     echo "Installing Kubernetes Packages ..."
     sudo apt-get install -y kubelet=1.15.0-00 kubeadm=1.15.0-00 kubectl=1.15.0-00
+    sudo apt-mark hold kubelet kubeadm kubectl
 }
 
 #initializes kubernetes control plane
 function init_kubeadm() {
     sudo swapoff -a
+    sudo sed -i.bak '/.*none.*swap/s/^\(.*\)$/#\1/g' /etc/fstab
     sudo kubeadm init --config $1
     sleep 5
 }
@@ -854,9 +825,13 @@ function kube_config_dir() {
 }
 
 function install_k8s_storageclass() {
-    kubectl apply -f https://openebs.github.io/charts/openebs-operator-1.6.0.yaml
-    local storageclass_timeout=300
+    OPENEBS_DIR="$(mktemp -d -q --tmpdir "openebs.XXXXXX")"
+    trap 'rm -rf "${OPENEBS_DIR}"' EXIT
+    wget -q https://openebs.github.io/charts/openebs-operator-1.6.0.yaml -P $OPENEBS_DIR
+    kubectl apply -f $OPENEBS_DIR
+    local storageclass_timeout=400
     local counter=0
+    local storageclass_ready=""
     echo "Waiting for storageclass"
     while (( counter < storageclass_timeout ))
     do
@@ -864,12 +839,14 @@ function install_k8s_storageclass() {
 
         if [ $? -eq 0 ] ; then
             echo "Storageclass available"
+            storageclass_ready="y"
             break
         else
             counter=$((counter + 15))
             sleep 15
         fi
     done
+    [ -n "$storageclass_ready" ] || FATAL "Storageclass not ready after $storageclass_timeout seconds. Cannot install openebs"
     kubectl patch storageclass openebs-hostpath -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
 }
 
@@ -907,7 +884,6 @@ function kube_secrets(){
     kubectl create secret generic ro-db-secret -n $OSM_STACK_NAME --from-env-file=$OSM_DOCKER_WORK_DIR/ro-db.env
     kubectl create secret generic ro-secret -n $OSM_STACK_NAME --from-env-file=$OSM_DOCKER_WORK_DIR/ro.env
     kubectl create secret generic keystone-secret -n $OSM_STACK_NAME --from-env-file=$OSM_DOCKER_WORK_DIR/keystone.env
-    kubectl create secret generic lwui-secret -n $OSM_STACK_NAME --from-env-file=$OSM_DOCKER_WORK_DIR/lwui.env
     kubectl create secret generic pol-secret -n $OSM_STACK_NAME --from-env-file=$OSM_DOCKER_WORK_DIR/pol.env
 }
 
@@ -962,7 +938,7 @@ function install_helm() {
         kubectl --namespace kube-system create serviceaccount tiller
         kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
         # HELM initialization
-        helm init --service-account tiller
+        helm init --stable-repo-url https://charts.helm.sh/stable --service-account tiller
 
         # Wait for Tiller to be up and running. If timeout expires, continue installing
         tiller_timeout=120;
@@ -987,7 +963,7 @@ function parse_yaml() {
         if [ "$module" == "pla" ]; then
             if [ -n "$INSTALL_PLA" ]; then
                 echo "Updating K8s manifest file from opensourcemano\/${module}:.* to ${DOCKER_REGISTRY_URL}${DOCKER_USER}\/${module}:${TAG}"
-                $WORKDIR_SUDO sed -i "s#opensourcemano/pla:.*#${DOCKER_REGISTRY_URL}${DOCKER_USER}/pla:${OSM_DOCKER_TAG}#g" ${OSM_DOCKER_WORK_DIR}/osm_pla/pla.yaml
+                $WORKDIR_SUDO sed -i "s#opensourcemano/pla:.*#${DOCKER_REGISTRY_URL}${DOCKER_USER}/pla:${TAG}#g" ${OSM_DOCKER_WORK_DIR}/osm_pla/pla.yaml
             fi
         else
             echo "Updating K8s manifest file from opensourcemano\/${module}:.* to ${DOCKER_REGISTRY_URL}${DOCKER_USER}\/${module}:${TAG}"
@@ -997,23 +973,15 @@ function parse_yaml() {
 }
 
 function update_manifest_files() {
-    if [ -n "$NGUI" ]; then
-        osm_services="nbi lcm ro pol mon ng-ui keystone pla"
-    else
-        osm_services="nbi lcm ro pol mon light-ui keystone pla"
-    fi
+    osm_services="nbi lcm ro pol mon ng-ui keystone pla"
     list_of_services=""
     for module in $osm_services; do
         module_upper="${module^^}"
-        if [ "$module_upper" == "LIGHT-UI" ]; then
-            module_upper="LW-UI"
-        fi
         if ! echo $TO_REBUILD | grep -q $module_upper ; then
             list_of_services="$list_of_services $module"
         fi
     done
-    list_of_services_to_rebuild=$(echo ${TO_REBUILD,,} |sed "s/lw-ui/light-ui/g")
-    if [ ! "$OSM_DOCKER_TAG" == "9" ]; then
+    if [ ! "$OSM_DOCKER_TAG" == "10" ]; then
         parse_yaml $OSM_DOCKER_TAG $list_of_services
     fi
     if [ -n "$MODULE_DOCKER_TAG" ]; then
@@ -1197,7 +1165,7 @@ function install_lightweight() {
     DEFAULT_IF=$(ip route list|awk '$1=="default" {print $5; exit}')
     [ -z "$DEFAULT_IF" ] && DEFAULT_IF=$(route -n |awk '$1~/^0.0.0.0/ {print $8; exit}')
     [ -z "$DEFAULT_IF" ] && FATAL "Not possible to determine the interface with the default route 0.0.0.0"
-    DEFAULT_IP=`ip -o -4 a |grep ${DEFAULT_IF} |awk '{split($4,a,"/"); print a[1]}'`
+    DEFAULT_IP=`ip -o -4 a s ${DEFAULT_IF} |awk '{split($4,a,"/"); print a[1]}'`
     [ -z "$DEFAULT_IP" ] && FATAL "Not possible to determine the IP address of the interface with the default route"
     DEFAULT_MTU=$(ip addr show ${DEFAULT_IF} | perl -ne 'if (/mtu\s(\d+)/) {print $1;}')
 
@@ -1410,7 +1378,7 @@ EOF
     [ -n "$KUBERNETES" ] && add_local_k8scluster
     track add_local_k8scluster
 
-    wget -q -O- https://osm-download.etsi.org/ftp/osm-9.0-nine/README2.txt &> /dev/null
+    wget -q -O- https://osm-download.etsi.org/ftp/osm-10.0-ten/README2.txt &> /dev/null
     track end
     return 0
 }
@@ -1422,7 +1390,7 @@ function install_to_openstack() {
     fi
 
     # Install Pip for Python3
-    $WORKDIR_SUDO apt install -y python3-pip
+    $WORKDIR_SUDO apt install -y python3-pip python3-venv
     $WORKDIR_SUDO -H LC_ALL=C python3 -m pip install -U pip
 
     # Create a venv to avoid conflicts with the host installation
@@ -1430,9 +1398,9 @@ function install_to_openstack() {
 
     source $OPENSTACK_PYTHON_VENV/bin/activate
 
-    # Install Ansible, OpenStack client and SDK
+    # Install Ansible, OpenStack client and SDK, latest openstack version supported is Train
     python -m pip install -U wheel
-    python -m pip install -U python-openstackclient "openstacksdk>=0.12.0,<1" "ansible>=2.10,<2.11"
+    python -m pip install -U "python-openstackclient<=4.0.2" "openstacksdk>=0.12.0,<=0.36.2" "ansible>=2.10,<2.11"
 
     # Install the Openstack cloud module (ansible>=2.10)
     ansible-galaxy collection install openstack.cloud
@@ -1524,6 +1492,7 @@ function dump_vars(){
     echo "INSTALL_LIGHTWEIGHT=$INSTALL_LIGHTWEIGHT"
     echo "INSTALL_ONLY=$INSTALL_ONLY"
     echo "INSTALL_ELK=$INSTALL_ELK"
+    echo "INSTALL_NOCACHELXDIMAGES=$INSTALL_NOCACHELXDIMAGES"
     #echo "INSTALL_PERFMON=$INSTALL_PERFMON"
     echo "INSTALL_TO_OPENSTACK=$INSTALL_TO_OPENSTACK"
     echo "OPENSTACK_PUBLIC_NET_NAME=$OPENSTACK_PUBLIC_NET_NAME"
@@ -1548,13 +1517,12 @@ function dump_vars(){
     echo "NO_HOST_PORTS=$NO_HOST_PORTS"
     echo "DOCKER_NOBUILD=$DOCKER_NOBUILD"
     echo "WORKDIR_SUDO=$WORKDIR_SUDO"
-    echo "OSM_WORK_DIR=$OSM_STACK_NAME"
+    echo "OSM_WORK_DIR=$OSM_WORK_DIR"
     echo "OSM_DOCKER_TAG=$OSM_DOCKER_TAG"
     echo "DOCKER_USER=$DOCKER_USER"
     echo "OSM_STACK_NAME=$OSM_STACK_NAME"
     echo "PULL_IMAGES=$PULL_IMAGES"
     echo "KUBERNETES=$KUBERNETES"
-    echo "NGUI=$NGUI"
     echo "DOCKER_REGISTRY_URL=$DOCKER_REGISTRY_URL"
     echo "DOCKER_PROXY_URL=$DOCKER_PROXY_URL"
     echo "SHOWOPTS=$SHOWOPTS"
@@ -1592,7 +1560,7 @@ SHOWOPTS=""
 COMMIT_ID=""
 ASSUME_YES=""
 INSTALL_FROM_SOURCE=""
-RELEASE="ReleaseNINE"
+RELEASE="ReleaseTEN"
 REPOSITORY="stable"
 INSTALL_VIMEMU=""
 INSTALL_PLA=""
@@ -1614,9 +1582,9 @@ INSTALL_NOLXD=""
 INSTALL_NODOCKER=""
 INSTALL_NOJUJU=""
 KUBERNETES="y"
-NGUI="y"
 INSTALL_K8S_MONITOR=""
 INSTALL_NOHOSTCLIENT=""
+INSTALL_NOCACHELXDIMAGES=""
 SESSION_ID=`date +%s`
 OSM_DEVOPS=
 OSM_VCA_HOST=
@@ -1670,12 +1638,6 @@ while getopts ":b:r:c:n:k:u:R:D:o:O:m:N:H:S:s:w:t:U:P:A:l:L:K:d:p:T:f:F:-: hy" o
             echo -e "Invalid argument for -i : ' $OPTARG'\n" >&2
             usage && exit 1
             ;;
-        n)
-            [ "${OPTARG}" == "lwui" ] && NGUI="" && REPO_ARGS+=(-n "${OPTARG}") && continue
-            [ "${OPTARG}" == "ngui" ] && continue
-            echo -e "Invalid argument for -n : ' $OPTARG'\n" >&2
-            usage && exit 1
-            ;;
         k)
             REPOSITORY_KEY="${OPTARG}"
             REPO_ARGS+=(-k "$REPOSITORY_KEY")
@@ -1716,7 +1678,6 @@ while getopts ":b:r:c:n:k:u:R:D:o:O:m:N:H:S:s:w:t:U:P:A:l:L:K:d:p:T:f:F:-: hy" o
             OPENSTACK_PUBLIC_NET_NAME="${OPTARG}"
             ;;
         m)
-            [ "${OPTARG}" == "LW-UI" ] && TO_REBUILD="$TO_REBUILD LW-UI" && continue
             [ "${OPTARG}" == "NG-UI" ] && TO_REBUILD="$TO_REBUILD NG-UI" && continue
             [ "${OPTARG}" == "NBI" ] && TO_REBUILD="$TO_REBUILD NBI" && continue
             [ "${OPTARG}" == "LCM" ] && TO_REBUILD="$TO_REBUILD LCM" && continue
@@ -1805,12 +1766,15 @@ while getopts ":b:r:c:n:k:u:R:D:o:O:m:N:H:S:s:w:t:U:P:A:l:L:K:d:p:T:f:F:-: hy" o
             [ "${OPTARG}" == "lxd" ] && continue
             [ "${OPTARG}" == "lxd-cred" ] && continue
             [ "${OPTARG}" == "microstack" ] && continue
+            [ "${OPTARG}" == "overlay" ] && continue
+            [ "${OPTARG}" == "only-vca" ] && continue
             [ "${OPTARG}" == "vca" ] && continue
             [ "${OPTARG}" == "ha" ] && continue
             [ "${OPTARG}" == "tag" ] && continue
             [ "${OPTARG}" == "registry" ] && continue
             [ "${OPTARG}" == "pla" ] && INSTALL_PLA="y" && continue
             [ "${OPTARG}" == "volume" ] && OPENSTACK_ATTACH_VOLUME="true" && continue
+            [ "${OPTARG}" == "nocachelxdimages" ] && INSTALL_NOCACHELXDIMAGES="y" && continue
             echo -e "Invalid option: '--$OPTARG'\n" >&2
             usage && exit 1
             ;;
@@ -1907,7 +1871,7 @@ fi
 [ -n "$INSTALL_ONLY" ] && echo -e "\nDONE" && exit 0
 
 #Installation starts here
-wget -q -O- https://osm-download.etsi.org/ftp/osm-9.0-nine/README.txt &> /dev/null
+wget -q -O- https://osm-download.etsi.org/ftp/osm-10.0-ten/README.txt &> /dev/null
 track start
 
 [ -n "$INSTALL_LIGHTWEIGHT" ] && install_lightweight && echo -e "\nDONE" && exit 0
@@ -1928,8 +1892,6 @@ export OSM_USE_LOCAL_DEVOPS=true
 #Install vim-emu (optional)
 [ -n "$INSTALL_VIMEMU" ] && install_docker_ce && install_vimemu
 
-wget -q -O- https://osm-download.etsi.org/ftp/osm-9.0-nine/README2.txt &> /dev/null
+wget -q -O- https://osm-download.etsi.org/ftp/osm-10.0-ten/README2.txt &> /dev/null
 track end
 echo -e "\nDONE"
-
-