Move scripts for keepalive to docker_templates

Change-Id: I67ebbfa5a89b5d5c6ab2db78ded10151b95f7337
Partially-Implements: blueprint remove-docker-dir
This commit is contained in:
Steven Dake 2015-08-27 18:13:04 -07:00
parent bd32c7a2dc
commit 2cbccd7dc1
6 changed files with 36 additions and 39 deletions

View File

@ -1,6 +0,0 @@
#!/bin/bash
# This will return 0 when it successfully talks to the haproxy daemon via the socket
# Failures return 1
echo "show info" | socat unix-connect:/run/haproxy.sock stdio

View File

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

View File

@ -1,20 +0,0 @@
#!/bin/bash
set -o errexit
CMD="/usr/sbin/keepalived"
ARGS="-nld -p /run/keepalived.pid"
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
modprobe ip_vs
# Workaround for bug #1485079
if [ -f /run/keepalived.pid ]; then
rm /run/keepalived.pid
fi
exec $CMD $ARGS

View File

@ -1 +0,0 @@
../../docker/common/keepalived/check_alive.sh

View File

@ -0,0 +1,6 @@
#!/bin/bash
# This will return 0 when it successfully talks to the haproxy daemon via the socket
# Failures return 1
echo "show info" | socat unix-connect:/run/haproxy.sock stdio

View File

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

View File

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

View File

@ -1 +0,0 @@
../../docker/common/keepalived/start.sh

View File

@ -0,0 +1,20 @@
#!/bin/bash
set -o errexit
CMD="/usr/sbin/keepalived"
ARGS="-nld -p /run/keepalived.pid"
# Loading common functions.
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
modprobe ip_vs
# Workaround for bug #1485079
if [ -f /run/keepalived.pid ]; then
rm /run/keepalived.pid
fi
exec $CMD $ARGS