PXE for Ironic for ubuntu
This makes Ironic build properly from source. Change-Id: Ic61cd945760843aae1f0a01738bca3b818fd2f69 Closes-Bug: #1500577
This commit is contained in:
parent
d55be10ddd
commit
3a56ce1826
@ -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 /
|
||||
|
@ -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'] %}
|
||||
|
||||
RUN yum -y install tftp-server syslinux-tftpboot \
|
||||
&& yum clean all
|
||||
|
||||
# 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
|
||||
RUN yum -y install \
|
||||
tftp-server \
|
||||
syslinux-tftpboot \
|
||||
&& yum clean all \
|
||||
&& mkdir -p /tftpboot \
|
||||
&& cp /var/lib/tftpboot/chain.c32 /tftpboot
|
||||
|
||||
{% 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"]
|
||||
|
4
docker/ironic/ironic-pxe/tftp-map-file
Normal file
4
docker/ironic/ironic-pxe/tftp-map-file
Normal file
@ -0,0 +1,4 @@
|
||||
re ^(/tftpboot/) /tftpboot/\2
|
||||
re ^/tftpboot/ /tftpboot/
|
||||
re ^(^/) /tftpboot/\1
|
||||
re ^([^/]) /tftpboot/\1
|
Loading…
Reference in New Issue
Block a user