diff --git a/docker/centos/binary/rabbitmq/Dockerfile b/docker/centos/binary/rabbitmq/Dockerfile index ba2d748b52..51197ca431 100644 --- a/docker/centos/binary/rabbitmq/Dockerfile +++ b/docker/centos/binary/rabbitmq/Dockerfile @@ -7,8 +7,7 @@ RUN yum -y install \ yum clean all && \ /usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_management -COPY rabbitmq.config rabbitmq-env.conf /etc/rabbitmq/ -COPY config-rabbit.sh config-external.sh config-internal.sh /opt/kolla/ -COPY start.sh /start.sh +COPY config-rabbit.sh config-external.sh /opt/kolla/ +COPY start.sh / CMD ["/start.sh"] diff --git a/docker/centos/binary/rabbitmq/config-internal.sh b/docker/centos/binary/rabbitmq/config-internal.sh deleted file mode 120000 index 73a13c7726..0000000000 --- a/docker/centos/binary/rabbitmq/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../common/rabbitmq/config-internal.sh \ No newline at end of file diff --git a/docker/centos/binary/rabbitmq/rabbitmq-env.conf b/docker/centos/binary/rabbitmq/rabbitmq-env.conf deleted file mode 120000 index af9f8525e9..0000000000 --- a/docker/centos/binary/rabbitmq/rabbitmq-env.conf +++ /dev/null @@ -1 +0,0 @@ -../../../common/rabbitmq/rabbitmq-env.conf \ No newline at end of file diff --git a/docker/centos/binary/rabbitmq/rabbitmq.config b/docker/centos/binary/rabbitmq/rabbitmq.config deleted file mode 120000 index cfb088507e..0000000000 --- a/docker/centos/binary/rabbitmq/rabbitmq.config +++ /dev/null @@ -1 +0,0 @@ -../../../common/rabbitmq/rabbitmq.config \ No newline at end of file diff --git a/docker/common/rabbitmq/config-internal.sh b/docker/common/rabbitmq/config-internal.sh deleted file mode 100755 index b34a4fa599..0000000000 --- a/docker/common/rabbitmq/config-internal.sh +++ /dev/null @@ -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 diff --git a/docker/common/rabbitmq/config-rabbit.sh b/docker/common/rabbitmq/config-rabbit.sh index f14d796ad7..6f2283c67f 100644 --- a/docker/common/rabbitmq/config-rabbit.sh +++ b/docker/common/rabbitmq/config-rabbit.sh @@ -1,57 +1,7 @@ #!/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 { echo "${RABBITMQ_CLUSTER_COOKIE}" > /var/lib/rabbitmq/.erlang.cookie chown rabbitmq: /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 -} diff --git a/docker/common/rabbitmq/rabbitmq-env.conf b/docker/common/rabbitmq/rabbitmq-env.conf deleted file mode 100644 index a8926619c8..0000000000 --- a/docker/common/rabbitmq/rabbitmq-env.conf +++ /dev/null @@ -1,2 +0,0 @@ -RABBITMQ_NODENAME=rabbit -RABBITMQ_LOG_BASE=@RABBITMQ_LOG_BASE@ diff --git a/docker/common/rabbitmq/rabbitmq.config b/docker/common/rabbitmq/rabbitmq.config deleted file mode 100644 index 7cd0f68298..0000000000 --- a/docker/common/rabbitmq/rabbitmq.config +++ /dev/null @@ -1,12 +0,0 @@ -[ - {rabbit, [ - @RABBITMQ_CLUSTER_CONFIGURATION@ - {default_user, <<"@RABBITMQ_USER@">>}, - {default_pass, <<"@RABBITMQ_PASS@">>} - ]}, - {kernel, [ - - ]} -]. -% EOF - diff --git a/docker/ubuntu/binary/rabbitmq/Dockerfile b/docker/ubuntu/binary/rabbitmq/Dockerfile index 4ade92668b..d9df48932f 100644 --- a/docker/ubuntu/binary/rabbitmq/Dockerfile +++ b/docker/ubuntu/binary/rabbitmq/Dockerfile @@ -7,8 +7,7 @@ RUN apt-get install -y --no-install-recommends \ && apt-get clean \ && /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 config-internal.sh /opt/kolla/ -COPY start.sh /start.sh +COPY config-rabbit.sh config-external.sh /opt/kolla/ +COPY start.sh / CMD ["/start.sh"] diff --git a/docker/ubuntu/binary/rabbitmq/config-internal.sh b/docker/ubuntu/binary/rabbitmq/config-internal.sh deleted file mode 120000 index 73a13c7726..0000000000 --- a/docker/ubuntu/binary/rabbitmq/config-internal.sh +++ /dev/null @@ -1 +0,0 @@ -../../../common/rabbitmq/config-internal.sh \ No newline at end of file diff --git a/docker/ubuntu/binary/rabbitmq/rabbitmq-env.conf b/docker/ubuntu/binary/rabbitmq/rabbitmq-env.conf deleted file mode 120000 index af9f8525e9..0000000000 --- a/docker/ubuntu/binary/rabbitmq/rabbitmq-env.conf +++ /dev/null @@ -1 +0,0 @@ -../../../common/rabbitmq/rabbitmq-env.conf \ No newline at end of file diff --git a/docker/ubuntu/binary/rabbitmq/rabbitmq.config b/docker/ubuntu/binary/rabbitmq/rabbitmq.config deleted file mode 120000 index cfb088507e..0000000000 --- a/docker/ubuntu/binary/rabbitmq/rabbitmq.config +++ /dev/null @@ -1 +0,0 @@ -../../../common/rabbitmq/rabbitmq.config \ No newline at end of file diff --git a/docs/minimal-environment-vars.md b/docs/minimal-environment-vars.md index d18953b509..cfaf0699a5 100644 --- a/docs/minimal-environment-vars.md +++ b/docs/minimal-environment-vars.md @@ -380,8 +380,7 @@ In order for each service to function, there is a minimum set of required variab # Rabbitmq - RABBITMQ_PASS - RABBITMQ_USER + None # Swift-account-server