Manage a node cohort
A node cohort defines skills and settings installed on every node in a cohort.
After you create a cohort, you assign nodes to the cohort during node enrollment, and Chef 360 Platform installs or removes the skills and settings on every node accordingly.
Prerequisites
To create a node cohort, you’ll need:
Create a node cohort
To create a node cohort, follow these steps:
Create a JSON file that defines a node cohort using the skill assembly ID and the settings ID it should be associated with.
{ "name": "<NODE_COHORT_NAME>", "description": "<NODE_COHORT_DESCRIPTION>", "settingId": "<SKILL_SETTING_ID>", "skillAssemblyId":"<SKILL_ASSEMBLY_ID>" }
Replace:
<NODE_COHORT_NAME>
with a name for the node cohort<NODE_COHORT_DESCRIPTION>
with a description of the node cohort<SKILL_SETTING_ID>
with a skill override settings ID<SKILL_ASSEMBLY_ID>
with a skill assembly ID
Create the node cohort with the
management cohort create-cohort
subcommand:chef-node-management-cli management cohort create-cohort --body-file <PATH_TO_NODE_COHORT_DEFINITION_FILE> --profile <NODE_MANAGER_PROFILE_NAME>
The response is similar to the following:
{ "item": { "cohortId": "86628101-0f31-48aa-b035-a8889232e568" } }
Save the cohort ID value, you’ll use it to enroll nodes into the cohort.
Update a node cohort
Assign a skill assembly to a node cohort
To update or assign a new skill assembly to an existing node cohort, use the management cohort assign-skillAssembly
subcommand:
chef-node-management-cli management cohort assign-skillAssembly --skillAssemblyId <SKILL_ASSEMBLY_ID> --cohortId <COHORT_ID> --profile <NODE_MANAGER_PROFILE_NAME>
Assign a set of override settings to a node cohort
To update or assign new setting to an existing node cohort, use the management cohort assign-setting
subcommand:
chef-node-management-cli management cohort assign-setting --settingId <settingId> --cohortId <COHORT_ID> --profile <NODE_MANAGER_PROFILE_NAME>
Troubleshooting
Use the management cohort find-one-cohort
subcommand to verify that a skill assembly was created or updated successfully:
chef-node-management-cli management cohort find-one-cohort --cohortId <COHORT_ID> --profile <NODE_MANAGER_PROFILE_NAME>