Merge "[install docs] ironic -> openstack baremetal CLI"

This commit is contained in:
Jenkins 2017-09-08 20:16:20 +00:00 committed by Gerrit Code Review
commit bed383083a
10 changed files with 107 additions and 105 deletions

View File

@ -46,14 +46,14 @@ and provide the file or HTTP URL to the Bare Metal service.
For the format of the configuration drive, Bare Metal service expects a
``gzipped`` and ``base64`` encoded ISO 9660 [*]_ file with a ``config-2``
label. The
`ironic client <https://docs.openstack.org/python-ironicclient/latest/>`_
label. The `openstack baremetal client
<https://docs.openstack.org/python-ironicclient/latest/cli/osc_plugin_cli.html>`_
can generate a configuration drive in the `expected format`_. Just pass a
directory path containing the files that will be injected into it via the
``--config-drive`` parameter of the ``node-set-provision-state`` command,
for example::
``--config-drive`` parameter of the ``openstack baremetal node deploy``
command, for example::
ironic node-set-provision-state --config-drive /dir/configdrive_files $node_identifier active
openstack baremetal node deploy $node_identifier --config-drive /dir/configdrive_files
Configuration drive storage in an object store

View File

@ -197,7 +197,7 @@ steps on the ironic conductor node to configure the PXE UEFI environment.
#. Update the bare metal node with ``boot_mode`` capability in node's properties
field::
ironic node-update <node-uuid> add properties/capabilities='boot_mode:uefi'
openstack baremetal node set <node-uuid> --property capabilities='boot_mode:uefi'
#. Make sure that bare metal node is configured to boot in UEFI boot mode and
boot device is set to network/pxe.

View File

