diff options
| author | Sam Yaple <sam@yaple.net> | 2015-08-20 14:49:49 +0000 |
|---|---|---|
| committer | Sam Yaple <sam@yaple.net> | 2015-08-23 06:07:04 +0000 |
| commit | 17333aed12775a439dc8d0699bf1811d7160ac55 (patch) | |
| tree | 1c24f2748bdcbd66173ed73eeeb9df4c50e0a9ef /docker | |
| parent | 5dcf175cb5e8220ca679210b4ebd0d6a4124d4a3 (diff) | |
| download | kolla-17333aed12775a439dc8d0699bf1811d7160ac55.tar.gz kolla-17333aed12775a439dc8d0699bf1811d7160ac55.zip | |
Fix keystone for Ubuntu
Due to the differences between Ubuntu and Centos around Apache2 I have
had to copy both start.sh and config-external.sh to be unique files
for Ubuntu so as not to affect Centos either. This can be removed when
we change the way config-external works.
Change-Id: I14dc11e7bb6284b897259a53acc914ae8f254d3c
Partially-Implements: blueprint install-from-ubuntu
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/common/keystone/config-external.sh | 11 | ||||
| -rwxr-xr-x | docker/common/keystone/start.sh | 17 |
2 files changed, 22 insertions, 6 deletions
diff --git a/docker/common/keystone/config-external.sh b/docker/common/keystone/config-external.sh index 9742e3b12..1bd4e3bb4 100644 --- a/docker/common/keystone/config-external.sh +++ b/docker/common/keystone/config-external.sh @@ -1,8 +1,6 @@ #!/bin/bash SOURCE="/opt/kolla/keystone/keystone.conf" TARGET="/etc/keystone/keystone.conf" -SOURCE_WSGI="/opt/kolla/keystone/wsgi-keystone.conf" -TARGET_WSGI="/etc/httpd/conf.d/wsgi-keystone.conf" OWNER="keystone" if [[ -f "$SOURCE" ]]; then @@ -11,6 +9,15 @@ if [[ -f "$SOURCE" ]]; then chmod 0644 $TARGET fi +if [[ "${KOLLA_BASE_DISTRO}" == "ubuntu" || \ + "${KOLLA_BASE_DISTRO}" == "debian" ]]; then + SOURCE_WSGI="/opt/kolla/keystone/wsgi-keystone.conf" + TARGET_WSGI="/etc/apache2/conf-enabled/wsgi-keystone.conf" +else + SOURCE_WSGI="/opt/kolla/keystone/wsgi-keystone.conf" + TARGET_WSGI="/etc/httpd/conf.d/wsgi-keystone.conf" +fi + if [[ -f "$SOURCE_WSGI" ]]; then cp $SOURCE_WSGI $TARGET_WSGI chown ${OWNER}: $TARGET_WSGI diff --git a/docker/common/keystone/start.sh b/docker/common/keystone/start.sh index a68995f81..d964b0303 100755 --- a/docker/common/keystone/start.sh +++ b/docker/common/keystone/start.sh @@ -2,12 +2,21 @@ set -o errexit -CMD="/usr/sbin/httpd" -ARGS="-DFOREGROUND" - -# Loading common functions. +# Loading common functions source /opt/kolla/kolla-common.sh +if [[ "${KOLLA_BASE_DISTRO}" == "ubuntu" || \ + "${KOLLA_BASE_DISTRO}" == "debian" ]]; then + CMD="/usr/sbin/apache2" + ARGS="-DFOREGROUND" + + # Loading Apache2 ENV variables + source /etc/apache2/envvars +else + CMD="/usr/sbin/httpd" + ARGS="-DFOREGROUND" +fi + # Execute config strategy set_configs |
