diff options
| author | Jenkins <jenkins@review.openstack.org> | 2014-11-26 20:55:10 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2014-11-26 20:55:10 +0000 |
| commit | a3d88c1a61c9943ba525eb94d990a69d283b0054 (patch) | |
| tree | f29ca33fc4e25294d04759fedcea56f946e59fd9 /docker | |
| parent | 6bd1f5a3a70b00d69806314812376257980ed0b4 (diff) | |
| parent | fdb5c77a9051f580cb02f868d83254af0385b39e (diff) | |
| download | kolla-a3d88c1a61c9943ba525eb94d990a69d283b0054.tar.gz kolla-a3d88c1a61c9943ba525eb94d990a69d283b0054.zip | |
Merge "Horizon container implementation"
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/fedora-rdo-base/kolla-common.sh | 28 | ||||
| -rw-r--r-- | docker/horizon/Dockerfile | 11 | ||||
| l--------- | docker/horizon/build | 1 | ||||
| -rwxr-xr-x | docker/horizon/start.sh | 23 |
4 files changed, 63 insertions, 0 deletions
diff --git a/docker/fedora-rdo-base/kolla-common.sh b/docker/fedora-rdo-base/kolla-common.sh index b625588b3..b917ebd68 100644 --- a/docker/fedora-rdo-base/kolla-common.sh +++ b/docker/fedora-rdo-base/kolla-common.sh @@ -44,6 +44,34 @@ check_for_keystone() { echo "keystone is active @ $KEYSTONE_URL" } +# Exit unless we receive a successful response from the Nova API. +check_for_nova() { + check_required_vars NOVA_API_SERVICE_HOST + + NOVA_API_URL="http://${NOVA_API_SERVICE_HOST}:8774" + + curl -sf -o /dev/null "$NOVA_API_URL" || { + echo "ERROR: nova is not available @ $NOVA_API_URL" >&2 + exit 1 + } + + echo "nova is active @ $NOVA_API_URL" +} + +# Exit unless we receive a successful response from the Neutron API. +check_for_neutron() { + check_required_vars NEUTRON_API_SERVICE_HOST + + NEUTRON_API_URL="http://${NEUTRON_SERVER_SERVICE_HOST}:9696" + + curl -sf -o /dev/null "$NEUTRON_API_URL" || { + echo "ERROR: neutron is not available @ $NEUTRON_API_URL" >&2 + exit 1 + } + + echo "neutron is active @ $NEUTRON_API_URL" +} + # Exit unless we receive a successful response from the database server. check_for_db() { check_required_vars MARIADB_SERVICE_HOST DB_ROOT_PASSWORD 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} |