@ -30,12 +30,12 @@ Choosing a driver
When enrolling a node, the most important information to supply is *driver*.
This can be either a *classic driver* or a *hardware type* - see
:doc:`enabling-drivers` for the difference. The ``driver-list`` command can
:doc:`enabling-drivers` for the difference. The ``driver list`` command can
be used to list all drivers (of both types) enabled on all hosts:
.. code-block:: console
ironic driver-list
openstack baremetal driver list
+---------------------+-----------------------+
| Supported driver(s) | Active host(s) |
+---------------------+-----------------------+
@ -48,7 +48,7 @@ also list only classic or only dynamic drivers:
.. code-block:: console
ironic --ironic-api-version 1.31 driver-list -t dynamic
openstack baremetal --os-baremetal-api-version 1.31 driver list --type dynamic
+---------------------+-----------------------+
| Supported driver(s) | Active host(s) |
+---------------------+-----------------------+
@ -62,12 +62,12 @@ on that.
Each driver has a list of *driver properties* that need to be specified via
the node's ``driver_info`` field, in order for the driver to operate on node.
This list consists of the properties of the hardware interfaces that the driver
uses. These driver properties are available with the ``driver-properties``
uses. These driver properties are available with the ``driver property list``
command:
.. code-block:: console
$ ironic driver-properties pxe_ipmitool
$ openstack baremetal driver property list pxe_ipmitool
+----------------------+-------------------------------------------------------------------------------------------------------------+
| Property | Description |
+----------------------+-------------------------------------------------------------------------------------------------------------+
@ -123,7 +123,7 @@ This section describes the main steps to enroll a node and make it available
for provisioning. Some steps are shown separately for illustration purposes,
and may be combined if desired.
#. Create a node in the Bare Metal service with the ``node-create`` command.
#. Create a node in the Bare Metal service with the ``node create`` command.
At a minimum, you must specify the driver name (for example,
``pxe_ipmitool``, ``agent_ipmitool`` or ``ipmi``).
@ -132,8 +132,8 @@ and may be combined if desired.
.. code-block:: console
$ export IRONIC_API_VERSION=1.11
$ ironic node-create -d pxe_ipmitool
$ export OS_BAREMETAL_API_VERSION=1.11
$ openstack baremetal node create --driver pxe_ipmitool
+--------------+--------------------------------------+
| Property | Value |
+--------------+--------------------------------------+
@ -146,7 +146,7 @@ and may be combined if desired.
| name | None |
+--------------+--------------------------------------+
$ ironic node-show dfc6189f-ad83-4261-9bda-b27258eb1987
$ openstack baremetal node show dfc6189f-ad83-4261-9bda-b27258eb1987
+------------------------+--------------------------------------+
| Property | Value |
+------------------------+--------------------------------------+
@ -171,8 +171,8 @@ and may be combined if desired.
A node may also be referred to by a logical name as well as its UUID.
A name can be assigned to the node during its creation by adding the ``-n``
option to the ``node-create`` command or by updating an existing node with
the ``node-update`` command. See `Logical Names`_ for examples.
option to the ``node create`` command or by updating an existing node with
the ``node set`` command. See `Logical Names`_ for examples.
#. Starting with API version 1.31 (and ``python-ironicclient`` 1.13), you can
pick which hardware interface to use with nodes that use hardware types.
@ -186,15 +186,15 @@ and may be combined if desired.
.. code-block:: console
$ ironic --ironic-api-version 1.31 node-update $NODE_UUID replace \
deploy_interface=direct \
raid_interface=agent
$ openstack baremetal --os-baremetal-api-version 1.31 node set $NODE_UUID \
--deploy-interface direct \
--raid-interface agent
or set during node creation:
.. code-block:: console
$ ironic --ironic-api-version 1.31 node-create -d ipmi \
$ openstack baremetal --os-baremetal-api-version 1.31 node create --driver ipmi \
--deploy-interface direct \
--raid-interface agent
@ -210,10 +210,10 @@ and may be combined if desired.
.. code-block:: console
$ ironic node-update $NODE_UUID add \
driver_info/ipmi_username=$USER \
driver_info/ipmi_password=$PASS \
driver_info/ipmi_address=$ADDRESS
$ openstack baremetal node set $NODE_UUID \
--driver-info ipmi_username=$USER \
--driver-info ipmi_password=$PASS \
--driver-info ipmi_address=$ADDRESS
.. note::
If IPMI is running on a port other than 623 (the default). The port must
@ -222,17 +222,17 @@ and may be combined if desired.
.. code-block:: console
$ ironic node-update $NODE_UUID add driver_info/ipmi_port=$PORT_NUMBER
$ openstack baremetal node set $NODE_UUID --driver-info ipmi_port=$PORT_NUMBER
You may also specify all ``driver_info`` parameters during node
creation by passing the **-i** option multiple times:
creation by passing the **--driver-info** option multiple times:
.. code-block:: console
$ ironic node-create -d pxe_ipmitool \
-i ipmi_username=$USER \
-i ipmi_password=$PASS \
-i ipmi_address=$ADDRESS
$ openstack baremetal node create --driver pxe_ipmitool \
--driver-info ipmi_username=$USER \
--driver-info ipmi_password=$PASS \
--driver-info ipmi_address=$ADDRESS
See `Choosing a driver`_ above for details on driver properties.
@ -241,9 +241,9 @@ and may be combined if desired.
.. code-block:: console
$ ironic node-update $NODE_UUID add \
driver_info/deploy_kernel=$DEPLOY_VMLINUZ_UUID \
driver_info/deploy_ramdisk=$DEPLOY_INITRD_UUID
$ openstack baremetal node set $NODE_UUID \
--driver-info deploy_kernel=$DEPLOY_VMLINUZ_UUID \
--driver-info deploy_ramdisk=$DEPLOY_INITRD_UUID
See :doc:`configure-glance-images` for details.
@ -254,7 +254,7 @@ and may be combined if desired.
.. code-block:: console
$ ironic port-create -n $NODE_UUID -a $MAC_ADDRESS
$ openstack baremetal port create $MAC_ADDRESS --node $NODE_UUID
.. _enrollment-scheduling:
@ -303,25 +303,25 @@ Adding scheduling information
.. code-block:: console
$ ironic node-update $NODE_UUID add \
properties/cpus=$CPU_COUNT \
properties/memory_mb=$RAM_MB \
properties/local_gb=$DISK_GB \
properties/cpu_arch=$ARCH
$ openstack baremetal node set $NODE_UUID \
--property cpus=$CPU_COUNT \
--property memory_mb=$RAM_MB \
--property local_gb=$DISK_GB \
--property cpu_arch=$ARCH
As above, these can also be specified at node creation by passing the **-p**
option to ``node-create`` multiple times:
As above, these can also be specified at node creation by passing the
**--property** option to ``node create`` multiple times:
.. code-block:: console
$ ironic node-create -d pxe_ipmitool \
-i ipmi_username=$USER \
-i ipmi_password=$PASS \
-i ipmi_address=$ADDRESS \
-p cpus=$CPU_COUNT \
-p memory_mb=$RAM_MB \
-p local_gb=$DISK_GB \
-p cpu_arch=$ARCH
$ openstack baremetal node create --driver pxe_ipmitool \
--driver-info ipmi_username=$USER \
--driver-info ipmi_password=$PASS \
--driver-info ipmi_address=$ADDRESS \
--property cpus=$CPU_COUNT \
--property memory_mb=$RAM_MB \
--property local_gb=$DISK_GB \
--property cpu_arch=$ARCH
These values can also be discovered during `Hardware Inspection`_.
@ -348,8 +348,8 @@ Adding scheduling information
.. code-block:: console
$ ironic node-update $NODE_UUID add \
properties/capabilities=key1:val1,key2:val2
$ openstack baremetal node set $NODE_UUID \
--property capabilities=key1:val1,key2:val2
Some capabilities can also be discovered during `Hardware Inspection`_.
@ -361,7 +361,7 @@ Validating node information
.. code-block:: console
$ ironic node-validate $NODE_UUID
$ openstack baremetal node validate $NODE_UUID
+------------+--------+--------+
| Interface | Result | Reason |
+------------+--------+--------+
@ -376,7 +376,7 @@ Validating node information
.. code-block:: console
$ ironic node-validate $NODE_UUID
$ openstack baremetal node validate $NODE_UUID
+------------+--------+-------------------------------------------------------------------------------------------------------------------------------------+
| Interface | Result | Reason |
+------------+--------+-------------------------------------------------------------------------------------------------------------------------------------+
@ -394,7 +394,7 @@ Validating node information
.. code-block:: console
$ ironic node-validate $NODE_UUID
$ openstack baremetal node validate $NODE_UUID
+------------+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Interface | Result | Reason |
+------------+--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
@ -424,8 +424,8 @@ To move a node from ``enroll`` to ``manageable`` provision state:
.. code-block:: console
$ ironic --ironic-api-version 1.11 node-set-provision-state $NODE_UUID manage
$ ironic node-show $NODE_UUID
$ openstack baremetal --os-baremetal-api-version 1.11 node manage $NODE_UUID
$ openstack baremetal node show $NODE_UUID
+------------------------+--------------------------------------------------------------------+
| Property | Value |
+------------------------+--------------------------------------------------------------------+
@ -436,9 +436,9 @@ To move a node from ``enroll`` to ``manageable`` provision state:
+------------------------+--------------------------------------------------------------------+
.. note:: Since it is an asynchronous call, the response for
``ironic node-set-provision-state`` will not indicate whether the
``openstack baremetal node manage`` will not indicate whether the
transition succeeded or not. You can check the status of the
operation via ``ironic node-show``. If it was successful,
operation via ``openstack baremetal node show``. If it was successful,
``provision_state`` will be in the desired state. If it failed,
there will be information in the node's ``last_error``.
@ -450,8 +450,8 @@ To move a node from ``manageable`` to ``available`` provision state:
.. code-block:: console
$ ironic --ironic-api-version 1.11 node-set-provision-state $NODE_UUID provide
$ ironic node-show $NODE_UUID
$ openstack baremetal --os-baremetal-api-version 1.11 node provide $NODE_UUID
$ openstack baremetal node show $NODE_UUID
+------------------------+--------------------------------------------------------------------+
| Property | Value |
+------------------------+--------------------------------------------------------------------+
@ -471,8 +471,8 @@ Logical names
A node may also be referred to by a logical name as well as its UUID.
Names can be assigned either during its creation by adding the ``-n``
option to the ``node-create`` command or by updating an existing node with
the ``node-update`` command.
option to the ``node create`` command or by updating an existing node with
the ``node set`` command.
Node names must be unique, and conform to:
@ -484,13 +484,13 @@ The node is named 'example' in the following examples:
.. code-block:: console
$ ironic node-create -d agent_ipmitool -n example
$ openstack baremetal node create --driver agent_ipmitool --name example
or
.. code-block:: console
$ ironic node-update $NODE_UUID add name=example
$ openstack baremetal node set $NODE_UUID --name example
Once assigned a logical name, a node can then be referred to by name or
@ -498,7 +498,7 @@ UUID interchangeably:
.. code-block:: console
$ ironic node-create -d agent_ipmitool -n example
$ openstack baremetal node create --driver agent_ipmitool --name example
+--------------+--------------------------------------+
| Property | Value |
+--------------+--------------------------------------+
@ -511,7 +511,7 @@ UUID interchangeably:
| name | example |
+--------------+--------------------------------------+
$ ironic node-show example
$ openstack baremetal node show example
+------------------------+--------------------------------------+
| Property | Value |
+------------------------+--------------------------------------+
@ -544,7 +544,7 @@ interfaces for a hardware type (for your deployment):
.. code-block:: console
$ openstack --os-baremetal-api-version 1.31 baremetal driver show ipmi
$ openstack baremetal --os-baremetal-api-version 1.31 driver show ipmi
+-------------------------------+----------------+
| Field | Value |
+-------------------------------+----------------+
@ -614,8 +614,8 @@ A new node is created with the ``ipmi`` driver and no interfaces specified:
.. code-block:: console
$ export IRONIC_API_VERSION=1.31
$ ironic node-create -d ipmi
$ export OS_BAREMETAL_API_VERSION=1.31
$ openstack baremetal node create --driver ipmi
+--------------+--------------------------------------+
| Property | Value |
+--------------+--------------------------------------+

