2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-14 18:30:23 +00:00

Refactor the MTMS section again to cover the two scenarios

- using bmcsetup to configure BMC with dhcp assigned IP address
- using bmcsetup to configure BMC with different IP in another subnet
This commit is contained in:
Victor Hu
2016-04-15 11:26:51 -04:00
parent 7e2c7b680d
commit b7c841999e
5 changed files with 284 additions and 139 deletions

View File

@ -1,140 +1,14 @@
Discovery
=========
When the IPMI-based servers are connected to power, the default setting from manuafacturing is DHCP mode and the BMCs will obtain a IP address from an open range DHCP server on your network. (xCAT can start an open range on the DHCP server by setting the ``dynamicrange`` attribute in the networks table)
When the IPMI-based servers are connected to power, the BMCs will boot up and attempt to obtain an IP address from an open range dhcp server on your network. In the case for xCAT managed networks, xCAT should be configured serve an open range dhcp IP addresses with the ``dynamicrange`` attribute in the networks table.
When the BMCs have an IP address and is pingable from the xCAT management node, administrators can discover the BMCs using the xCAT :doc:`bmcdiscover </guides/admin-guides/references/man1/bmcdiscover.1>` command and obtain basic information to start the hardware discovery process. When hardware discovery is running, xCAT uses the genesis kernel to discover attributes of the compute node and populate the node attributes so xCAT can then manage the node.
When the BMCs have an IP address and is pingable from the xCAT management node, administrators can discover the BMCs using the xCAT's :doc:`bmcdiscover </guides/admin-guides/references/man1/bmcdiscover.1>` command and obtain basic information to start the hardware discovery process.
The following example outlines the MTMS based hardware discovery for a single IPMI-based compute node.
xCAT Hardware discover uses the xCAT genesis kernel (diskless) to discover additional attributes of the compute node and automatically populate the node definitions in xCAT.
+-------------------------+------------+
| Environment | Value |
+=========================+============+
| Compute Node Model Type | 8247-22l |
+-------------------------+------------+
| Compute Node Serial Num | 10112CA |
+-------------------------+------------+
| Compute Node Hostname | cn01 |
+-------------------------+------------+
| Compute Node IP address | 10.1.2.1 |
+-------------------------+------------+
| BMC DHCP IP address | 172.30.0.1 |
+-------------------------+------------+
| BMC STATIC IP address | 172.20.0.1 |
+-------------------------+------------+
.. toctree::
:maxdepth: 2
#. Gather the **predefined** nodes
Using the ``bmcdiscover`` command, discover the nodes over an IP range and save the output to a file to use as a base for creating the **predefined** compute nodes.
To discover the BMC with an IP address of 172.30.0.1, use the command: ::
bmcdiscover --range 172.30.0.1 -z > predefined.stanzas
The discovered nodes has the naming convention: node-<*model-type*>-<*serial-number*> ::
# cat predefined.stanzas
node-8247-22l-10112ca:
objtype=node
groups=all
bmc=172.30.0.1
cons=ipmi
mgt=ipmi
mtm=8247-22L
serial=10112CA
#. Gather the **discovered** nodes
Using the ``bmcdiscover`` command again to discover the nodes over the IP range, but use the ``-t`` option to get machine type information and the ``-w`` option to automatically write the output to the xCAT database.
To discover the BMC with an IP address of 172.30.0.1, use the command: ::
bmcdiscover --range 172.30.0.1 -t -z -w
The discovered nodes will be written to xCAT database: ::
# lsdef node-8247-22l-10112ca
Object name: node-8247-22l-10112ca
bmc=172.30.0.1
cons=ipmi
groups=all
hwtype=bmc
mgt=ipmi
mtm=8247-22L
nodetype=mp
postbootscripts=otherpkgs
postscripts=syslog,remoteshell,syncfiles
serial=10112CA
#. Edit the **predefined** nodes and set their intended ``hostname`` and ``IP adress``
#. Edit the file saved from the above step. ::
vi predefined.stanzas
#. Rename the object names to their intended compute node hostnames. ::
node-8247-22l-10112ca ==> cn01
#. Set the ``ip=`` attribute for the compute node IP address. ::
ip=10.1.2.1
#. Repeat for additional nodes in the predefined.stanza file based on the MTMS mapping.
In this example, our **predefined.stanzas** file now looks like the following: ::
# cat predefined.stanzas
cn01:
objtype=node
groups=all
bmc=172.30.0.1
cons=ipmi
mgt=ipmi
mtm=8247-22L
serial=10112CA
ip=10.1.2.1
#. Define the **predefined node** to xCAT: ::
cat predefined.stanzas | mkdef -z
#. **[Optional]** Change the BMC IP address from DHCP to STATIC
Some sites would prefer to configure the BMCs to use static IP addresses to avoid issues when DHCP leases expire. xCAT provides a way for the administrator to modify theDHCP IP address to a static IP address during the hardware discovery process using the xCAT chain concept.
Set the BMC IP address to a different value for the **predefined** compute node definitions.
To change the DHCP IP address of 172.30.0.1 to a STATIC IP address of 172.**20**.0.1, run the following command: ::
chdef cn01 bmc=172.20.0.1 chain="rumcmd=bmcsetup"
#. Add the compute node IP information to ``/etc/hosts``: ::
makehosts cn01
#. Refresh the DNS configuration for the new hosts: ::
makedns -n
#. **[Optional]** Monitor the node discovery process using rcons
Configure the conserver for the **discovered** node to watch the discovery process using ``rcons``::
makeconservercf node-8247-22l-10112ca
In another terminal window, open the remote console: ::
rcons node-8247-22l-10112ca
#. Start the discovery process by booting the **discovered** node definition: ::
rsetboot node-8247-22l-10112ca net
rpower node-8247-22l-10112ca on
#. The discovery process will network boot the machine into the diskless xCAT genesis kernel and perform the discovery process. When the discovery process is complete, doing ``lsdef`` on the compute nodes should show discovered attributes for the machine. The important ``mac`` information should be discovered, which is necessary for xCAT to perform OS provisioning.
discovery_using_defined.rst
discovery_using_dhcp.rst

