From 6a297265c5b1a3fa6ef134e8953ea5c1bbfdca02 Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Sun, 23 Aug 2015 12:01:35 +0000 Subject: Ubuntu - Horizon Updates support for Ubuntu to install Horizon. Update the Horizon install block to follow the same structure as all of the other source install blocks. Removed local_settings copy since that will be copied in from outside with the config-external.sh script Change-Id: Iab386386286d66e6f74407a043e78cb5cb1b032b Partially-Implements: blueprint install-from-ubuntu --- docker/common/horizon/config-external.sh | 15 +++++++++++++++ docker/common/horizon/start.sh | 17 +++++++++++++---- 2 files changed, 28 insertions(+), 4 deletions(-) (limited to 'docker') diff --git a/docker/common/horizon/config-external.sh b/docker/common/horizon/config-external.sh index 373a82e64..8e9fc47a0 100644 --- a/docker/common/horizon/config-external.sh +++ b/docker/common/horizon/config-external.sh @@ -8,3 +8,18 @@ if [[ -f "$SOURCE" ]]; then chown ${OWNER}: $TARGET chmod 0644 $TARGET fi + +if [[ "${KOLLA_BASE_DISTRO}" == "ubuntu" || \ + "${KOLLA_BASE_DISTRO}" == "debian" ]]; then + SOURCE="/opt/kolla/horizon/horizon.conf" + TARGET="/etc/apache2/sites-enabled/000-default.conf" +else + SOURCE="/opt/kolla/horizon/horizon.conf" + TARGET="/etc/httpd/sites.d/horizon.conf" +fi + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker/common/horizon/start.sh b/docker/common/horizon/start.sh index 2470bda77..096326a3a 100755 --- a/docker/common/horizon/start.sh +++ b/docker/common/horizon/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 -- cgit v1.2.3