View File

@ -22,7 +22,7 @@ The boot modes can be configured in Bare Metal service in the following way:
To configure a node in ``uefi`` mode, then set ``capabilities`` as below::
ironic node-update <node-uuid> add properties/capabilities='boot_mode:uefi'
openstack baremetal node set <node-uuid> --property capabilities='boot_mode:uefi'
Nodes having ``boot_mode`` set to ``uefi`` may be requested by adding an
``extra_spec`` to the Compute service flavor::

View File

@ -47,7 +47,7 @@ When Ironic is used with the Compute service the disk label should be
set to node's ``properties/capabilities`` field and also to the flavor
which will request such capability, for example::
ironic node-update <node-uuid> add properties/capabilities='disk_label:gpt'
openstack baremetal node set <node-uuid> --property capabilities='disk_label:gpt'
As for the flavor::
@ -59,4 +59,4 @@ When used in standalone mode
When used without the Compute service, the disk label should be set
directly to the node's ``instance_info`` field, as below::
ironic node-update <node-uuid> add instance_info/capabilities='{"disk_label": "gpt"}'
openstack baremetal node set <node-uuid> --instance-info capabilities='{"disk_label": "gpt"}'

View File

@ -27,7 +27,7 @@ Enabling local boot with Compute service
To enable local boot we need to set a capability on the bare metal node,
for example::
ironic node-update <node-uuid> add properties/capabilities="boot_option:local"
openstack baremetal node set <node-uuid> --property capabilities="boot_option:local"
Nodes having ``boot_option`` set to ``local`` may be requested by adding
@ -53,4 +53,4 @@ we need a way to enable local boot when Compute is not present. To do that
we can simply specify the capability via the ``instance_info`` attribute
of the node, for example::
ironic node-update <node-uuid> add instance_info/capabilities='{"boot_option": "local"}'
openstack baremetal node set <node-uuid> --instance-info capabilities='{"boot_option": "local"}'

