Add templated dockerfiles for ironic

Partially-implements: blueprint ironic-container

Change-Id: I7869c49c851a95c12fffaf426abd6625f3f1a212
This commit is contained in:
Jeff Peeler 2015-08-19 15:59:06 -04:00
parent 76630d26a5
commit e0f0e2105f
10 changed files with 142 additions and 0 deletions

View 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"]

View 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

View 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

View 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 %}

View 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"]

View 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

View 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

View 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"]

View 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

View 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