Metal3 (Metal-Kubed) is an open source tool that provides components for bare metal host management utilizing the Kubernetes native API. (see https://metal3.io/)
Currently requires an Ubuntu (22.04 LTS) host to enable testing on Equinix.
- Create a non-root user with sudo access
If one does not already exist e.g:
sudo useradd auser -m -s /bin/bash
sudo echo "auser ALL=NOPASSWD: ALL" > /etc/sudoers.d/auser
sudo su - auser
- Clone this metal3-demo repo
git clone https://github.com/suse-edge/metal3-demo.git
- Install pre-requisite packages
cd metal3-demo
./01_prepare_host.sh
- (optional) customize extra_vars.yml
If desired the defaults from extra_vars.yml
can be customized, copy the file and export EXTRA_VARS_FILE
to reference the copied file location.
- Configure the host
-
In the main directory of the repository, execute the script to configure the host:
./02_configure_host.sh
- Create management cluster
./03_launch_mgmt_cluster.sh
- Apply the BareMetalHost manifests
kubectl apply -f ~/metal3-demo-files/baremetalhosts
The host will now be registered and inspected, which will take several minutes,
you can monitor progress via kubectl get bmh
until the host reaches available
state
kubectl get bmh
NAME STATE CONSUMER ONLINE ERROR AGE
controlplane-0 available true 9m44s
worker-0 available true 9m44s
- You may pass
-vvv
at the end of the scripts to see more verbose output, or to pass arbitrary additional arguments to ansible-playbook - You can interact with Ironic directly on the metal3-core VM for debugging e.g
ssh [email protected] baremetal node list
- For more information about the BareMetalHost resource states refer to the Metal3 documentation
- If a BareMetalHost resource is stuck in the inspecting state,
virsh console
can be useful to view the inspection ramdisk output