Generate overcloudrc in instack-deploy-overcloud
It's highly unlikely anyone won't want an overcloudrc file after deployment, so just create one in instack-deploy-overcloud. This also allows us to remove some obsolete or duplicate logic. Change-Id: Idc46c991ebddeb7572b6ec8778dabff37900ced2
This commit is contained in:
parent
6787f9be89
commit
7f27a30433
@ -46,13 +46,15 @@ Deploy the the *openstack-full* image (default of 1 compute and 1 control)::
|
||||
Working with the Overcloud
|
||||
--------------------------
|
||||
|
||||
To generate an appropriate rc file for interacting the overcloud, run::
|
||||
``instack-deploy-overcloud`` generates an overcloudrc file appropriate for
|
||||
interacting with the deployed overcloud in the current user's home directory.
|
||||
To use it, simply source the file::
|
||||
|
||||
instack-create-overcloudrc
|
||||
source ~/overcloudrc
|
||||
|
||||
This will create an `overcloudrc` file in the current user's home directory
|
||||
which can be sourced to set up the client environment for the overcloud.
|
||||
To return to working with the undercloud, source the stackrc file again::
|
||||
|
||||
source ~/stackrc
|
||||
|
||||
Redeploying the Overcloud
|
||||
-------------------------
|
||||
|
@ -259,12 +259,6 @@ tripleo wait_for_stack_ready 220 10 overcloud
|
||||
|
||||
echo "Overcloud CREATE_COMPLETE"
|
||||
|
||||
if [ -d /etc/tripleo ]; then
|
||||
TRIPLEO_ROOT=/etc/tripleo
|
||||
else
|
||||
TRIPLEO_ROOT=$INSTACK_ROOT/tripleo-incubator
|
||||
fi
|
||||
|
||||
OVERCLOUD_ENDPOINT=$(heat output-show overcloud KeystoneURL|sed 's/^"\(.*\)"$/\1/')
|
||||
export OVERCLOUD_IP=$(echo $OVERCLOUD_ENDPOINT | awk -F '[/:]' '{print $4}')
|
||||
|
||||
@ -272,15 +266,17 @@ touch ~/.ssh/known_hosts
|
||||
chmod 600 ~/.ssh/known_hosts
|
||||
ssh-keygen -R $OVERCLOUD_IP
|
||||
|
||||
export no_proxy=${no_proxy:-""}
|
||||
export no_proxy=$no_proxy,$OVERCLOUD_IP
|
||||
|
||||
NEW_JSON=$(jq '.overcloud.password="'${OVERCLOUD_ADMIN_PASSWORD}'" | .overcloud.endpoint="'${OVERCLOUD_ENDPOINT}'" | .overcloud.endpointhost="'${OVERCLOUD_IP}'"' $NODES_JSON)
|
||||
|
||||
echo $NEW_JSON > $NODES_JSON
|
||||
|
||||
export TE_DATAFILE=$NODES_JSON
|
||||
source $TRIPLEO_ROOT/overcloudrc
|
||||
|
||||
# We're done with TRIPLEO_ROOT at this point, and the value set above doesn't
|
||||
# work for creating the overcloudrc file.
|
||||
unset TRIPLEO_ROOT
|
||||
instack-create-overcloudrc
|
||||
source ~/overcloudrc
|
||||
|
||||
init-keystone -o $OVERCLOUD_IP -t $OVERCLOUD_ADMIN_TOKEN \
|
||||
-e admin.example.com -p $OVERCLOUD_ADMIN_PASSWORD -u heat-admin \
|
||||
|
Loading…
Reference in New Issue
Block a user