Chameleon sites can support a wide variety of hardware. Here's how to manage each type for a given site.
Baremetal
Bare metal nodes can be registered via Doni, the registration and inventory service. Doni is enabled by default for all CHI-in-a-Box sites since 2021/04; if you have an older deployment, you can deploy Doni by checking out the latest version of CHI-in-a-Box and deploying it manually:
The client, python-doniclient, integrates with the openstack commandline interface. Some commands must be run as an admin user, due to the possibility of exposing sensitive information.
It's often more convenient to describe hardware to import as structured data, rather than shell wrangling. python-doniclient supports using json as input for creating one or more nodes.
To do so, use the hardware import command, and specify a json, structured as an array of objects.
In the example below, items enclosed in <..> should be replaced by your actual value.
--dry-run will print the configuration to your terminal, instead of sending the command
--skip-existing will, when adding multiple nodes, skip any that have already been enrolled. This allows re-running by appending to the same json file.
Watching Progress
After a node has been "enrolled", Doni will synchronize the state for Ironic and Blazar.
Get the UUID with openstack hardware list, then get the detailed info with openstack hardware show <uuid>. Each worker will eventually transition from PENDING to IN Progress to STEADY.
Afterwards, the node will be visible in the rest of the system.
in the Horizon Web UI under leases/host calendar
In the Admin Web UI under admin/system/ironic-baremetal-provisioning
In the output of openstack baremetal node list
In the output if openstack reservation host list
Updating a node's availability
It's possible to "block out" a period of time for a bare metal node so that users cannot reserve it. This can be useful for performing maintenance or managing/accessing the hardware outside of Chameleon. You can update a node's availability by PATCHing its /availability subresource.
For each availability window, a maintenance lease is created in the reservation system. This lease will show up in the host calendar so that users can see when the node will be available once again.
Note: avoid manually updating the maintenance leases or deleting them in Blazar! Instead, manage them via the inventory service.
# Remove availability window at slot 0 (i.e., the first one in the list)openstackhardwareset4ea18b84-c182-48c5-ac23-3d6cdccd5ec1--delete0
To update an existing window:
# Update availability window at slot 0 (i.e., the first one in the list)openstackhardwareset4ea18b84-c182-48c5-ac23-3d6cdccd5ec1 \availability--update02021-05-01T00:00:00Z2021-07-01T00:00:00Z