diff options
| author | Jeff Peeler <jpeeler@redhat.com> | 2014-10-14 11:44:30 -0400 |
|---|---|---|
| committer | Jeff Peeler <jpeeler@redhat.com> | 2014-10-20 17:35:41 -0400 |
| commit | 40ba2909d8f470a48221fa7f005ea3f2dfdf8704 (patch) | |
| tree | 6716e2bb0957000102a979e8987a041c4ecf05f7 /docker/heat/heat-api/start.sh | |
| parent | ad615338cc141105253f772315a5905a86c91a42 (diff) | |
| download | kolla-40ba2909d8f470a48221fa7f005ea3f2dfdf8704.tar.gz kolla-40ba2909d8f470a48221fa7f005ea3f2dfdf8704.zip | |
Implement containers for heat-engine and heat-api
Loosely followed this document for setting up Heat:
http://docs.openstack.org/icehouse/install-guide/install/yum/content/heat-install.html
Some gotchas:
- crux doesn't require escaping parenthesis for endpoint creation like
keystone client
- heat icehouse packages are configured for qpid, so kombu had to be
specified specifically
This firewall reference was handy for port information:
http://docs.openstack.org/trunk/config-reference/content/firewalls-default-ports.html
Implements: blueprint kube-heat-container
Change-Id: Ie4291a6c4c2b85a23a71fc0a003d9160bf0a32b8
Diffstat (limited to 'docker/heat/heat-api/start.sh')
| -rwxr-xr-x[-rw-r--r--] | docker/heat/heat-api/start.sh | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/docker/heat/heat-api/start.sh b/docker/heat/heat-api/start.sh index 8f73ae3e2..b6565c207 100644..100755 --- a/docker/heat/heat-api/start.sh +++ b/docker/heat/heat-api/start.sh @@ -1,13 +1,34 @@ #!/bin/bash set -e -: ${IP_ADDRESS:=$IP_ADDRESS} +. /opt/kolla/kolla-common.sh +. /opt/kolla/config-heat.sh -if [ -z "$IP_ADDRESS" ]; then - echo >&2 'error: IP_ADDRESS is not set.' - echo >&2 ' Be sure to set IP_ADDRESS so it can be placed in heat configurations' - exit 1 -fi +check_required_vars KEYSTONE_ADMIN_TOKEN KEYSTONE_ADMIN_SERVICE_HOST \ + HEAT_KEYSTONE_USER HEAT_KEYSTONE_PASSWORD \ + KEYSTONE_AUTH_PROTOCOL ADMIN_TENANT_NAME \ + HEAT_API_SERVICE_HOST PUBLIC_IP +check_for_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" + +#crux endpoint-create --remove-all -n ${HEAT_KEYSTONE_USER} -t cloudformation \ +# -I "http://${HEAT_CFN_API_SERVICE_HOST}:8000/v1" \ +# -P "http://${PUBLIC_IP}:8000/v1" \ +# -A "http://${HEAT_CFN_API_SERVICE_HOST}:8000/v1" + +# 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 |
