aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
Diffstat (limited to 'docker')
-rw-r--r--docker/heat/heat-api/Dockerfile6
-rw-r--r--docker/heat/heat-api/start.sh5
-rw-r--r--docker/heat/heat-base/Dockerfile10
-rw-r--r--docker/heat/heat-engine/Dockerfile6
-rw-r--r--docker/heat/heat-engine/start.sh40
-rw-r--r--docker/heat/heat.json56
6 files changed, 123 insertions, 0 deletions
diff --git a/docker/heat/heat-api/Dockerfile b/docker/heat/heat-api/Dockerfile
new file mode 100644
index 000000000..4a7799335
--- /dev/null
+++ b/docker/heat/heat-api/Dockerfile
@@ -0,0 +1,6 @@
+FROM fedora-rdo-heat-base
+MAINTAINER Steven Dake <sdake@redhat.com>
+
+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 000000000..9a35a49b9
--- /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 000000000..1904d189c
--- /dev/null
+++ b/docker/heat/heat-base/Dockerfile
@@ -0,0 +1,10 @@
+FROM fedora-rdo-base
+MAINTAINER Steven Dake <sdake@redhat.com>
+
+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 000000000..49b80e1f6
--- /dev/null
+++ b/docker/heat/heat-engine/Dockerfile
@@ -0,0 +1,6 @@
+FROM fedora-rdo-base
+MAINTAINER Steven Dake <sdake@redhat.com>
+
+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 000000000..ac95ad3a1
--- /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 <<EOF
+CREATE DATABASE IF NOT EXISTS ${GLANCE_DB_NAME};
+GRANT ALL PRIVILEGES ON heat* TO
+ '${GLANCE_DB_USER}'@'%' IDENTIFIED BY '${GLANCE_DB_PASSWORD}'
+EOF
+
+export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}"
+export SERVICE_ENDPOINT="${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONEMASTER_35357_PORT_35357_TCP_ADDR}:35357/v2.0"
+
+/bin/keystone user-create --name ${GLANCE_KEYSTONE_USER} --pass ${GLANCE_ADMIN_PASSWORD}
+/bin/keystone role-create --name ${GLANCE_KEYSTONE_USER}
+/bin/keystone user-role-add --user ${GLANCE_KEYSTONE_USER} --role admin --tenant ${ADMIN_TENANT_NAME}
+
+exec /usr/bin/heat-engine
diff --git a/docker/heat/heat.json b/docker/heat/heat.json
new file mode 100644
index 000000000..ca4fd0854
--- /dev/null
+++ b/docker/heat/heat.json
@@ -0,0 +1,56 @@
+{
+ "id": "heat",
+ "desiredState": {
+ "manifest": {
+ "version": "v1beta1",
+ "id": "heat-1",
+ "containers": [
+ {
+ "name": "heat-engine",
+ "image": "fedora-rdo-heat-engine",
+ "ports": [
+ {"containerPort": 9292},
+ ],
+ "env": [
+ {
+ "name": "DB_ROOT_PASSWORD",
+ "value": "password"
+ },
+ {
+ "name": "HEAT_DB_PASSWORD",
+ "value": "heatdbpassword"
+ },
+ {
+ "name": "KEYSTONE_ADMIN_TOKEN",
+ "value": "ADMINTOKEN"
+ },
+ ]
+ },
+ {
+ "name": "heat-api",
+ "image": "fedora-rdo-heat-api",
+ "ports": [
+ {"containerPort": 9292},
+ ],
+ "env": [
+ {
+ "name": "DB_ROOT_PASSWORD",
+ "value": "password"
+ },
+ {
+ "name": "HEAT_DB_PASSWORD",
+ "value": "heatdbpassword"
+ },
+ {
+ "name": "KEYSTONE_ADMIN_TOKEN",
+ "value": "ADMINTOKEN"
+ },
+ ]
+ },
+ ]
+ }
+ },
+ "labels": {
+ "name": "keystone-master"
+ }
+}