Server Provisioning
This section describes how the provisioning of bare metal servers is handled in IronCore's bare metal automation. In the discovery section we discussed how servers are discovered and first time booted and how they are transitioned into an Available state. Now we will focus on the provisioning process, and one can use such a Server resource to provision a custom operating system and automate the software installation on such a server.
Claiming a Server
The core concept in the provisioning process is the ServerClaim resource.
An example of a ServerClaim resource is as follows:
apiVersion: metal.ironcore.dev/v1alpha1
kind: ServerClaim
metadata:
name: my-server-claim
namespace: default
spec:
power: "On"
serverRef:
name: "my-server"
image: "my-osimage:latest"
ignitionSecretRef:
name: "my-ignition-secret"This example directly references a Server resource by providing the serverRef field. You can also dynamically claim a server by providing a label selector in the spec.serverSelector field, which will match a Server resource.
In both cases, only Servers in an Available state can be claimed.
Provisioning Flow
The provisioning flow looks like this:
The
ServerClaimReconcilerwatches forServerClaimresources and reserves aServerresource by updating its state toBoundand transitions theServerfrom anAvailablestate to aReservedstate.The
ServerClaimReconcilercreates aServerBootConfigurationresource for the claimedServer, which contains the boot image and Ignition configuration. This process is similar to theServerBootConfigurationcreated by theServerReconcilerforServersin theInitialstate. Here however, theServerBootConfigurationcontains the operating system image and the Ignition configuration as specified in theServerClaimresource.The
boot-operatorwatches theServerBootConfigurationand creates and serves the necessary boot images and Ignition configurations.The
ServerReconcilerwatches theServerBootConfigurationto becomeReady, which indicates that the boot images and Ignition configurations are ready to be used. Once that happens it ensures the power state as specified in theServerClaimspec.powerfield.
The server will boot using the iPXE or HTTP boot configuration served by the boot-operator, start the specified operating system and apply the Ignition configuration.