From 2d78f1a8168c379dce6acdd471f774f296674006 Mon Sep 17 00:00:00 2001 From: Teemu Matilainen Date: Sat, 11 Oct 2014 22:59:52 +0300 Subject: [PATCH] website/docs: Add documentation for the Chef Zero provisioner --- .../v2/provisioning/chef_common.html.md | 8 +-- .../source/v2/provisioning/chef_solo.html.md | 2 +- .../source/v2/provisioning/chef_zero.html.md | 65 +++++++++++++++++++ 3 files changed, 70 insertions(+), 5 deletions(-) create mode 100644 website/docs/source/v2/provisioning/chef_zero.html.md diff --git a/website/docs/source/v2/provisioning/chef_common.html.md b/website/docs/source/v2/provisioning/chef_common.html.md index 1a41691ed..ed776ad0c 100644 --- a/website/docs/source/v2/provisioning/chef_common.html.md +++ b/website/docs/source/v2/provisioning/chef_common.html.md @@ -5,11 +5,11 @@ sidebar_current: "provisioning-chefcommon" # Shared Chef Options -This page documents the list of available options that are available in -both the -[Chef solo](/v2/provisioning/chef_solo.html) +This page documents the list of available options that are available in the +[Chef Solo](/v2/provisioning/chef_solo.html), +[Chef Zero](/v2/provisioning/chef_zero.html) and -[Chef client](/v2/provisioning/chef_client.html) +[Chef Client](/v2/provisioning/chef_client.html) provisioners. * `arguments` (string) - A list of additional arguments to pass on the diff --git a/website/docs/source/v2/provisioning/chef_solo.html.md b/website/docs/source/v2/provisioning/chef_solo.html.md index cb8e34ac8..d916f4fe2 100644 --- a/website/docs/source/v2/provisioning/chef_solo.html.md +++ b/website/docs/source/v2/provisioning/chef_solo.html.md @@ -34,7 +34,7 @@ available below this section. Note that only the Chef-solo specific options are shown below. There is also a large set of [common options](/v2/provisioning/chef_common.html) -that are available with both the Chef Solo and Chef client provisioners. +that are available with all Chef provisioners. * `cookbooks_path` (string or array) - A list of paths to where cookbooks are stored. By default this is "cookbooks", expecting a cookbooks folder diff --git a/website/docs/source/v2/provisioning/chef_zero.html.md b/website/docs/source/v2/provisioning/chef_zero.html.md new file mode 100644 index 000000000..ad5435642 --- /dev/null +++ b/website/docs/source/v2/provisioning/chef_zero.html.md @@ -0,0 +1,65 @@ +--- +page_title: "Chef Zero - Provisioning" +sidebar_current: "provisioning-chefzero" +--- + +# Chef Zero Provisioner + +**Provisioner name: `chef_zero`** + +The Chef Zero provisioner allows you to provision the guest using +[Chef](https://www.getchef.com/chef/), specifically with +[Chef Zero/local mode](https://docs.getchef.com/ctl_chef_client.html#run-in-local-mode). + +This new provisioner is a middle ground between running a full blown +Chef Server and using the limited [Chef Solo](/v2/provisioning/chef_solo.html) +provisioner. It runs a local in-memory Chef Server and fakes the validation +and client key registration. + +
+

+ Warning: If you're not familiar with Chef and Vagrant already, + I recommend starting with the shell + provisioner. However, if you're comfortable with Vagrant already, Vagrant + is the best way to learn Chef. + +

+
+ +## Options + +This section lists the complete set of available options for the Chef Zero +provisioner. More detailed examples of how to use the provisioner are +available below this section. + +Note that only the Chef Zero specific options are shown below, but all [Chef +Solo options](/v2/provisioning/chef_solo.html), including the [common Chef +provisioner options](/v2/provisioning/chef_common.html), are also inherited. + +* `nodes_path` (string) - A path where the Chef nodes are stored. Be default, + no node path is set. + +## Usage + +The Chef Zero provisioner is configured basically the same way as the Chef Solo +provisioner. See the [Chef Solo documentations](/v2/provisioning/chef_solo.html) +for more information. + +A basic example could look like this: + +```ruby +Vagrant.configure("2") do |config| + config.vm.provision "chef_zero" do |chef| + # Specify the local paths where Chef data is stored + chef.cookbooks_path = "cookbooks" + chef.roles_path = "roles" + chef.nodes_path = "nodes" + + # Add a recipe + chef.add_recipe "apache" + + # Or maybe a role + chef.add_role "web" + end +end +```