View File

@ -41,7 +41,7 @@ which disk it should pick for the deployment. The list of supported hints is:
To associate one or more hints with a node, update the node's properties
with a ``root_device`` key, for example::
ironic node-update <node-uuid> add properties/root_device='{"wwn": "0x4000cca77fc4dba1"}'
openstack baremetal node set <node-uuid> --property root_device='{"wwn": "0x4000cca77fc4dba1"}'
That will guarantee that Bare Metal service will pick the disk device that
@ -82,11 +82,11 @@ Examples are:
* Finding a disk larger or equal to 60 GiB and non-rotational (SSD)::
ironic node-update <node-uuid> add properties/root_device='{"size": ">= 60", "rotational": false}'
openstack baremetal node set <node-uuid> --property root_device='{"size": ">= 60", "rotational": false}'
* Finding a disk whose vendor is ``samsung`` or ``winsys``::
ironic node-update <node-uuid> add properties/root_device='{"vendor": "<or> samsung <or> winsys"}'
openstack baremetal node set <node-uuid> --property root_device='{"vendor": "<or> samsung <or> winsys"}'
.. note::
If multiple hints are specified, a device must satisfy all the hints.

View File

@ -27,9 +27,9 @@ with PXE and Nova:
#. Enroll the node and update the node capability value::
ironic node-create -d pxe_ipmitool
openstack baremetal node create --driver pxe_ipmitool
ironic node-update $NODE_UUID add properties/capabilities={'trusted_boot':true}
openstack baremetal node set $NODE_UUID --property capabilities={'trusted_boot':true}
#. Create a special flavor::

