Manage bare metal nodes
The bare metal driver for OpenStack Compute manages provisioning of
physical hardware using common cloud APIs and tools such as Orchestration
(Heat). The use case for this driver is for single tenant clouds such as a
high-performance computing cluster or deploying OpenStack itself.
Development efforts are focused on moving the driver out of the Compute code
base in the Icehouse release. If you use the bare metal driver, you must
create and add a network interface to a bare metal node. Then, you can
launch an instance from a bare metal image.
You can list and delete bare metal nodes. When you delete a node, any
associated network interfaces are removed. You can list and remove network
interfaces that are associated with a bare metal node.
Commands
baremetal-interface-add
Adds a network interface to a bare metal node.
baremetal-interface-list
Lists network interfaces associated with a bare metal node.
baremetal-interface-remove
Removes a network interface from a bare metal node.
baremetal-node-create
Creates a bare metal node.
baremetal-node-delete
Removes a bare metal node and any associated interfaces.
baremetal-node-list
Lists available bare metal nodes.
baremetal-node-show
Shows information about a bare metal node.
To manage bare metal nodes
Create a bare metal node:
$ nova baremetal-node-create --pm_address=1.2.3.4 --pm_user=ipmi --pm_password=ipmi $(hostname -f) 1 512 10 aa:bb:cc:dd:ee:ff
+------------------+-------------------+
| Property | Value |
+------------------+-------------------+
| instance_uuid | None |
| pm_address | 1.2.3.4 |
| interfaces | [] |
| prov_vlan_id | None |
| cpus | 1 |
| memory_mb | 512 |
| prov_mac_address | aa:bb:cc:dd:ee:ff |
| service_host | ubuntu |
| local_gb | 10 |
| id | 1 |
| pm_user | ipmi |
| terminal_port | None |
+------------------+-------------------+
Add a network interface to the node:
$ nova baremetal-interface-add 1 aa:bb:cc:dd:ee:ff
+-------------+-------------------+
| Property | Value |
+-------------+-------------------+
| datapath_id | 0 |
| id | 1 |
| port_no | 0 |
| address | aa:bb:cc:dd:ee:ff |
+-------------+-------------------+
Launch an instance from a bare metal image:
$ nova boot --image my-baremetal-image --flavor my-baremetal-flavor test
+-----------------------------+--------------------------------------+
| Property | Value |
+-----------------------------+--------------------------------------+
| status | BUILD |
| id | cc302a8f-cd81-484b-89a8-b75eb3911b1b |
... wait for instance to become active ...
You can list bare metal nodes and interfaces, as follows:
$ nova baremetal-node-list
When a node is in use, its status includes the UUID of the instance
that runs on it:
+----+--------+------+-----------+---------+-------------------
+------+------------+-------------+-------------+---------------+
| ID | Host | CPUs | Memory_MB | Disk_GB | MAC Address
| VLAN | PM Address | PM Username | PM Password | Terminal Port |
+----+--------+------+-----------+---------+-------------------
+------+------------+-------------+-------------+---------------+
| 1 | ubuntu | 1 | 512 | 10 | aa:bb:cc:dd:ee:ff
| None | 1.2.3.4 | ipmi | | None |
+----+--------+------+-----------+---------+-------------------
+------+------------+-------------+-------------+---------------+
Show details for a bare metal node:
$ nova baremetal-node-show 1
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| instance_uuid | cc302a8f-cd81-484b-89a8-b75eb3911b1b |
| pm_address | 1.2.3.4 |
| interfaces |
[{u'datapath_id': u'0', u'id': 1, u'port_no': 0, u'address': u'aa:bb:cc:dd:ee:ff'}] |
| prov_vlan_id | None |
| cpus | 1 |
| memory_mb | 512 |
| prov_mac_address | aa:bb:cc:dd:ee:ff |
| service_host | ubuntu |
| local_gb | 10 |
| id | 1 |
| pm_user | ipmi |
| terminal_port | None |
+------------------+--------------------------------------+
Set the --availability_zone parameter to
specify which zone or node to start the server. You can separate the zone
from the hostname with a comma. As an example:
$ nova boot --availability_zone=zone:host,node
Specifying "host" is optional for the --availability_zone parameter, and "zone:,node" also works.