diff options
| author | Ryan Hallisey <rhallise@redhat.com> | 2014-11-19 18:14:42 -0500 |
|---|---|---|
| committer | Ryan Hallisey <rhallise@redhat.com> | 2014-11-24 17:09:29 -0500 |
| commit | fdb5c77a9051f580cb02f868d83254af0385b39e (patch) | |
| tree | afbdb5b206ffa4aba4c34e7d7b2d53ad56984489 /docker/fedora-rdo-base | |
| parent | 1520f41a653b947817bbe2ca9c8910fb11ed538b (diff) | |
| download | kolla-fdb5c77a9051f580cb02f868d83254af0385b39e.tar.gz kolla-fdb5c77a9051f580cb02f868d83254af0385b39e.zip | |
Horizon container implementation
Horizon requires that Nova, Neutron(Nova Network), Glance,
and Keystone are running. Therefore, the container needs to
check for the availablity of each service on startup.
The config file is not a .ini file, but rather a python file
so it requires using sed instead of crudini.
Change-Id: I5ed14514881fe9aef688ca08bcb94881ef5b25cb
Diffstat (limited to 'docker/fedora-rdo-base')
| -rw-r--r-- | docker/fedora-rdo-base/kolla-common.sh | 28 |
1 files changed, 28 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 |
