From 1931a016b06dd1c1b18dc0328497d19d16f024ac Mon Sep 17 00:00:00 2001
From: Lars Kellogg-Stedman <lars@redhat.com>
Date: Fri, 3 Oct 2014 10:26:18 -0400
Subject: [PATCH] Using new fedora base image from kollaglue

Change-Id: I388113e5a9c748054a099ef1a3063863120e9a99
---
 docker/heat/heat-api/Dockerfile | 14 +++++++++++---
 docker/heat/heat-api/start.sh   | 12 ++++++++++--
 2 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/docker/heat/heat-api/Dockerfile b/docker/heat/heat-api/Dockerfile
index 4a7799335d..44ff6ed93e 100644
--- a/docker/heat/heat-api/Dockerfile
+++ b/docker/heat/heat-api/Dockerfile
@@ -1,6 +1,14 @@
-FROM fedora-rdo-heat-base
-MAINTAINER Steven Dake <sdake@redhat.com>
+FROM kollaglue/fedora-rdo-base
+MAINTAINER James Labocki <jlabocki@redhat.com>
+
+RUN yum install -y openstack-heat-api \
+	openstack-heat-api-cfn \
+	openstack-heat-common \
+	openstack-heat-api-cloudwatch \
+	openstack-utils \
+	python-openstackclient \
+	&& yum clean all
 
 ADD ./start.sh /start.sh
-CMD ["/start.sh"]
 
+CMD ["/start.sh"]
diff --git a/docker/heat/heat-api/start.sh b/docker/heat/heat-api/start.sh
index 9a35a49b94..8f73ae3e27 100644
--- a/docker/heat/heat-api/start.sh
+++ b/docker/heat/heat-api/start.sh
@@ -1,5 +1,13 @@
-#!/bin/sh
+#!/bin/bash
+set -e
+
+: ${IP_ADDRESS:=$IP_ADDRESS}
+
+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
 
-sh /opt/heat/config-glance.sh api
 
 exec /usr/bin/heat-api