2
Create
Networks
Upload
Images
Group
“Compute”
Nodes
(VMs vs BMs)
Create
Flavors
Register
Bare
Metal
Nodes
Select
Network
Start VM
Instances
Start BM
Instances
Select
OS and
Flavor
Enjoy!
OpenStack
User
APIs Nova
KVM
Ironic
VM
VM
VM
BM
BM
BM
Create
networks Create 100
virtual instances
Create 4
physical
instances
Build a big data
cluster with physical
and virtual instances
8
L2 Switch
BM
NIC NIC
LAG
bond
Configured by
ML2 plug-in
Configured by
cloud-init using
metadata
L2 Switch
BM
NIC
VLANs set by
by ML2 plug-in
BM
NIC
L2 Switch
Create Tenant Networks
Register BM in
Ironic
Create Port for BM
Specify
Tenant VLANs
Specify Physical
Switch Port Details
Provisioning Network is
configured in the switch
Boot BM on
Tenant
Network
ML2 Plug-in
Configures
Switch
BM is
Provisioned
ML2 Plug-in
Configures
Switch
Tenant Network is
configured in the switch
BM is ready
15
[stack@undercloud ~]$ openstack baremetal introspection rule list
+--------------------------------------+-----------------------------------------+
| UUID | Description |
+--------------------------------------+-----------------------------------------+
| 823ac164-05af-4289-99ae-461dde2d7029 | Set default IPMI credentials |
| 271f93d7-0ac5-4dfa-94c2-e474f61171e8 | Set the vendor driver for Dell hardware |
+--------------------------------------+-----------------------------------------+
$ cat > rule1.json << EOF
[
{
"description": "Set default IPMI credentials",
"conditions": [
{"op": "eq", "field": "data://auto_discovered", "value": true}
],
"actions": [
{"action": "set-attribute", "path": " driver_info/ipmi_username",
"value": " root"},
{"action": "set-attribute", "path": "driver_info/ipmi_password",
"value": " calvin"}
]
}
]
EOF
$ openstack baremetal introspection rule import rule1.json
cat > rule2.json << EOF
[
{
"description": "Set the vendor driver for Dell hardware",
"conditions": [
{"op": "eq", "field": "data://auto_discovered", "value": true},
{"op": "eq", "field": "data://inventory.system_vendor.manufacturer",
"value": "Dell Inc."}
],
"actions": [
{"action": "set-attribute", "path": "driver", "value": "pxe_drac"},
{"action": "set-attribute", "path": "driver_info/drac_username",
"value": "root"},
{"action": "set-attribute", "path": "driver_info/drac_password",
"value": "calvin"},
{"action": "set-attribute", "path": "driver_info/drac_address",
"value": "{data[inventory][bmc_address]}"}
]
}
]
EOF
$ openstack baremetal introspection rule import rule2.json
Data collected during
inspection
21
openstack baremetal node create 
--driver redfish 
--driver-info redfish_address=https://example.com 
--driver-info redfish_system_id=/redfish/v1/Systems/CX34R87 
--driver-info redfish_username=admin 
--driver-info redfish_password=password
{
"nodes": [
{
"pm_type":"ipmi",
"mac":[
"fa:16:3e:2a:0e:36"
],
"cpu":"2",
"memory":"4096",
"disk":"40",
"arch":"x86_64",
"pm_user":"admin",
"pm_password":"password",
"pm_addr":"https://example.com"
"pm_system_id":"/redfish/v1/Systems/CX34R87"
}
]
}
26
$ openstack baremetal introspection data save $NODE_ID | jq .all_interfaces.em1.lldp_processed``
$ openstack baremetal introspection interface list $NODE_ID
+-----------+-------------------+------------------------+-------------------+----------------+
| Interface | MAC Address | Switch Port VLAN IDs | Switch Chassis ID | Switch Port ID |
+-----------+-------------------+------------------------+-------------------+----------------+
| p2p2 | 00:0a:f7:79:93:19 | [103, 102, 18, 20, 42] | 64:64:9b:31:12:00 | 510 |
| p2p1 | 00:0a:f7:79:93:18 | [101] | 64:64:9b:31:12:00 | 507 |
| em1 | c8:1f:66:c7:e8:2f | [162] | 08:81:f4:a6:b3:80 | 515 |
| em2 | c8:1f:66:c7:e8:30 | [182, 183] | 08:81:f4:a6:b3:80 | 559 |
+-----------+-------------------+------------------------+-------------------+----------------+
OpenStack Ironic - Bare Metal-as-a-Service

