Basic implementation of Railway's "Zero-Touch Bare Metal at Scale" article using Go with Temporal for workflow orchestration, Pixiecore for booting, and UniFi for basic network queries.
'Onboard' a bare-metal server by providing its BMC MAC address, and the application finds the machine, scrapes its RedFish API for hardware details, and persists them in a DB. When that bare-metal server is then started up, it is PXE-booted straight to a Linux installer specified by this application based on the configuration of that server.
The 'bare metal' server in this case can be two separate machines (e.g., VMs) for the purposes of simulating a real server with a BMC.
sequenceDiagram
actor Admin
participant Control Plane & Pixiecore
participant Temporal Core
participant Temporal Worker
participant Router
participant Server BMC
participant Server
alt "Machine onboarding flow"
Admin->>Temporal Core: Initiate machine 'onboarding' request of MAC 1 through CLI
Temporal Core->>Temporal Worker: Start 'onboarding workflow
Temporal Worker->>Router: Activity: Check what IP corresponds to MAC 1
Temporal Worker->>Server BMC: Activity: Scrape RedFish REST API provided by BMC on given IP
Temporal Worker->>Control Plane: Activity: Store server data from RedFish to Control Plane DB
end
alt "Machine OS boot and install workflow"
Admin->>Server: Turn on server/initiate PXE boot (manual in this POC, RedFish controlled in reality)
Server->>Control Plane: Make DHCP boot requests, which are served by Pixiecore
Control Plane->>Control Plane: Check database to determine which boot config to provide
Control Plane->>Server: Pixiecore: Netboot machine with given configs
Server->>Server: Install OS from given configurations
end
- Make sure your local machine firewall allows UDP traffic on 67,68,69 as these are used by Pixiecore
- Make sure your local router is not serving PXE boot requests, to avoid interfering with the boot process
-
Run RedFish emulator on your 'BMC' host:
# in case you want to build the container, in case your host is e.g. arm64 like a Raspberry Pi podman build -t dmtf/redfish-interface-emulator:latest https://github.com/DMTF/Redfish-Interface-Emulator.git podman run --rm --detach --name redfish-emulator -p 5000:5000 dmtf/redfish-interface-emulator:latest -
Get the MAC address of the BMC host
-
Configure
.envwith credentials to UniFi router -
make containers- spins up Temporal backend and pixiecore -
make worker- run a Temporal worker -
make migrate- prepare control plane DB -
Initiate onboarding with
go run main.go onboard $MAC- with the MAC of your 'BMC' host.
This 'onboards' the new machine to the control plane database, with a given hardware config and MAC addresses.
- Configure
.env.and runsource .envin all terminals used to run these commands make containers- make sure all containers are upmake control-plane- run the control plane API- Create a VM, and give it a MAC address of
12:44:6A:3B:04:11- this is one of the defaults used in the RedFish emulator. - Trigger boot - power on that VM, and it will boot into a CentOS installer, as defined by the selection logic here to choose the server type, and the configurations here to specify boot options.
The VM will talk to Pixiecore, which in turn asks the control plane which configs to give to the newly booting machine with MAC 12:44:6A:3B:04:11. The control plane DB has this MAC, since you onboarded the server whose RedFish API returned this MAC address.