From: garciadeblas Date: Fri, 19 May 2023 09:42:13 +0000 (+0200) Subject: Clarify messages and minor refactors in full_install_osm X-Git-Tag: release-v14.0-start~50 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F26%2F13426%2F3;p=osm%2Fdevops.git Clarify messages and minor refactors in full_install_osm Change-Id: I33182aa1f7c53117ae0b645a4f02b3cbde7bfb1c Signed-off-by: garciadeblas --- diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh index 7413bd66..a7f46a28 100755 --- a/installers/full_install_osm.sh +++ b/installers/full_install_osm.sh @@ -248,12 +248,18 @@ function pull_docker_images() { sg docker -c "docker pull mysql:5" || FATAL "cannot get mysql docker image" fi - echo "Pulling OSM docker images" - for module in MON POL NBI KEYSTONE RO LCM NG-UI PLA osmclient Airflow; do + list_of_modules="MON NBI KEYSTONE RO LCM NG-UI osmclient" + if [ -n "$INSTALL_NGSA" ]; then + list_of_modules="${list_of_modules} Airflow Webhook" + else + list_of_modules="${list_of_modules} POL" + fi + if [ -n "$INSTALL_PLA" ]; then + list_of_modules="${list_of_modules} PLA" + fi + echo "Pulling OSM docker images for the following modules: ${list_of_modules}" + for module in ${list_of_modules}; do module_lower=${module,,} - if [ $module == "PLA" -a ! -n "$INSTALL_PLA" ]; then - continue - fi module_tag="${OSM_DOCKER_TAG}" if [ -n "${MODULE_DOCKER_TAG}" ] && echo $TO_REBUILD | grep -q $module ; then module_tag="${MODULE_DOCKER_TAG}" @@ -501,10 +507,11 @@ function kube_secrets(){ kubectl create secret generic ro-db-secret -n $OSM_NAMESPACE --from-env-file=$OSM_DOCKER_WORK_DIR/ro-db.env kubectl create secret generic ro-secret -n $OSM_NAMESPACE --from-env-file=$OSM_DOCKER_WORK_DIR/ro.env kubectl create secret generic keystone-secret -n $OSM_NAMESPACE --from-env-file=$OSM_DOCKER_WORK_DIR/keystone.env - kubectl create secret generic pol-secret -n $OSM_NAMESPACE --from-env-file=$OSM_DOCKER_WORK_DIR/pol.env if [ -n "${INSTALL_NGSA}" ]; then kubectl create secret generic ngsa-secret -n $OSM_NAMESPACE --from-env-file=$OSM_DOCKER_WORK_DIR/ngsa.env kubectl create secret generic webhook-translator-secret -n $OSM_NAMESPACE --from-env-file=$OSM_DOCKER_WORK_DIR/webhook-translator.env + else + kubectl create secret generic pol-secret -n $OSM_NAMESPACE --from-env-file=$OSM_DOCKER_WORK_DIR/pol.env fi [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function } @@ -512,6 +519,8 @@ function kube_secrets(){ #deploys osm pods and services function deploy_osm_services() { [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function + echo "The following manifests under $OSM_K8S_WORK_DIR will be deployed:" + ls $OSM_K8S_WORK_DIR kubectl apply -n $OSM_NAMESPACE -f $OSM_K8S_WORK_DIR [ -z "${DEBUG_INSTALL}" ] || DEBUG end of function } @@ -548,7 +557,7 @@ function parse_yaml() { for module in $services; do if [ "$module" == "pla" ]; then if [ -n "$INSTALL_PLA" ]; then - echo "Updating K8s manifest file from opensourcemano\/pla:.* to ${DOCKER_REGISTRY_URL}${DOCKER_USER}\/pla:${TAG}" + echo "Updating K8s manifest file for ${module} from opensourcemano\/pla:.* to ${DOCKER_REGISTRY_URL}${DOCKER_USER}\/pla:${TAG}" sudo sed -i "s#opensourcemano/pla:.*#${DOCKER_REGISTRY_URL}${DOCKER_USER}/pla:${TAG}#g" ${OSM_DOCKER_WORK_DIR}/osm_pla/pla.yaml fi else @@ -558,7 +567,7 @@ function parse_yaml() { elif [ "$module" == "ng-mon" ]; then image="mon" fi - echo "Updating K8s manifest file from opensourcemano\/${image}:.* to ${DOCKER_REGISTRY_URL}${DOCKER_USER}\/${image}:${TAG}" + echo "Updating K8s manifest file for ${module} from opensourcemano\/${image}:.* to ${DOCKER_REGISTRY_URL}${DOCKER_USER}\/${image}:${TAG}" sudo sed -i "s#opensourcemano/${image}:.*#${DOCKER_REGISTRY_URL}${DOCKER_USER}/${image}:${TAG}#g" ${OSM_K8S_WORK_DIR}/${module}.yaml fi done @@ -566,6 +575,7 @@ function parse_yaml() { } function update_manifest_files() { + [ -z "${DEBUG_INSTALL}" ] || DEBUG beginning of function osm_services="nbi lcm ro pol mon ng-mon ng-ui keystone pla prometheus ng-prometheus" list_of_services="" for module in $osm_services; do