Merge "Add support for creating heat stack domain"
This commit is contained in:
commit
cf3203b6ae
20
lib/heat
20
lib/heat
@ -110,6 +110,15 @@ function configure_heat() {
|
|||||||
iniset $HEAT_CONF ec2authtoken auth_uri $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v2.0
|
iniset $HEAT_CONF ec2authtoken auth_uri $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v2.0
|
||||||
iniset $HEAT_CONF ec2authtoken keystone_ec2_uri $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v2.0/ec2tokens
|
iniset $HEAT_CONF ec2authtoken keystone_ec2_uri $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v2.0/ec2tokens
|
||||||
|
|
||||||
|
# stack user domain
|
||||||
|
# Note we have to pass token/endpoint here because the current endpoint and
|
||||||
|
# version negotiation in OSC means just --os-identity-api-version=3 won't work
|
||||||
|
KS_ENDPOINT_V3="$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v3"
|
||||||
|
D_ID=$(openstack --os-token $OS_SERVICE_TOKEN --os-url=$KS_ENDPOINT_V3 \
|
||||||
|
--os-identity-api-version=3 domain show heat \
|
||||||
|
| grep ' id ' | get_field 2)
|
||||||
|
iniset $HEAT_CONF stack_user_domain ${D_ID}
|
||||||
|
|
||||||
# paste_deploy
|
# paste_deploy
|
||||||
[[ "$HEAT_STANDALONE" = "True" ]] && iniset $HEAT_CONF paste_deploy flavor standalone
|
[[ "$HEAT_STANDALONE" = "True" ]] && iniset $HEAT_CONF paste_deploy flavor standalone
|
||||||
|
|
||||||
@ -196,6 +205,17 @@ function disk_image_create {
|
|||||||
upload_image "http://localhost/$output.qcow2" $TOKEN
|
upload_image "http://localhost/$output.qcow2" $TOKEN
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# create_heat_accounts() - Set up common required heat accounts
|
||||||
|
# Note this is in addition to what is in files/keystone_data.sh
|
||||||
|
function create_heat_accounts() {
|
||||||
|
# Note we have to pass token/endpoint here because the current endpoint and
|
||||||
|
# version negotiation in OSC means just --os-identity-api-version=3 won't work
|
||||||
|
KS_ENDPOINT_V3="$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v3"
|
||||||
|
openstack --os-token $OS_SERVICE_TOKEN --os-url=$KS_ENDPOINT_V3 \
|
||||||
|
--os-identity-api-version=3 domain create heat \
|
||||||
|
--description "Owns users and projects created by heat"
|
||||||
|
}
|
||||||
|
|
||||||
# Restore xtrace
|
# Restore xtrace
|
||||||
$XTRACE
|
$XTRACE
|
||||||
|
|
||||||
|
4
stack.sh
4
stack.sh
@ -941,6 +941,10 @@ if is_service_enabled key; then
|
|||||||
create_swift_accounts
|
create_swift_accounts
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if is_service_enabled heat; then
|
||||||
|
create_heat_accounts
|
||||||
|
fi
|
||||||
|
|
||||||
# ``keystone_data.sh`` creates services, admin and demo users, and roles.
|
# ``keystone_data.sh`` creates services, admin and demo users, and roles.
|
||||||
ADMIN_PASSWORD=$ADMIN_PASSWORD SERVICE_TENANT_NAME=$SERVICE_TENANT_NAME SERVICE_PASSWORD=$SERVICE_PASSWORD \
|
ADMIN_PASSWORD=$ADMIN_PASSWORD SERVICE_TENANT_NAME=$SERVICE_TENANT_NAME SERVICE_PASSWORD=$SERVICE_PASSWORD \
|
||||||
SERVICE_TOKEN=$SERVICE_TOKEN SERVICE_ENDPOINT=$SERVICE_ENDPOINT SERVICE_HOST=$SERVICE_HOST \
|
SERVICE_TOKEN=$SERVICE_TOKEN SERVICE_ENDPOINT=$SERVICE_ENDPOINT SERVICE_HOST=$SERVICE_HOST \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user