aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-08-12 09:26:02 +0000
committerGerrit Code Review <review@openstack.org>2015-08-12 09:26:02 +0000
commitd1ebd4abd04022b0fe1d9b75249384e3a98164c5 (patch)
treecccdac15ff82df03b38eeee285a855d7e0d1158d
parenta3751385569906973b19809d56da403d3a9d0771 (diff)
parent16223ff63957ccc3b98d08cea473460f3b6e6b4a (diff)
downloadkolla-d1ebd4abd04022b0fe1d9b75249384e3a98164c5.tar.gz
kolla-d1ebd4abd04022b0fe1d9b75249384e3a98164c5.zip
Merge "Add Dockerfile template for rabbitmq"
-rw-r--r--docker_templates/rabbitmq/Dockerfile.j225
l---------docker_templates/rabbitmq/config-external.sh1
l---------docker_templates/rabbitmq/config-rabbit.sh1
l---------docker_templates/rabbitmq/start.sh1
-rwxr-xr-xtools/build.py4
5 files changed, 31 insertions, 1 deletions
diff --git a/docker_templates/rabbitmq/Dockerfile.j2 b/docker_templates/rabbitmq/Dockerfile.j2
new file mode 100644
index 000000000..63dc1ff3c
--- /dev/null
+++ b/docker_templates/rabbitmq/Dockerfile.j2
@@ -0,0 +1,25 @@
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+MAINTAINER Kolla Project (https://launchpad.net/kolla)
+
+{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
+
+RUN yum -y install \
+ hostname \
+ rabbitmq-server \
+ && yum clean all
+
+{% elif base_distro in ['ubuntu', 'debian'] %}
+
+RUN apt-get install -y --no-install-recommends \
+ hostname \
+ rabbitmq-server \
+ && apt-get clean
+
+{% endif %}
+
+RUN /usr/lib/rabbitmq/bin/rabbitmq-plugins enable rabbitmq_management
+
+COPY start.sh /
+COPY config-rabbit.sh config-external.sh /opt/kolla/
+
+CMD ["/start.sh"]
diff --git a/docker_templates/rabbitmq/config-external.sh b/docker_templates/rabbitmq/config-external.sh
new file mode 120000
index 000000000..d0f0563db
--- /dev/null
+++ b/docker_templates/rabbitmq/config-external.sh
@@ -0,0 +1 @@
+../../docker/common/rabbitmq/config-external.sh \ No newline at end of file
diff --git a/docker_templates/rabbitmq/config-rabbit.sh b/docker_templates/rabbitmq/config-rabbit.sh
new file mode 120000
index 000000000..af4be1bf9
--- /dev/null
+++ b/docker_templates/rabbitmq/config-rabbit.sh
@@ -0,0 +1 @@
+../../docker/common/rabbitmq/config-rabbit.sh \ No newline at end of file
diff --git a/docker_templates/rabbitmq/start.sh b/docker_templates/rabbitmq/start.sh
new file mode 120000
index 000000000..5a3f6c74c
--- /dev/null
+++ b/docker_templates/rabbitmq/start.sh
@@ -0,0 +1 @@
+../../docker/common/rabbitmq/start.sh \ No newline at end of file
diff --git a/tools/build.py b/tools/build.py
index 2a17a6452..9fc134882 100755
--- a/tools/build.py
+++ b/tools/build.py
@@ -191,7 +191,9 @@ class KollaWorker(object):
template = env.get_template(template_name)
values = {'base_distro': self.base,
'base_distro_tag': self.base_tag,
- 'install_type': self.type_}
+ 'install_type': self.type_,
+ 'namespace': self.namespace,
+ 'tag': self.tag}
content = template.render(values)
with open(os.path.join(path, 'Dockerfile'), 'w') as f:
f.write(content)