View File

@ -0,0 +1,144 @@
Set static BMC IP using different IP address (recommended)
==========================================================
The following example outlines the MTMS based hardware discovery for a single IPMI-based compute node.
+------------------------------+------------+
| Compute Node Information | Value |
+==============================+============+
| Model Type | 8247-22l |
+------------------------------+------------+
| Serial Number | 10112CA |
+------------------------------+------------+
| Hostname | cn01 |
+------------------------------+------------+
| IP address | 10.1.2.1 |
+------------------------------+------------+
The BMC IP address is obtained by the open range dhcp server and the plan in this scenario is to change the IP address for the BMC to a static IP address in a different subnet than the open range addresses.
+------------------------------+------------+
| BMC Information | Value |
+==============================+============+
| IP address - dhcp | 172.30.0.1 |
+------------------------------+------------+
| IP address - static | 172.20.2.1 |
+------------------------------+------------+
#. Detect the BMCs and add the node definitions into xCAT.
Use the ``bmcdiscover`` command to discover the BMCs responding over an IP range and automatically write the output into the xCAT database. You **must** use the ``-t`` option to indicate node type is bmc and the ``-w`` option to automatically write the output into the xCAT database.
To discover the BMC with an IP address of 172.30.0.1, use the command: ::
bmcdiscover --range 172.30.0.1 -t -z -w
The discovered nodes will be written to xCAT database: ::
# lsdef node-8247-22l-10112ca
Object name: node-8247-22l-10112ca
bmc=172.30.0.1
cons=ipmi
groups=all
hwtype=bmc
mgt=ipmi
mtm=8247-22L
nodetype=mp
postbootscripts=otherpkgs
postscripts=syslog,remoteshell,syncfiles
serial=10112CA
#. **Pre-define** the compute nodes:
Use the ``bmcdiscover`` command to help discover the nodes over an IP range and easily create a starting file to define the compute nodes into xCAT.
To discover the compute nodes for the BMCs with an IP address of 172.30.0.1, use the command: ::
bmcdiscover --range 172.30.0.1 -z > predefined.stanzas
The discovered nodes have the naming convention: node-<*model-type*>-<*serial-number*> ::
# cat predefined.stanzas
node-8247-22l-10112ca:
objtype=node
groups=all
bmc=172.30.0.1
cons=ipmi
mgt=ipmi
mtm=8247-22L
serial=10112CA
#. Edit the ``predefined.stanzas`` file and change the discovered nodes to the intended ``hostname`` and ``IP address``.
#. Edit the ``predefined.stanzas`` file: ::
vi predefined.stanzas
#. Rename the discovered object names to their intended compute node hostnames based on the MTMS mapping: ::
node-8247-22l-10112ca ==> cn01
#. Add a ``ip`` attribute and give it the compute node IP address: ::
ip=10.1.2.1
#. Repeat for additional nodes in the ``predefined.stanza`` file based on the MTMS mapping.
In this example, the ``predefined.stanzas`` file now looks like the following: ::
# cat predefined.stanzas
cn01:
objtype=node
groups=all
bmc=172.30.0.1
cons=ipmi
mgt=ipmi
mtm=8247-22L
serial=10112CA
ip=10.1.2.1
#. Set the chain table to run the ``bmcsetup`` script, this will set the BMC IP to static. ::
chdef cn01 chain="runcmd=bmcsetup"
#. Change the BMC IP address
Set the BMC IP address to a different value for the **predefined** compute node definitions.
To change the dhcp obtained IP address of 172.30.0.1 to a static IP address of 172.20.2.1, run the following command: ::
chdef cn01 bmc=172.20.2.1
#. Define the compute nodes into xCAT: ::
cat predefined.stanzas | mkdef -z
#. Add the compute node IP information to ``/etc/hosts``: ::
makehosts cn01
#. Refresh the DNS configuration for the new hosts: ::
makedns -n
#. **[Optional]** Monitor the node discovery process using rcons
Configure the conserver for the **discovered** node to watch the discovery process using ``rcons``::
makeconservercf node-8247-22l-10112ca
In another terminal window, open the remote console: ::
rcons node-8247-22l-10112ca
#. Start the discovery process by booting the **discovered** node definition: ::
rsetboot node-8247-22l-10112ca net
rpower node-8247-22l-10112ca on
#. The discovery process will network boot the machine into the diskless xCAT genesis kernel and perform the discovery process. When the discovery process is complete, doing ``lsdef`` on the compute nodes should show discovered attributes for the machine. The important ``mac`` information should be discovered, which is necessary for xCAT to perform OS provisioning.

