diff options
| author | Sam Yaple <sam@yaple.net> | 2015-08-07 18:53:38 +0000 |
|---|---|---|
| committer | Sam Yaple <sam@yaple.net> | 2015-08-07 18:53:38 +0000 |
| commit | 51e20db747653b67340333fe823a20e6fd8d898c (patch) | |
| tree | 793760ddb8cbdd254b50a8f19c4b91c435fb67cc /docker/common | |
| parent | a5e907a8e91bc4e1d8f563dc79db0ee96c15d380 (diff) | |
| download | kolla-51e20db747653b67340333fe823a20e6fd8d898c.tar.gz kolla-51e20db747653b67340333fe823a20e6fd8d898c.zip | |
Remove config-internal for Heat
Change-Id: I33cf4afbb532c6268bdc2017211ea78733a42fd7
Partially-implements: blueprint remove-config-internal
Diffstat (limited to 'docker/common')
| -rwxr-xr-x | docker/common/heat/heat-api-cfn/check.sh | 16 | ||||
| -rw-r--r--[-rwxr-xr-x] | docker/common/heat/heat-api-cfn/config-external.sh | 0 | ||||
| -rwxr-xr-x | docker/common/heat/heat-api-cfn/config-internal.sh | 32 | ||||
| -rwxr-xr-x | docker/common/heat/heat-api-cfn/start.sh | 2 | ||||
| -rwxr-xr-x | docker/common/heat/heat-api/check.sh | 16 | ||||
| -rw-r--r--[-rwxr-xr-x] | docker/common/heat/heat-api/config-external.sh | 0 | ||||
| -rwxr-xr-x | docker/common/heat/heat-api/config-internal.sh | 33 | ||||
| -rwxr-xr-x | docker/common/heat/heat-api/start.sh | 2 | ||||
| -rwxr-xr-x | docker/common/heat/heat-base/config-heat.sh | 74 | ||||
| -rw-r--r--[-rwxr-xr-x] | docker/common/heat/heat-engine/config-external.sh | 0 | ||||
| -rwxr-xr-x | docker/common/heat/heat-engine/config-internal.sh | 31 | ||||
| -rwxr-xr-x | docker/common/heat/heat-engine/start.sh | 2 |
12 files changed, 3 insertions, 205 deletions
diff --git a/docker/common/heat/heat-api-cfn/check.sh b/docker/common/heat/heat-api-cfn/check.sh deleted file mode 100755 index ee03dc6d2..000000000 --- a/docker/common/heat/heat-api-cfn/check.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -RES=0 - -. /openrc -if ! keystone token-get > /dev/null; then - echo "ERROR: keystone token-get failed" >&2 - RES=1 -else - if ! heat stack-list > /dev/null; then - echo "ERROR: heat stack-list failed" >&2 - RES=1 - fi -fi - -exit $RES diff --git a/docker/common/heat/heat-api-cfn/config-external.sh b/docker/common/heat/heat-api-cfn/config-external.sh index 91d5742f1..91d5742f1 100755..100644 --- a/docker/common/heat/heat-api-cfn/config-external.sh +++ b/docker/common/heat/heat-api-cfn/config-external.sh diff --git a/docker/common/heat/heat-api-cfn/config-internal.sh b/docker/common/heat/heat-api-cfn/config-internal.sh deleted file mode 100755 index 4fce4079c..000000000 --- a/docker/common/heat/heat-api-cfn/config-internal.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -set -e - -. /opt/kolla/kolla-common.sh -. /opt/kolla/config-heat.sh - -check_required_vars ADMIN_TENANT_NAME \ - HEAT_API_CFN_SERVICE_HOST \ - HEAT_API_CFN_SERVICE_PORT \ - HEAT_CFN_KEYSTONE_PASSWORD \ - HEAT_CFN_KEYSTONE_USER \ - KEYSTONE_ADMIN_SERVICE_HOST \ - KEYSTONE_ADMIN_SERVICE_PORT \ - KEYSTONE_ADMIN_TOKEN \ - KEYSTONE_AUTH_PROTOCOL - -fail_unless_os_service_running keystone - -export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}" -export SERVICE_ENDPOINT="${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}/v2.0" - -crux user-create -n ${HEAT_CFN_KEYSTONE_USER} \ - -p ${HEAT_CFN_KEYSTONE_PASSWORD} \ - -t ${ADMIN_TENANT_NAME} \ - -r admin - -crux endpoint-create --remove-all -n ${HEAT_CFN_KEYSTONE_USER} -t cloudformation \ - -I "${KEYSTONE_AUTH_PROTOCOL}://${HEAT_API_CFN_SERVICE_HOST}:${HEAT_API_CFN_SERVICE_PORT}/v1" \ - -P "${KEYSTONE_AUTH_PROTOCOL}://${HEAT_API_CFN_SERVICE_HOST}:${HEAT_API_CFN_SERVICE_PORT}/v1" \ - -A "${KEYSTONE_AUTH_PROTOCOL}://${HEAT_API_CFN_SERVICE_HOST}:${HEAT_API_CFN_SERVICE_PORT}/v1" - -exec /usr/bin/heat-api-cfn diff --git a/docker/common/heat/heat-api-cfn/start.sh b/docker/common/heat/heat-api-cfn/start.sh index 716527c80..54b533185 100755 --- a/docker/common/heat/heat-api-cfn/start.sh +++ b/docker/common/heat/heat-api-cfn/start.sh @@ -7,7 +7,7 @@ ARGS="" # Loading common functions. source /opt/kolla/kolla-common.sh -# Config-internal script exec out of this function, it does not return here. +# Execute config strategy set_configs exec $CMD $ARGS diff --git a/docker/common/heat/heat-api/check.sh b/docker/common/heat/heat-api/check.sh deleted file mode 100755 index ee03dc6d2..000000000 --- a/docker/common/heat/heat-api/check.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -RES=0 - -. /openrc -if ! keystone token-get > /dev/null; then - echo "ERROR: keystone token-get failed" >&2 - RES=1 -else - if ! heat stack-list > /dev/null; then - echo "ERROR: heat stack-list failed" >&2 - RES=1 - fi -fi - -exit $RES diff --git a/docker/common/heat/heat-api/config-external.sh b/docker/common/heat/heat-api/config-external.sh index ca5d73e90..ca5d73e90 100755..100644 --- a/docker/common/heat/heat-api/config-external.sh +++ b/docker/common/heat/heat-api/config-external.sh diff --git a/docker/common/heat/heat-api/config-internal.sh b/docker/common/heat/heat-api/config-internal.sh deleted file mode 100755 index 39acca515..000000000 --- a/docker/common/heat/heat-api/config-internal.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -set -e - -. /opt/kolla/kolla-common.sh -. /opt/kolla/config-heat.sh - -check_required_vars ADMIN_TENANT_NAME \ - HEAT_API_SERVICE_HOST \ - HEAT_KEYSTONE_PASSWORD \ - HEAT_KEYSTONE_USER \ - KEYSTONE_ADMIN_SERVICE_HOST \ - KEYSTONE_ADMIN_TOKEN \ - KEYSTONE_AUTH_PROTOCOL \ - PUBLIC_IP - -fail_unless_os_service_running keystone - -export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}" -export SERVICE_ENDPOINT="${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:35357/v2.0" -crux user-create -n ${HEAT_KEYSTONE_USER} \ - -p ${HEAT_KEYSTONE_PASSWORD} \ - -t ${ADMIN_TENANT_NAME} \ - -r admin - -crux endpoint-create --remove-all -n ${HEAT_KEYSTONE_USER} -t orchestration \ - -I "${KEYSTONE_AUTH_PROTOCOL}://${HEAT_API_SERVICE_HOST}:8004/v1/%(tenant_id)s" \ - -P "${KEYSTONE_AUTH_PROTOCOL}://${PUBLIC_IP}:8004/v1/%(tenant_id)s" \ - -A "${KEYSTONE_AUTH_PROTOCOL}://${HEAT_API_SERVICE_HOST}:8004/v1/%(tenant_id)s" - -# will use crux after https://github.com/larsks/crux/issues/1 is implemented -openstack role list --os-token="${KEYSTONE_ADMIN_TOKEN}" --os-url $SERVICE_ENDPOINT -f csv | tail -n +2 | awk -F, '{print $2}' | grep heat_stack_user || keystone role-create --name heat_stack_user - -exec /usr/bin/heat-api diff --git a/docker/common/heat/heat-api/start.sh b/docker/common/heat/heat-api/start.sh index 6dd14d17e..a7b14b1d9 100755 --- a/docker/common/heat/heat-api/start.sh +++ b/docker/common/heat/heat-api/start.sh @@ -7,7 +7,7 @@ ARGS="" # Loading common functions. source /opt/kolla/kolla-common.sh -# Config-internal script exec out of this function, it does not return here. +# Execute config strategy set_configs exec $CMD $ARGS diff --git a/docker/common/heat/heat-base/config-heat.sh b/docker/common/heat/heat-base/config-heat.sh deleted file mode 100755 index 9b71654aa..000000000 --- a/docker/common/heat/heat-base/config-heat.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash - -set -e - -. /opt/kolla/kolla-common.sh - -check_required_vars HEAT_API_CFN_SERVICE_PORT \ - HEAT_API_CFN_URL_HOST \ - HEAT_DB_PASSWORD \ - HEAT_DOMAIN_PASS \ - HEAT_KEYSTONE_PASSWORD \ - KEYSTONE_PUBLIC_SERVICE_HOST \ - KEYSTONE_PUBLIC_SERVICE_PORT \ - MARIADB_SERVICE_HOST \ - RABBITMQ_SERVICE_HOST - -fail_unless_db -dump_vars - -# this should use the keystone admin port -# https://bugs.launchpad.net/kolla/+bug/1469209 -cat > /openrc <<EOF -export OS_AUTH_URL="http://${KEYSTONE_PUBLIC_SERVICE_HOST}:\ -${KEYSTONE_PUBLIC_SERVICE_PORT}/v2.0" -export OS_USERNAME="${HEAT_KEYSTONE_USER}" -export OS_PASSWORD="${HEAT_KEYSTONE_PASSWORD}" -export OS_TENANT_NAME="${ADMIN_TENANT_NAME}" -EOF - -crudini --set /etc/heat/heat.conf DEFAULT log_file \ - "" -crudini --set /etc/heat/heat.conf DEFAULT use_stderr \ - true -crudini --set /etc/heat/heat.conf DEFAULT rpc_backend \ - heat.openstack.common.rpc.impl_kombu -crudini --set /etc/heat/heat.conf DEFAULT rabbit_host \ - "${RABBITMQ_SERVICE_HOST}" -crudini --set /etc/heat/heat.conf DEFAULT rabbit_userid \ - "${RABBIT_USER}" -crudini --set /etc/heat/heat.conf DEFAULT rabbit_password \ - "${RABBIT_PASSWORD}" - -crudini --set /etc/heat/heat.conf database connection \ - mysql://${HEAT_DB_USER}:${HEAT_DB_PASSWORD}@${MARIADB_SERVICE_HOST}/${HEAT_DB_NAME} - -crudini --set /etc/heat/heat.conf keystone_authtoken auth_protocol \ - "${KEYSTONE_AUTH_PROTOCOL}" -crudini --set /etc/heat/heat.conf keystone_authtoken auth_host \ - "${KEYSTONE_PUBLIC_SERVICE_HOST}" -crudini --set /etc/heat/heat.conf keystone_authtoken auth_port \ - "${KEYSTONE_PUBLIC_SERVICE_PORT}" -crudini --set /etc/heat/heat.conf keystone_authtoken auth_uri \ - "${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_PUBLIC_SERVICE_HOST}:${KEYSTONE_PUBLIC_SERVICE_PORT}/v2.0" -crudini --set /etc/heat/heat.conf keystone_authtoken admin_tenant_name \ - "${ADMIN_TENANT_NAME}" -crudini --set /etc/heat/heat.conf keystone_authtoken admin_user \ - "${HEAT_KEYSTONE_USER}" -crudini --set /etc/heat/heat.conf keystone_authtoken admin_password \ - "${HEAT_KEYSTONE_PASSWORD}" - -crudini --set /etc/heat/heat.conf ec2authtoken auth_uri \ - "${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_PUBLIC_SERVICE_HOST}:${KEYSTONE_PUBLIC_SERVICE_PORT}/v2.0" - -crudini --set /etc/heat/heat.conf DEFAULT heat_metadata_server_url \ - http://${HEAT_API_CFN_URL_HOST}:${HEAT_API_CFN_SERVICE_PORT} -crudini --set /etc/heat/heat.conf DEFAULT heat_waitcondition_server_url \ - http://${HEAT_API_CFN_URL_HOST}:${HEAT_API_CFN_SERVICE_PORT}/v1/waitcondition - -crudini --set /etc/heat/heat.conf DEFAULT stack_domain_admin \ - "heat_domain_admin" -crudini --set /etc/heat/heat.conf DEFAULT stack_domain_admin_password \ - "${HEAT_DOMAIN_PASS}" -crudini --set /etc/heat/heat.conf DEFAULT stack_user_domain_name \ - "heat_user_domain" diff --git a/docker/common/heat/heat-engine/config-external.sh b/docker/common/heat/heat-engine/config-external.sh index bde0ffe0d..bde0ffe0d 100755..100644 --- a/docker/common/heat/heat-engine/config-external.sh +++ b/docker/common/heat/heat-engine/config-external.sh diff --git a/docker/common/heat/heat-engine/config-internal.sh b/docker/common/heat/heat-engine/config-internal.sh deleted file mode 100755 index 90fdfb8d0..000000000 --- a/docker/common/heat/heat-engine/config-internal.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -. /opt/kolla/kolla-common.sh -. /opt/kolla/config-heat.sh -. /openrc - -check_required_vars HEAT_DB_NAME \ - HEAT_DB_PASSWORD \ - HEAT_DB_USER \ - HEAT_DOMAIN_PASS \ - INIT_HEAT_DB -fail_unless_db - -if [ "${INIT_HEAT_DB}" == "true" ]; then - mysql -h ${MARIADB_SERVICE_HOST} -u root -p${DB_ROOT_PASSWORD} mysql <<EOF -CREATE DATABASE IF NOT EXISTS ${HEAT_DB_NAME} DEFAULT CHARACTER SET utf8; -GRANT ALL PRIVILEGES ON ${HEAT_DB_NAME}.* TO - '${HEAT_DB_USER}'@'%' IDENTIFIED BY '${HEAT_DB_PASSWORD}' -EOF - - /usr/bin/heat-manage db_sync - - # If the database needs to be created, assume keystone-setup is allowed to - # run as well. - heat-keystone-setup-domain \ - --stack-user-domain-name heat_user_domain \ - --stack-domain-admin heat_domain_admin \ - --stack-domain-admin-password ${HEAT_DOMAIN_PASS} -fi - -exec /usr/bin/heat-engine diff --git a/docker/common/heat/heat-engine/start.sh b/docker/common/heat/heat-engine/start.sh index 155a0f46c..8f9a6f1cb 100755 --- a/docker/common/heat/heat-engine/start.sh +++ b/docker/common/heat/heat-engine/start.sh @@ -7,7 +7,7 @@ ARGS="" # Loading common functions. source /opt/kolla/kolla-common.sh -# Config-internal script exec out of this function, it does not return here. +# Execute config strategy set_configs # Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases |
