Add Dockerfile template for Cinder
Change-Id: I3791b58f15802f9ddbedb48d1a846813b05e0209 Partially-Implements: blueprint dockerfile-template
This commit is contained in:
parent
a0a859ac92
commit
87b8d2c133
16
docker_templates/cinder/cinder-api/Dockerfile.j2
Normal file
16
docker_templates/cinder/cinder-api/Dockerfile.j2
Normal file
@ -0,0 +1,16 @@
|
||||
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-cinder-base:{{ tag }}
|
||||
MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
|
||||
|
||||
RUN yum install -y python-keystone \
|
||||
&& yum clean all
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
COPY ./start.sh /
|
||||
COPY config-external.sh /opt/kolla/
|
||||
|
||||
CMD ["/start.sh"]
|
1
docker_templates/cinder/cinder-api/build
Symbolic link
1
docker_templates/cinder/cinder-api/build
Symbolic link
@ -0,0 +1 @@
|
||||
../../../tools/build-docker-image
|
1
docker_templates/cinder/cinder-api/config-external.sh
Symbolic link
1
docker_templates/cinder/cinder-api/config-external.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../docker/common/cinder/cinder-api/config-external.sh
|
1
docker_templates/cinder/cinder-api/start.sh
Symbolic link
1
docker_templates/cinder/cinder-api/start.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../docker/common/cinder/cinder-api/start.sh
|
7
docker_templates/cinder/cinder-backup/Dockerfile.j2
Normal file
7
docker_templates/cinder/cinder-backup/Dockerfile.j2
Normal file
@ -0,0 +1,7 @@
|
||||
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-cinder-base:{{ tag }}
|
||||
MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
||||
|
||||
COPY ./start.sh /
|
||||
COPY config-external.sh /opt/kolla/
|
||||
|
||||
CMD ["/start.sh"]
|
1
docker_templates/cinder/cinder-backup/build
Symbolic link
1
docker_templates/cinder/cinder-backup/build
Symbolic link
@ -0,0 +1 @@
|
||||
../../../tools/build-docker-image
|
1
docker_templates/cinder/cinder-backup/config-external.sh
Symbolic link
1
docker_templates/cinder/cinder-backup/config-external.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../docker/common/cinder/cinder-backup/config-external.sh
|
1
docker_templates/cinder/cinder-backup/start.sh
Symbolic link
1
docker_templates/cinder/cinder-backup/start.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../docker/common/cinder/cinder-backup/start.sh
|
32
docker_templates/cinder/cinder-base/Dockerfile.j2
Normal file
32
docker_templates/cinder/cinder-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 ['fedora', 'centos', 'oraclelinux'] %}
|
||||
|
||||
RUN yum -y install openstack-cinder \
|
||||
automaton \
|
||||
&& yum clean all
|
||||
|
||||
{% elif base_distro in ['ubuntu', 'debian'] %}
|
||||
|
||||
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
||||
&& /bin/false
|
||||
|
||||
{% endif %}
|
||||
{% elif install_type == 'source' %}
|
||||
|
||||
ADD ./cinder.tar /
|
||||
RUN ln -s /cinder-* /cinder
|
||||
|
||||
RUN cd /cinder \
|
||||
&& useradd --user-group cinder \
|
||||
&& pip install -r requirements.txt \
|
||||
&& pip install /cinder \
|
||||
&& mkdir /etc/cinder /var/log/cinder \
|
||||
&& cp -r /cinder/etc/cinder/* /etc/cinder/ \
|
||||
&& cp /etc/cinder/cinder.conf.sample /etc/cinder/cinder.conf \
|
||||
&& chown -R cinder: /etc/cinder /var/log/cinder \
|
||||
&& rm -rf /root/.cache
|
||||
|
||||
{% endif %}
|
1
docker_templates/cinder/cinder-base/build
Symbolic link
1
docker_templates/cinder/cinder-base/build
Symbolic link
@ -0,0 +1 @@
|
||||
../../../tools/build-docker-image
|
9
docker_templates/cinder/cinder-data/Dockerfile.j2
Normal file
9
docker_templates/cinder/cinder-data/Dockerfile.j2
Normal file
@ -0,0 +1,9 @@
|
||||
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-cinder-base:{{ tag }}
|
||||
MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
||||
|
||||
RUN mkdir -p /opt/data
|
||||
VOLUME [ "/opt/data" ]
|
||||
|
||||
# Command needed to start the data container.
|
||||
# Note: data containers do not need to be persistent.
|
||||
CMD ["/bin/true"]
|
1
docker_templates/cinder/cinder-data/build
Symbolic link
1
docker_templates/cinder/cinder-data/build
Symbolic link
@ -0,0 +1 @@
|
||||
../../../tools/build-docker-image
|
7
docker_templates/cinder/cinder-scheduler/Dockerfile.j2
Normal file
7
docker_templates/cinder/cinder-scheduler/Dockerfile.j2
Normal file
@ -0,0 +1,7 @@
|
||||
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-cinder-base:{{ tag }}
|
||||
MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
||||
|
||||
COPY ./start.sh /
|
||||
COPY config-external.sh /opt/kolla/
|
||||
|
||||
CMD ["/start.sh"]
|
1
docker_templates/cinder/cinder-scheduler/build
Symbolic link
1
docker_templates/cinder/cinder-scheduler/build
Symbolic link
@ -0,0 +1 @@
|
||||
../../../tools/build-docker-image
|
1
docker_templates/cinder/cinder-scheduler/config-external.sh
Symbolic link
1
docker_templates/cinder/cinder-scheduler/config-external.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../docker/common/cinder/cinder-scheduler/config-external.sh
|
1
docker_templates/cinder/cinder-scheduler/start.sh
Symbolic link
1
docker_templates/cinder/cinder-scheduler/start.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../docker/common/cinder/cinder-scheduler/start.sh
|
17
docker_templates/cinder/cinder-volume/Dockerfile.j2
Normal file
17
docker_templates/cinder/cinder-volume/Dockerfile.j2
Normal file
@ -0,0 +1,17 @@
|
||||
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-cinder-base:{{ tag }}
|
||||
MAINTAINER Kolla Project (https://launchpad.net/kolla)
|
||||
|
||||
{% if install_type == 'binary' %}
|
||||
{% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
|
||||
|
||||
RUN yum install -y lvm2 \
|
||||
scsi-target-utils \
|
||||
&& yum clean all
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
COPY ./start.sh /
|
||||
COPY config-external.sh /opt/kolla/
|
||||
|
||||
CMD ["/start.sh"]
|
1
docker_templates/cinder/cinder-volume/build
Symbolic link
1
docker_templates/cinder/cinder-volume/build
Symbolic link
@ -0,0 +1 @@
|
||||
../../../tools/build-docker-image
|
1
docker_templates/cinder/cinder-volume/config-external.sh
Symbolic link
1
docker_templates/cinder/cinder-volume/config-external.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../docker/common/cinder/cinder-volume/config-external.sh
|
1
docker_templates/cinder/cinder-volume/start.sh
Symbolic link
1
docker_templates/cinder/cinder-volume/start.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../../docker/common/cinder/cinder-volume/start.sh
|
Loading…
Reference in New Issue
Block a user