Berkshelf


#1

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’, 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


#2

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)’, 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


#3

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

On Fri, May 9, 2014 at 8:37 AM, Daniel DeLeo 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)’, 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


#4

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


#5

BS3 is ~1500% faster than BS2.

Thanks,
Seth

On May 9, 2014, at 11:48 AM, Morgan Blackthorne 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

On Fri, May 9, 2014 at 8:37 AM, Daniel DeLeo 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)’, 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