[chef] Re: Vagrantfile chef.run_list Vs. "knife solo cook"


Chronological Thread 
  • From: Zac Stevens < >
  • To:
  • Subject: [chef] Re: Vagrantfile chef.run_list Vs. "knife solo cook"
  • Date: Thu, 11 Jul 2013 16:50:32 +0100

On Thu, Jul 11, 2013 at 4:14 PM, Rudi < " target="_blank"> > wrote:
For one of these apps my coworker put his run lists in the Vagrantfile - which works fine.

So when you "vagrant up" the recipes run and everything gets pretty much done. 
Then there's just a rake db seeding task to finish the build off.

The other app is the one I've done, but the run list is in a node.json file.

"vagrant up" just boots up the VM .. then I use "knife solo cook" to run the recipies.


I'm thinking the "knife solo cook" method is better as it more versatile.
These same recipes are not bound to vagrant and can easily be run on a remote server.

What do you think? Am I missing something?

The recipes are not bound to Vagrant in either case, so the biggest difference is user experience.

Is the point of the Vagrant configuration to run your application, or to run Chef?  If the application is the important part, is Chef simply an implementation detail, or do you expect everyone using Vagrant to be comfortable using Chef too?

When Chef is just an implementation detail, I prefer making Vagrant responsible - adding "knife solo" means more dependencies, and more for your users to understand before they are productive.
On the other hand, if the point is to let people get comfortable with Chef, it might make sense to avoid some of Vagrant's magic.  If you're using (or planning on using) "knife solo" on your production machines, using it for your local VMs is a good way to build experience in a safer environment.

Of course, you can provide a Vagrantfile that makes it easy to provision your VM, and still use the same cookbook(s) via "knife solo".


Zac




Archive powered by MHonArc 2.6.16.

§