Merge "HAProxy container"

This commit is contained in:
Jenkins 2015-07-22 18:25:56 +00:00 committed by Gerrit Code Review
commit 6d4a55060e
7 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,11 @@
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%base:%%KOLLA_TAG%%
MAINTAINER Kolla Project (https://launchpad.net/kolla)
RUN yum -y install \
haproxy \
&& yum clean all
COPY start.sh /
COPY config-external.sh /opt/kolla/
CMD ["/start.sh"]

View File

@ -0,0 +1 @@
../../../../tools/build-docker-image

View File

@ -0,0 +1 @@
../../../common/haproxy/config-external.sh

View File

@ -0,0 +1 @@
../../../common/haproxy/start.sh

View File

@ -0,0 +1,11 @@
#!/bin/bash
SOURCE="/opt/kolla/haproxy/haproxy.cfg"
TARGET="/etc/haproxy/haproxy.cfg"
OWNER="root"
if [[ -f "$SOURCE" ]]; then
rm $TARGET
cp $SOURCE $TARGET
chown ${OWNER}: $TARGET
chmod 0644 $TARGET
fi

17
docker/common/haproxy/start.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
set -o errexit
CMD='/usr/sbin/haproxy'
# Parameters:
# -db for non-daemon execution and logging to stdout
# -p pidfile to specify pidfile and allow hot reconfiguration
# loop which generates -f file.conf for each file in /etc/haproxy and /etc/haproxy/conf.d
ARGS="-db -f /etc/haproxy/haproxy.cfg"
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Config-internal script exec out of this function, it does not return here.
set_configs
exec $CMD $ARGS

View File

@ -229,6 +229,10 @@ In order for each service to function, there is a minimum set of required variab
GLANCE_DB_USER
MARIADB_SERVICE_HOST
# Haproxy
None
# Hautoproxy
None