'chef configure' command
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 18
- Forks
- 23
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 1
Description
We need to replace 'knife configure -i' with something a bit more opinionated (yet ultimately customizable) and which does better integration.
By default it should probably hit hosted chef, with a --server command line option to override the server location (I DO NOT WANT TO TYPE IN API.OPSCODE.COM AND YES IM SCREAMING THIS). It needs to know your organization, user and password. It should take those off of the command line, or via interactive prompting.
It should then fetch your validator, client key and setup a knife.rb for your with no additional prompting.
The default location for the knife.rb should be .chef/knife.rb, it should assume a ~/chef-repo/{cookbooks,data_bags,role,etc} directory structure. Do not prompt the user to make a choice. It should /allow/ overriding the directory structure to move it under a more ~/env/{organization}-like structure (I'd like to be able to set ~/env/{organization} as a preference in a .chefrc file)
The way I see this working for a new hosted user:
$ chef configure --organization acmeinc --user bob
password: ******
- creating ~/.chef/knife.rb
- creating ~/.chef/bob.pem
- creating ~/.chef/acmeinc-validator.pem
- creating ~/chef-repo/{cookbooks,data_bags,roles,environments}
The way I see this working for a new private EC user:
$ chef configure --server chef.acmeinc.com --organization acmeinc --user bob
password: ******
- creating ~/.chef/knife.rb
- creating ~/.chef/bob.pem
- creating ~/.chef/acmeinc-validator.pem
- creating ~/chef-repo/{cookbooks,data_bags,roles,environments}
The way I'd like to be able to use it after some minor config tweaking:
$ chef configure --organization acmeinc --user lamont
password: ******
- creating ~/env/acmeinc/.chef/knife.rb
- creating ~/env/acmeinc/.chef/bob.pem
- creating ~/env/acmeinc/.chef/acmeinc-validator.pem
- creating ~/env/acmeinc/chef-repo/{cookbooks,data_bags,roles,environments}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing knife configure -i command and its configuration flow. Use the requested hosted and private-server examples to define the command’s inputs, prompts, generated files, and directory layout. Done means chef configure can create the credentials, .chef/knife.rb, and repository structure without additional prompting while supporting the stated overrides.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100