diff options
| author | Swapnil Kulkarni <me@coolsvap.net> | 2015-08-13 02:25:47 +0000 |
|---|---|---|
| committer | Swapnil Kulkarni <me@coolsvap.net> | 2015-08-14 04:19:35 +0000 |
| commit | ca3a8744120812fa1026c163fbfc6da68d5b1a38 (patch) | |
| tree | 5a84344589795807bc7dcb3e3790fc6917bd770d | |
| parent | a0a859ac9281dc28e7e0e2d3ae002b068af6f706 (diff) | |
| download | kolla-ca3a8744120812fa1026c163fbfc6da68d5b1a38.tar.gz kolla-ca3a8744120812fa1026c163fbfc6da68d5b1a38.zip | |
Add Dockerfile template for Magnum
Change-Id: I919560ad437724595ba83170a852116be011bff8
Partially-Implements: blueprint dockerfile-template
| -rw-r--r-- | docker_templates/magnum/magnum-api/Dockerfile.j2 | 17 | ||||
| l--------- | docker_templates/magnum/magnum-api/build | 1 | ||||
| l--------- | docker_templates/magnum/magnum-api/config-external.sh | 1 | ||||
| l--------- | docker_templates/magnum/magnum-api/start.sh | 1 | ||||
| -rw-r--r-- | docker_templates/magnum/magnum-base/Dockerfile.j2 | 32 | ||||
| l--------- | docker_templates/magnum/magnum-base/build | 1 | ||||
| -rw-r--r-- | docker_templates/magnum/magnum-conductor/Dockerfile.j2 | 21 | ||||
| l--------- | docker_templates/magnum/magnum-conductor/build | 1 | ||||
| l--------- | docker_templates/magnum/magnum-conductor/config-external.sh | 1 | ||||
| l--------- | docker_templates/magnum/magnum-conductor/start.sh | 1 |
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 |
