Set OS_CLOUD instead in stackrc
We now write clouds.yaml when configuring keystone and can use OS_CLOUD instead. Setting OS_AUTH_URL overrides when we want use OS_CLOUD pointing to overcloud. Closes-bug: #1931172 Depends-On: https://review.opendev.org/c/openstack/tripleo-common/+/795225 Depends-On: https://review.opendev.org/c/openstack/tripleo-validations/+/795293 Change-Id: Ib42fc397389d8b50c740edf334fe6f281c392ec6
This commit is contained in:
parent
7f36a91785
commit
454b45c7d2
extraconfig/post_deploy
@ -2,6 +2,7 @@
|
||||
set -eux
|
||||
|
||||
HOMEDIR="$homedir"
|
||||
CLOUD_NAME="$cloud_name"
|
||||
USERNAME=`ls -ld $HOMEDIR | awk {'print $3'}`
|
||||
GROUPNAME=`ls -ld $HOMEDIR | awk {'print $4'}`
|
||||
|
||||
@ -12,32 +13,14 @@ chmod 0600 $HOMEDIR/stackrc
|
||||
cat > $HOMEDIR/stackrc <<-EOF_CAT
|
||||
# Clear any old environment that may conflict.
|
||||
for key in \$( set | awk -F= '/^OS_/ {print \$1}' ); do unset "\${key}" ; done
|
||||
|
||||
export OS_AUTH_TYPE=password
|
||||
export OS_PASSWORD=$admin_password
|
||||
export OS_AUTH_URL=$auth_url
|
||||
export OS_USERNAME=admin
|
||||
export OS_PROJECT_NAME=admin
|
||||
export COMPUTE_API_VERSION=1.1
|
||||
export NOVA_VERSION=1.1
|
||||
export OS_NO_CACHE=True
|
||||
export OS_CLOUDNAME=undercloud
|
||||
export OS_IDENTITY_API_VERSION='3'
|
||||
export OS_PROJECT_DOMAIN_NAME='Default'
|
||||
export OS_USER_DOMAIN_NAME='Default'
|
||||
export OS_CLOUD=$CLOUD_NAME
|
||||
EOF_CAT
|
||||
|
||||
if [ -n "$internal_tls_ca_file" ]; then
|
||||
cat >> $HOMEDIR/stackrc <<-EOF_CAT
|
||||
export OS_CACERT="$internal_tls_ca_file"
|
||||
EOF_CAT
|
||||
fi
|
||||
|
||||
cat >> $HOMEDIR/stackrc <<-"EOF_CAT"
|
||||
# Add OS_CLOUDNAME to PS1
|
||||
if [ -z "${CLOUDPROMPT_ENABLED:-}" ]; then
|
||||
export PS1=${PS1:-""}
|
||||
export PS1=\${OS_CLOUDNAME:+"(\$OS_CLOUDNAME)"}\ $PS1
|
||||
export PS1=\${OS_CLOUD:+"(\$OS_CLOUD)"}\ $PS1
|
||||
export CLOUDPROMPT_ENABLED=1
|
||||
fi
|
||||
EOF_CAT
|
||||
|
@ -115,17 +115,14 @@ conditions:
|
||||
- tls_enabled
|
||||
|
||||
resources:
|
||||
|
||||
UndercloudPostConfig:
|
||||
type: OS::Heat::SoftwareConfig
|
||||
properties:
|
||||
group: script
|
||||
inputs:
|
||||
- name: deploy_identifier
|
||||
- name: admin_password
|
||||
- name: auth_url
|
||||
- name: internal_tls_ca_file
|
||||
- name: ssl_certificate
|
||||
- name: cloud_name
|
||||
- name: homedir
|
||||
config: {get_file: ./undercloud_post.sh}
|
||||
|
||||
UndercloudPostDeployment:
|
||||
@ -136,15 +133,8 @@ resources:
|
||||
config: {get_resource: UndercloudPostConfig}
|
||||
input_values:
|
||||
ssl_certificate: {get_param: SSLCertificate}
|
||||
homedir: {get_param: UndercloudHomeDir}
|
||||
admin_password: {get_param: AdminPassword}
|
||||
cloud_name: {get_param: UndercloudCloudName}
|
||||
internal_tls_ca_file:
|
||||
if:
|
||||
- ca_file_enabled
|
||||
- {get_param: InternalTLSCAFile}
|
||||
- ''
|
||||
auth_url: {get_param: [EndpointMap, KeystonePublic, uri_no_suffix]}
|
||||
homedir: {get_param: UndercloudHomeDir}
|
||||
|
||||
UndercloudPostPyConfig:
|
||||
type: OS::Heat::SoftwareConfig
|
||||
|
Loading…
x
Reference in New Issue
Block a user