#!/bin/bash set -eu set -o pipefail OS_AUTH_URL=${OS_AUTH_URL:-""} if [ -z "$OS_AUTH_URL" ]; then echo "You must source a stackrc file for the Undercloud." exit 1 fi export TRIPLEO_ROOT=${TRIPLEO_ROOT:-"/etc/tripleo"} export NODES_JSON=${NODES_JSON:-"instackenv.json"} export TE_DATAFILE=$NODES_JSON source tripleo-overcloud-passwords OVERCLOUD_ENDPOINT=$(heat output-show overcloud KeystoneURL|sed 's/^"\(.*\)"$/\1/') export OVERCLOUD_IP=$(echo $OVERCLOUD_ENDPOINT | awk -F '[/:]' '{print $4}') source $TRIPLEO_ROOT/overcloudrc cat > ~/overcloudrc << EOF export NOVA_VERSION=$NOVA_VERSION export COMPUTE_API_VERSION=$COMPUTE_API_VERSION export OS_PASSWORD=$OS_PASSWORD export OS_AUTH_URL=$OS_AUTH_URL export OS_USERNAME=$OS_USERNAME export OS_TENANT_NAME=$OS_TENANT_NAME export OS_NO_CACHE=True export OS_CLOUDNAME=overcloud export no_proxy=${no_proxy:-''},$OVERCLOUD_IP EOF