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 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/chef_server

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

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

The Chef encrypted data bag secret chef-bootstrap/environment

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

A JSON formated string that defines the first chef run of a machine 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/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/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 chef-bootstrap/user_key

The Chef user private key 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 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