View File

@ -0,0 +1,113 @@
Set static BMC IP using dhcp provided IP address
================================================
The following example outlines the MTMS based hardware discovery for a single IPMI-based compute node.
+------------------------------+------------+
| Compute Node Information | Value |
+==============================+============+
| Model Type | 8247-22l |
+------------------------------+------------+
| Serial Number | 10112CA |
+------------------------------+------------+
| Hostname | cn01 |
+------------------------------+------------+
| IP address | 10.1.2.1 |
+------------------------------+------------+
The BMC IP address is obtained by the open range dhcp server and the plan is to leave the IP address the same, except we want to change the IP address to be static in the BMC.
+------------------------------+------------+
| BMC Information | Value |
+==============================+============+
| IP address - dhcp | 172.30.0.1 |
+------------------------------+------------+
| IP address - static | 172.30.0.1 |
+------------------------------+------------+
#. **Pre-define** the compute nodes:
Use the ``bmcdiscover`` command to help discover the nodes over an IP range and easily create a starting file to define the compute nodes into xCAT.
To discover the compute nodes for the BMCs with an IP address of 172.30.0.1, use the command: ::
bmcdiscover --range 172.30.0.1 -z > predefined.stanzas
The discovered nodes have the naming convention: node-<*model-type*>-<*serial-number*> ::
# cat predefined.stanzas
node-8247-22l-10112ca:
objtype=node
groups=all
bmc=172.30.0.1
cons=ipmi
mgt=ipmi
mtm=8247-22L
serial=10112CA
#. Edit the ``predefined.stanzas`` file and change the discovered nodes to the intended ``hostname`` and ``IP address``.
#. Edit the ``predefined.stanzas`` file: ::
vi predefined.stanzas
#. Rename the discovered object names to their intended compute node hostnames based on the MTMS mapping: ::
node-8247-22l-10112ca ==> cn01
#. Add a ``ip`` attribute and give it the compute node IP address: ::
ip=10.1.2.1
#. Repeat for additional nodes in the ``predefined.stanza`` file based on the MTMS mapping.
In this example, the ``predefined.stanzas`` file now looks like the following: ::
# cat predefined.stanzas
cn01:
objtype=node
groups=all
bmc=172.30.0.1
cons=ipmi
mgt=ipmi
mtm=8247-22L
serial=10112CA
ip=10.1.2.1
#. Set the chain table to run the ``bmcsetup`` script, this will set the BMC IP to static. ::
chdef cn01 chain="runcmd=bmcsetup"
#. Define the compute nodes into xCAT: ::
cat predefined.stanzas | mkdef -z
#. Add the compute node IP information to ``/etc/hosts``: ::
makehosts cn01
#. Refresh the DNS configuration for the new hosts: ::
makedns -n
#. **[Optional]** Monitor the node discovery process using rcons
Configure the conserver for the **discovered** node to watch the discovery process using ``rcons``::
makeconservercf node-8247-22l-10112ca
In another terminal window, open the remote console: ::
rcons node-8247-22l-10112ca
#. Start the discovery process by booting the **discovered** node definition: ::
rsetboot node-8247-22l-10112ca net
rpower node-8247-22l-10112ca on
#. The discovery process will network boot the machine into the diskless xCAT genesis kernel and perform the discovery process. When the discovery process is complete, doing ``lsdef`` on the compute nodes should show discovered attributes for the machine. The important ``mac`` information should be discovered, which is necessary for xCAT to perform OS provisioning.

