Skip to content
Snippets Groups Projects
Commit eef32f03 authored by Steven Dake's avatar Steven Dake
Browse files

Move scripts for rabbitmq to docker_templates

Change-Id: I6f06c067c18e4a3eafbed2b2796aa1cfe6c9b28c
Partially-Implements: blueprint remove-docker-dir
parent c685119f
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
SOURCE_CONFIG="/opt/kolla/rabbitmq/rabbitmq.config"
TARGET_CONFIG="/etc/rabbitmq/rabbitmq.config"
SOURCE_ENV="/opt/kolla/rabbitmq/rabbitmq-env.conf"
TARGET_ENV="/etc/rabbitmq/rabbitmq-env.conf"
OWNER="rabbitmq"
# Cluster configuration
if [[ -f "$SOURCE_CONFIG" ]]; then
cp -af $SOURCE_CONFIG $TARGET_CONFIG
chown ${OWNER}: $TARGET_CONFIG
chmod 0600 $TARGET_CONFIG
fi
if [[ -f "$SOURCE_ENV" ]]; then
cp -af $SOURCE_ENV $TARGET_ENV
chown ${OWNER}: $TARGET_ENV
chmod 0600 $TARGET_ENV
fi
#!/bin/bash
function set_rabbitmq_cookie {
echo "${RABBITMQ_CLUSTER_COOKIE}" > /var/lib/rabbitmq/.erlang.cookie
chown -R rabbitmq: /var/lib/rabbitmq
chmod 400 /var/lib/rabbitmq/.erlang.cookie
}
#!/bin/bash
set -o errexit
CMD="/usr/sbin/rabbitmq-server"
ARGS=""
# loading common functions
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
# loading functions
source /opt/kolla/config-rabbit.sh
# This catches all cases of the BOOTSTRAP variable being set, including empty
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
set_rabbitmq_cookie
exit 0
fi
$CMD $ARGS
../../docker/common/rabbitmq/config-external.sh
\ No newline at end of file
#!/bin/bash
SOURCE_CONFIG="/opt/kolla/rabbitmq/rabbitmq.config"
TARGET_CONFIG="/etc/rabbitmq/rabbitmq.config"
SOURCE_ENV="/opt/kolla/rabbitmq/rabbitmq-env.conf"
TARGET_ENV="/etc/rabbitmq/rabbitmq-env.conf"
OWNER="rabbitmq"
# Cluster configuration
if [[ -f "$SOURCE_CONFIG" ]]; then
cp -af $SOURCE_CONFIG $TARGET_CONFIG
chown ${OWNER}: $TARGET_CONFIG
chmod 0600 $TARGET_CONFIG
fi
if [[ -f "$SOURCE_ENV" ]]; then
cp -af $SOURCE_ENV $TARGET_ENV
chown ${OWNER}: $TARGET_ENV
chmod 0600 $TARGET_ENV
fi
../../docker/common/rabbitmq/config-rabbit.sh
\ No newline at end of file
#!/bin/bash
function set_rabbitmq_cookie {
echo "${RABBITMQ_CLUSTER_COOKIE}" > /var/lib/rabbitmq/.erlang.cookie
chown -R rabbitmq: /var/lib/rabbitmq
chmod 400 /var/lib/rabbitmq/.erlang.cookie
}
../../docker/common/rabbitmq/start.sh
\ No newline at end of file
#!/bin/bash
set -o errexit
CMD="/usr/sbin/rabbitmq-server"
ARGS=""
# loading common functions
source /opt/kolla/kolla-common.sh
# Execute config strategy
set_configs
# loading functions
source /opt/kolla/config-rabbit.sh
# This catches all cases of the BOOTSTRAP variable being set, including empty
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
set_rabbitmq_cookie
exit 0
fi
$CMD $ARGS
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment