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.
This subcommand has the following syntax:
$ knife serve (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
chef_repo_path
in the client.rb file.--chef-zero-host IP
127.0.0.1
.--chef-zero-port PORT
8889
and 9999
.--repo-mode MODE
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
.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