diff options
Diffstat (limited to 'docker/haproxy')
| -rw-r--r-- | docker/haproxy/Dockerfile.j2 | 8 | ||||
| -rw-r--r-- | docker/haproxy/ensure_latest_config.sh | 4 |
2 files changed, 5 insertions, 7 deletions
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 |