View File

@ -1,7 +1,7 @@
MTMS-based Discovery
====================
MTMS stands for **M**\ achine **T**\ ype/\ **M**\ odel and **S**\ erial which is a way to uniquely define each physical server.
MTMS stands for **M**\ achine **T**\ ype/\ **M**\ odel and **S**\ erial. This is one way to uniquely identify each physical server.
MTMS-based hardware discovery assumes the administator has the model type and serial number information for the physical servers and a plan for mapping the servers to intended hostname/IP addresses.
@ -24,4 +24,4 @@ MTMS-based hardware discovery assumes the administator has the model type and se
:maxdepth: 2
verification.rst
discovery.rst
discovery.rst

View File

@ -6,11 +6,11 @@ Before starting hardware discovery, ensure the following is configured to make t
Password Table
--------------
In order to communicate with IPMI-based hardware (with BMCs), verify that the xCAT ``passwd`` table contains an entry for ``ipmi`` which defines the username and password to communicate with the IPMI-based servers. ::
In order to communicate with IPMI-based hardware (with BMCs), verify that the xCAT ``passwd`` table contains an entry for ``ipmi`` which defines the default username and password to communicate with the IPMI-based servers. ::
tabdump passwd | grep ipmi
If not configured, use the following command as an example to set the ``usernam=ADMIN`` and ``password=admin``. ::
If not configured, use the following command to set ``usernam=ADMIN`` and ``password=admin``. ::
chtab key=ipmi passwd.username=ADMIN passwd.password=admin
@ -18,7 +18,7 @@ If not configured, use the following command as an example to set the ``usernam=
Genesis Package
---------------
The **xcat-genesis** packages provides the utility to create the genesis network boot rootimage used by xCAT when doing hardware discovery. It should have been installed during the xCAT installation and would cause problems if missing.
The **xCAT-genesis** packages provides the utility to create the genesis network boot rootimage used by xCAT when doing hardware discovery. It should be installed during the xCAT install and would cause problems if missing.
Verify that the ``genesis-scripts`` and ``genesis-base`` packages are installed:
@ -35,5 +35,19 @@ If missing:
#. Install them from the ``xcat-dep`` repository using the Operating Specific package manager (``yum, zypper, apt-get, etc``)
#. Create the network boot rootimage with the following command: ``mknb ppc64``. The resulting genesis kernel should be present in ``/tftpboot/xcat`` directory.
* **[RHEL]**: ::
yum install xCAT-genesis
* **[SLES]**: ::
zypper install xCAT-genesis
* **[Ubuntu]**: ::
apt-get install xCAT-genesis
#. Create the network boot rootimage with the following command: ``mknb ppc64``.
The genesis kernel should be copied to ``/tftpboot/xcat``.