Having problems getting jenkins cookbook to do anything

I forked https://github.com/opscode-cookbooks/jenkins

and modified the metadata.rb file:
name "jenkins"
maintainer "Opscode, Inc."
maintainer_email "cookbooks@opscode.com"
license "Apache 2.0"
description "Installs and configures Jenkins CI server & slaves"
long_description IO.read(File.join(File.dirname(FILE), ‘README.md’))
version “0.8.0”

depends "java"
depends “runit”, ">= 1.0.0"
depends “apt”

depends "apache2"
depends "nginx"
depends “iptables”

recipe “jenkins::server”, “run server recipe.” <<-- added this line

Berksfile:
site :opscode

cookbook ‘runit’, '>= 1.1.2’
cookbook ‘jenkins’, github: ‘hayesmp/jenkins-cookbook’

And I get nothing, it doesn’t install anything:
Uploading the kitchen…
Generating solo config…
Running Chef…
Starting Chef Client, version 11.6.0
Compiling Cookbooks…
Converging 0 resources
Chef Client finished, 0 resources updated

I think we might have discussed this on IRC briefly.

I think the problem is conceptual - you don't need to modify the recipe's
metadata.rb - you need to modify your node's run_list to include the
recipes you want.

I tried to find an example on learnchef.com for how to do that, but
couldn't find that distinct idea represented.

-M

On Thu, Aug 29, 2013 at 5:14 PM, Michael Hayes hayesmp@thefrontside.netwrote:

I forked GitHub - sous-chefs/jenkins: Development repository for the jenkins cookbook

and modified the metadata.rb file:
name "jenkins"
maintainer "Opscode, Inc."
maintainer_email "cookbooks@opscode.com"
license "Apache 2.0"
description "Installs and configures Jenkins CI server & slaves"
long_description IO.read(File.join(File.dirname(FILE), 'README.md'))
version "0.8.0"

depends "java"
depends "runit", ">= 1.0.0"
depends "apt"

depends "apache2"
depends "nginx"
depends "iptables"

recipe "jenkins::server", "run server recipe." <<-- added this line

Berksfile:
site :opscode

cookbook 'runit', '>= 1.1.2'
cookbook 'jenkins', github: 'hayesmp/jenkins-cookbook'

And I get nothing, it doesn't install anything:
Uploading the kitchen...
Generating solo config...
Running Chef...
Starting Chef Client, version 11.6.0
Compiling Cookbooks...
Converging 0 resources
Chef Client finished, 0 resources updated

bump up the version or specify the revision in berks , against your
cookbook,

On Thu, Aug 29, 2013 at 2:14 PM, Michael Hayes hayesmp@thefrontside.netwrote:

I forked GitHub - sous-chefs/jenkins: Development repository for the jenkins cookbook

and modified the metadata.rb file:
name "jenkins"
maintainer "Opscode, Inc."
maintainer_email "cookbooks@opscode.com"
license "Apache 2.0"
description "Installs and configures Jenkins CI server & slaves"
long_description IO.read(File.join(File.dirname(FILE), 'README.md'))
version "0.8.0"

depends "java"
depends "runit", ">= 1.0.0"
depends "apt"

depends "apache2"
depends "nginx"
depends "iptables"

recipe "jenkins::server", "run server recipe." <<-- added this line

Berksfile:
site :opscode

cookbook 'runit', '>= 1.1.2'
cookbook 'jenkins', github: 'hayesmp/jenkins-cookbook'

And I get nothing, it doesn't install anything:
Uploading the kitchen...
Generating solo config...
Running Chef...
Starting Chef Client, version 11.6.0
Compiling Cookbooks...
Converging 0 resources
Chef Client finished, 0 resources updated

Hm ok. I will look at this concept. I really don't understand chef all that well.

On Aug 29, 2013, at 4:19 PM, Mike miketheman@gmail.com wrote:

I think we might have discussed this on IRC briefly.

I think the problem is conceptual - you don't need to modify the recipe's metadata.rb - you need to modify your node's run_list to include the recipes you want.

I tried to find an example on learnchef.com for how to do that, but couldn't find that distinct idea represented.

-M

On Thu, Aug 29, 2013 at 5:14 PM, Michael Hayes hayesmp@thefrontside.net wrote:
I forked GitHub - sous-chefs/jenkins: Development repository for the jenkins cookbook

and modified the metadata.rb file:
name "jenkins"
maintainer "Opscode, Inc."
maintainer_email "cookbooks@opscode.com"
license "Apache 2.0"
description "Installs and configures Jenkins CI server & slaves"
long_description IO.read(File.join(File.dirname(FILE), 'README.md'))
version "0.8.0"

depends "java"
depends "runit", ">= 1.0.0"
depends "apt"

depends "apache2"
depends "nginx"
depends "iptables"

recipe "jenkins::server", "run server recipe." <<-- added this line

Berksfile:
site :opscode

cookbook 'runit', '>= 1.1.2'
cookbook 'jenkins', github: 'hayesmp/jenkins-cookbook'

And I get nothing, it doesn't install anything:
Uploading the kitchen...
Generating solo config...
Running Chef...
Starting Chef Client, version 11.6.0
Compiling Cookbooks...
Converging 0 resources
Chef Client finished, 0 resources updated

On Thursday, August 29, 2013 at 2:23 PM, Michael Hayes wrote:

Hm ok. I will look at this concept. I really don't understand chef all that well.

Here's the basic gist:

dependencies in metadata say "this cookbook has to be present". The reasons you need a cookbook present are usually:

  • you're using include_recipe to run a recipe in that cookbook. Since include_recipe is a dynamic/late bound thing that happens when recipes are evaluated, chef/chef-server can't know that this dependency between cookbooks exists without a hint.
  • you're using library code from that cookbook, such as LWRPs or whatever.

In any case, dependencies in metadata will only ensure that the cookbook gets copied to the client. To actually run a recipe from that cookbook, you need an include_recipe statement in a different recipe, or to put a recipe from that cookbook in your node's run_list.

--
Daniel DeLeo