Server Provisioning
This section describes how the provisioning of bare metal servers is handled in IronCore's baremetal 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
ServerClaimReconciler
watches forServerClaim
resources and reserves aServer
resource by updating its state toBound
and transitions theServer
from anAvailable
state to aReserved
state.The
ServerClaimReconciler
creates aServerBootConfiguration
resource for the claimedServer
, which contains the boot image and Ignition configuration. This process is similar to theServerBootConfiguration
created by theServerReconciler
forServers
in theInitial
state. Here however, theServerBootConfiguration
contains the operating system image and the Ignition configuration as specified in theServerClaim
resource.The
boot-operator
watches theServerBootConfiguration
and creates and serves the necessary boot images and Ignition configurations.The
ServerReconciler
watches theServerBootConfiguration
to 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 theServerClaim
spec.power
field.
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.