View File

@ -62,23 +62,26 @@ There are however some limitations for different drivers:
Steps to start a deployment are pretty similar to those when using Compute:
#. To use the `ironic CLI <https://docs.openstack.org/python-ironicclient/latest/cli/>`_,
#. To use the `openstack baremetal CLI
<https://docs.openstack.org/python-ironicclient/latest/cli/osc_plugin_cli.html>`_,
set up these environment variables. Since no authentication strategy is
being used, the value can be any string for OS_AUTH_TOKEN. IRONIC_URL is
being used, the value can be any string for OS_TOKEN. OS_URL is
the URL of the ironic-api process.
For example::
export OS_AUTH_TOKEN=fake-token
export IRONIC_URL=http://localhost:6385/
export OS_TOKEN=fake-token
export OS_URL=http://localhost:6385/
#. Create a node in Bare Metal service. At minimum, you must specify the driver
name (for example, "pxe_ipmitool"). You can also specify all the required
driver parameters in one command. This will return the node UUID::
ironic node-create -d pxe_ipmitool -i ipmi_address=ipmi.server.net \
-i ipmi_username=user -i ipmi_password=pass \
-i deploy_kernel=file:///images/deploy.vmlinuz \
-i deploy_ramdisk=http://my.server.net/images/deploy.ramdisk
openstack node create --driver pxe_ipmitool \
--driver-info ipmi_address=ipmi.server.net \
--driver-info ipmi_username=user \
--driver-info ipmi_password=pass \
--driver-info deploy_kernel=file:///images/deploy.vmlinuz \
--driver-info deploy_ramdisk=http://my.server.net/images/deploy.ramdisk
+--------------+--------------------------------------------------------------------------+
| Property | Value |
@ -107,26 +110,28 @@ Steps to start a deployment are pretty similar to those when using Compute:
cards which are part of the node by creating a port with each NIC's MAC
address. In this case, they're used for naming of PXE configs for a node::
ironic port-create -n $NODE_UUID -a $MAC_ADDRESS
openstack baremetal port create $MAC_ADDRESS --node $NODE_UUID
#. As there is no Compute service flavor and instance image is not provided with
nova boot command, you also need to specify some fields in ``instance_info``.
For PXE deployment, they are ``image_source``, ``kernel``, ``ramdisk``,
``root_gb``::
ironic node-update $NODE_UUID add instance_info/image_source=$IMG \
instance_info/kernel=$KERNEL instance_info/ramdisk=$RAMDISK \
instance_info/root_gb=10
openstack baremetal node set $NODE_UUID \
--instance-info image_source=$IMG \
--instance-info kernel=$KERNEL \
--instance-info ramdisk=$RAMDISK \
--instance-info root_gb=10
Here $IMG, $KERNEL, $RAMDISK can also be HTTP(S) or file hrefs. For agent
drivers, you don't need to specify kernel and ramdisk, but MD5 checksum of
instance image is required::
ironic node-update $NODE_UUID add instance_info/image_checksum=$MD5HASH
openstack baremetal node set $NODE_UUID --instance-info image_checksum=$MD5HASH
#. Validate that all parameters are correct::
ironic node-validate $NODE_UUID
openstack baremetal node validate $NODE_UUID
+------------+--------+----------------------------------------------------------------+
| Interface | Result | Reason |
@ -139,10 +144,7 @@ Steps to start a deployment are pretty similar to those when using Compute:
#. Now you can start the deployment, run::
ironic node-set-provision-state $NODE_UUID active
You can manage provisioning by issuing this command. Valid provision states
are ``active``, ``rebuild`` and ``deleted``.
openstack baremetal node deploy $NODE_UUID
For iLO drivers, fields that should be provided are:

