diff options
| author | Paul Bourke <paul.bourke@oracle.com> | 2016-09-08 12:49:02 +0100 |
|---|---|---|
| committer | Paul Bourke <paul.bourke@oracle.com> | 2016-09-08 12:49:02 +0100 |
| commit | d3f65a812f807cda9f27af0cf808de8be8acacf6 (patch) | |
| tree | 5b9408528fb81f93bd2f06981872f3a21d81378c /docker | |
| parent | b10e29281ad81a16e340641cf144a9540e94b9d2 (diff) | |
| download | kolla-d3f65a812f807cda9f27af0cf808de8be8acacf6.tar.gz kolla-d3f65a812f807cda9f27af0cf808de8be8acacf6.zip | |
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 <vladislav.belogrudov@oracle.com>
Closes-Bug: 1618781
Change-Id: Ib68a21397dc020d20e07dcc51d3d0fdc1de102ff
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/horizon/extend_start.sh | 11 | ||||
| -rw-r--r-- | docker/openstack-base/Dockerfile.j2 | 1 |
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 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', |
