Add templated dockerfiles for ironic
Partially-implements: blueprint ironic-container Change-Id: I7869c49c851a95c12fffaf426abd6625f3f1a212
This commit is contained in:
parent
76630d26a5
commit
e0f0e2105f
17
docker_templates/ironic/ironic-api/Dockerfile.j2
Normal file
17
docker_templates/ironic/ironic-api/Dockerfile.j2
Normal file
@ -0,0 +1,17 @@
|
||||
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ironic-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-ironic-api \
|
||||
&& yum clean all
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
COPY start.sh /
|
||||
COPY config-external.sh /opt/kolla/
|
||||
|
||||
CMD ["/start.sh"]
|
11
docker_templates/ironic/ironic-api/config-external.sh
Normal file
11
docker_templates/ironic/ironic-api/config-external.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
SOURCE="/opt/kolla/ironic-api/ironic.conf"
|
||||
TARGET="/etc/ironic/ironic.conf"
|
||||
OWNER="ironic"
|
||||
|
||||
if [[ -f "$SOURCE" ]]; then
|
||||
cp $SOURCE $TARGET
|
||||
chown ${OWNER}: $TARGET
|
||||
chmod 0644 $TARGET
|
||||
fi
|
10
docker_templates/ironic/ironic-api/start.sh
Executable file
10
docker_templates/ironic/ironic-api/start.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -o errexit
|
||||
|
||||
CMD="/usr/bin/ironic-api"
|
||||
ARGS=""
|
||||
|
||||
source /opt/kolla/kolla-common.sh
|
||||
set_configs
|
||||
|
||||
exec $CMD $ARGS
|
28
docker_templates/ironic/ironic-base/Dockerfile.j2
Normal file
28
docker_templates/ironic/ironic-base/Dockerfile.j2
Normal file
@ -0,0 +1,28 @@
|
||||
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'] %}
|
||||
|
||||
# until packaging is fixed, all of this is required
|
||||
# api: policy
|
||||
# conductor:MySQL-python
|
||||
RUN yum -y install \
|
||||
python-oslo-log \
|
||||
python-oslo-concurrency \
|
||||
python-oslo-policy \
|
||||
MySQL-python \
|
||||
&& 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' %}
|
||||
|
||||
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
|
||||
&& /bin/false
|
||||
|
||||
{% endif %}
|
17
docker_templates/ironic/ironic-conductor/Dockerfile.j2
Normal file
17
docker_templates/ironic/ironic-conductor/Dockerfile.j2
Normal file
@ -0,0 +1,17 @@
|
||||
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ironic-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-ironic-conductor \
|
||||
&& yum clean all
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
COPY start.sh /
|
||||
COPY config-external.sh /opt/kolla/
|
||||
|
||||
CMD ["/start.sh"]
|
11
docker_templates/ironic/ironic-conductor/config-external.sh
Normal file
11
docker_templates/ironic/ironic-conductor/config-external.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
SOURCE="/opt/kolla/ironic-api/ironic.conf"
|
||||
TARGET="/etc/ironic/ironic.conf"
|
||||
OWNER="ironic"
|
||||
|
||||
if [[ -f "$SOURCE" ]]; then
|
||||
cp $SOURCE $TARGET
|
||||
chown ${OWNER}: $TARGET
|
||||
chmod 0644 $TARGET
|
||||
fi
|
10
docker_templates/ironic/ironic-conductor/start.sh
Executable file
10
docker_templates/ironic/ironic-conductor/start.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -o errexit
|
||||
|
||||
CMD="/usr/bin/ironic-conductor"
|
||||
ARGS=""
|
||||
|
||||
source /opt/kolla/kolla-common.sh
|
||||
set_configs
|
||||
|
||||
exec $CMD $ARGS
|
17
docker_templates/ironic/ironic-discoverd/Dockerfile.j2
Normal file
17
docker_templates/ironic/ironic-discoverd/Dockerfile.j2
Normal file
@ -0,0 +1,17 @@
|
||||
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-ironic-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-ironic-discoverd \
|
||||
&& yum clean all
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
COPY start.sh /
|
||||
COPY config-external.sh /opt/kolla/
|
||||
|
||||
CMD ["/start.sh"]
|
11
docker_templates/ironic/ironic-discoverd/config-external.sh
Normal file
11
docker_templates/ironic/ironic-discoverd/config-external.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
SOURCE="/opt/kolla/ironic-discoverd/discoverd.conf"
|
||||
TARGET="/etc/ironic-discoverd/discoverd.conf"
|
||||
OWNER="ironic"
|
||||
|
||||
if [[ -f "$SOURCE" ]]; then
|
||||
cp $SOURCE $TARGET
|
||||
chown ${OWNER}: $TARGET
|
||||
chmod 0644 $TARGET
|
||||
fi
|
10
docker_templates/ironic/ironic-discoverd/start.sh
Executable file
10
docker_templates/ironic/ironic-discoverd/start.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -o errexit
|
||||
|
||||
CMD="/usr/bin/ironic-discoverd"
|
||||
ARGS=""
|
||||
|
||||
source /opt/kolla/kolla-common.sh
|
||||
set_configs
|
||||
|
||||
exec $CMD $ARGS
|
Loading…
Reference in New Issue
Block a user