Provision workers on Bare Metal
There are essentially two ways to bootstrap your bare metal machines with meltcloud.
- through a locally attached ISO (a USB Stick/SD-card or virtual media)
- through a PXE enabled network boot infrastructure
Prerequisites
- Create an iPXE Boot Artifact
- Prepare the network environment
- Make sure you have a bare metal machine at hand 😉
- To be used as a Machine, the machine requires at least 3GB RAM and some disk space for docker images.
WARNING
Be aware that meltcloud will wipe the contents of the disk device on each boot – ensure to save your holiday pictures beforehand!
Bootstrap via ISO
Booting machines over a locally attached ISO shall be considered if a DHCP/PXE supported network boot is not possible within the environment.
- Download the ISO file from your iPXE Boot Artifact and either mount it as a virtual media or flash it onto a SD-Card or USB drive. To create a bootable drive either use a tool like Etcher or built-in command line tools of your OS.
# identify the USB/SD device on your local machine
# make sure the device is not mounted
sudo umount /dev/sdd
# copy the ISO with dd onto your drive
sudo dd if=/path/to/iso/ipxe.iso of=/dev/sdd
- Once finished, safely remove your drive and plug it into your bare metal machine.
- Make sure your BIOS/UEFI boot settings are configured to allow booting from your SD/USB drive
- The machine will now automatically boot into the immmutable OS and register itself on meltcloud.io
WARNING
The ISO must remain attached to the node all the time. meltcloud does not install any operating system on the disk. Once you remove the drive, the machine will no longer be able to boot correctly.
Bootstrap via network
Launching machines in a network boot enabled setup is the preferred option for meltcloud environments. Benefit from the high automation degree without having to touch the physical machines.
Prepare Environment
As described in the prerequisites, meltcloud environments rely on external network configuration to allow integration to the target environment. To leverage network boot a PXE environment must be configured:
TFTP
- Configure the TFTP server to serve files.
# enable built-in tftp server
enable-tftp
tftp-secure
tftp-root=/srv/tftp
- Copy the boot artifacts onto the tftp-root path.
- copy ipxe.efi for UEFI based systems
- copy undionly.kpxe for legacy BIOS based systems
cp undionly.kpxe ipxe.efi /srv/tftp
DHCP Configuration
The DHCP configuration slightly differs based on the product in use. The following DHCP options must be provided to allow for a correct boot.
Number | Option name | Description |
---|---|---|
3 | router | tells the client which router is the default gateway |
6 | dns-server | tells the client which DNS services to use |
121 | classless-static-route | tells the client to add specific routes. this can be useful is you use multiple network interfaces and want to propagate certain routes to some interface (i.e. default route on some interface) |
In addition, DHCP must be configured to support PXE. Most DHCP servers allow serving different files for UEFI or Legacy BIOS. A working example can be found below.
...
# define an IP range for DHCP
dhcp-range=<ip-from>,<ip-to>,<mask>,<lease-time>
# default DHCP options for gateway, DNS, ntp
dhcp-option=option:router,<gateway-ip>
dhcp-option=option:dns-server,<dns-ip>
dhcp-option=option:ntp-server,<ntp-ip>
# dhcp-pxe configuration
# identify client architecture: efi
dhcp-match=set:efi-x86_64,option:client-arch,7
dhcp-match=set:efi-x86_64,option:client-arch,9
# identify client architecture: bios
dhcp-match=set:bios,option:client-arch,0
# set boot config according to architecture
dhcp-boot=tag:efi-x86_64,ipxe.efi
dhcp-boot=tag:bios,undionly.kpxe
...
Boot Machine
Make sure your machine's BIOS/UEFI boot configuration is set to always boot from network. This will ensure the machine will reconsile after planned or unplanned reboots.
Power on the machine and verify that it is booting into the immutable OS.
You should be able to find the machine on app.meltcloud.io
INFO
Before assigning the machine to a machine pool, verify that the machine pool's configuration (network, disk) matches the devices detected by meltcloud.
Assign the machine to the designed machine pool as described here and turn it into a worker node.