GitHub workflow for open source cookbooks

Hi,

We have a normal chef style cookbooks repository on GitHub with about 30
cookbooks or so in our site-cookbooks directory. Since I only want to open
source a subset of them, I cannot just make our repository public. I was
thinking about just setting up a second public repository and using git
filter-branch to move the cookbooks we want to open into it. That seems
like it work well for the initial release, but I wanted to make ongoing
maintenance easy well. Assuming I don’t change the directory names, I
believe I might be able to cherry-pick from the private repository to keep
the public cookbooks up to date. The other alternative I thought was
filter-branch’ing a new public repository, forking it and making the fork
private. This requires more coordination with the other guys using our
repository and I’m not sure if you can send a pull request to a public
repository from a private one.

Anyone have a good suggestion? Thanks.

I don't try to sync cookbooks in our public repository back to the private
one -- once it's moved to public, it's public, and that's the only place
it lives.

On Fri, Jun 17, 2011 at 9:29 AM, Eric Hauser ewhauser@gmail.com wrote:

Hi,

We have a normal chef style cookbooks repository on GitHub with about 30
cookbooks or so in our site-cookbooks directory. Since I only want to open
source a subset of them, I cannot just make our repository public. I was
thinking about just setting up a second public repository and using git
filter-branch to move the cookbooks we want to open into it. That seems
like it work well for the initial release, but I wanted to make ongoing
maintenance easy well. Assuming I don't change the directory names, I
believe I might be able to cherry-pick from the private repository to keep
the public cookbooks up to date. The other alternative I thought was
filter-branch'ing a new public repository, forking it and making the fork
private. This requires more coordination with the other guys using our
repository and I'm not sure if you can send a pull request to a public
repository from a private one.

Anyone have a good suggestion? Thanks.

Eric,

On 17 June 2011 16:29, Eric Hauser ewhauser@gmail.com wrote:

We have a normal chef style cookbooks repository on GitHub with about 30
cookbooks or so in our site-cookbooks directory. Since I only want to open
source a subset of them, I cannot just make our repository public. I was
thinking about just setting up a second public repository and using git
filter-branch to move the cookbooks we want to open into it. That seems
like it work well for the initial release, but I wanted to make ongoing
maintenance easy well.

Have a look at the following:
https://github.com/atriso/chef-repo-pas

The former link is a Chef repository on Github I am using for one of
my customers, that has the single cookbook repository from the second
link as a Git submodule.

Having the cookbooks I develop in separate Git repositories is easy
for letting other people contribute. It is a repo on it's own, with
tickets, pull requests and alike. Either, people use my repo (or their
own fork) as a Git submodule within their Chef repository, or they use
the knife plugin [1] that allows them to use the vendor branch pattern
similar to "knife cookbook site install".

[1] GitHub - websterclay/knife-github-cookbooks: A knife plugin facilitating installing, updating, and tracking Chef cookbooks found on Github.

In your case, split out the cookbooks you want to share as separate
Git repositories, and then pull them back in in your complete Chef
repository as Git submodules.

Cheers,

Ringo

On Sat, Jun 18, 2011 at 12:29 AM, Eric Hauser ewhauser@gmail.com wrote:

Hi,
We have a normal chef style cookbooks repository on GitHub with about 30
cookbooks or so in our site-cookbooks directory. Since I only want to open
source a subset of them, I cannot just make our repository public. I was
thinking about just setting up a second public repository and using git
filter-branch to move the cookbooks we want to open into it. That seems
like it work well for the initial release, but I wanted to make ongoing
maintenance easy well. Assuming I don't change the directory names, I
believe I might be able to cherry-pick from the private repository to keep
the public cookbooks up to date. The other alternative I thought was
filter-branch'ing a new public repository, forking it and making the fork
private. This requires more coordination with the other guys using our
repository and I'm not sure if you can send a pull request to a public
repository from a private one.
Anyone have a good suggestion? Thanks.

If you follow the opscode convention of with cookbook
as folder the we can probably track that as upstream in
Multiple vendor Chef cookbooks. · GitHub.
The thought was to have github teams per-cookbook, so you could be
added to your cookbook's team if you wanted, and could soliicit others
to join.
Just how teams are formed and regulated is an open issue - thoughts?
This team would manage community contributions to that cookbook,
handle issues and pull requests, etc.
The idea is:

  • master branch tracks upstream, in this case your repo, in other
    cases 37signals or opscode.
  • qa branch is for community contributions
  • various teams should try to ensure that their cookbooks play nice
    with other cookbook's qa branches, it not its a bug - for which
    cookbook is for the various team members to debate - hopefully in
    public on the issue tracker.

That said we are still feeling our way in discovering what works for
people. jnewland has made some nice contributions with his knife
plugin and offering to run the cookbooks-bot.
The objective is to try and facilitate contributions from those 400+
forks of various cookbooks, and to try and bring to the surface
cookbooks for less known applications.

Feed back welcome.

HTH

--
πόλλ' οἶδ ἀλώπηξ, ἀλλ' ἐχῖνος ἓν μέγα
[The fox knows many things, but the hedgehog knows one big thing.]
Archilochus, Greek poet (c. 680 BC – c. 645 BC)
http://hedgehogshiatus.com