23.8. chef-bootstrap - chef-bootstrap

The following documentation is for chef-bootstrap (chef-bootstrap) content package at version v4.6.0-beta01.97+g1e33864277dc9bbb839f71f1eff994a0c4f05c23.

23.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)

23.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 `

23.8.3. Object Specific Documentation

23.8.3.1. tasks

The content package provides the following tasks.

23.8.3.1.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.

23.8.3.1.2. chef-bootstrap-install

Takes care of installing the chef-client software.

23.8.3.1.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.

23.8.3.1.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.

23.8.3.2. workflows

The content package provides the following workflows.

23.8.3.2.1. chef-bootstrap

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

23.8.3.3. params

The content package provides the following params.

23.8.3.3.1. chef-bootstrap/chef_channel

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

23.8.3.3.2. chef-bootstrap/chef_install_source

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

23.8.3.3.3. chef-bootstrap/environment

The Environment to add the node to, incompatible with PolicyFiles

23.8.3.3.4. chef-bootstrap/organization

The Chef organization this node belongs to

23.8.3.3.5. chef-bootstrap/policy_group

The Policy Group this node belongs to

23.8.3.3.6. chef-bootstrap/policy_name

The Policy Name to be applied to the node

23.8.3.3.7. chef-bootstrap/chef_server

The address or hostname corresponding to the Chef Server

23.8.3.3.8. chef-bootstrap/encrypted_data_bag_secret

The Chef encrypted data bag secret

23.8.3.3.9. chef-bootstrap/first_boot

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

23.8.3.3.10. chef-bootstrap/user_key

The Chef user private key

23.8.3.3.11. chef-bootstrap/chef_version

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

23.8.3.3.12. chef-bootstrap/named_runlist

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

23.8.3.3.13. chef-bootstrap/node_name

The Chef identifier for the registering node/client

23.8.3.3.14. chef-bootstrap/recreate_client

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

23.8.3.3.15. chef-bootstrap/user

The user to authenticate as when bootstrapping the Chef node

23.8.3.4. profiles

The content package provides the following profiles.

23.8.3.4.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.

23.8.3.5. stages

The content package provides the following stages.

23.8.3.5.1. chef-bootstrap

The actual Chef Server bootstrap stage

23.8.3.5.2. chef-bootstrap-complete

Decorator stage to show workflow completion

23.8.3.5.3. chef-bootstrap-start

Decorator stage to show workflow start