View File

@ -21,14 +21,14 @@ therein should match the bare metal node properties, and the Compute service fla
Here is an example set of commands to compare the resources in Compute
service and Bare Metal service::
$ ironic node-list
$ openstack baremetal node list
+--------------------------------------+---------------+-------------+--------------------+-------------+
| UUID | Instance UUID | Power State | Provisioning State | Maintenance |
+--------------------------------------+---------------+-------------+--------------------+-------------+
| 86a2b1bb-8b29-4964-a817-f90031debddb | None | power off | available | False |
+--------------------------------------+---------------+-------------+--------------------+-------------+
$ ironic node-show 86a2b1bb-8b29-4964-a817-f90031debddb
$ openstack baremetal node show 86a2b1bb-8b29-4964-a817-f90031debddb
+------------------------+----------------------------------------------------------------------+
| Property | Value |
+------------------------+----------------------------------------------------------------------+
@ -92,17 +92,17 @@ the node to the nova scheduler. Nodes can be placed into maintenance mode
with the following command.
::
$ ironic node-set-maintenance $NODE_UUID on
$ openstack baremetal node maintenance set $NODE_UUID
A maintenance reason may be included with the optional ``--reason`` command
line option. This is a free form text field that will be displayed in the
``maintenance_reason`` section of the ``node-show`` command.
``maintenance_reason`` section of the ``node show`` command.
::
$ ironic node-set-maintenance $UUID on --reason "Need to add ram."
$ openstack baremetal node maintenance set $UUID --reason "Need to add ram."
$ ironic node-show $UUID
$ openstack baremetal node show $UUID
+------------------------+--------------------------------------+
| Property | Value |
@ -121,7 +121,7 @@ To remove maintenance mode and clear any ``maintenance_reason`` use the
following command.
::
$ ironic node-set-maintenance $NODE_UUID off
$ openstack baremetal node maintenance unset $NODE_UUID
.. _ironic-python-agent: https://docs.openstack.org/ironic-python-agent/latest/