Enroll nodes with a Chef Infra cookbook
With cookbook-based node enrollment, you upload cookbooks with enrollment settings to Chef Infra Server and Chef Infra Client enrolls the node with Chef 360 Platform.
Cookbook-based enrollment can fully or partially enroll nodes.
Requirements
Nodes enrolled with Chef 360 Platform using a Chef Infra cookbook have the following requirements:
- Nodes must have Chef Infra Client installed.
- Nodes have a public DNS or public IP address.
- Nodes can’t have localhost (
127.0.0.1) as an IP address. - Nodes can’t have a CIDR address in the same range as the Chef 360 Platform services. The default CIDR range for Chef 360 Platform services is
10.244.0.0/16or10.96.0.0/12. - You must have sudo privileges on the node.
Role requirements
To enroll nodes, use a profile with the node-manager role.
Enroll nodes
The Use as Cookbook option in Chef 360 Platform (in the Self-Enrollment Keys page in the Node Management section) helps you to perform cookbook-based enrollment. When you generate a new self-enrollment key (or regenerate an existing key), you can select the Use as Cookbook option to see the steps and commands needed to create a Chef cookbook. The guide that displays provides step-by-step instructions for creating a Chef cookbook that automates the enrollment of nodes into Chef 360. The cookbook includes platform-specific scripts and a recipe to deploy and execute the appropriate script on client nodes. The steps are as follows:
- Generate the cookbook template.
- Navigate to the cookbook directory.
- Create the enrollment script file.
- Add the enrollment script content.
- Update the default recipe.
Select Copy to copy the command or script.
For further details on Self-Enrollment Keys, refer to the following section: Self-Enrollment Keys.