aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorSam Yaple <sam@yaple.net>2015-08-23 12:01:35 +0000
committerSam Yaple <sam@yaple.net>2015-08-24 18:19:34 +0000
commit6a297265c5b1a3fa6ef134e8953ea5c1bbfdca02 (patch)
treeafc2e6c42eda0a0071e5bee29864bc5fd8f8e56f /docker
parentd568c47207340cd481404f43bc3fdb00d0af356f (diff)
downloadkolla-6a297265c5b1a3fa6ef134e8953ea5c1bbfdca02.tar.gz
kolla-6a297265c5b1a3fa6ef134e8953ea5c1bbfdca02.zip
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
Diffstat (limited to 'docker')
-rw-r--r--docker/common/horizon/config-external.sh15
-rwxr-xr-xdocker/common/horizon/start.sh17
2 files changed, 28 insertions, 4 deletions
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