Skip to main content

Bare-metal API and CLI

All endpoints are under /api/v1/baremetal on the controller (through the daemon at /api/v1/platform/controller). Roles are Machina roles; "token" means a single-use or short-lived token instead of a sign-in.

Endpoints​

Method and pathRolePurpose
GET /servers, POST /serversoperator, adminList; register
PUT /servers/{id}/bmcadminAttach or change BMC type, address and login (audited)
POST /importadminRegister up to 500 servers; existing ones are skipped
POST /discoveradminScan a private IPv4 range for Redfish BMCs, optionally register them
POST /servers/{id}/poweradminon, off, cycle, reset (dry_run)
GET /servers/{id}/power-stateoperatorWhat the BMC reports
POST /servers/{id}/boot-deviceadminpxe, disk, cdrom, once or persistent
POST /servers/{id}/virtual-mediaadmininsert or eject
POST /servers/{id}/bmc-info/refresh, GET /servers/{id}/bmc-infooperatorRedfish read model
POST /servers/{id}/sol-tokenadminSerial console token (audited)
POST /servers/{id}/commissionadminStart commissioning
GET /servers/{id}/inventoryoperatorThe commissioning report
POST /servers/{id}/lifecycleadminGeneric transition
POST /servers/{id}/zoneadminSet the zone
POST /allocate, POST /servers/{id}/release, GET /zonesoperatorAllocation
POST /servers/{id}/deployadminImage or installer deploy
GET /images, POST /images, DELETE /images/{name}operator, adminOS image catalog
GET /profiles, PUT /profiles, DELETE /profiles/{name}, POST /provisionoperator, adminProfiles and one-step provisioning
GET /boot/dnsmasq.confadminproxyDHCP and TFTP configuration
GET /boot/ipxe, GET /boot/commission.sh, GET /boot/deploy.shnoneBoot service (public by design)
GET /boot/plan/{id}/{token}, POST /deploy/{id}/completetokenImage deploy plan and result
GET /boot/install/{id}/{token}/{name}tokenInstaller documents
POST /commissioning/{id}/reporttokenCommissioning report
GET /dist/images/{name} (not under /baremetal)noneImages, with Range
GET /ws/v1/baremetal/{id}/sol?token= (WebSocket)tokenSerial console

Enrolment tokens (POST /api/v1/enrollment/tokens) also accept cluster_id, site, rack, tags, networks and storage_pools.

machinactl​

CommandDoes
metal list, metal zonesServers with lifecycle, zone, power, MAC, BMC and error; counts per zone
metal add HOSTNAME --bmc ADDRRegister (password from MACHINA_BMC_PASSWORD)
metal bmc-set ID --type T --address AAttach or change BMC details
metal import --csv FILEBulk registration
metal discover --cidr NET [--import]Scan (credentials from MACHINA_BMC_CREDENTIALS)
metal commission ID, metal inventory IDCommissioning and its report
metal power ID on|off|cycle|resetPower through the BMC
metal allocate, metal release IDAllocation
metal deploy ID --os OS --key KEYDeploy
metal image list|catalog|add|rmOS images
metal profile list|add|rm, metal provision --profile P --count NProfiles
metal dnsmasq --subnet NETproxyDHCP and TFTP configuration
bootstrapPublic URL, join listener, publish the agent, wait for health
host add USER@HOST... or host add --file FJoin nodes over SSH, in parallel, with labels
dist publish, dist publish-metal, dist statusPublish the agent and the ramdisk and ISOs

Configuration​

Controller environment variables (set them in /etc/default/machina-platform).

VariableDefaultPurpose
MACHINA_API_KEY_MASTER_KEYunsetEncrypts BMC and fencing passwords at rest; unset means plaintext
MACHINA_PUBLIC_URL, MACHINA_CONTROLLER_TLS_ADDRsee environmentWhat machines are told to call; the pinned join listener
MACHINA_DIST_DIR/var/lib/machina/distRamdisk, installer media, ISOs and images
MACHINA_BMC_VERIFY_TLS, MACHINA_BMC_CA_FILEoff, unsetVerify Redfish certificates (BMCs ship self-signed)
MACHINA_BMC_POLL_SECS0Poll BMC power state (minimum 30; 0 is off)
MACHINA_BMC_SCAN_ANYoffAllow discovery outside private ranges
MACHINA_BMC_LIBVIRT_URI, MACHINA_BMC_LIBVIRT_PREFIX, MACHINA_BMC_LIBVIRT_ANYqemu:///system, metal-test-, offThe libvirt driver, for labs
MACHINA_IPMITOOLipmitoolThe ipmitool binary
MACHINA_METAL_AUTO_ENROLLoffEnrol unknown PXE MACs
MACHINA_METAL_AUTODEPLOY_SECS60Profile top-up interval; 0 is off
MACHINA_METAL_NO_AUTO_POWERoffDo not reset or power on after setting the boot override
MACHINA_METAL_ALLOW_HTTP_JOINoffAllow deploys without the TLS join listener (lab only)
MACHINA_METAL_IMAGE_MAX_BYTES20 GiBLargest image an import may download
MACHINA_METAL_IPXE_ISO_URLderivediPXE ISO URL for virtual-media boots
MACHINA_METAL_RHEL_REPOunsetPackage repository for kickstart installs