.\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "KNIFE\-BOOTSTRAP" "1" "February 2013" "Chef 10.20.0" "Chef Manual" . .SH "NAME" \fBknife\-bootstrap\fR \- Install Chef Client on a remote host . .SH "SYNOPSIS" \fBknife\fR \fBbootstrap\fR \fI(options)\fR . .TP \fB\-i\fR, \fB\-\-identity\-file IDENTITY_FILE\fR The SSH identity file used for authentication . .TP \fB\-N\fR, \fB\-\-node\-name NAME\fR The Chef node name for your new node . .TP \fB\-P\fR, \fB\-\-ssh\-password PASSWORD\fR The ssh password . .TP \fB\-x\fR, \fB\-\-ssh\-user USERNAME\fR The ssh username . .TP \fB\-p\fR, \fB\-\-ssh\-port PORT\fR The ssh port . .TP \fB\-\-bootstrap\-version VERSION\fR The version of Chef to install . .TP \fB\-\-bootstrap\-proxy PROXY_URL\fR \fBThe proxy server for the node being bootstrapped\fR . .TP \fB\-\-prerelease\fR Install pre\-release Chef gems . .TP \fB\-r\fR, \fB\-\-run\-list RUN_LIST\fR Comma separated list of roles/recipes to apply . .TP \fB\-\-template\-file TEMPLATE\fR Full path to location of template to use . .TP \fB\-\-sudo\fR Execute the bootstrap via sudo . .TP \fB\-d\fR, \fB\-\-distro DISTRO\fR Bootstrap a distro using a template . .TP \fB\-\-[no\-]host\-key\-verify\fR Enable host key verification, which is the default behavior\. . .TP \fB\-\-hint HINT_NAME[=HINT_FILE]\fR Provide the name of a hint (with option JSON file) to set for use by Ohai plugins\. . .SH "DESCRIPTION" Performs a Chef Bootstrap on the target node\. The goal of the bootstrap is to get Chef installed on the target system so it can run Chef Client with a Chef Server\. The main assumption is a baseline OS installation exists\. This sub\-command is used internally by some cloud computing plugins\. . .P The bootstrap sub\-command supports supplying a template to perform the bootstrap steps\. If the distro is not specified (via \fB\-d\fR or \fB\-\-distro\fR option), an Ubuntu 10\.04 host bootstrapped with RubyGems is assumed\. The \fBDISTRO\fR value corresponds to the base filename of the template, in other words \fBDISTRO\fR\.erb\. A template file can be specified with the \fB\-\-template\-file\fR option in which case the \fBDISTRO\fR is not used\. The sub\-command looks in the following locations for the template to use: . .IP "\(bu" 4 \fBbootstrap\fR directory in the installed Chef Knife library\. . .IP "\(bu" 4 \fBbootstrap\fR directory in the \fB$PWD/\.chef\fR\. . .IP "\(bu" 4 \fBbootstrap\fR directory in the users \fB$HOME/\.chef\fR\. . .IP "" 0 . .P The default bootstrap templates are scripts that get copied to the target node (FQDN)\. The following distros are supported: . .IP "\(bu" 4 centos5\-gems . .IP "\(bu" 4 fedora13\-gems . .IP "\(bu" 4 ubuntu10\.04\-gems . .IP "\(bu" 4 ubuntu10\.04\-apt . .IP "" 0 . .P The gems installations will use RubyGems 1\.3\.6 and Chef installed as a gem\. The apt installation will use the Opscode APT repository\. . .P In addition to handling the software installation, these bootstrap templates do the following: . .IP "\(bu" 4 Write the validation\.pem per the local knife configuration\. . .IP "\(bu" 4 Write a default config file for Chef (\fB/etc/chef/client\.rb\fR) using values from the \fBknife\.rb\fR\. . .IP "\(bu" 4 Create a JSON attributes file containing the specified run list and run Chef\. . .IP "" 0 . .P In the case of the RubyGems, the \fBclient\.rb\fR will be written from scratch with a minimal set of values; see \fBEXAMPLES\fR\. In the case of APT Package installation, \fBclient\.rb\fR will have the \fBvalidation_client_name\fR appended if it is not set to \fBchef\-validator\fR (default config value), and the \fBnode_name\fR will be added if \fBchef_node_name\fR option is specified\. . .P When this is complete, the bootstrapped node will have: . .IP "\(bu" 4 Latest Chef version installed from RubyGems or APT Packages from Opscode\. This may be a later version than the local system\. . .IP "\(bu" 4 Be validated with the configured Chef Server\. . .IP "\(bu" 4 Have run Chef with its default run list if one is specfied\. . .IP "" 0 . .P Additional custom bootstrap templates can be created and stored in \fB\.chef/bootstrap/DISTRO\.erb\fR, replacing \fBDISTRO\fR with the value passed with the \fB\-d\fR or \fB\-\-distro\fR option\. See \fBEXAMPLES\fR for more information\. . .SH "EXAMPLES" Setting up a custom bootstrap is fairly straightforward\. Create a \fB\.chef/bootstrap\fR directory in your Chef Repository or in \fB$HOME/\.chef/bootstrap\fR\. Then create the ERB template file\. . .IP "" 4 . .nf mkdir ~/\.chef/bootstrap vi ~/\.chef/bootstrap/debian5\.0\-apt\.erb . .fi . .IP "" 0 . .P For example, to create a new bootstrap template that should be used when setting up a new Debian node\. Edit the template to run the commands, set up the validation certificate and the client configuration file, and finally to run chef\-client on completion\. The bootstrap template can be called with: . .IP "" 4 . .nf knife bootstrap mynode\.example\.com \-\-template\-file ~/\.chef/bootstrap/debian5\.0\-apt\.erb . .fi . .IP "" 0 . .P Or, . .IP "" 4 . .nf knife bootstrap mynode\.example\.com \-\-distro debian5\.0\-apt . .fi . .IP "" 0 . .P The \fB\-\-distro\fR parameter will automatically look in the \fB~/\.chef/bootstrap\fR directory for a file named \fBdebian5\.0\-apt\.erb\fR\. . .P Templates provided by the Chef installation are located in \fBBASEDIR/lib/chef/knife/bootstrap/*\.erb\fR, where \fIBASEDIR\fR is the location where the package or Gem installed the Chef client libraries\. . .SH "BUGS" \fBknife bootstrap\fR is not capable of bootstrapping multiple hosts in parallel\. . .P The bootstrap script is passed as an argument to sh(1) on the remote system, so sensitive information contained in the script will be visible to other users via the process list using tools such as ps(1)\. . .SH "SEE ALSO" \fBknife\-ssh\fR(1) . .SH "AUTHOR" Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\. . .SH "DOCUMENTATION" This manual page was written by Joshua Timberman \fIjoshua@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\. . .SH "CHEF" Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR