# Berkshelf

**URL:** <https://discourse.chef.io/t/berkshelf/5387>\
**Category:** Chef Infra (archive)\
**Created:** [May 9, 2014, 11:24am UTC](https://discourse.chef.io/t/berkshelf/5387 "2014-05-09T11:24:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Morgan\_Blackthorne](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/morgan_blackthorne/32/100_2.png) [@Morgan\_Blackthorne](https://discourse.chef.io/u/Morgan_Blackthorne)\
**Post date:** [May 9, 2014, 11:24am UTC](https://discourse.chef.io/t/berkshelf/5387/1 "2014-05-09T11:24:48Z")

</div>

I recently moved over to generating my Berksfile via ERB, as we have two  
different chef orgs, one of which is for testing and uses a different set  
of branches than the main set for our internal repos.

How difficult will it be for me to move from a Berksfile like so:

#!/usr/bin/env ruby  
#^syntax detection

group :opscode do  
site :opscode

cookbook ‘apache2’, '~\> 1.8.14’  
cookbook ‘apt’, '~\> 2.0.0’  
cookbook ‘bluepill’, '~\> 2.2.2’  
cookbook ‘chef-client’, '= 2.2.4’  
cookbook ‘chef\_handler’, '~\> 1.1.5’  
cookbook ‘chef-splunk’, '~\> 1.0.4’  
cookbook ‘hostsfile’, '~\> 2.4.4’  
cookbook ‘java’, '~\> 1.22.0’  
cookbook ‘java-management’, '~\> 1.0.2’  
cookbook ‘lvm’, '~\> 0.8.10’  
cookbook ‘mongodb’, '~\> 0.11.0’  
cookbook ‘nagios’, '~\> 5.0.0’  
cookbook ‘nginx’, '~\> 1.6.0’  
cookbook ‘ntp’, '~\> 1.3.2’  
cookbook ‘ohai’, '~\> 1.1.12’  
cookbook ‘omnibus\_updater’, '~\> 0.2.3’  
cookbook ‘openssl’, '~\> 1.0.2’  
cookbook ‘percona’, '~\> 0.14.5’  
cookbook ‘postfix’, '~\> 2.1.6’  
cookbook ‘rsyslog’, '~\> 1.6.0’  
cookbook ‘ruby\_build’, '~\> 0.8.0’  
cookbook ‘sssd\_ldap’, '~\> 0.1.4’  
cookbook ‘sudo’, '~\> 2.1.4’  
cookbook ‘tomcat’, '~\> 0.15.10’  
cookbook ‘users’, '~\> 1.5.0’  
end

group :github do  
cookbook ‘airbrake\_handler’, github: ‘cgriego/chef-airbrake\_handler’,  
protocol: :https  
cookbook ‘irc\_handler’, github: ‘bflad/chef-irc\_handler’,  
protocol: :https  
cookbook ‘npm’, github: ‘balbeko/chef-npm’,  
protocol: :https  
cookbook ‘rbenv’, github: ‘fnichol/chef-rbenv’,  
protocol: :https  
end

group :rst do  
\<% subdir\_list.each do |cb| %\>  
cookbook ‘\<%= cb %\>’, git: ‘ssh://  
[git@stash.trstone.com](mailto:git@stash.trstone.com)/chef/rs-cookbooks.git’, rel: ‘\<%= cb %\>’\<%= branch %\>  
\<% end %\>  
end

# vim: ai et ts=2 sts=2 sw=2 ft=ruby fdm=marker

Over to using Berks3? I’m not sure exactly what changed and what depends on  
the new API server so I’m not sure if I’d need that or not.

Also, I know we’re using subdirectories of a repo, vs individual repos per  
cookbook which is the commonly accepted solution in the community. Does  
anyone happen to know how to set up a Bamboo plan to fire off on multiple  
repository triggers?

–  
~_~ StormeRider ~_~

“Every world needs its heroes […] They inspire us to be better than we  
are. And they protect from the darkness that’s just around the corner.”

(from Smallville Season 6x1: “Zod”)

On why I hate the phrase “that’s so lame”… [http://bit.ly/Ps3uSS](http://bit.ly/Ps3uSS)

---

<div class="post-metadata">

**Author:** ![kallistec](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallistec/32/23_2.png) [@kallistec](https://discourse.chef.io/u/kallistec)\
**Post date:** [May 9, 2014, 3:37pm UTC](https://discourse.chef.io/t/berkshelf/5387/2 "2014-05-09T15:37:49Z")

</div>

On Friday, May 9, 2014 at 4:24 AM, Morgan Blackthorne wrote:

> I recently moved over to generating my Berksfile via ERB, as we have two different chef orgs, one of which is for testing and uses a different set of branches than the main set for our internal repos.
> 
> How difficult will it be for me to move from a Berksfile like so:
> 
> > #!/usr/bin/env ruby  
> > #^syntax detection
> > 
> > group :opscode do  
> > site :opscode
> > 
> > cookbook 'apache2', '~\> 1.8.14'  
> > cookbook 'apt', '~\> 2.0.0'  
> > cookbook 'bluepill', '~\> 2.2.2'  
> > cookbook 'chef-client', '= 2.2.4'  
> > cookbook 'chef\_handler', '~\> 1.1.5'  
> > cookbook 'chef-splunk', '~\> 1.0.4'  
> > cookbook 'hostsfile', '~\> 2.4.4'  
> > cookbook 'java', '~\> 1.22.0'  
> > cookbook 'java-management', '~\> 1.0.2'  
> > cookbook 'lvm', '~\> 0.8.10'  
> > cookbook 'mongodb', '~\> 0.11.0'  
> > cookbook 'nagios', '~\> 5.0.0'  
> > cookbook 'nginx', '~\> 1.6.0'  
> > cookbook 'ntp', '~\> 1.3.2'  
> > cookbook 'ohai', '~\> 1.1.12'  
> > cookbook 'omnibus\_updater', '~\> 0.2.3'  
> > cookbook 'openssl', '~\> 1.0.2'  
> > cookbook 'percona', '~\> 0.14.5'  
> > cookbook 'postfix', '~\> 2.1.6'  
> > cookbook 'rsyslog', '~\> 1.6.0'  
> > cookbook 'ruby\_build', '~\> 0.8.0'  
> > cookbook 'sssd\_ldap', '~\> 0.1.4'  
> > cookbook 'sudo', '~\> 2.1.4'  
> > cookbook 'tomcat', '~\> 0.15.10'  
> > cookbook 'users', '~\> 1.5.0'  
> > end
> > 
> > group :github do  
> > cookbook 'airbrake\_handler', github: 'cgriego/chef-airbrake\_handler', protocol: :https  
> > cookbook 'irc\_handler', github: 'bflad/chef-irc\_handler', protocol: :https  
> > cookbook 'npm', github: 'balbeko/chef-npm', protocol: :https  
> > cookbook 'rbenv', github: 'fnichol/chef-rbenv', protocol: :https  
> > end
> > 
> > group :rst do  
> > \<% subdir\_list.each do |cb| %\>  
> > cookbook '\<%= cb %\>', git: 'ssh://git@stash.trstone.com/chef/rs-cookbooks.git ([http://git@stash.trstone.com/chef/rs-cookbooks.git](http://git@stash.trstone.com/chef/rs-cookbooks.git))', rel: '\<%= cb %\>'\<%= branch %\>  
> > \<% end %\>  
> > end
> > 
> > # vim: ai et ts=2 sts=2 sw=2 ft=ruby fdm=marker
> 
> Over to using Berks3? I'm not sure exactly what changed and what depends on the new API server so I'm not sure if I'd need that or not.

I don’t know about the rest of your questions, but the purpose of the new API server is to serve dependency information for community cookbooks. This is a stopgap solution to work around the fact that the current community site API doesn’t provide enough dependency information for berks to solve your cookbooks’ dependencies (something we at Chef are hoping to rectify as soon as we can). So you will need to use the new API server, but you can just use the public one if you don’t want to manage any new infrastructure.

HTH,

--  
Daniel DeLeo

---

<div class="post-metadata">

**Author:** ![Morgan\_Blackthorne](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/morgan_blackthorne/32/100_2.png) [@Morgan\_Blackthorne](https://discourse.chef.io/u/Morgan_Blackthorne)\
**Post date:** [May 9, 2014, 3:48pm UTC](https://discourse.chef.io/t/berkshelf/5387/3 "2014-05-09T15:48:49Z")

</div>

Ok, so the public one corresponds to the "site :opscode" section, then.

How is the speed of B3 vs B2?

--  
~_~ StormeRider ~_~

"Every world needs its heroes [...] They inspire us to be better than we  
are. And they protect from the darkness that's just around the corner."

(from Smallville Season 6x1: "Zod")

On why I hate the phrase "that's so lame"... [http://bit.ly/Ps3uSS](http://bit.ly/Ps3uSS)

On Fri, May 9, 2014 at 8:37 AM, Daniel DeLeo [dan@kallistec.com](mailto:dan@kallistec.com) wrote:

> On Friday, May 9, 2014 at 4:24 AM, Morgan Blackthorne wrote:
> 
> > I recently moved over to generating my Berksfile via ERB, as we have two  
> > different chef orgs, one of which is for testing and uses a different set  
> > of branches than the main set for our internal repos.
> > 
> > How difficult will it be for me to move from a Berksfile like so:
> > 
> > > #!/usr/bin/env ruby  
> > > #^syntax detection
> > > 
> > > group :opscode do  
> > > site :opscode
> > > 
> > > cookbook 'apache2', '~\> 1.8.14'  
> > > cookbook 'apt', '~\> 2.0.0'  
> > > cookbook 'bluepill', '~\> 2.2.2'  
> > > cookbook 'chef-client', '= 2.2.4'  
> > > cookbook 'chef\_handler', '~\> 1.1.5'  
> > > cookbook 'chef-splunk', '~\> 1.0.4'  
> > > cookbook 'hostsfile', '~\> 2.4.4'  
> > > cookbook 'java', '~\> 1.22.0'  
> > > cookbook 'java-management', '~\> 1.0.2'  
> > > cookbook 'lvm', '~\> 0.8.10'  
> > > cookbook 'mongodb', '~\> 0.11.0'  
> > > cookbook 'nagios', '~\> 5.0.0'  
> > > cookbook 'nginx', '~\> 1.6.0'  
> > > cookbook 'ntp', '~\> 1.3.2'  
> > > cookbook 'ohai', '~\> 1.1.12'  
> > > cookbook 'omnibus\_updater', '~\> 0.2.3'  
> > > cookbook 'openssl', '~\> 1.0.2'  
> > > cookbook 'percona', '~\> 0.14.5'  
> > > cookbook 'postfix', '~\> 2.1.6'  
> > > cookbook 'rsyslog', '~\> 1.6.0'  
> > > cookbook 'ruby\_build', '~\> 0.8.0'  
> > > cookbook 'sssd\_ldap', '~\> 0.1.4'  
> > > cookbook 'sudo', '~\> 2.1.4'  
> > > cookbook 'tomcat', '~\> 0.15.10'  
> > > cookbook 'users', '~\> 1.5.0'  
> > > end
> > > 
> > > group :github do  
> > > cookbook 'airbrake\_handler', github: 'cgriego/chef-airbrake\_handler',  
> > > protocol: :https  
> > > cookbook 'irc\_handler', github: 'bflad/chef-irc\_handler', protocol:  
> > > :https  
> > > cookbook 'npm', github: 'balbeko/chef-npm', protocol: :https  
> > > cookbook 'rbenv', github: 'fnichol/chef-rbenv', protocol: :https  
> > > end
> > > 
> > > group :rst do  
> > > \<% subdir\_list.each do |cb| %\>  
> > > cookbook '\<%= cb %\>', git: 'ssh://  
> > > [git@stash.trstone.com](mailto:git@stash.trstone.com)/chef/rs-cookbooks.git (  
> > > [http://git@stash.trstone.com/chef/rs-cookbooks.git](http://git@stash.trstone.com/chef/rs-cookbooks.git))', rel: '\<%= cb %\>'\<%=  
> > > branch %\>  
> > > \<% end %\>  
> > > end
> > > 
> > > # vim: ai et ts=2 sts=2 sw=2 ft=ruby fdm=marker
> > 
> > Over to using Berks3? I'm not sure exactly what changed and what depends  
> > on the new API server so I'm not sure if I'd need that or not.
> 
> I don’t know about the rest of your questions, but the purpose of the new  
> API server is to serve dependency information for community cookbooks. This  
> is a stopgap solution to work around the fact that the current community  
> site API doesn’t provide enough dependency information for berks to solve  
> your cookbooks’ dependencies (something we at Chef are hoping to rectify as  
> soon as we can). So you will need to use the new API server, but you can  
> just use the public one if you don’t want to manage any new infrastructure.
> 
> HTH,
> 
> --  
> Daniel DeLeo

---

<div class="post-metadata">

**Author:** ![kallistec](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallistec/32/23_2.png) [@kallistec](https://discourse.chef.io/u/kallistec)\
**Post date:** [May 9, 2014, 4:06pm UTC](https://discourse.chef.io/t/berkshelf/5387/4 "2014-05-09T16:06:35Z")

</div>

On Friday, May 9, 2014 at 8:48 AM, Morgan Blackthorne wrote:

> Ok, so the public one corresponds to the "site :opscode" section, then.
> 
> How is the speed of B3 vs B2?
> 
> --  
> ~_~ StormeRider ~_~

The dependency resolver is now actually accurate (and solutions will match what chef-server would do) and fast. Whether it was slow before depended on your exact constraints and number of cookbooks, but it could sometimes take over a minute to solve dependency constraints. As for the rest of berks, I think it’s largely unchanged so stuff like cookbook downloading should take about the same amount of time.

--  
Daniel DeLeo

---

<div class="post-metadata">

**Author:** ![Seth\_Vargo2](https://avatars.discourse-cdn.com/v4/letter/s/ccd318/32.png) [@Seth\_Vargo2](https://discourse.chef.io/u/Seth_Vargo2)\
**Post date:** [May 11, 2014, 5:09pm UTC](https://discourse.chef.io/t/berkshelf/5387/5 "2014-05-11T17:09:14Z")

</div>

BS3 is ~1500% faster than BS2.

Thanks,  
Seth

On May 9, 2014, at 11:48 AM, Morgan Blackthorne [stormerider@gmail.com](mailto:stormerider@gmail.com) wrote:

> Ok, so the public one corresponds to the "site :opscode" section, then.
> 
> How is the speed of B3 vs B2?
> 
> --  
> ~_~ StormeRider ~_~
> 
> "Every world needs its heroes [...] They inspire us to be better than we are. And they protect from the darkness that's just around the corner."
> 
> (from Smallville Season 6x1: "Zod")
> 
> On why I hate the phrase "that's so lame"... [http://bit.ly/Ps3uSS](http://bit.ly/Ps3uSS)
> 
> On Fri, May 9, 2014 at 8:37 AM, Daniel DeLeo [dan@kallistec.com](mailto:dan@kallistec.com) wrote:
> 
> On Friday, May 9, 2014 at 4:24 AM, Morgan Blackthorne wrote:
> 
> > I recently moved over to generating my Berksfile via ERB, as we have two different chef orgs, one of which is for testing and uses a different set of branches than the main set for our internal repos.
> > 
> > How difficult will it be for me to move from a Berksfile like so:
> > 
> > > #!/usr/bin/env ruby  
> > > #^syntax detection
> > > 
> > > group :opscode do  
> > > site :opscode
> > > 
> > > cookbook 'apache2', '~\> 1.8.14'  
> > > cookbook 'apt', '~\> 2.0.0'  
> > > cookbook 'bluepill', '~\> 2.2.2'  
> > > cookbook 'chef-client', '= 2.2.4'  
> > > cookbook 'chef\_handler', '~\> 1.1.5'  
> > > cookbook 'chef-splunk', '~\> 1.0.4'  
> > > cookbook 'hostsfile', '~\> 2.4.4'  
> > > cookbook 'java', '~\> 1.22.0'  
> > > cookbook 'java-management', '~\> 1.0.2'  
> > > cookbook 'lvm', '~\> 0.8.10'  
> > > cookbook 'mongodb', '~\> 0.11.0'  
> > > cookbook 'nagios', '~\> 5.0.0'  
> > > cookbook 'nginx', '~\> 1.6.0'  
> > > cookbook 'ntp', '~\> 1.3.2'  
> > > cookbook 'ohai', '~\> 1.1.12'  
> > > cookbook 'omnibus\_updater', '~\> 0.2.3'  
> > > cookbook 'openssl', '~\> 1.0.2'  
> > > cookbook 'percona', '~\> 0.14.5'  
> > > cookbook 'postfix', '~\> 2.1.6'  
> > > cookbook 'rsyslog', '~\> 1.6.0'  
> > > cookbook 'ruby\_build', '~\> 0.8.0'  
> > > cookbook 'sssd\_ldap', '~\> 0.1.4'  
> > > cookbook 'sudo', '~\> 2.1.4'  
> > > cookbook 'tomcat', '~\> 0.15.10'  
> > > cookbook 'users', '~\> 1.5.0'  
> > > end
> > > 
> > > group :github do  
> > > cookbook 'airbrake\_handler', github: 'cgriego/chef-airbrake\_handler', protocol: :https  
> > > cookbook 'irc\_handler', github: 'bflad/chef-irc\_handler', protocol: :https  
> > > cookbook 'npm', github: 'balbeko/chef-npm', protocol: :https  
> > > cookbook 'rbenv', github: 'fnichol/chef-rbenv', protocol: :https  
> > > end
> > > 
> > > group :rst do  
> > > \<% subdir\_list.each do |cb| %\>  
> > > cookbook '\<%= cb %\>', git: 'ssh://git@stash.trstone.com/chef/rs-cookbooks.git ([http://git@stash.trstone.com/chef/rs-cookbooks.git](http://git@stash.trstone.com/chef/rs-cookbooks.git))', rel: '\<%= cb %\>'\<%= branch %\>  
> > > \<% end %\>  
> > > end
> > > 
> > > # vim: ai et ts=2 sts=2 sw=2 ft=ruby fdm=marker
> > 
> > Over to using Berks3? I'm not sure exactly what changed and what depends on the new API server so I'm not sure if I'd need that or not.
> 
> I don’t know about the rest of your questions, but the purpose of the new API server is to serve dependency information for community cookbooks. This is a stopgap solution to work around the fact that the current community site API doesn’t provide enough dependency information for berks to solve your cookbooks’ dependencies (something we at Chef are hoping to rectify as soon as we can). So you will need to use the new API server, but you can just use the public one if you don’t want to manage any new infrastructure.
> 
> HTH,
> 
> --  
> Daniel DeLeo
