aboutsummaryrefslogtreecommitdiff
path: root/docker/horizon
diff options
context:
space:
mode:
Diffstat (limited to 'docker/horizon')
-rw-r--r--docker/horizon/Dockerfile11
l---------docker/horizon/build1
-rwxr-xr-xdocker/horizon/start.sh23
3 files changed, 35 insertions, 0 deletions
diff --git a/docker/horizon/Dockerfile b/docker/horizon/Dockerfile
new file mode 100644
index 000000000..71785aad0
--- /dev/null
+++ b/docker/horizon/Dockerfile
@@ -0,0 +1,11 @@
+FROM kollaglue/fedora-rdo-base
+MAINTAINER Kolla Project (https://launchpad.net/kolla)
+
+RUN yum -y install \
+ openstack-dashboard && yum clean all
+
+EXPOSE 80
+
+ADD ./start.sh /start.sh
+
+CMD ["/start.sh"]
diff --git a/docker/horizon/build b/docker/horizon/build
new file mode 120000
index 000000000..d2accf7d3
--- /dev/null
+++ b/docker/horizon/build
@@ -0,0 +1 @@
+../../tools/build-docker-image \ No newline at end of file
diff --git a/docker/horizon/start.sh b/docker/horizon/start.sh
new file mode 100755
index 000000000..d51cac655
--- /dev/null
+++ b/docker/horizon/start.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+set -e
+
+: ${HORIZON_KEYSTONE_USER:=horizon}
+
+. /opt/kolla/kolla-common.sh
+
+check_required_vars HORIZON_KEYSTONE_USER
+
+check_for_keystone
+check_for_glance
+check_for_nova
+check_for_neutron
+
+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/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}