summaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-09-22 04:00:28 +0000
committerGerrit Code Review <review@openstack.org>2016-09-22 04:00:28 +0000
commitce3abeb0ebd3ef682315cc4d76db32cffb083248 (patch)
tree434fa5b67efef7963961072f85cbaa06dcb7fea2 /docker
parenta2c6eefdde5f334ea43e36fba2acad4cd23a6046 (diff)
parentd3f65a812f807cda9f27af0cf808de8be8acacf6 (diff)
downloadkolla-ce3abeb0ebd3ef682315cc4d76db32cffb083248.tar.gz
kolla-ce3abeb0ebd3ef682315cc4d76db32cffb083248.zip
Merge "Allow use of database for Horizon sessions"
Diffstat (limited to 'docker')
-rw-r--r--docker/horizon/extend_start.sh11
-rw-r--r--docker/openstack-base/Dockerfile.j21
2 files changed, 12 insertions, 0 deletions
diff --git a/docker/horizon/extend_start.sh b/docker/horizon/extend_start.sh
index a34d33f52..51be17405 100644
--- a/docker/horizon/extend_start.sh
+++ b/docker/horizon/extend_start.sh
@@ -1,5 +1,16 @@
#!/bin/bash
+# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
+# of the KOLLA_BOOTSTRAP variable being set, including empty.
+if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
+ MANAGE_PY="/usr/bin/python /usr/bin/manage.py"
+ if [[ -f "/var/lib/kolla/venv/bin/python" ]]; then
+ MANAGE_PY="/var/lib/kolla/venv/bin/python /var/lib/kolla/venv/bin/manage.py"
+ fi
+ $MANAGE_PY syncdb --noinput
+ exit 0
+fi
+
# NOTE(pbourke): httpd will not clean up after itself in some cases which
# results in the container not being able to restart. (bug #1489676, 1557036)
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
diff --git a/docker/openstack-base/Dockerfile.j2 b/docker/openstack-base/Dockerfile.j2
index bb42093db..cdfe6131c 100644
--- a/docker/openstack-base/Dockerfile.j2
+++ b/docker/openstack-base/Dockerfile.j2
@@ -199,6 +199,7 @@ ENV DEBIAN_FRONTEND noninteractive
'libxslt-devel',
'libyaml-devel',
'MariaDB-devel',
+ 'MySQL-python',
'openldap-devel',
'openssl-devel',
'postgresql',