knife serve
Use the knife serve subcommand to run a persistent chef-zero against the local chef-repo. (chef-zero is a lightweight Chef server that runs in-memory on the local machine.) This is the same as running the chef-client executable with the --local-mode option. The chef_repo_path is located automatically and the Chef server will bind to the first available port between 8889 and 9999. knife serve will print the URL for the local Chef server, so that it may be added to the knife.rb file.
Syntax
This subcommand has the following syntax:
$ knife serve (options)
Options
Note
Review the list of common options available to this (and all) knife subcommands and plugins.
This subcommand has the following options:
--chef-repo-path PATH- The path to the chef-repo. Default value: same as
chef_repo_pathin the client.rb file. --chef-zero-host IP- Override the host on which chef-zero listens. Default value:
127.0.0.1. --chef-zero-port PORT- The port on which chef-zero listens. The default behavior will bind to the first available port between
8889and9999. --repo-mode MODE- Use to specify the local chef-repo layout. Possible values:
static(for environments, roles, data bags, and cookbooks),everything(same as static, plus nodes, clients, and users),hosted_everything(for ACLs, groups). Default value:everything/hosted_everything.
Examples
None.
© Chef Software, Inc.
Licensed under the Creative Commons Attribution 3.0 Unported License.
The Chef™ Mark and Chef Logo are either registered trademarks/service marks or trademarks/servicemarks of Chef, in the United States and other countries and are used with Chef Inc's permission.
We are not affiliated with, endorsed or sponsored by Chef Inc.
https://docs-archive.chef.io/release/12-13/knife_serve.html