PXE for Ironic for ubuntu

This makes Ironic build properly from source.

Change-Id: Ic61cd945760843aae1f0a01738bca3b818fd2f69
Closes-Bug: #1500577
This commit is contained in:
Sam Yaple 2015-10-04 03:58:27 +00:00
parent d55be10ddd
commit 3a56ce1826
3 changed files with 20 additions and 27 deletions

View File

@ -11,12 +11,6 @@ RUN pip install ironic-discoverd
# && yum clean all
{% endif %}
{% elif install_type == 'source' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %}
COPY start.sh /

View File

@ -1,33 +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 ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
{% if base_distro in ['centos', 'fedora', 'oraclelinux', 'rhel'] %}
RUN yum -y install tftp-server syslinux-tftpboot \
&& yum clean all
RUN yum -y install \
tftp-server \
syslinux-tftpboot \
&& yum clean all \
&& mkdir -p /tftpboot \
&& cp /var/lib/tftpboot/chain.c32 /tftpboot
# PXE configuration
RUN mkdir -p /tftpboot \
&& cp /var/lib/tftpboot/chain.c32 /tftpboot \
&& echo 're ^(/tftpboot/) /tftpboot/\2' > /tftpboot/map-file \
&& echo 're ^/tftpboot/ /tftpboot/' >> /tftpboot/map-file \
&& echo 're ^(^/) /tftpboot/\1' >> /tftpboot/map-file \
&& echo 're ^([^/]) /tftpboot/\1' >> /tftpboot/map-file
{% elif base_distro in ['ubuntu', 'debian'] %}
{% 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
RUN apt-get install --no-install-recommends \
tftpd-hpa \
syslinux-common \
pxelinux \
&& apt-get clean \
&& mkdir -p /tftpboot \
&& cp /usr/lib/syslinux/pxelinux.0 /var/lib/tftpboot/chain.c32 /tftpboot
{% endif %}
COPY tftp-map-file /tftpboot/map-file
COPY start.sh /
CMD ["/start.sh"]

View File

@ -0,0 +1,4 @@
re ^(/tftpboot/) /tftpboot/\2
re ^/tftpboot/ /tftpboot/
re ^(^/) /tftpboot/\1
re ^([^/]) /tftpboot/\1