22.8. chef-bootstrap - chef-bootstrap

The following documentation is for chef-bootstrap (chef-bootstrap) content package at version v4.6.9.

22.8.1. Quickstart

Clone the chef-bootstrap-example profile, edit the profile parameters to your case, and add the cloned profile to the machine you want to bootstrap.

Add the chef-bootstrap workflow to bootstrap your machine to your chef server and organization.

The node name defaults to the machine’s fqdn (hostname -f result)

22.8.2. Inject into DRP endpoint

First create the bundle:

`shell script chef-bootstrap$ cd content chef-bootstrap/content$ drpcli contents bundle ../chef-bootstrap.yaml `

then upload the bundle

`shell script chef-bootstrap/content$ cd .. chef-bootstrap$ drpcli -E https://<DRP ENPOINT URL>:8092 -U <ADMIN USER> -P <ADMIN PASSWORD> contents upload chef-bootstrap.yaml `

22.8.3. Object Specific Documentation

22.8.3.1. workflows

The content package provides the following workflows.

22.8.3.1.1. chef-bootstrap

Simple showcase workflow for bootstraping a node into a Chef server’s organization

22.8.3.2. params

The content package provides the following params.

22.8.3.2.1. chef-bootstrap/first_boot

A JSON formated string that defines the first chef run of a machine

22.8.3.2.2. chef-bootstrap/organization

The Chef organization this node belongs to

22.8.3.2.3. chef-bootstrap/policy_group

The Policy Group this node belongs to

22.8.3.2.4. chef-bootstrap/user

The user to authenticate as when bootstrapping the Chef node

22.8.3.2.5. chef-bootstrap/chef_channel

The source channel from where to get Chef Software, defaults to the stable channel

22.8.3.2.6. chef-bootstrap/encrypted_data_bag_secret

The Chef encrypted data bag secret

22.8.3.2.7. chef-bootstrap/environment

The Environment to add the node to, incompatible with PolicyFiles

22.8.3.2.8. chef-bootstrap/node_name

The Chef identifier for the registering node/client

22.8.3.2.9. chef-bootstrap/user_key

The Chef user private key

22.8.3.2.10. chef-bootstrap/chef_install_source

The URI for a chef bash installer, i.e:

22.8.3.2.11. chef-bootstrap/chef_server

The address or hostname corresponding to the Chef Server

22.8.3.2.12. chef-bootstrap/chef_version

The version of the Chef Software to install, defaults to the latest available

22.8.3.2.13. chef-bootstrap/named_runlist

A named run_list defined in a policy this node will belong to

22.8.3.2.14. chef-bootstrap/policy_name

The Policy Name to be applied to the node

22.8.3.2.15. chef-bootstrap/recreate_client

If true we delete client and node if they already exist on the Chef Server, before creating them.

22.8.3.3. profiles

The content package provides the following profiles.

22.8.3.3.1. chef-bootstrap-example

Configures the machine to be processed by the chef-bootstrap workflow and tasks. Clone this profile and change/add values according to your environment.

22.8.3.4. stages

The content package provides the following stages.

22.8.3.4.1. chef-bootstrap-start

Decorator stage to show workflow start

22.8.3.4.2. chef-bootstrap

The actual Chef Server bootstrap stage

22.8.3.4.3. chef-bootstrap-complete

Decorator stage to show workflow completion

22.8.3.5. tasks

The content package provides the following tasks.

22.8.3.5.1. chef-bootstrap-configure

Takes care of making sure that “chef-bootstrap/node_name” param is set and Chef directories exist.

Using a separate task because we can’t render the now chef-bootstrap-setup task contents before having “chef-bootstrap/node_name” defined.

22.8.3.5.2. chef-bootstrap-install

Takes care of installing the chef-client software.

22.8.3.5.3. chef-bootstrap-join

Takes care of creating a client in the Chef server, and executing a chef-client run, which will register a
new node.

22.8.3.5.4. chef-bootstrap-setup

Takes care of configuring client.rb file, setting up temporary validation/admin credentials and other optional settings, like encrypted data bag secret, or first run user-defined json.