有关使用以下步骤的具体示例,请参见示例 6。
开始之前
确保要使用的 UAR 文件已存在。
IP—用来连接到节点的 ILOM 的 IP 地址。
USER—通常,用户为 root。
PASS—root 的口令。
HOST_MAC—系统的 MAC 地址。
# ironic node-create options
此时将显示新节点的属性,包括节点的 UUID。
# ironic node-update options
# ironic port-create options
# ironic node-validate options
# ironic node-set-provision-state options
# ironic node-show options
本示例假定:
用于承载节点的计算机的基本信息
主机名:mynewnode.example.com
体系结构:x86
IP 地址:1.1.1.1
MAC 地址:01:02:03:04:05:06
ILOM 主机的基本信息:
主机名:mynewnode-aa.example.com
IP 地址:2.2.2.2
用户:root
口令:password
UAR 文件的名称:myuar.server/sol11-3-x86.uar
# export ILOM_IP=2.2.2.2 # export ILOM_USER=root # export ILOM_PASS=password # export HOST_MAC=01:02:03:04:05:06 # ironic node-create -d solaris -i ipmi_address=$ILOM_IP \ -i ipmi_username=$ILOM_USER -i ipmi_password=$ILOM_PASS +--------------+----------------------------------------------------------+节点已创建 | Property | Value | +--------------+----------------------------------------------------------+ | uuid | 4eacbfde-4977-4d8c-8043-8cbe8f876187 | | driver_info | {u'ipmi_address': u'2.2.2.2', u'ipmi_username': u'root', | | | u'ipmi_password': u'password'} | | extra | {} | | driver | solaris | | chassis_uuid | None | | properties | {} | +--------------+----------------------------------------------------------+ # export NODE=4eacbfde-4977-4d8c-8043-8cbe8f876187UUID 已保存 # ironic node-update $NODE \ add driver_info/archive_uri=http://myuar.server/sol11-3-x86.uar +------------------------+-----------------------------------------------------------+ | Property | Value | +------------------------+-----------------------------------------------------------+ | instance_uuid | None | | target_power_state | None | | properties | {} | | maintenance | False | | driver_info | {u'archive_uri': u'http://myuar.server/sol11-3-x86.uar', | | | u'ipmi_address': u'2.2.2.2', u'ipmi_username': u'root', | | | u'ipmi_password': u'password'} | | extra | {} | | last_error | None | | created_at | 2014-10-03T15:38:43+00:00 | | target_provision_state | None | | driver | solaris | | updated_at | 2014-10-03T15:53:04+00:00 | | instance_info | | | chassis_uuid | None | | provision_state | None | | reservation | None | | power_state | None | | console_enabled | False | | uuid | 4eacbfde-4977-4d8c-8043-8cbe8f876187 | +------------------------+-----------------------------------------------------------+ # ironic port-create -n $NODE -a $HOST_MAC +-----------+--------------------------------------+ | Property | Value | +-----------+--------------------------------------+ | node_uuid | 4eacbfde-4977-4d8c-8043-8cbe8f876187 | | extra | {} | | uuid | 4c765ab0-2529-4463-a51b-e5544dd15a32 | | address | 01:02:03:04:05:06 | +-----------+--------------------------------------+ # ironic node-validate $NODE +------------+--------+---------------+ | Interface | Result | Reason | +------------+--------+---------------+ | console | None | not supported | | deploy | True | | | management | True | | | power | True | | +------------+--------+---------------+ # ironic node-set-provision-state $NODE active节点已置备 # ironic node-show $NODE +------------------------+----------------------------------------------------------+ | Property | Value | +------------------------+----------------------------------------------------------+ |instance_uuid | None | |target_power_state | None | |properties | {} | |maintenance | False | |driver_info | {u'archive_uri': u'http://myuar.server/sol11-3-x86.uar', | | | u'ipmi_address': u'2.2.2.2', u'ipmi_username': u'root', | | | u'ipmi_password': u'password'} | |extra | {} | |last_error | None | |created_at | 2014-10-03T15:38:43+00:00 | |target_provision_state | deploy_complete | |driver | solaris | |updated_at | 2014-10-03T15:53:04+00:00 | |instance_info | | |chassis_uuid | None | |provision_state | active | |reservation | None | |power_state | power on | |console_enabled | False | |uuid | 4eacbfde-4977-4d8c-8043-8cbe8f876187 | +------------------------+----------------------------------------------------------+
如果您在置备正在进行时发出了 ironic node-show 命令,则 provision_state 将指示一个不同于 active 的状态。