From d3f65a812f807cda9f27af0cf808de8be8acacf6 Mon Sep 17 00:00:00 2001 From: Paul Bourke Date: Thu, 8 Sep 2016 12:49:02 +0100 Subject: Allow use of database for Horizon sessions Database-backed sessions are scalable (using an appropriate database strategy), persistent, and can be made high-concurrency and highly-available [0] Default is off. [0] http://docs.openstack.org/developer/horizon/topics/deployment.html#database Co-Authored-By: Vladislav Belogrudov Closes-Bug: 1618781 Change-Id: Ib68a21397dc020d20e07dcc51d3d0fdc1de102ff --- docker/horizon/extend_start.sh | 11 +++++++++++ docker/openstack-base/Dockerfile.j2 | 1 + 2 files changed, 12 insertions(+) (limited to 'docker') 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 3ec33f1be..7e92d2c58 100644 --- a/docker/openstack-base/Dockerfile.j2 +++ b/docker/openstack-base/Dockerfile.j2 @@ -197,6 +197,7 @@ ENV DEBIAN_FRONTEND noninteractive 'libxslt-devel', 'libyaml-devel', 'MariaDB-devel', + 'MySQL-python', 'openldap-devel', 'openssl-devel', 'postgresql', -- cgit v1.2.3