aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-08-15 01:43:36 +0000
committerGerrit Code Review <review@openstack.org>2015-08-15 01:43:36 +0000
commit6ecdde79c06a1919c3176a9de5eea23014830d7a (patch)
treed67fa526260ed89cd86e08a6b9d570e508894f91
parent457d97087656f7837ff948b39d7b7e7f976170e3 (diff)
parentca3a8744120812fa1026c163fbfc6da68d5b1a38 (diff)
downloadkolla-6ecdde79c06a1919c3176a9de5eea23014830d7a.tar.gz
kolla-6ecdde79c06a1919c3176a9de5eea23014830d7a.zip
Merge "Add Dockerfile template for Magnum"
-rw-r--r--docker_templates/magnum/magnum-api/Dockerfile.j217
l---------docker_templates/magnum/magnum-api/build1
l---------docker_templates/magnum/magnum-api/config-external.sh1
l---------docker_templates/magnum/magnum-api/start.sh1
-rw-r--r--docker_templates/magnum/magnum-base/Dockerfile.j232
l---------docker_templates/magnum/magnum-base/build1
-rw-r--r--docker_templates/magnum/magnum-conductor/Dockerfile.j221
l---------docker_templates/magnum/magnum-conductor/build1
l---------docker_templates/magnum/magnum-conductor/config-external.sh1
l---------docker_templates/magnum/magnum-conductor/start.sh1
10 files changed, 77 insertions, 0 deletions
diff --git a/docker_templates/magnum/magnum-api/Dockerfile.j2 b/docker_templates/magnum/magnum-api/Dockerfile.j2
new file mode 100644
index 000000000..4da0f3a65
--- /dev/null
+++ b/docker_templates/magnum/magnum-api/Dockerfile.j2
@@ -0,0 +1,17 @@
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-magnum-base:{{ tag }}
+MAINTAINER Kolla Project (https://launchpad.net/kolla)
+
+{% if install_type == 'binary' %}
+ {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
+
+RUN yum -y install openstack-magnum-api \
+ && yum clean all
+
+ {% endif %}
+{% endif %}
+
+COPY ./start.sh /
+COPY config-external.sh /opt/kolla/
+
+CMD ["/start.sh"]
+
diff --git a/docker_templates/magnum/magnum-api/build b/docker_templates/magnum/magnum-api/build
new file mode 120000
index 000000000..43944faa0
--- /dev/null
+++ b/docker_templates/magnum/magnum-api/build
@@ -0,0 +1 @@
+../../../tools/build-docker-image \ No newline at end of file
diff --git a/docker_templates/magnum/magnum-api/config-external.sh b/docker_templates/magnum/magnum-api/config-external.sh
new file mode 120000
index 000000000..0adec980b
--- /dev/null
+++ b/docker_templates/magnum/magnum-api/config-external.sh
@@ -0,0 +1 @@
+../../../docker/common/magnum/magnum-api/config-external.sh \ No newline at end of file
diff --git a/docker_templates/magnum/magnum-api/start.sh b/docker_templates/magnum/magnum-api/start.sh
new file mode 120000
index 000000000..d6de9b70e
--- /dev/null
+++ b/docker_templates/magnum/magnum-api/start.sh
@@ -0,0 +1 @@
+../../../docker/common/magnum/magnum-api/start.sh \ No newline at end of file
diff --git a/docker_templates/magnum/magnum-base/Dockerfile.j2 b/docker_templates/magnum/magnum-base/Dockerfile.j2
new file mode 100644
index 000000000..c49da1cd5
--- /dev/null
+++ b/docker_templates/magnum/magnum-base/Dockerfile.j2
@@ -0,0 +1,32 @@
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
+MAINTAINER Kolla Project (https://launchpad.net/kolla)
+
+{% if install_type == 'binary' %}
+ {% if base_distro in ['centos', 'oraclelinux'] %}
+
+RUN curl https://copr.fedoraproject.org/coprs/sdake/openstack-magnum/repo/epel-7/sdake-openstack-magnum-epel-7.repo -o /etc/yum.repos.d/sdake-openstack-magnum-epel-7.repo
+
+ {% elif base_distro in ['fedora'] %}
+
+RUN curl https://copr.fedoraproject.org/coprs/sdake/openstack-magnum/repo/fedora-22/sdake-openstack-magnum-fedora-22.repo -o /etc/yum.repos.d/sdake-openstack-magnum-f22.repo
+
+ {% elif base_distro in ['ubuntu', 'debian'] %}
+
+RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
+ && /bin/false
+
+ {% endif %}
+{% elif install_type == 'source' %}
+
+ADD ./magnum.tar /
+RUN ln -s /magnum-* /magnum
+
+RUN cd /magnum \
+ && useradd --user-group magnum \
+ && pip install -r requirements.txt \
+ && pip install /magnum \
+ && mkdir /etc/magnum /var/log/magnum \
+ && cp -r /magnum/etc/* /etc/magnum/ \
+ && rm -rf /root/.cache
+
+{% endif %}
diff --git a/docker_templates/magnum/magnum-base/build b/docker_templates/magnum/magnum-base/build
new file mode 120000
index 000000000..43944faa0
--- /dev/null
+++ b/docker_templates/magnum/magnum-base/build
@@ -0,0 +1 @@
+../../../tools/build-docker-image \ No newline at end of file
diff --git a/docker_templates/magnum/magnum-conductor/Dockerfile.j2 b/docker_templates/magnum/magnum-conductor/Dockerfile.j2
new file mode 100644
index 000000000..2f1660359
--- /dev/null
+++ b/docker_templates/magnum/magnum-conductor/Dockerfile.j2
@@ -0,0 +1,21 @@
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-magnum-base:{{ tag }}
+MAINTAINER Kolla Project (https://launchpad.net/kolla)
+
+{% if install_type == 'binary' %}
+ {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
+
+RUN yum -y install openstack-magnum-conductor \
+ tar \
+ && yum clean all
+
+# Install kubectl binary (ugh)
+RUN cd /tmp && curl -L https://github.com/GoogleCloudPlatform/kubernetes/releases/download/v0.15.0/kubernetes.tar.gz -o /tmp/kubernetes.tar.gz && /usr/bin/tar -xzvf /tmp/kubernetes.tar.gz && cp -a /tmp/kubernetes/platforms/linux/amd64/kubectl /usr/bin/kubectl && rm -rf /tmp/kubernetes
+
+ {% endif %}
+{% endif %}
+
+COPY ./start.sh /
+COPY config-external.sh /opt/kolla/
+
+CMD ["/start.sh"]
+
diff --git a/docker_templates/magnum/magnum-conductor/build b/docker_templates/magnum/magnum-conductor/build
new file mode 120000
index 000000000..43944faa0
--- /dev/null
+++ b/docker_templates/magnum/magnum-conductor/build
@@ -0,0 +1 @@
+../../../tools/build-docker-image \ No newline at end of file
diff --git a/docker_templates/magnum/magnum-conductor/config-external.sh b/docker_templates/magnum/magnum-conductor/config-external.sh
new file mode 120000
index 000000000..694c7b5d7
--- /dev/null
+++ b/docker_templates/magnum/magnum-conductor/config-external.sh
@@ -0,0 +1 @@
+../../../docker/common/magnum/magnum-conductor/config-external.sh \ No newline at end of file
diff --git a/docker_templates/magnum/magnum-conductor/start.sh b/docker_templates/magnum/magnum-conductor/start.sh
new file mode 120000
index 000000000..42ca31c46
--- /dev/null
+++ b/docker_templates/magnum/magnum-conductor/start.sh
@@ -0,0 +1 @@
+../../../docker/common/magnum/magnum-conductor/start.sh \ No newline at end of file