Customizations for Ironic

This patchset contains customization of Dockerfile of Ironic
containers.

Change-Id: If6ffb741111127886f754ddebd17059174387fc8
Partially-implements: blueprint third-party-plugin-support
This commit is contained in:
Shaun Smekel 2016-08-12 08:16:11 +10:00
parent e4259f805b
commit b597c90827
5 changed files with 60 additions and 63 deletions

View File

@ -1,25 +1,23 @@
FROM {{ namespace }}/{{ image_prefix }}ironic-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-ironic-api \
&& yum clean all
{% set ironic_api_packages = ['openstack-ironic-api'] %}
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
ironic-api \
&& apt-get clean
{% set ironic_api_packages = ['ironic-api'] %}
{% endif %}
{{ macros.install_packages(ironic_api_packages | customizable("packages")) }}
{% endif %}
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block ironic_api_footer %}{% endblock %}
{{ include_footer }}
USER ironic

View File

@ -1,20 +1,17 @@
FROM {{ namespace }}/{{ image_prefix }}openstack-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-ironic-common \
&& yum clean all
{% set ironic_base_packages = ['openstack-ironic-common'] %}
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
ironic-common \
&& apt-get clean
{% set ironic_base_packages = ['ironic-common'] %}
{% endif %}
{{ macros.install_packages(ironic_base_packages | customizable("packages")) }}
{% elif install_type == 'source' %}
ADD ironic-base-archive /ironic-base-source
@ -30,3 +27,5 @@ RUN ln -s ironic-base-source/* ironic \
RUN usermod -a -G kolla ironic \
&& chown -R ironic: /etc/ironic
{% block ironic_base_footer %}{% endblock %}

View File

@ -1,41 +1,38 @@
FROM {{ namespace }}/{{ image_prefix }}ironic-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-ironic-conductor \
qemu-img \
&& yum clean all
{% set ironic_conductor_packages = [
'openstack-ironic-conductor',
'qemu-img'
] %}
{% elif base_distro in ['ubuntu'] %}
RUN apt-get -y install --no-install-recommends \
ironic-conductor \
qemu-utils \
ipmitool \
&& apt-get clean
{% set ironic_conductor_packages = [
'ironic-conductor',
'qemu-utils',
'ipmitool'
] %}
{% endif %}
{% elif install_type == 'source' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
qemu-img \
ipmitool \
&& yum clean all
{% set ironic_conductor_packages = [
'qemu-img',
'ipmitool'
] %}
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN apt-get -y install --no-install-recommends \
qemu-utils \
ipmitool \
&& apt-get clean
{% set ironic_conductor_packages = [
'qemu-utils',
'ipmitool'
] %}
{% endif %}
{% endif %}
{{ macros.install_packages(ironic_conductor_packages | customizable("packages")) }}
{% block ironic_conductor_footer %}{% endblock %}
{{ include_footer }}
USER ironic

View File

@ -1,16 +1,18 @@
FROM {{ namespace }}/{{ image_prefix }}ironic-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
openstack-ironic-inspector \
&& yum clean all
{% set ironic_inspector_packages = ['openstack-ironic-inspector'] %}
{% endif %}
{{ macros.install_packages(ironic_inspector_packages | customizable("packages")) }}
{% endif %}
{% block ironic_inspector_footer %}{% endblock %}
{{ include_footer }}
USER ironic

View File

@ -1,25 +1,26 @@
FROM {{ namespace }}/{{ image_prefix }}ironic-base:{{ tag }}
MAINTAINER {{ maintainer }}
{% import "macros.j2" as macros with context %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install \
tftp-server \
syslinux-tftpboot \
&& yum clean all
{% set ironic_pxe_packages = [
'tftp-server',
'syslinux-tftpboot'
] %}
{% elif base_distro in ['ubuntu', 'debian'] %}
RUN apt-get -y install --no-install-recommends \
tftpd-hpa \
syslinux-common \
syslinux \
&& apt-get clean
{% set ironic_pxe_packages = [
'tftpd-hpa',
'syslinux-common',
'syslinux'
] %}
{% endif %}
{{ macros.install_packages(ironic_pxe_packages | customizable("packages")) }}
COPY tftp-map-file /map-file
COPY extend_start.sh /usr/local/bin/kolla_extend_start
RUN chmod 755 /usr/local/bin/kolla_extend_start
{% block ironic_pxe_footer %}{% endblock %}
{{ include_footer }}