From 3b9c556254c0ac42aa6bf0edfbe1a2d59327e7ea Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Sat, 20 Sep 2014 12:24:19 -0700 Subject: [PATCH] Add heat api and engine docker boilerplates This adds a directory layout for Heat based on the Glance setup, but does not actually attempt to build functional images at this time. --- docker/heat/heat-api/Dockerfile | 6 ++++ docker/heat/heat-api/start.sh | 5 +++ docker/heat/heat-base/Dockerfile | 10 ++++++ docker/heat/heat-engine/Dockerfile | 6 ++++ docker/heat/heat-engine/start.sh | 40 +++++++++++++++++++++ docker/heat/heat.json | 56 ++++++++++++++++++++++++++++++ 6 files changed, 123 insertions(+) create mode 100644 docker/heat/heat-api/Dockerfile create mode 100644 docker/heat/heat-api/start.sh create mode 100644 docker/heat/heat-base/Dockerfile create mode 100644 docker/heat/heat-engine/Dockerfile create mode 100644 docker/heat/heat-engine/start.sh create mode 100644 docker/heat/heat.json diff --git a/docker/heat/heat-api/Dockerfile b/docker/heat/heat-api/Dockerfile new file mode 100644 index 0000000000..4a7799335d --- /dev/null +++ b/docker/heat/heat-api/Dockerfile @@ -0,0 +1,6 @@ +FROM fedora-rdo-heat-base +MAINTAINER Steven Dake + +ADD ./start.sh /start.sh +CMD ["/start.sh"] + diff --git a/docker/heat/heat-api/start.sh b/docker/heat/heat-api/start.sh new file mode 100644 index 0000000000..9a35a49b94 --- /dev/null +++ b/docker/heat/heat-api/start.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +sh /opt/heat/config-glance.sh api + +exec /usr/bin/heat-api diff --git a/docker/heat/heat-base/Dockerfile b/docker/heat/heat-base/Dockerfile new file mode 100644 index 0000000000..1904d189c6 --- /dev/null +++ b/docker/heat/heat-base/Dockerfile @@ -0,0 +1,10 @@ +FROM fedora-rdo-base +MAINTAINER Steven Dake + +RUN yum -y install \ + openstack-utils \ + openstack-heat && yum clean all + +# These will come after we sort out start time config +#RUN mkdir /opt/heat +#COPY config-heat.sh /opt/heat/config-heat.sh diff --git a/docker/heat/heat-engine/Dockerfile b/docker/heat/heat-engine/Dockerfile new file mode 100644 index 0000000000..49b80e1f66 --- /dev/null +++ b/docker/heat/heat-engine/Dockerfile @@ -0,0 +1,6 @@ +FROM fedora-rdo-base +MAINTAINER Steven Dake + +ADD ./start.sh /start.sh +CMD ["/start.sh"] + diff --git a/docker/heat/heat-engine/start.sh b/docker/heat/heat-engine/start.sh new file mode 100644 index 0000000000..ac95ad3a1d --- /dev/null +++ b/docker/heat/heat-engine/start.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +: ${GLANCE_DB_USER:=heat} +: ${GLANCE_DB_NAME:=heat} +: ${KEYSTONE_AUTH_PROTOCOL:=http} +: ${GLANCE_KEYSTONE_USER:=heat} +: ${ADMIN_TENANT_NAME:=admin} + +if ! [ "$KEYSTONE_ADMIN_TOKEN" ]; then + echo "*** Missing KEYSTONE_ADMIN_TOKEN" >&2 + exit 1 +fi + +if ! [ "$DB_ROOT_PASSWORD" ]; then + echo "*** Missing DB_ROOT_PASSWORD" >&2 + exit 1 +fi + +if ! [ "$GLANCE_DB_PASSWORD" ]; then + GLANCE_DB_PASSWORD=$(openssl rand -hex 15) + export GLANCE_DB_PASSWORD +fi + +sh /opt/heat/config-heat.sh engine + +mysql -h ${MARIADBMASTER_PORT_3306_TCP_ADDR} -u root \ + -p${DB_ROOT_PASSWORD} mysql <