X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Ffull_install_osm.sh;h=ebf2e03a6e8ba2b7735575ff67ebe9f5820babd0;hb=d15e054d353f83a343cbe089e053b4636a0e641f;hp=56ebcc1e3c701f981569457092b96f42f7511cb6;hpb=453d45826bad7fe43f94c8ae7265f0f59b4e180f;p=osm%2Fdevops.git diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index 56ebcc1e..ebf2e03a 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -402,20 +402,20 @@ function install_docker_ce() { echo "... restarted Docker service" if [ -n "${DOCKER_PROXY_URL}" ]; then echo "Configuring docker proxy ..." - if [ -f daemon.json ]; then - if grep -q registry-mirrors daemon.json; then - sudo sed -Ei 's/("registry-mirrors".*\[)(.*)\]/\1\2, \"'"${DOCKER_PROXY_URL}"'\"\]/' daemon.json + if [ -f /etc/docker/daemon.json ]; then + if grep -q registry-mirrors /etc/docker/daemon.json; then + 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}"'\"]",/' daemon.json + sudo sed -i "s|{|{\n \"registry-mirrors\": [\"${DOCKER_PROXY_URL}\"],|" /etc/docker/daemon.json fi else - sudo cat << EOF > 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 @@ -954,7 +954,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; @@ -979,17 +979,21 @@ 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}" - $WORKDIR_SUDO sed -i "s/opensourcemano\/${module}:.*/${DOCKER_REGISTRY_URL}${DOCKER_USER}\/${module}:${TAG}/g" ${OSM_K8S_WORK_DIR}/${module}.yaml + $WORKDIR_SUDO sed -i "s#opensourcemano/${module}:.*#${DOCKER_REGISTRY_URL}${DOCKER_USER}/${module}:${TAG}#g" ${OSM_K8S_WORK_DIR}/${module}.yaml fi done } function update_manifest_files() { - osm_services="nbi lcm ro pol mon light-ui ng-ui keystone pla" + 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 list_of_services="" for module in $osm_services; do module_upper="${module^^}" @@ -1001,7 +1005,7 @@ function update_manifest_files() { fi done list_of_services_to_rebuild=$(echo ${TO_REBUILD,,} |sed "s/lw-ui/light-ui/g") - if [ ! "$OSM_DOCKER_TAG" == "8" ]; then + if [ ! "$OSM_DOCKER_TAG" == "9" ]; then parse_yaml $OSM_DOCKER_TAG $list_of_services fi if [ -n "$MODULE_DOCKER_TAG" ]; then @@ -1544,7 +1548,7 @@ function parse_docker_registry_url() { DOCKER_REGISTRY_URL=$(echo "$DOCKER_REGISTRY_URL" | awk '{split($1,a,"@"); print a[2]}') } -JUJU_AGENT_VERSION=2.8.6 +JUJU_AGENT_VERSION=2.8.8 UNINSTALL="" DEVELOP="" UPDATE=""