NCN personalization is the process of applying product-specific configuration to NCNs post-boot.
Prior to running this procedure, gather the following information required by CFS to create a configuration layer:
Products may supply multiple plays to run, in which case multiple configuration layers must be created. Consult the manual for each product to configure them on NCNs by referring to the 1.5 HPE Cray EX System Software Getting Started Guide S-8000 on the HPE Customer Support Center.
If upgrading a product to a new version, an NCN personalization configuration in
CFS should already exist. By default, the configuration is named
ncn-personalization
. If the default name is not used, substitute that name in
the steps below.
ncn# cray cfs configurations describe ncn-personalization --format json > ncn-personalization.json
If the configuration exists, the ncn-personalization.json
file will be
created and populated with previously defined configuration layers. If it does
not exist, the file will be created empty and the command will respond with an
error. This error can be ignored.
CFS executes configuration layers in order. Refer to the 1.5 HPE Cray EX System Software Getting Started Guide S-8000 on the HPE Customer Support Center at https://www.hpe.com/support/ex-gsg to determine if the configuration layer requires special placement in the layer list.
NOTE: The CSM configuration layer MUST be the first layer in the NCN personalization CFS configuration.
ncn-personalization.json
file. Follow the
appropriate step based on if an NCN personalization CFS configuration exists:
ncn-personalization.json
file is empty, overwrite the file with
the configuration layer(s) information gathered from the product that is
configuring the NCNs. Use the sample file with a single layer
as a template.ncn# cat ncn-personalization.json
{
"layers": [
# ...
{
"name": "<product-release-etc>",
"cloneUrl": "https://api-gw-service-nmn.local/vcs/cray/<product>-config-management.git",
"playbook": "site.yml",
"commit": "<git commit>"
},
# ...
]
}
ncn-personalization
CFS configuration.
ncn# cray cfs configurations update ncn-personalization --file ncn-personalization.json --format json
{
"lastUpdated": "2021-07-28T03:26:01Z",
"layers": [
{ ... layer information here ... },
],
"name": "ncn-personalization"
}
Update the desired configuration for all NCNs.
ncn# for xname in $(cray hsm state components list --role Management --format json | jq -r .Components[].ID)
do
cray cfs components update --desired-config ncn-personalization --enabled true --format json $xname
done
After this command is issued, the CFS Batcher service will dispatch a CFS session to configure the NCNs. Since the NCN is now managed by CFS by setting a desired configuration, the same will happen every time the NCN boots.
Query the status of the NCN Personalization process. The status will be
pending
while the node is being configured by CFS, and will change to
configured
when the configuration has completed.
ncn# for xname in $(cray hsm state components list \
--role Management --format json |
jq -r .Components[].ID)
do
cray cfs components describe --format json $xname |
jq -r ' .id+" status="+.configurationStatus'
done
x3000c0s17b0n0 status=configured
x3000c0s19b0n0 status=pending
x3000c0s21b0n0 status=configured
...
The NCN personalization step is complete and the NCNs are now configured as
specified in the ncn-personalization
configuration layers when each node’s
status is configured
.
See Configuration Management of System Components for more information on setting desired configuration on specific nodes using CFS.
If no changes have been made to the configuration layers (such as a new layer, different playbook, or new commit made), but NCN personalization needs to be run again, CFS can re-run NCN personalization on specific nodes.
Re-run the configuration for an NCN by clearing the state of the node. Clearing the node state will cause CFS to reconfigure the node, so long as the desired configuration was set previously.
Clear the state and error count of the node using CFS.
Replace the <XNAME>
string in the following command with the xname of the node
being reconfigured.
ncn# cray cfs components update --error-count 0 --state '[]' --format json <XNAME>
(Optional) To re-run NCN personalization on all NCNs at once, use the following loop:
ncn# for xname in $(cray hsm state components list \
--role Management --format json |
jq -r .Components[].ID)
do
cray cfs components update --error-count 0 --state '[]' --format json $xname
done