aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Dake <stdake@cisco.com>2015-03-19 22:11:31 -0700
committerSteven Dake <stdake@cisco.com>2015-03-20 10:21:29 -0700
commit71576f4e420b9147917469f1ff26018435da80ac (patch)
treecba475b510566fddca8518a6e20bbe9bcf10b3b7
parentdbddef4f7840caed6cf79eb39f721e1f29426481 (diff)
downloadkolla-71576f4e420b9147917469f1ff26018435da80ac.tar.gz
kolla-71576f4e420b9147917469f1ff26018435da80ac.zip
Make the Horizon dashboard work properly
The Horizon dashboard was not working properly prior to this work. Also a docker-compose file was added to start the dashboard. Change-Id: I8a438c15b967b0cec00bfe44b997f833bf745191
-rw-r--r--compose/horizon.yml7
-rw-r--r--docker/horizon/Dockerfile4
-rwxr-xr-xdocker/horizon/start.sh8
-rwxr-xr-xtools/start3
4 files changed, 17 insertions, 5 deletions
diff --git a/compose/horizon.yml b/compose/horizon.yml
new file mode 100644
index 000000000..f2767005c
--- /dev/null
+++ b/compose/horizon.yml
@@ -0,0 +1,7 @@
+horizon:
+ image: kollaglue/centos-rdo-horizon
+ name: horizon
+ net: "host"
+ restart: always
+ env_file:
+ - openstack.env
diff --git a/docker/horizon/Dockerfile b/docker/horizon/Dockerfile
index d05d07f2a..eafff2faa 100644
--- a/docker/horizon/Dockerfile
+++ b/docker/horizon/Dockerfile
@@ -1,8 +1,8 @@
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base
MAINTAINER Kolla Project (https://launchpad.net/kolla)
-RUN yum -y install \
- openstack-dashboard && yum clean all
+RUN yum -y install openstack-dashboard \
+ httpd httpd-mod-wsgi && yum clean all
EXPOSE 80
diff --git a/docker/horizon/start.sh b/docker/horizon/start.sh
index 01b1405e7..5f65f72fe 100755
--- a/docker/horizon/start.sh
+++ b/docker/horizon/start.sh
@@ -8,14 +8,16 @@ set -e
check_for_keystone
check_for_glance
check_for_nova
-check_for_neutron
+
+export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}"
+export SERVICE_ENDPOINT="${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:35357/v2.0"
cfg=/etc/openstack-dashboard/local_settings
-sed -ri 's/#ALLOWED_HOSTS = \['\''horizon.example.com'\'', '\''localhost'\''\]/ALLOWED_HOSTS = \['\''*'\'', \]/' /etc/openstack-dashboard/local_settings
+sed -ri 's/ALLOWED_HOSTS = \['\''horizon.example.com'\'', '\''localhost'\''\]/ALLOWED_HOSTS = \['\''*'\'', \]/' /etc/openstack-dashboard/local_settings
sed -ri 's/OPENSTACK_KEYSTONE_URL = \"http:\/\/%s:5000\/v2.0\" % OPENSTACK_HOST/OPENSTACK_KEYSTONE_URL = \"http:\/\/'"$KEYSTONE_PUBLIC_SERVICE_HOST"':5000\/v2.0\"/' /etc/openstack-dashboard/local_settings
sed -ri 's/OPENSTACK_HOST = \"127.0.0.1\"/OPENSTACK_HOST = \"'"$KEYSTONE_PUBLIC_SERVICE_HOST"'\" /' /etc/openstack-dashboard/local_settings
-/bin/keystone role-create --name ${HORIZON_KEYSTONE_USER}
+/usr/sbin/httpd -DFOREGROUND
diff --git a/tools/start b/tools/start
index 79527b2e5..2d8369463 100755
--- a/tools/start
+++ b/tools/start
@@ -49,6 +49,9 @@ docker-compose -f ./compose/nova-compute-network.yml up -d
echo Starting heat.
docker-compose -f ./compose/heat-api-engine.yml up -d
+echo Starting Horizon.
+docker-compose -f ./compose/horizon.yml up -d
+
IMAGE_URL=http://download.cirros-cloud.net/0.3.3/
IMAGE=cirros-0.3.3-x86_64-disk.img
if ! [ -f "$IMAGE" ]; then