aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSwapnil Kulkarni <me@coolsvap.net>2015-08-19 05:23:05 +0000
committerSwapnil Kulkarni <me@coolsvap.net>2015-08-19 15:02:07 +0000
commit8758435d404e21815ebd98c932cd08749d56ef4b (patch)
tree74bb0324dd8fb1fe261408eae977bcffbe4f720d
parentac61653343536017b20182e75bc66228bc4da79f (diff)
downloadkolla-8758435d404e21815ebd98c932cd08749d56ef4b.tar.gz
kolla-8758435d404e21815ebd98c932cd08749d56ef4b.zip
Add Dockerfile template for Gnocchi
Change-Id: I15e6a06645361aec979d7dad4794b45236c957e3 Partially-Implements: blueprint dockerfile-template
-rw-r--r--docker_templates/gnocchi/gnocchi-api/Dockerfile.j218
l---------docker_templates/gnocchi/gnocchi-api/config-external.sh1
l---------docker_templates/gnocchi/gnocchi-api/start.sh1
-rw-r--r--docker_templates/gnocchi/gnocchi-base/Dockerfile.j224
-rw-r--r--docker_templates/gnocchi/gnocchi-statsd/Dockerfile.j216
l---------docker_templates/gnocchi/gnocchi-statsd/config-external.sh1
l---------docker_templates/gnocchi/gnocchi-statsd/start.sh1
7 files changed, 62 insertions, 0 deletions
diff --git a/docker_templates/gnocchi/gnocchi-api/Dockerfile.j2 b/docker_templates/gnocchi/gnocchi-api/Dockerfile.j2
new file mode 100644
index 000000000..93d821476
--- /dev/null
+++ b/docker_templates/gnocchi/gnocchi-api/Dockerfile.j2
@@ -0,0 +1,18 @@
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-gnocchi-base:{{ tag }}
+MAINTAINER Kolla Project (https://launchpad.net/kolla)
+
+{% if install_type == 'binary' %}
+ {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
+
+RUN yum install -y openstack-gnocchi-api \
+ openstack-gnocchi-carbonara \
+ openstack-gnocchi-indexer-sqlalchemy \
+ && yum clean all
+
+ {% endif %}
+{% endif %}
+
+COPY start.sh /
+COPY config-external.sh /opt/kolla/
+
+CMD ["/start.sh"]
diff --git a/docker_templates/gnocchi/gnocchi-api/config-external.sh b/docker_templates/gnocchi/gnocchi-api/config-external.sh
new file mode 120000
index 000000000..ef5155846
--- /dev/null
+++ b/docker_templates/gnocchi/gnocchi-api/config-external.sh
@@ -0,0 +1 @@
+../../../docker/common/gnocchi/gnocchi-api/config-external.sh \ No newline at end of file
diff --git a/docker_templates/gnocchi/gnocchi-api/start.sh b/docker_templates/gnocchi/gnocchi-api/start.sh
new file mode 120000
index 000000000..92849bb3d
--- /dev/null
+++ b/docker_templates/gnocchi/gnocchi-api/start.sh
@@ -0,0 +1 @@
+../../../docker/common/gnocchi/gnocchi-api/start.sh \ No newline at end of file
diff --git a/docker_templates/gnocchi/gnocchi-base/Dockerfile.j2 b/docker_templates/gnocchi/gnocchi-base/Dockerfile.j2
new file mode 100644
index 000000000..db8220524
--- /dev/null
+++ b/docker_templates/gnocchi/gnocchi-base/Dockerfile.j2
@@ -0,0 +1,24 @@
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+MAINTAINER Kolla Project (https://launchpad.net/kolla)
+
+{% if install_type == 'binary' %}
+ {% if base_distro in ['ubuntu', 'debian'] %}
+
+RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
+ && /bin/false
+
+ {% endif %}
+{% elif install_type == 'source' %}
+
+ADD ./gnocchi.tar /
+RUN ln -s /gnocchi-* /gnocchi
+
+RUN cd /gnocchi \
+ && useradd --user-group gnocchi \
+ && pip install -r requirements.txt \
+ && pip install /gnocchi \
+ && mkdir /etc/gnocchi /var/log/gnocchi \
+ && cp -r /gnocchi/etc/* /etc/gnocchi/ \
+ && rm -rf /root/.cache
+
+{% endif %}
diff --git a/docker_templates/gnocchi/gnocchi-statsd/Dockerfile.j2 b/docker_templates/gnocchi/gnocchi-statsd/Dockerfile.j2
new file mode 100644
index 000000000..446c47d1c
--- /dev/null
+++ b/docker_templates/gnocchi/gnocchi-statsd/Dockerfile.j2
@@ -0,0 +1,16 @@
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-gnocchi-base:{{ tag }}
+MAINTAINER Kolla Project (https://launchpad.net/kolla)
+
+{% if install_type == 'binary' %}
+ {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
+
+RUN yum install -y openstack-gnocchi-statsd \
+ && yum clean all
+
+ {% endif %}
+{% endif %}
+
+COPY start.sh /
+COPY config-external.sh /opt/kolla/
+
+CMD ["/start.sh"]
diff --git a/docker_templates/gnocchi/gnocchi-statsd/config-external.sh b/docker_templates/gnocchi/gnocchi-statsd/config-external.sh
new file mode 120000
index 000000000..a3d14b10e
--- /dev/null
+++ b/docker_templates/gnocchi/gnocchi-statsd/config-external.sh
@@ -0,0 +1 @@
+../../../docker/common/gnocchi/gnocchi-statsd/config-external.sh \ No newline at end of file
diff --git a/docker_templates/gnocchi/gnocchi-statsd/start.sh b/docker_templates/gnocchi/gnocchi-statsd/start.sh
new file mode 120000
index 000000000..d27368708
--- /dev/null
+++ b/docker_templates/gnocchi/gnocchi-statsd/start.sh
@@ -0,0 +1 @@
+../../../docker/common/gnocchi/gnocchi-statsd/start.sh \ No newline at end of file