LinuxCommandLibrary

knife

command-line tool for Chef infrastructure automation

TLDR

Bootstrap node

$ knife bootstrap [host] -x [user] -P [password]
copy
List nodes
$ knife node list
copy
Show node info
$ knife node show [node_name]
copy
Upload cookbook
$ knife cookbook upload [cookbook]
copy
Search nodes
$ knife search node "role:[webserver]"
copy
SSH to nodes
$ knife ssh "role:[webserver]" "[command]"
copy

SYNOPSIS

knife command [subcommand] [options]

DESCRIPTION

knife is the command-line tool for Chef infrastructure automation. It manages nodes, cookbooks, and Chef server.
The tool bootstraps nodes for configuration management. It uploads recipes and queries infrastructure.

PARAMETERS

bootstrap HOST

Bootstrap Chef on node.
node CMD
Node management.
cookbook CMD
Cookbook operations.
search TYPE QUERY
Search Chef server.
ssh QUERY CMD
Run command via SSH.
-x USER
SSH username.
--help
Display help information.

CAVEATS

Requires Chef Workstation. Chef server access needed. Ruby-based.

HISTORY

knife is part of Chef, the infrastructure automation platform created by Opscode (now Progress Chef).

SEE ALSO

chef(1), chef-client(8), berks(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community