KNIFE-BOOTSTRAP(1)

NAME
knife-bootstrap - The man page for the knife bootstrap subcommand.

A bootstrap is a process that installs the chef-client on a target system so that it can run as a chef-client and communicate with a server.

The knife bootstrap subcommand is used run a bootstrap operation that installs the chef-client on the target system. The bootstrap operation must specify the IP address or FQDN of the target system.

Note
    To bootstrap the chef-client on Microsoft Windows machines, the knife-windows plugins is required, which includes the necessary bootstrap scripts that are used to do the actual installation.

Common Options

The following options can be run with all Knife sub-commands and plug-ins:

-c CONFIG, --config CONFIG
    The configuration file to use.

--color
    Indicates that colored output will be used.

-d, --disable-editing
    Indicates that $EDITOR will not be opened; data will be accepted as-is.

--defaults
    Indicates that Knife will use the default value, instead of asking a user to provide one.

-e EDITOR, --editor EDITOR
    The $EDITOR that is used for all interactive commands.

-E ENVIRONMENT, --environment ENVIRONMENT
    The name of the environment. When this option is added to a command, the command will run only against the named environment.

-f FILE_NAME, --file FILE_NAME
    Indicates that the private key will be saved to a specified file name.

-F FORMAT, --format FORMAT
    The output format: summary (default), text, json, yaml, and pp.

-h, --help
    Shows help for the command.

-k KEY, --key KEY
    The private key that Knife will use to sign requests made by the API client to the server.

--no-color
    Indicates that color will not be used in the output.

-p PASSWORD, --password PASSWORD
    The user password.

--print-after
    Indicates that data will be shown after a destructive operation.

-s URL, --server-url URL
    The URL for the server.

-u USER, --user USER
    The user name used by Knife to sign requests made by the API client to the server. Authentication will fail if the user name does not match the private key.

-v, --version
    The version of the chef-client.

-V, --verbose
    Set for more verbose outputs. Use -VV for maximum verbosity.

-y, --yes
    Indicates that the response to all confirmation prompts will be "Yes" (and that Knife will not ask for confirmation).

    Syntax

    This argument has the following syntax:

    $ knife bootstrap FQDN_or_IP_ADDRESS (options)

    Options

    This subcommand has the following options:

-A, --forward-agent
    Indicates that SSH agent forwarding is enabled.

--bootstrap-proxy PROXY_URL
    The proxy server for the node that is the target of a bootstrap operation.

--bootstrap-version VERSION
    The version of the chef-client to install.

-d DISTRO, --distro DISTRO
    The template file to be used during a bootstrap operation. The following distributions are supported: chef-full (the default bootstrap), centos5-gems, fedora13-gems, ubuntu10.04-gems, ubuntu10.04-apt, ubuntu12.04-gems, and the name of a custom bootstrap template file. When this option is used, Knife will search for the template file in the following order: the bootstrap/ folder in the current working directory, the bootstrap/ folder in the chef-repo, the bootstrap/ folder in the ~/.chef/ directory, or a default bootstrap file. Do not use the --template-file option when --distro is specified.

-G GATEWAY, --ssh-gateway GATEWAY
    The SSH tunnel or gateway that is used to run a bootstrap action on a machine that is not accessible from the workstation.

--hint HINT_NAME[=HINT_FILE]
    An Ohai hint to be set on the target of the bootstrap. The hint is contained in a file and is formatted as JSON: {"attribute":"value","attribute":"value"...}. HINT_NAME is the name of the hint and HINT_FILE is the name of the hint file located at /etc/chef/ohai/hints/HINT_FILE.json. Use multiple --hint options in the command to specify multiple hints.

-i IDENTITY_FILE, --identity-file IDENTITY_FILE
    The SSH identity file used for authentication. Key-based authentication is recommended.

-j JSON_ATTRIBS, --json-attributes JSON_ATTRIBS
    A JSON string that is added to the first run of a chef-client.

-N NAME, --node-name NAME
    The name of the node.

--[no-]host-key-verify
    Use --no-host-key-verify to disable host key verification. Default setting: --host-key-verify.

-p PORT, --ssh-port PORT
    The SSH port.

-P PASSWORD, --ssh-password PASSWORD
    The SSH password. This can be used to pass the password directly on the command line. If this option is not specified (and a password is required) Knife will prompt for the password.

--prerelease
    Indicates that pre-release gems should be installed.

-r RUN_LIST, --run-list RUN_LIST
    A comma-separated list of roles and/or recipes to be applied.

--secret SECRET
    The encryption key that is used for values contained within a data bag.

--secret-file FILE
    The path to the file that contains the encryption key.

--sudo
    Indicates that a bootstrap operation should be executed using sudo.

--template-file TEMPLATE
    The path to a template file that will be used during a bootstrap operation. Do not use the --distro option when --template-file is specified.

--use-sudo-password
    Indicates that a bootstrap operation is done using sudo, with the password specified by the -P (or --ssh-password) option.

-x USERNAME, --ssh-user USERNAME
    The SSH user name.

    Examples

    To pass an SSH password as part of the command:

    $ knife bootstrap 192.168.1.1 -x username -P PASSWORD --sudo

    To use a file that contains a private key:

    $ knife bootstrap 192.168.1.1 -x username -i ~/.ssh/id_rsa --sudo

AUTHOR
Opscode