Stop creating userrc_early

We can use the devstack-admin cloud configuration everywhere now
and don't need to set environment variables with cloud credentials
any longer.

Fix the swift setup, where some more options need to be explicitly
specified now and the default OS_CLOUD setting overridden.

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I86ffa9cd52454f1c1c72d29b3a0e0caa3e44b829
This commit is contained in:
Dr. Jens Harbott 2021-11-09 10:57:25 +01:00
parent 55c7830b4b
commit f56f7a557a
No known key found for this signature in database
GPG Key ID: E7862B245C3596B1
2 changed files with 12 additions and 31 deletions

View File

@ -866,12 +866,15 @@ function stop_swift {
function swift_configure_tempurls { function swift_configure_tempurls {
# note we are using swift credentials! # note we are using swift credentials!
OS_USERNAME=swift \ openstack --os-cloud "" \
OS_PASSWORD=$SERVICE_PASSWORD \ --os-region-name $REGION_NAME \
OS_USER_DOMAIN_NAME=$SERVICE_DOMAIN_NAME \ --os-auth-url $KEYSTONE_SERVICE_URI \
OS_PROJECT_NAME=$SERVICE_PROJECT_NAME \ --os-username=swift \
OS_PROJECT_DOMAIN_NAME=$SERVICE_DOMAIN_NAME \ --os-password=$SERVICE_PASSWORD \
openstack object store account \ --os-user-domain-name=$SERVICE_DOMAIN_NAME \
--os-project-name=$SERVICE_PROJECT_NAME \
--os-project-domain-name=$SERVICE_DOMAIN_NAME \
object store account \
set --property "Temp-URL-Key=$SWIFT_TEMPURL_KEY" set --property "Temp-URL-Key=$SWIFT_TEMPURL_KEY"
} }

View File

@ -1063,35 +1063,13 @@ fi
# Keystone # Keystone
# -------- # --------
# Rather than just export these, we write them out to a
# intermediate userrc file that can also be used to debug if
# something goes wrong between here and running
# tools/create_userrc.sh (this script relies on services other
# than keystone being available, so we can't call it right now)
cat > $TOP_DIR/userrc_early <<EOF
# Use this for debugging issues before files in accrc are created
# Set up password auth credentials now that Keystone is bootstrapped
export OS_IDENTITY_API_VERSION=3
export OS_AUTH_URL=$KEYSTONE_SERVICE_URI
export OS_USERNAME=admin
export OS_USER_DOMAIN_ID=default
export OS_PASSWORD=$ADMIN_PASSWORD
export OS_PROJECT_NAME=admin
export OS_PROJECT_DOMAIN_ID=default
export OS_REGION_NAME=$KEYSTONE_REGION_NAME
EOF
if is_service_enabled tls-proxy; then if is_service_enabled tls-proxy; then
echo "export OS_CACERT=$INT_CA_DIR/ca-chain.pem" >> $TOP_DIR/userrc_early
start_tls_proxy http-services '*' 443 $SERVICE_HOST 80 start_tls_proxy http-services '*' 443 $SERVICE_HOST 80
fi fi
source $TOP_DIR/userrc_early # Write a clouds.yaml file and use the devstack-admin cloud
# Write a clouds.yaml file
write_clouds_yaml write_clouds_yaml
export OS_CLOUD=devstack-admin
if is_service_enabled keystone; then if is_service_enabled keystone; then
echo_summary "Starting Keystone" echo_summary "Starting Keystone"
@ -1380,7 +1358,7 @@ fi
# which is helpful in image bundle steps. # which is helpful in image bundle steps.
if is_service_enabled nova && is_service_enabled keystone; then if is_service_enabled nova && is_service_enabled keystone; then
USERRC_PARAMS="-PA --target-dir $TOP_DIR/accrc" USERRC_PARAMS="-PA --target-dir $TOP_DIR/accrc --os-password $ADMIN_PASSWORD"
if [ -f $SSL_BUNDLE_FILE ]; then if [ -f $SSL_BUNDLE_FILE ]; then
USERRC_PARAMS="$USERRC_PARAMS --os-cacert $SSL_BUNDLE_FILE" USERRC_PARAMS="$USERRC_PARAMS --os-cacert $SSL_BUNDLE_FILE"