From 94162bd08f40ec742a7bfcdcd4aac45be5bd5618 Mon Sep 17 00:00:00 2001 From: Sam Yaple Date: Thu, 1 Oct 2015 07:43:18 +0000 Subject: Bring Kolla inline with FHS This brings Kolla images inline with FHS and should make finding locations of things more consistent and reliable with the linux world at large. Change-Id: Iece5b4da4bace0fb8b1f41a65ab2c852ec73e6f8 Closes-Bug: #1485742 --- docker/haproxy/Dockerfile.j2 | 8 +++----- docker/haproxy/ensure_latest_config.sh | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'docker/haproxy') diff --git a/docker/haproxy/Dockerfile.j2 b/docker/haproxy/Dockerfile.j2 index e7a4abddd..4bd73b7e0 100644 --- a/docker/haproxy/Dockerfile.j2 +++ b/docker/haproxy/Dockerfile.j2 @@ -3,8 +3,7 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla) {% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %} -RUN yum -y install \ - haproxy \ +RUN yum -y install haproxy \ && yum clean all {% elif base_distro == 'ubuntu' %} @@ -19,9 +18,8 @@ RUN apt-get install -y --no-install-recommends haproxy \ {% endif %} -COPY ensure_latest_config.sh /opt/kolla/ - +COPY ensure_latest_config.sh /usr/local/bin/kolla_ensure_haproxy_latest_config COPY extend_start.sh /usr/local/bin/kolla_extend_start -RUN chmod 755 /usr/local/bin/kolla_extend_start /opt/kolla/ensure_latest_config.sh +RUN chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/kolla_ensure_haproxy_latest_config {{ include_footer }} diff --git a/docker/haproxy/ensure_latest_config.sh b/docker/haproxy/ensure_latest_config.sh index af20175a6..9a34f1758 100644 --- a/docker/haproxy/ensure_latest_config.sh +++ b/docker/haproxy/ensure_latest_config.sh @@ -1,11 +1,11 @@ #!/bin/bash CURRENT_CONFIG_HASH=$(sha1sum /etc/haproxy/haproxy.cfg | cut -f1 -d' ') -NEW_CONFIG_HASH=$(sha1sum /opt/kolla/config_files/haproxy.cfg | cut -f1 -d' ') +NEW_CONFIG_HASH=$(sha1sum /var/lib/kolla/config_files/haproxy.cfg | cut -f1 -d' ') if [[ $CURRENT_CONFIG_HASH != $NEW_CONFIG_HASH ]]; then changed=changed - source /opt/kolla/config-external.sh + python /usr/local/bin/kolla_set_configs /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -sf $(cat /run/haproxy.pid) fi -- cgit v1.2.3