Add Dockerfile template for Magnum
Change-Id: I919560ad437724595ba83170a852116be011bff8 Partially-Implements: blueprint dockerfile-template
This commit is contained in:
parent
a0a859ac92
commit
ca3a874412
17
docker_templates/magnum/magnum-api/Dockerfile.j2
Normal file
17
docker_templates/magnum/magnum-api/Dockerfile.j2
Normal file
@ -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"]
|
||||
|
1
docker_templates/magnum/magnum-api/build
Symbolic link
1
docker_templates/magnum/magnum-api/build
Symbolic link
@ -0,0 +1 @@
|
||||
../../../tools/build-docker-image
|
1
docker_templates/magnum/magnum-api/config-external.sh
Symbolic link
1
docker_templates/magnum/magnum-api/config-external.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../docker/common/magnum/magnum-api/config-external.sh
|
1
docker_templates/magnum/magnum-api/start.sh
Symbolic link
1
docker_templates/magnum/magnum-api/start.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../docker/common/magnum/magnum-api/start.sh
|
32
docker_templates/magnum/magnum-base/Dockerfile.j2
Normal file
32
docker_templates/magnum/magnum-base/Dockerfile.j2
Normal file
@ -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 %}
|
1
docker_templates/magnum/magnum-base/build
Symbolic link
1
docker_templates/magnum/magnum-base/build
Symbolic link
@ -0,0 +1 @@
|
||||
../../../tools/build-docker-image
|
21
docker_templates/magnum/magnum-conductor/Dockerfile.j2
Normal file
21
docker_templates/magnum/magnum-conductor/Dockerfile.j2
Normal file
@ -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"]
|
||||
|
1
docker_templates/magnum/magnum-conductor/build
Symbolic link
1
docker_templates/magnum/magnum-conductor/build
Symbolic link
@ -0,0 +1 @@
|
||||
../../../tools/build-docker-image
|
1
docker_templates/magnum/magnum-conductor/config-external.sh
Symbolic link
1
docker_templates/magnum/magnum-conductor/config-external.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../docker/common/magnum/magnum-conductor/config-external.sh
|
1
docker_templates/magnum/magnum-conductor/start.sh
Symbolic link
1
docker_templates/magnum/magnum-conductor/start.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../docker/common/magnum/magnum-conductor/start.sh
|
Loading…
Reference in New Issue
Block a user