Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helper script for working with chef solo cookbooks #34

Closed
mscottford opened this issue Mar 19, 2010 · 5 comments
Closed

Helper script for working with chef solo cookbooks #34

mscottford opened this issue Mar 19, 2010 · 5 comments

Comments

@mscottford
Copy link

This is something that I am working on for myself, but I thought it might be useful to others as well. Perhaps bundled with vagrant?

cookbooks sources <command>

Description: Manages the places that cookbooks will be retrieved from. Default opscode github repository.

Commands:

  • list - display the configured sources
  • add - add a source to the list, with optional position
  • remove - remove a source from the list
  • clear - remove all of the sources
  • promote - move a source up in the list
  • demote - move a source down in the list

Implementation Notes:

  • Sources can be github repositories or local folders

cookbooks list

Description: Lists all of the cookbooks that are installed

cookbooks search <search string>

Description: Search the configured sources for cookbooks

cookbooks add <cookbook name> [options]

Description: Install a cookbook and all of its dependencies

Options:

  • --link - if the cookbook is found in a local folder, create a symbolic link instead of coping the folder
  • --exclude-dependencies - overrides the default behavior to include dependent cookbooks

cookbooks remove <cookbook name>

Description: Remove an installed cookbook

cookbooks stub <cookbook name>

Description: Generates a cookbook of the given name, and creates an empty default recipe

@mscottford
Copy link
Author

The last command here may be a good way to implement my suggestion in #32.

@mitchellh
Copy link
Contributor

mscottford,

I've been thinking on this quite a bit, and I think that this sort of functionality is best served via rake similar to the OpsCode cookbooks repo: http://github.com/opscode/cookbooks/blob/master/Rakefile

While Vagrant comes with built-in chef support, I don't want to tie this too tightly.

But, in the future, I'd like to make the vagrant command extensible such that such an addition could be easy to add. If this were the case, then a 3rd party, such as puppet, could come along and easily add a vagrant puppet command.

So perhaps the gist of this whole comment is: Not yet, but possibly in the future. For now, you can use a rakefile.

Mitchell

@mitchellh
Copy link
Contributor

mscottford,

Long time no comment on this issue. Vagrant 0.6 will bring support for plugins, and this will make a perfect plugin. I've flagged it with the plugin tag so I'll pick it up soon.

Mitchell

@mikesmullin
Copy link

I also have a helper script for chef that i use with my vbox deployments. it will take a new vbox image w/ a clean ubuntu install and setup my users, ssh keys, groups, visudo, etc., and then from there it will upload the chef cookbooks and execute them. this satisfies me from deployment standpoint.

http://github.com/mikesmullin/Chef-Solo-Capistrano-Bootstrap

all i really need vagrant to do is download setup a new vbox in one command for devs who are not familiar with it. then run my script. e.g.:

vagrant up
cap chef:init_server 10.1.10.1
cap chef:bootstrap local_dev_dna 10.1.10.1

@mitchellh
Copy link
Contributor

I just realized this issue is still open. I meant to close it awhile back. This feature would make for a good plugin, but one I don't personally need. Writing plugins is very easy though and if you already have cap scripts then writing them into a plugin, if you need it, would be no problem.

Best,
Mitchell

@ghost ghost locked and limited conversation to collaborators Apr 17, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants