class PXEAndIPMIToolDriver(base.BaseDriver):
def __init__(self):
self.power = ipmitool.IPMIPower()
self.deploy = pxe.PXEDeploy()
pxe_vendor = pxe.VendorPassthru()
ipmi_vendor = ipmitool.VendorPassthru()
mapping = {'pass_deploy_info': pxe_vendor,
'set_boot_device': ipmi_vendor}
self.vendor = utils.MixinVendorInterface(mapping)
class IPMIPower(base.PowerInterface):
def get_power_state(self, task, node):
...
def set_power_state(self, task, node, pstate):
...
def reboot(self, task, node):
...
ramdisk collects hardware properties and posts back to ironic-inspector, which
{
"nodes": [
{
"pm_type":"pxe_ipmitool",
"mac":[
"fa:16:3e:2a:0e:36"
],
"pm_user":"admin",
"pm_password":"password",
"pm_addr":"10.0.0.8"
},
{
"pm_type":"pxe_ipmitool",
"mac":[
"fa:16:3e:da:39:c9"
],
"pm_user":"admin",
"pm_password":"password",
"pm_addr":"10.0.0.15"
},
...
]
}
$ openstack baremetal import --json instackenv.json
[
{
"description": "Fail introspection for unexpected nodes",
"conditions": [
{"op": "lt", "field": "memory_mb", "value": 4096}
],
"actions": [
{"action": "fail", "message": "Memory too low, expected at least 4 GiB"}
]
},
{
"description": "Assign possible profiles for compute and controller",
"conditions": [
{"op": "lt", "field": "local_gb", "value": 1024},
{"op": "ge", "field": "local_gb", "value": 40}
],
"actions": [
{"action": "set-capability", "name": "compute_profile", "value": "1"},
{"action": "set-capability", "name": "control_profile", "value": "1"}
]
}
]
$ openstack baremetal introspection rule import /path/to/rules.json
$ openstack baremetal introspection bulk start
$ openstack overcloud profiles list
$ openstack overcloud deploy --templates