Remove config-internal for rabbitmq
Change-Id: Ifd8fc361d8a7e278134f671910e8c122c9842386 Partially-Implements: blueprint remove-config-internal
This commit is contained in:
parent
a5e907a8e9
commit
1a145d8a01
@ -7,8 +7,7 @@ RUN yum -y install \
|
|||||||
yum clean all && \
|
yum clean all && \
|
||||||
/usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_management
|
/usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_management
|
||||||
|
|
||||||
COPY rabbitmq.config rabbitmq-env.conf /etc/rabbitmq/
|
COPY config-rabbit.sh config-external.sh /opt/kolla/
|
||||||
COPY config-rabbit.sh config-external.sh config-internal.sh /opt/kolla/
|
COPY start.sh /
|
||||||
COPY start.sh /start.sh
|
|
||||||
|
|
||||||
CMD ["/start.sh"]
|
CMD ["/start.sh"]
|
||||||
|
@ -1 +0,0 @@
|
|||||||
../../../common/rabbitmq/config-internal.sh
|
|
@ -1 +0,0 @@
|
|||||||
../../../common/rabbitmq/rabbitmq-env.conf
|
|
@ -1 +0,0 @@
|
|||||||
../../../common/rabbitmq/rabbitmq.config
|
|
@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
. /opt/kolla/kolla-common.sh
|
|
||||||
. /opt/kolla/config-rabbit.sh
|
|
||||||
|
|
||||||
check_required_vars RABBITMQ_PASS \
|
|
||||||
RABBITMQ_USER
|
|
||||||
|
|
||||||
configure_rabbit
|
|
||||||
|
|
||||||
exec /usr/sbin/rabbitmq-server
|
|
@ -1,57 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
RABBITMQ_CLUSTER_CONFIGURATION=""
|
|
||||||
|
|
||||||
function configure_files {
|
|
||||||
sed -i '
|
|
||||||
s|@RABBITMQ_USER@|'"$RABBITMQ_USER"'|g
|
|
||||||
s|@RABBITMQ_PASS@|'"$RABBITMQ_PASS"'|g
|
|
||||||
s|@RABBITMQ_CLUSTER_CONFIGURATION@|'"$RABBITMQ_CLUSTER_CONFIGURATION"'|g
|
|
||||||
' /etc/rabbitmq/rabbitmq.config
|
|
||||||
|
|
||||||
sed -i '
|
|
||||||
s|@RABBITMQ_LOG_BASE@|'"$RABBITMQ_LOG_BASE"'|g
|
|
||||||
' /etc/rabbitmq/rabbitmq-env.conf
|
|
||||||
}
|
|
||||||
|
|
||||||
function set_rabbitmq_cookie {
|
function set_rabbitmq_cookie {
|
||||||
echo "${RABBITMQ_CLUSTER_COOKIE}" > /var/lib/rabbitmq/.erlang.cookie
|
echo "${RABBITMQ_CLUSTER_COOKIE}" > /var/lib/rabbitmq/.erlang.cookie
|
||||||
chown rabbitmq: /var/lib/rabbitmq/.erlang.cookie
|
chown rabbitmq: /var/lib/rabbitmq/.erlang.cookie
|
||||||
chmod 400 /var/lib/rabbitmq/.erlang.cookie
|
chmod 400 /var/lib/rabbitmq/.erlang.cookie
|
||||||
}
|
}
|
||||||
|
|
||||||
function configure_cluster {
|
|
||||||
check_required_vars RABBITMQ_CLUSTER_COOKIE \
|
|
||||||
RABBITMQ_CLUSTER_NODES
|
|
||||||
set_rabbitmq_cookie
|
|
||||||
|
|
||||||
HOSTNAME=""
|
|
||||||
IP_ADDRESS=""
|
|
||||||
DELIMETER=""
|
|
||||||
|
|
||||||
for node in ${RABBITMQ_CLUSTER_NODES}; do
|
|
||||||
HOSTNAME=`echo ${node} | cut -d'@' -f1`
|
|
||||||
IP_ADDRESS=`echo ${node} | cut -d'@' -f2`
|
|
||||||
CLUSTER_NODES="${CLUSTER_NODES}${DELIMETER}rabbit@${HOSTNAME}"
|
|
||||||
echo "${IP_ADDRESS} ${HOSTNAME}" >> /etc/hosts
|
|
||||||
DELIMETER=","
|
|
||||||
done
|
|
||||||
RABBITMQ_CLUSTER_CONFIGURATION="{cluster_nodes, {[$CLUSTER_NODES], disc}},"
|
|
||||||
}
|
|
||||||
|
|
||||||
function configure_rabbit {
|
|
||||||
if [ "$RABBITMQ_CLUSTER_NODES" ] && [ "$RABBITMQ_CLUSTER_COOKIE" ]; then
|
|
||||||
configure_cluster
|
|
||||||
elif [ "$RABBITMQ_SERVICE_HOST" ]; then
|
|
||||||
# work around:
|
|
||||||
# https://bugs.launchpad.net/ubuntu/+source/rabbitmq-server/+bug/653405
|
|
||||||
HOSTNAME=`/usr/bin/hostname -s 2> /dev/null || /bin/hostname 2> /dev/null`
|
|
||||||
echo "${RABBITMQ_SERVICE_HOST} ${HOSTNAME}" > /etc/hosts
|
|
||||||
else
|
|
||||||
echo "You need RABBITMQ_SERVICE_HOST or RABBITMQ_CLUSTER_NODES & " \
|
|
||||||
" RABBITMQ_CLUSTER_COOKIES variables"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
configure_files
|
|
||||||
}
|
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
RABBITMQ_NODENAME=rabbit
|
|
||||||
RABBITMQ_LOG_BASE=@RABBITMQ_LOG_BASE@
|
|
@ -1,12 +0,0 @@
|
|||||||
[
|
|
||||||
{rabbit, [
|
|
||||||
@RABBITMQ_CLUSTER_CONFIGURATION@
|
|
||||||
{default_user, <<"@RABBITMQ_USER@">>},
|
|
||||||
{default_pass, <<"@RABBITMQ_PASS@">>}
|
|
||||||
]},
|
|
||||||
{kernel, [
|
|
||||||
|
|
||||||
]}
|
|
||||||
].
|
|
||||||
% EOF
|
|
||||||
|
|
@ -7,8 +7,7 @@ RUN apt-get install -y --no-install-recommends \
|
|||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& /usr/lib/rabbitmq/bin/rabbitmq-plugins --offline enable rabbitmq_management
|
&& /usr/lib/rabbitmq/bin/rabbitmq-plugins --offline enable rabbitmq_management
|
||||||
|
|
||||||
COPY rabbitmq.config rabbitmq-env.conf /etc/rabbitmq/
|
COPY config-rabbit.sh config-external.sh /opt/kolla/
|
||||||
COPY config-rabbit.sh config-external.sh config-internal.sh /opt/kolla/
|
COPY start.sh /
|
||||||
COPY start.sh /start.sh
|
|
||||||
|
|
||||||
CMD ["/start.sh"]
|
CMD ["/start.sh"]
|
||||||
|
@ -1 +0,0 @@
|
|||||||
../../../common/rabbitmq/config-internal.sh
|
|
@ -1 +0,0 @@
|
|||||||
../../../common/rabbitmq/rabbitmq-env.conf
|
|
@ -1 +0,0 @@
|
|||||||
../../../common/rabbitmq/rabbitmq.config
|
|
@ -511,8 +511,7 @@ In order for each service to function, there is a minimum set of required variab
|
|||||||
|
|
||||||
# Rabbitmq
|
# Rabbitmq
|
||||||
|
|
||||||
RABBITMQ_PASS
|
None
|
||||||
RABBITMQ_USER
|
|
||||||
|
|
||||||
# Swift-account-server
|
# Swift-account-server
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user