22.8. chef-bootstrap - chef-bootstrap

The following documentation is for chef-bootstrap (chef-bootstrap) content package at version v4.12.0-alpha00.78+gc037aaa40eb3ad853690ce178f9ab8a5bae4c436.

## 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) ## Inject into DRP endpoint First create the bundle:

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

then upload the bundle

`sh 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.1. Object Specific Documentation

22.8.1.1. params

The content package provides the following params.

22.8.1.1.1. chef-bootstrap/chef_channel

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

22.8.1.1.2. chef-bootstrap/chef_install_source

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

22.8.1.1.3. chef-bootstrap/chef_server

The address or hostname corresponding to the Chef Server

22.8.1.1.4. chef-bootstrap/chef_version

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

22.8.1.1.5. chef-bootstrap/encrypted_data_bag_secret

The Chef encrypted data bag secret

22.8.1.1.6. chef-bootstrap/environment

The Environment to add the node to, incompatible with PolicyFiles

22.8.1.1.7. chef-bootstrap/first_boot

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

22.8.1.1.8. chef-bootstrap/named_runlist

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

22.8.1.1.9. chef-bootstrap/node_name

The Chef identifier for the registering node/client

22.8.1.1.10. chef-bootstrap/organization

The Chef organization this node belongs to

22.8.1.1.11. chef-bootstrap/policy_group

The Policy Group this node belongs to

22.8.1.1.12. chef-bootstrap/policy_name

The Policy Name to be applied to the node

22.8.1.1.13. chef-bootstrap/recreate_client

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

22.8.1.1.14. chef-bootstrap/user

The user to authenticate as when bootstrapping the Chef node

22.8.1.1.15. chef-bootstrap/user_key

The Chef user private key

22.8.1.2. profiles

The content package provides the following profiles.

22.8.1.2.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.1.3. stages

The content package provides the following stages.

22.8.1.3.1. chef-bootstrap

The actual Chef Server bootstrap stage

22.8.1.3.2. chef-bootstrap-complete

Decorator stage to show workflow completion

22.8.1.3.3. chef-bootstrap-start

Decorator stage to show workflow start

22.8.1.4. tasks

The content package provides the following tasks.

22.8.1.4.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.1.4.2. chef-bootstrap-install

Takes care of installing the chef-client software.

22.8.1.4.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.1.4.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.

22.8.1.5. workflows

The content package provides the following workflows.

22.8.1.5.1. chef-bootstrap

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