OpenStack Ironic - Bare Metal-as-a-Service

  • 2.
  • 5.
  • 6.
  • 7.
    OpenStack User APIs Nova KVM Ironic VM VM VM BM BM BM Create networks Create100 virtual instances Create 4 physical instances Build a big data cluster with physical and virtual instances
  • 8.
  • 10.
    L2 Switch BM NIC NIC LAG bond Configuredby ML2 plug-in Configured by cloud-init using metadata L2 Switch BM NIC VLANs set by by ML2 plug-in BM NIC L2 Switch
  • 12.
    Create Tenant Networks RegisterBM in Ironic Create Port for BM Specify Tenant VLANs Specify Physical Switch Port Details
  • 13.
    Provisioning Network is configuredin the switch Boot BM on Tenant Network ML2 Plug-in Configures Switch BM is Provisioned ML2 Plug-in Configures Switch Tenant Network is configured in the switch BM is ready
  • 15.
  • 18.
    [stack@undercloud ~]$ openstackbaremetal introspection rule list +--------------------------------------+-----------------------------------------+ | UUID | Description | +--------------------------------------+-----------------------------------------+ | 823ac164-05af-4289-99ae-461dde2d7029 | Set default IPMI credentials | | 271f93d7-0ac5-4dfa-94c2-e474f61171e8 | Set the vendor driver for Dell hardware | +--------------------------------------+-----------------------------------------+
  • 19.
    $ cat >rule1.json << EOF [ { "description": "Set default IPMI credentials", "conditions": [ {"op": "eq", "field": "data://auto_discovered", "value": true} ], "actions": [ {"action": "set-attribute", "path": " driver_info/ipmi_username", "value": " root"}, {"action": "set-attribute", "path": "driver_info/ipmi_password", "value": " calvin"} ] } ] EOF $ openstack baremetal introspection rule import rule1.json
  • 20.
    cat > rule2.json<< EOF [ { "description": "Set the vendor driver for Dell hardware", "conditions": [ {"op": "eq", "field": "data://auto_discovered", "value": true}, {"op": "eq", "field": "data://inventory.system_vendor.manufacturer", "value": "Dell Inc."} ], "actions": [ {"action": "set-attribute", "path": "driver", "value": "pxe_drac"}, {"action": "set-attribute", "path": "driver_info/drac_username", "value": "root"}, {"action": "set-attribute", "path": "driver_info/drac_password", "value": "calvin"}, {"action": "set-attribute", "path": "driver_info/drac_address", "value": "{data[inventory][bmc_address]}"} ] } ] EOF $ openstack baremetal introspection rule import rule2.json Data collected during inspection
  • 21.
  • 24.
    openstack baremetal nodecreate --driver redfish --driver-info redfish_address=https://example.com --driver-info redfish_system_id=/redfish/v1/Systems/CX34R87 --driver-info redfish_username=admin --driver-info redfish_password=password
  • 25.
  • 26.
  • 27.
    $ openstack baremetalintrospection data save $NODE_ID | jq .all_interfaces.em1.lldp_processed`` $ openstack baremetal introspection interface list $NODE_ID +-----------+-------------------+------------------------+-------------------+----------------+ | Interface | MAC Address | Switch Port VLAN IDs | Switch Chassis ID | Switch Port ID | +-----------+-------------------+------------------------+-------------------+----------------+ | p2p2 | 00:0a:f7:79:93:19 | [103, 102, 18, 20, 42] | 64:64:9b:31:12:00 | 510 | | p2p1 | 00:0a:f7:79:93:18 | [101] | 64:64:9b:31:12:00 | 507 | | em1 | c8:1f:66:c7:e8:2f | [162] | 08:81:f4:a6:b3:80 | 515 | | em2 | c8:1f:66:c7:e8:30 | [182, 183] | 08:81:f4:a6:b3:80 | 559 | +-----------+-------------------+------------------------+-------------------+----------------+