Docs suggestions: adding non-default recipes, adding attributes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Docs suggestions: adding non-default recipes, adding attributes

Paul Tiplady
Hello,

I've just spent a few hours ramping up on Vagrant and Chef, and I have a couple suggestions for places that the Vagrant docs could be improved.

Part of this is just the fact that the Chef docs are a bit crap at explaining the basic concepts, but a couple more links to carefully chosen pages could help a lot. Concepts that took a lot of reading around to figure out:

* How to add non-default recipes to the run list. This turns out to be simple, but it wasn't clear to me how Vagrant was populating the run list. A link to http://docs.opscode.com/essentials_cookbook_recipes_run_lists.html, which illustrates the
apache2::mod_ssl 
syntax would have been useful.

* How to add attributes. Again, if you're familiar with Chef then the statement "Additional configuration data for Chef attributes can be passed in to Chef solo." explains everything. However, this is mentioned almost as an afterthought, and should really be emphasized; this is the way you configure your recipes. http://docs.opscode.com/chef_solo.html#attributes is a bit more helpful than the docs here.

Also, as an aside, adding all the JSON at the end makes the Vagrantfile harder to read; it would be much more elegant (and consistent) if you could attach the attributes to the recipe in a block:

Vagrant.configure("2") do |config|
  config.vm.provision :chef_solo do |chef|
    chef.add_recipe "apache" do |apache_config|
apache_config.
listen_address = "0.0.0.0"
end
 
end end

Hopefully at the very least this will be of use to someone else.

Cheers,
Paul

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Docs suggestions: adding non-default recipes, adding attributes

Mitchell Hashimoto
Paul,

Thanks!

The link to run lists makes sense and I've added that. A new docs site will be deployed when 1.2 is released.

As for attributes: The "json" attribute is consistent with how Chef works. And as the docs say, it assumes you know or are you using some other resource to learn Chef if you're using Vagrant with it. So I think masking what is actually happening under the covers with the Chef attributes would be a mistake.

Best,
Mitchell


On Wed, Apr 10, 2013 at 1:10 AM, Paul Tiplady <[hidden email]> wrote:
Hello,

I've just spent a few hours ramping up on Vagrant and Chef, and I have a couple suggestions for places that the Vagrant docs could be improved.

Part of this is just the fact that the Chef docs are a bit crap at explaining the basic concepts, but a couple more links to carefully chosen pages could help a lot. Concepts that took a lot of reading around to figure out:

* How to add non-default recipes to the run list. This turns out to be simple, but it wasn't clear to me how Vagrant was populating the run list. A link to http://docs.opscode.com/essentials_cookbook_recipes_run_lists.html, which illustrates the
apache2::mod_ssl 
syntax would have been useful.

* How to add attributes. Again, if you're familiar with Chef then the statement "Additional configuration data for Chef attributes can be passed in to Chef solo." explains everything. However, this is mentioned almost as an afterthought, and should really be emphasized; this is the way you configure your recipes. http://docs.opscode.com/chef_solo.html#attributes is a bit more helpful than the docs here.

Also, as an aside, adding all the JSON at the end makes the Vagrantfile harder to read; it would be much more elegant (and consistent) if you could attach the attributes to the recipe in a block:

Vagrant.configure("2") do |config|
  config.vm.provision :chef_solo do |chef|
    chef.add_recipe "apache" do |apache_config|
apache_config.
listen_address = "0.0.0.0"
end
 
end end

Hopefully at the very least this will be of use to someone else.

Cheers,
Paul

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.