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 # && yum clean all
{% endif %} {% endif %}
{% elif install_type == 'source' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %} {% endif %}
COPY start.sh / COPY start.sh /

View File

@ -1,33 +1,28 @@
FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }} FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-base:{{ tag }}
MAINTAINER Kolla Project (https://launchpad.net/kolla) 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 \ RUN yum -y install \
&& yum clean all tftp-server \
syslinux-tftpboot \
&& yum clean all \
&& mkdir -p /tftpboot \
&& cp /var/lib/tftpboot/chain.c32 /tftpboot
# PXE configuration {% elif base_distro in ['ubuntu', 'debian'] %}
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'] %} RUN apt-get install --no-install-recommends \
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \ tftpd-hpa \
&& /bin/false syslinux-common \
pxelinux \
{% endif %} && apt-get clean \
&& mkdir -p /tftpboot \
{% elif install_type == 'source' %} && cp /usr/lib/syslinux/pxelinux.0 /var/lib/tftpboot/chain.c32 /tftpboot
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% endif %} {% endif %}
COPY tftp-map-file /tftpboot/map-file
COPY start.sh / COPY start.sh /
CMD ["/start.sh"] CMD ["/start.sh"]

View File

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