Merge "doc: Use dnsmasq to run tftp server"
This commit is contained in:
@@ -59,27 +59,26 @@ A DHCP server is required for network boot clients. You need to follow steps bel
|
|||||||
Replace eth2 with the interface on the network node which you are using to
|
Replace eth2 with the interface on the network node which you are using to
|
||||||
connect to the Bare Metal service.
|
connect to the Bare Metal service.
|
||||||
|
|
||||||
TFTP server setup
|
TFTP Server Setup
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
In order to deploy instances via PXE, a TFTP server needs to be
|
In order to deploy instances via PXE, a TFTP server needs to be
|
||||||
set up on the Bare Metal service nodes which run the ``ironic-conductor``.
|
set up on the Bare Metal service nodes which run the ``ironic-conductor``.
|
||||||
|
|
||||||
#. Make sure the tftp root directory exist and can be written to by the
|
Debian or Ubuntu
|
||||||
|
~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
In Debian or Ubuntu, xinetd can be used to run tftp server service.
|
||||||
|
|
||||||
|
#. Make sure the tftp root directory exists and can be written to by the
|
||||||
user the ``ironic-conductor`` is running as. For example::
|
user the ``ironic-conductor`` is running as. For example::
|
||||||
|
|
||||||
sudo mkdir -p /tftpboot
|
sudo mkdir -p /tftpboot
|
||||||
sudo chown -R ironic /tftpboot
|
sudo chown -R ironic /tftpboot
|
||||||
|
|
||||||
#. Install tftp server:
|
#. Install tftp server::
|
||||||
|
|
||||||
Ubuntu::
|
sudo apt-get install xinetd tftpd-hpa
|
||||||
|
|
||||||
sudo apt-get install xinetd tftpd-hpa
|
|
||||||
|
|
||||||
RHEL8/CentOS8/Fedora::
|
|
||||||
|
|
||||||
sudo dnf install tftp-server xinetd
|
|
||||||
|
|
||||||
#. Using xinetd to provide a tftp server setup to serve ``/tftpboot``.
|
#. Using xinetd to provide a tftp server setup to serve ``/tftpboot``.
|
||||||
Create or edit ``/etc/xinetd.d/tftp`` as below::
|
Create or edit ``/etc/xinetd.d/tftp`` as below::
|
||||||
@@ -99,15 +98,9 @@ set up on the Bare Metal service nodes which run the ``ironic-conductor``.
|
|||||||
flags = IPv4
|
flags = IPv4
|
||||||
}
|
}
|
||||||
|
|
||||||
and restart the ``xinetd`` service:
|
and restart the ``xinetd`` service::
|
||||||
|
|
||||||
Ubuntu::
|
sudo systemctl restart xinetd
|
||||||
|
|
||||||
sudo service xinetd restart
|
|
||||||
|
|
||||||
Fedora/RHEL8/CentOS8::
|
|
||||||
|
|
||||||
sudo systemctl restart xinetd
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
@@ -127,6 +120,41 @@ set up on the Bare Metal service nodes which run the ``ironic-conductor``.
|
|||||||
echo 're ^(^/) /tftpboot/\1' >> /tftpboot/map-file
|
echo 're ^(^/) /tftpboot/\1' >> /tftpboot/map-file
|
||||||
echo 're ^([^/]) /tftpboot/\1' >> /tftpboot/map-file
|
echo 're ^([^/]) /tftpboot/\1' >> /tftpboot/map-file
|
||||||
|
|
||||||
|
RHEL or CentOS
|
||||||
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
In RHEL or CentOS, xinetd is not available. So use a dedicated dnsmasq instance
|
||||||
|
to run tftp server service.
|
||||||
|
|
||||||
|
#. Make sure the tftp root directory exists and can be written to by the
|
||||||
|
user the ``ironic-conductor`` is running as. For example::
|
||||||
|
|
||||||
|
sudo mkdir -p /tftpboot
|
||||||
|
sudo chown -R ironic /tftpboot
|
||||||
|
|
||||||
|
#. Install tftp server::
|
||||||
|
|
||||||
|
sudo dnf install openstack-ironic-dnsmasq-tftp-server
|
||||||
|
|
||||||
|
#. Using dndmasq to provide a tftp server setup to serve ``/tftpboot``.
|
||||||
|
Edit ``/etc/ironic/dnsmasq-tftp-server.conf`` as below::
|
||||||
|
|
||||||
|
port=0
|
||||||
|
bind-interfaces
|
||||||
|
enable-tftp
|
||||||
|
tftp-root=/tftproot
|
||||||
|
|
||||||
|
and restart the ``openstack-ironic-dnsmasq-tftp-server`` service::
|
||||||
|
|
||||||
|
sudo systemctl restart openstack-ironic-dnsmasq-tftp-server
|
||||||
|
|
||||||
|
#. Create a map file in the tftp boot directory (``/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
|
||||||
|
|
||||||
.. _uefi-pxe-grub:
|
.. _uefi-pxe-grub:
|
||||||
|
|
||||||
UEFI PXE - Grub setup
|
UEFI PXE - Grub setup
|
||||||
|
Reference in New Issue
Block a user