Skip to content

Add Machines ​

Machines can be added to your organization in one of two ways:

Self-Register ​

If a Machine enrolls via Enrollment Images, it automatically registers itself with its unique BIOS UUID in the associated organization in meltcloud.

If a Machine with the UUID already exists (i.e. on subsequent boot or if it was pre-registered), then the configuration for the Machine with this UUID is applied.

Once the Machine has registered itself, it will be in status ready_unassigned. From this point onwards, it can be managed in the web UI or API, for example assigned to a Machine Pool.

The enrollment tasks (Bare Metal, macOS, Linux, Windows) use this approach to add a Machine.

Pre-Register ​

If you have a fleet of servers and want to configure them in meltcloud before boot (i.e. already assign them to pools, give them names etc.), you can pre-register the Machines in advance:

  1. Go to Machines → Pre-register Machine
  2. Configure the properties:
PropertyDescriptionRequired
UUIDThe hardware UUID of the Machine (from SMBIOS/DMI)Yes
NameThe hostname of this MachineNo
Operational Network ProfileUsed once the Machine is assigned to a Machine PoolYes
Depot Network ProfileUsed when the Machine is unassigned or in recoveryYes
Assign Static IPsFixed addresses out of the IP Pools the Network Profiles use. Only shown when a Profile addresses with IPAMNo
Machine PoolThe Machine Pool (and Cluster) this Machine belongs toNo
ZoneThe Zone this Machine is in. Sets the topology.kubernetes.io/region and topology.kubernetes.io/zone labels. Only shown when the Organization has ZonesNo
LabelsKubernetes labels applied to the node object when this Machine joins a ClusterNo
  1. Click Create

Once your Machines boot, they will automatically take over the configuration prepared for the specific UUID.

Terraform ​

Reference

Pre-registered ​

terraform
# register a machine assigned to the pool
resource "meltcloud_machine" "node1" {
  uuid = "0442228d-023e-42ab-af34-da267d3e9c37"
  name = "meltcloud-node01"

  network_profile_id       = meltcloud_network_profile.single_untagged.id
  depot_network_profile_id = meltcloud_network_profile.single_untagged.id

  machine_pool_id = meltcloud_machine_pool.example.id
}
terraform
# register an unassigned machine
resource "meltcloud_machine" "node2" {
  uuid = "8d8fd677-db06-4acf-ac34-920b950ddbe5"
  name = "meltcloud-node02"

  network_profile_id       = meltcloud_network_profile.single_untagged.id
  depot_network_profile_id = meltcloud_network_profile.auto.id

  # sets the Kubernetes labels topology.kubernetes.io/region and topology.kubernetes.io/zone
  zone_id = meltcloud_zone.zrh_dc1.id

  labels = {
    "node-role.example.com/storage" = "true"
  }
}

Self-registered ​

terraform
# import a machine that self-registered during enrollment.
# The id can be found from the URL in foundry.
import {
  to = meltcloud_machine.worker1
  id = "machines/42"
}

resource "meltcloud_machine" "worker1" {
  uuid = "cb4b3a08-3c3d-4b0e-9a1e-2f1d9a2f7c11"
  name = "worker1"

  network_profile_id       = data.meltcloud_network_profile.default.id
  depot_network_profile_id = data.meltcloud_network_profile.default.id

  machine_pool_id = meltcloud_machine_pool.example.id
}

data "meltcloud_network_profile" "default" {
  name = "default"
}