knife serve
Use the knife serve
subcommand to run a persistent chef-zero against
the local chef-repo. (chef-zero is a lightweight Chef Infra Server that
runs in-memory on the local machine.) This is the same as running the
Chef Infra Client executable with the --local-mode
option. The
chef_repo_path
is located automatically and the Chef Infra Server will
bind to the first available port between 8889
and 9999
.
knife serve
will print the URL for the local Chef Infra Server, so
that it may be added to the config.rb file.
Syntax
This subcommand has the following syntax:
knife serve (options)
Options
Note
This subcommand has the following options:
--chef-repo-path PATH
-
The path to the chef-repo. Default value: same as
chef_repo_path
in 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
8889
and9999
. --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.
Was this page helpful?