99f355e145
For centos, we should be using the RDO repositories to provide rabbitmq-server. This version is updated with bug fixes and provides a more stable experience then using rabbitmq.com builds. Co-Authored-by: Jeffrey Zhang <zhang.lei.fly@gmail.com> Co-Authored-by: Michal (inc0) Jastrzebski <inc007@gmail.com> Closes-Bug: #1621460 Change-Id: Ib0eafc5da4397756fbdd837520b15543180ce229
61 lines
2.0 KiB
Django/Jinja
61 lines
2.0 KiB
Django/Jinja
FROM {{ namespace }}/{{ image_prefix }}base:{{ tag }}
|
|
MAINTAINER {{ maintainer }}
|
|
|
|
{% import "macros.j2" as macros with context %}
|
|
|
|
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
|
|
{% set rabbitmq_packages = [
|
|
'hostname',
|
|
'rabbitmq-server'
|
|
] %}
|
|
|
|
{{ macros.install_packages(rabbitmq_packages | customizable("packages")) }}
|
|
|
|
{% elif base_distro == 'ubuntu' %}
|
|
{% set rabbitmq_packages = [
|
|
'erlang-nox',
|
|
'socat',
|
|
'logrotate',
|
|
'http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.2/rabbitmq-server_3.6.2-1_all.deb'
|
|
] %}
|
|
|
|
{{ macros.install_packages(rabbitmq_packages | customizable("packages")) }}
|
|
|
|
{% elif base_distro == 'debian' %}
|
|
{% set rabbitmq_packages = [
|
|
'erlang-nox',
|
|
'http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.2/rabbitmq-server_3.6.2-1_all.deb'
|
|
] %}
|
|
|
|
{{ macros.install_packages(rabbitmq_packages | customizable("packages")) }}
|
|
|
|
{% endif %}
|
|
|
|
{% block rabbitmq_install_plugins %}
|
|
|
|
# NOTE(sdake): the /bin/true unblocks the rabbitmq-plugins tool. Not sure how
|
|
# or why. My suspicion is it sends a signal to the parent
|
|
# process.
|
|
|
|
RUN rm -rf /var/lib/rabbitmq/* \
|
|
&& curl -o /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.2/plugins/rabbitmq_clusterer-3.6.2.ez http://www.rabbitmq.com/community-plugins/v3.6.x/rabbitmq_clusterer-3.6.x-667f92b0.ez \
|
|
&& /usr/lib/rabbitmq/bin/rabbitmq-plugins enable --offline \
|
|
rabbitmq_management \
|
|
rabbitmq_clusterer \
|
|
&& /bin/true
|
|
|
|
{% endblock %}
|
|
|
|
COPY extend_start.sh /usr/local/bin/kolla_extend_start
|
|
COPY rabbitmq_sudoers /etc/sudoers.d/kolla_rabbitmq_sudoers
|
|
COPY rabbitmq_get_gospel_node.py /usr/local/bin/rabbitmq_get_gospel_node
|
|
RUN chmod 755 /usr/local/bin/kolla_extend_start /usr/local/bin/rabbitmq_get_gospel_node \
|
|
&& chmod 750 /etc/sudoers.d \
|
|
&& chmod 440 /etc/sudoers.d/kolla_rabbitmq_sudoers \
|
|
&& usermod -a -G kolla rabbitmq
|
|
|
|
{% block rabbitmq_footer %}{% endblock %}
|
|
{{ include_footer }}
|
|
|
|
USER rabbitmq
|