From: garciadeblas Date: Tue, 25 Jun 2024 14:40:44 +0000 (+0200) Subject: Fix OSM_HOSTNAME for public cloud tests in Azure X-Git-Tag: release-v16.0-start~7 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=a4b669eca2d65335e5c1896550e2adf7939b9759;p=osm%2Ftests.git Fix OSM_HOSTNAME for public cloud tests in Azure Change-Id: I517655ed6dba0121ff73b701b260371d366b0869 Signed-off-by: garciadeblas --- diff --git a/cloud-scripts/create-osm-vm.sh b/cloud-scripts/create-osm-vm.sh index 454cb06..c7fc080 100755 --- a/cloud-scripts/create-osm-vm.sh +++ b/cloud-scripts/create-osm-vm.sh @@ -65,7 +65,8 @@ fi mkdir -p ${ROBOT_REPORT_FOLDER} cat < ${ROBOT_REPORT_FOLDER}/osm_environment.rc export CLOUD_TYPE="${CLOUD_TYPE}" -export OSM_HOSTNAME="${NEW_OSM_IP}" +export OSM_IP_ADDRESS="${NEW_OSM_IP}" +export OSM_HOSTNAME="nbi.${NEW_OSM_IP}.nip.io" export OSM_IMAGE_NAME="${OSM_IMAGE_NAME}" EOF echo File with new environment was created at ${ROBOT_REPORT_FOLDER}/osm_environment.rc diff --git a/cloud-scripts/remote-extract-logs.sh b/cloud-scripts/remote-extract-logs.sh index b304826..7973f32 100755 --- a/cloud-scripts/remote-extract-logs.sh +++ b/cloud-scripts/remote-extract-logs.sh @@ -22,7 +22,7 @@ set -e for MODULE in 'grafana' 'keystone' 'lcm' 'mon' 'nbi' 'pol' 'ro' 'ngui' 'airflow-scheduler' 'pushgateway-prometheus-pushgateway' 'webhook-translator' do echo Saving ${MODULE} logs... - ssh -T -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@${OSM_HOSTNAME} \ + ssh -T -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@${OSM_IP_ADDRESS} \ 'kubectl -n osm logs deployment/"'${MODULE}'" --all-containers=true 2>&1 | cat' > "${ROBOT_REPORT_FOLDER}"/"osm-deploy-${MODULE}".log done @@ -30,7 +30,7 @@ done for MODULE in 'kafka' 'mongo' 'mysql' 'prometheus' 'zookeeper' 'alertmanager' do echo Saving ${MODULE} logs... - ssh -T -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@${OSM_HOSTNAME} \ + ssh -T -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@${OSM_IP_ADDRESS} \ 'kubectl -n osm logs statefulset/"'${MODULE}'" --all-containers=true 2>&1 | cat' > "${ROBOT_REPORT_FOLDER}"/"osm-sts-${MODULE}".log done diff --git a/cloud-scripts/remote-install-osm.sh b/cloud-scripts/remote-install-osm.sh index 1b91020..f3ed497 100755 --- a/cloud-scripts/remote-install-osm.sh +++ b/cloud-scripts/remote-install-osm.sh @@ -16,7 +16,7 @@ # limitations under the License. ####################################################################################### -ssh -T -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@"${OSM_HOSTNAME}" \ +ssh -T -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@"${OSM_IP_ADDRESS}" \ 'sudo apt-get update -y && sudo apt-get upgrade -y && sudo reboot' sleep 90 @@ -25,7 +25,7 @@ sleep 90 INSTALLER_PARAMETERS="-R ${REPO_BASE} -t ${DOCKER_TAG} -r ${REPO_NAME} -y" echo "INSTALLER_URL: $INSTALLER_URL" echo "INSTALLER_PARAMETERS: $INSTALLER_PARAMETERS" -ssh -T -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@${OSM_HOSTNAME} << EOF 2>&1 +ssh -T -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@${OSM_IP_ADDRESS} << EOF 2>&1 set -eux wget "${INSTALLER_URL}" chmod +x install_osm.sh @@ -35,12 +35,12 @@ EOF # # Installs additional tools for telemetry # set +eux -# ssh -T -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@${OSM_HOSTNAME} 'sudo apt-get install -y sysstat' +# ssh -T -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@${OSM_IP_ADDRESS} 'sudo apt-get install -y sysstat' # set -eux # Gets Juju password from LCM env file set +eux -JUJU_PWD=$(ssh -T -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@${OSM_HOSTNAME} 'kubectl -n osm exec -ti deploy/lcm -- env | grep OSMLCM_VCA_SECRET | cut -d = -f 2') +JUJU_PWD=$(ssh -T -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@${OSM_IP_ADDRESS} 'kubectl -n osm exec -ti deploy/lcm -- env | grep OSMLCM_VCA_SECRET | cut -d = -f 2') set -eux # Updates environment variables and logs them