a82f4dc363
-Very incomplete testing right now -Puts the password and stackrc files in the current user's home directory during the install. Given that they now have secure permissions and we recommend doing that anyway, I think it's fine, but it is a non-trivial change in behavior. This was done because it's awkward to read a root-owned file from a Python process running as a regular user. -Uses oslo.config instead of the bash-style answers file. A sample conf file created by the oslo.config generator is included (for now, although we may want to generate that dynamically at some point). Backwards compatibility with existing answers files is maintained for now, but is deprecated. -Hard-codes the image path in instack-test-overcloud to . It's difficult to extract the value from the conf file in bash (unless they overrode the default, there's nothing for ConfigParser to read), and since it's just a simple sanity test script I think that's okay, at least for now. Change-Id: I09270997dea7fdad2b40dfb303967ff425b55a9b
33 lines
890 B
Bash
Executable File
33 lines
890 B
Bash
Executable File
#!/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 |