Stop sourcing devtest_undercloud.
Like devtest_seed, we need endpoint details and noproxy settings as outputs from the undercloud script. By moving them into the structured testenvironment file we can query them later without depending on an ever moving set of environment variables. This will also support using pre-running underclouds to run overcloud tests in CI (when we get to that). Change-Id: Ida6beac05c46ab5c7da8a77ae3a14fec5a39a825
This commit is contained in:
parent
dcc8ceab44
commit
c284833ee6
@ -141,6 +141,8 @@ devtest_ramdisk.sh
|
||||
devtest_seed.sh
|
||||
export no_proxy=${no_proxy:-},192.0.2.1
|
||||
source $TRIPLEO_ROOT/tripleo-incubator/seedrc
|
||||
source devtest_undercloud.sh
|
||||
devtest_undercloud.sh $TE_DATAFILE
|
||||
export no_proxy=$no_proxy,$(os-apply-config --type raw -m $TE_DATAFILE --key undercloud.endpointhost)
|
||||
source $TRIPLEO_ROOT/tripleo-incubator/undercloudrc
|
||||
source devtest_overcloud.sh
|
||||
source devtest_end.sh
|
||||
|
@ -114,6 +114,15 @@ fi
|
||||
## #. env-num: An opaque key used by the test environment hosts for identifying
|
||||
## which environment seed images are being copied into.
|
||||
|
||||
## #. undercloud: an object with metadata for connecting to the undercloud in
|
||||
## the environment.
|
||||
|
||||
## #. undercloud.password: The password for the currently deployed undercloud.
|
||||
|
||||
## #. undercloud.endpoint: The Keystone endpoint URL for the undercloud.
|
||||
|
||||
## #. undercloud.endpointhost: The host of the endpoint - used for noproxy settings.
|
||||
|
||||
## XXX: We're currently migrating to that structure - some code still uses
|
||||
## environment variables instead.
|
||||
|
||||
|
@ -4,6 +4,7 @@ set -eu
|
||||
set -o pipefail
|
||||
|
||||
USE_CACHE=${USE_CACHE:-0}
|
||||
TE_DATAFILE=${1:?"A test environment description is required as $$1."}
|
||||
|
||||
### --include
|
||||
## devtest_undercloud
|
||||
@ -66,11 +67,6 @@ export UNDERCLOUD_IP=$(nova list | grep ctlplane | sed -e "s/.*=\\([0-9.]*\\).*
|
||||
|
||||
ssh-keygen -R $UNDERCLOUD_IP
|
||||
|
||||
## #. Source the undercloud configuration:
|
||||
## ::
|
||||
|
||||
source $TRIPLEO_ROOT/tripleo-incubator/undercloudrc
|
||||
|
||||
## #. Exclude the undercloud from proxies:
|
||||
## ::
|
||||
|
||||
@ -78,6 +74,18 @@ set +u #nodocs
|
||||
export no_proxy=$no_proxy,$UNDERCLOUD_IP
|
||||
set -u #nodocs
|
||||
|
||||
## #. Export the undercloud endpoint and credentials to your test environment.
|
||||
## ::
|
||||
|
||||
UNDERCLOUD_ENDPOINT="http://$UNDERCLOUD_IP:5000/v2.0"
|
||||
NEW_JSON=$(jq '.undercloud.password="'${UNDERCLOUD_ADMIN_PASSWORD}'" | .undercloud.endpoint="'${UNDERCLOUD_ENDPOINT}'" | .undercloud.endpointhost="'${UNDERCLOUD_IP}'"' $TE_DATAFILE)
|
||||
echo $NEW_JSON > $TE_DATAFILE
|
||||
|
||||
## #. Source the undercloud configuration:
|
||||
## ::
|
||||
|
||||
source $TRIPLEO_ROOT/tripleo-incubator/undercloudrc
|
||||
|
||||
## #. Perform setup of your undercloud.
|
||||
## ::
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
export NOVA_VERSION=1.1
|
||||
export OS_PASSWORD=$UNDERCLOUD_ADMIN_PASSWORD
|
||||
export OS_AUTH_URL=http://$UNDERCLOUD_IP:5000/v2.0
|
||||
export OS_PASSWORD=$(os-apply-config -m $TE_DATAFILE --type raw --key undercloud.password)
|
||||
export OS_AUTH_URL=$(os-apply-config -m $TE_DATAFILE --type raw --key undercloud.endpoint)
|
||||
export OS_USERNAME=admin
|
||||
export OS_TENANT_NAME=admin
|
||||
export COMPUTE_API_VERSION=1.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user