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 tasks

The content package provides the following tasks. 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. chef-bootstrap-install

Takes care of installing the chef-client software. 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. 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. workflows

The content package provides the following workflows. chef-bootstrap

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

The content package provides the following params. chef-bootstrap/chef_channel

The source channel from where to get Chef Software, defaults to the stable channel chef-bootstrap/chef_install_source

The URI for a chef bash installer, i.e: chef-bootstrap/environment

The Environment to add the node to, incompatible with PolicyFiles chef-bootstrap/organization

The Chef organization this node belongs to chef-bootstrap/policy_group

The Policy Group this node belongs to chef-bootstrap/policy_name

The Policy Name to be applied to the node chef-bootstrap/chef_server

The address or hostname corresponding to the Chef Server chef-bootstrap/encrypted_data_bag_secret

The Chef encrypted data bag secret chef-bootstrap/first_boot

A JSON formated string that defines the first chef run of a machine chef-bootstrap/user_key

The Chef user private key chef-bootstrap/chef_version

The version of the Chef Software to install, defaults to the latest available chef-bootstrap/named_runlist

A named run_list defined in a policy this node will belong to chef-bootstrap/node_name

The Chef identifier for the registering node/client chef-bootstrap/recreate_client

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

The user to authenticate as when bootstrapping the Chef node profiles

The content package provides the following profiles. 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. stages

The content package provides the following stages. chef-bootstrap

The actual Chef Server bootstrap stage chef-bootstrap-complete

Decorator stage to show workflow completion chef-bootstrap-start

Decorator stage to show workflow start