Skip to content

[CHEF-3330] Added functionality to create standard chef repo out of knife#322

Closed
amateurhuman wants to merge 9 commits into
chef:masterfrom
amateurhuman:knife-chef-repo-creation-task
Closed

[CHEF-3330] Added functionality to create standard chef repo out of knife#322
amateurhuman wants to merge 9 commits into
chef:masterfrom
amateurhuman:knife-chef-repo-creation-task

Conversation

@amateurhuman

Copy link
Copy Markdown

http://tickets.opscode.com/browse/CHEF-3330

The current way to get a canonical chef repository is to create it yourself (which is error prone) or clone it from opscode/chef-repo. There are two problems with cloning the chef-repo:

  1. Cloning brings the git history along with it, bulking up the history of your repository in general.
  2. You'll have to tweak your remotes to switch origin to upstream and create a new origin.

I built out the functionality as a knife task (knife repo create NAME) to automate the creation of the directory structure and standard files (readmes and Rakefile). You can pass -p /path/to/repo to create the repo in a different directory than the current one.

I didn't include any tests, since it is just building a directory and file structure without any dynamic elements. I mirrored how this was done from the knife cookbook create task.

The only thing I don't really like is keeping the text of the files in the methods themselves and I am more than open to suggestions for improving that.

@btm

btm commented Jul 30, 2012

Copy link
Copy Markdown
Contributor

Thank you for supporting Chef! Our process has a couple prerequisites before we can merge your contribution. We need to ensure you've completed a Contributor License Agreement (CLA) and a ticket on our ticket tracker for the release workflow. Pull requests are optional, but should always include the ticket number that they're related to for cross-referencing. Please take a moment to review the below wiki page for the appropriate steps:

http://wiki.opscode.com/display/chef/How+to+Contribute

@amateurhuman

Copy link
Copy Markdown
Author

Sorry for not getting these done beforehand, CLA submitted and ticket has been created for feature.

@sethvargo

Copy link
Copy Markdown
Contributor

@amateurhuman could you link this PR to the ticket you created in JIRA please?

@josephholsten

Copy link
Copy Markdown
Contributor

related ticket: http://tickets.opscode.com/browse/CHEF-3330

@btm

btm commented Oct 9, 2013

Copy link
Copy Markdown
Contributor

@amateurhuman If you're not going to be able to return to this, could you please close the pull request?

@sersut sersut closed this Dec 6, 2013
@sersut

sersut commented Dec 6, 2013

Copy link
Copy Markdown
Contributor

Closed this PR since there was not too much activity on it for the last year.

Check out https://tickets.opscode.com/browse/CHEF-3330?focusedCommentId=44702&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-44702 for an alternative way of achieving the overall goal of getting a chef repo created automatically.

@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants