mkdir -p ${ROBOT_REPORT_FOLDER}
cat <<EOF > ${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
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
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
# 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
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
# # 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