# Jenkins cookbook(s) - recommendations

**URL:** <https://discourse.chef.io/t/jenkins-cookbook-s-recommendations/2936>\
**Category:** Chef Infra (archive)\
**Created:** [July 19, 2012, 2:52pm UTC](https://discourse.chef.io/t/jenkins-cookbook-s-recommendations/2936 "2012-07-19T14:52:28Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maven\_User](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Maven\_User](https://discourse.chef.io/u/Maven_User)\
**Post date:** [July 19, 2012, 2:52pm UTC](https://discourse.chef.io/t/jenkins-cookbook-s-recommendations/2936/1 "2012-07-19T14:52:28Z")

</div>

Hi all -

A quick google search drums up several jenkins cookbooks - out  
of curiosity - what have people used or does everyone write their own?

I’ve found five or six unique cookbooks which is why I’m asking…

---

<div class="post-metadata">

**Author:** ![anon65899839](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@anon65899839](https://discourse.chef.io/u/anon65899839)\
**Post date:** [July 19, 2012, 2:56pm UTC](https://discourse.chef.io/t/jenkins-cookbook-s-recommendations/2936/2 "2012-07-19T14:56:05Z")

</div>

i used Fletcher Nichol cookbook, he makes great stuff with quality.

> **[GitHub - fnichol/chef-jenkins: Former location for Jenkins Chef cookbook, now...](https://github.com/fnichol/chef-jenkins)**
>
> Former location for Jenkins Chef cookbook, now maintained by Chef Software Inc at https://github.com/chef-cookbooks/jenkins - GitHub - fnichol/chef-jenkins: Former location for Jenkins Chef cookboo...

regards,  
Sebastian

2012/7/19 Maven User [maven.2.user@gmail.com](mailto:maven.2.user@gmail.com)

> Hi all -
> 
> A quick google search drums up several jenkins cookbooks - out  
> of curiosity - what have people used or does everyone write their own?
> 
> I've found five or six unique cookbooks which is why I'm asking...

---

<div class="post-metadata">

**Author:** ![bbaugher](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@bbaugher](https://discourse.chef.io/u/bbaugher)\
**Post date:** [July 19, 2012, 3:02pm UTC](https://discourse.chef.io/t/jenkins-cookbook-s-recommendations/2936/3 "2012-07-19T15:02:45Z")

</div>

I used that cookbook but had to make a few changes to get it to work for  
myself (I also wanted the latest jenkins). The biggest issue was the groovy  
script for setting up a slave (what a pain...).

On Thu, Jul 19, 2012 at 9:56 AM, Sebastian Wendel  
[s.wendel@sourceindex.de](mailto:s.wendel@sourceindex.de)wrote:

> i used Fletcher Nichol cookbook, he makes great stuff with quality.
> 
> [GitHub - fnichol/chef-jenkins: Former location for Jenkins Chef cookbook, now maintained by Chef Software Inc at https://github.com/chef-cookbooks/jenkins](https://github.com/fnichol/chef-jenkins)
> 
> regards,  
> Sebastian
> 
> 2012/7/19 Maven User [maven.2.user@gmail.com](mailto:maven.2.user@gmail.com)
> 
> > Hi all -
> > 
> > A quick google search drums up several jenkins cookbooks - out  
> > of curiosity - what have people used or does everyone write their own?
> > 
> > I've found five or six unique cookbooks which is why I'm asking...

--  
-Bryan

---

<div class="post-metadata">

**Author:** ![Maven\_User](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Maven\_User](https://discourse.chef.io/u/Maven_User)\
**Post date:** [October 12, 2012, 12:13am UTC](https://discourse.chef.io/t/jenkins-cookbook-s-recommendations/2936/4 "2012-10-12T00:13:59Z")

</div>

What did you change in the groovy script and which way did you launch it?

jnlp? ssh?

On Thu, Jul 19, 2012 at 11:02 AM, Bryan Baugher [bjbq4d@gmail.com](mailto:bjbq4d@gmail.com) wrote:

> I used that cookbook but had to make a few changes to get it to work for  
> myself (I also wanted the latest jenkins). The biggest issue was the groovy  
> script for setting up a slave (what a pain...).
> 
> On Thu, Jul 19, 2012 at 9:56 AM, Sebastian Wendel \<[s.wendel@sourceindex.de](mailto:s.wendel@sourceindex.de)
> 
> > wrote:
> 
> > i used Fletcher Nichol cookbook, he makes great stuff with quality.
> > 
> > [GitHub - fnichol/chef-jenkins: Former location for Jenkins Chef cookbook, now maintained by Chef Software Inc at https://github.com/chef-cookbooks/jenkins](https://github.com/fnichol/chef-jenkins)
> > 
> > regards,  
> > Sebastian
> > 
> > 2012/7/19 Maven User [maven.2.user@gmail.com](mailto:maven.2.user@gmail.com)
> > 
> > > Hi all -
> > > 
> > > A quick google search drums up several jenkins cookbooks - out  
> > > of curiosity - what have people used or does everyone write their own?
> > > 
> > > I've found five or six unique cookbooks which is why I'm asking...
> 
> --  
> -Bryan

---

<div class="post-metadata">

**Author:** ![Maven\_User](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Maven\_User](https://discourse.chef.io/u/Maven_User)\
**Post date:** [October 12, 2012, 1:04am UTC](https://discourse.chef.io/t/jenkins-cookbook-s-recommendations/2936/5 "2012-10-12T01:04:48Z")

</div>

heh - the “#”'s in the groovy file are not making jenkins happy…

First I’ll pull them all out…

---

<div class="post-metadata">

**Author:** ![Maven\_User](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Maven\_User](https://discourse.chef.io/u/Maven_User)\
**Post date:** [October 12, 2012, 1:13am UTC](https://discourse.chef.io/t/jenkins-cookbook-s-recommendations/2936/6 "2012-10-12T01:13:11Z")

</div>

Other problem(s) were the package names were wrong.

There didn't seem to be a jenkins.slaves.\* but there is a hudson.slaves.\*

Still no slave added to our cluster....

Still digging....

On Thu, Oct 11, 2012 at 9:04 PM, Maven User [maven.2.user@gmail.com](mailto:maven.2.user@gmail.com) wrote:

> heh - the "#"'s in the groovy file are not making jenkins happy....
> 
> First I'll pull them all out.......

---

<div class="post-metadata">

**Author:** ![Maven\_User](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Maven\_User](https://discourse.chef.io/u/Maven_User)\
**Post date:** [October 12, 2012, 1:49am UTC](https://discourse.chef.io/t/jenkins-cookbook-s-recommendations/2936/7 "2012-10-12T01:49:34Z")

</div>

a few other things...

I had to log into jenkins and make sure it is listening on a particular  
jnlp port.

Also - there was a way to pass through credentials to the groovy script  
that I had to add...

Still digging...

On Thu, Oct 11, 2012 at 9:13 PM, Maven User [maven.2.user@gmail.com](mailto:maven.2.user@gmail.com) wrote:

> Other problem(s) were the package names were wrong.
> 
> There didn't seem to be a jenkins.slaves.\* but there is a hudson.slaves.\*
> 
> Still no slave added to our cluster....
> 
> Still digging....
> 
> On Thu, Oct 11, 2012 at 9:04 PM, Maven User [maven.2.user@gmail.com](mailto:maven.2.user@gmail.com)wrote:
> 
> > heh - the "#"'s in the groovy file are not making jenkins happy....
> > 
> > First I'll pull them all out.......

---

<div class="post-metadata">

**Author:** ![Maven\_User](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Maven\_User](https://discourse.chef.io/u/Maven_User)\
**Post date:** [October 12, 2012, 5:39am UTC](https://discourse.chef.io/t/jenkins-cookbook-s-recommendations/2936/8 "2012-10-12T05:39:15Z")

</div>

It really looks like someone did a search/replace/rename - anything that  
was "hudson" to "jenkins" with this cookbook - which borks MUCH of it...

I'm still finding little bits and pieces that are wrong....

On Thu, Oct 11, 2012 at 9:49 PM, Maven User [maven.2.user@gmail.com](mailto:maven.2.user@gmail.com) wrote:

> a few other things...
> 
> I had to log into jenkins and make sure it is listening on a particular  
> jnlp port.
> 
> Also - there was a way to pass through credentials to the groovy script  
> that I had to add...
> 
> Still digging...
> 
> On Thu, Oct 11, 2012 at 9:13 PM, Maven User [maven.2.user@gmail.com](mailto:maven.2.user@gmail.com)wrote:
> 
> > Other problem(s) were the package names were wrong.
> > 
> > There didn't seem to be a jenkins.slaves.\* but there is a hudson.slaves.\*
> > 
> > Still no slave added to our cluster....
> > 
> > Still digging....
> > 
> > On Thu, Oct 11, 2012 at 9:04 PM, Maven User [maven.2.user@gmail.com](mailto:maven.2.user@gmail.com)wrote:
> > 
> > > heh - the "#"'s in the groovy file are not making jenkins happy....
> > > 
> > > First I'll pull them all out.......

---

<div class="post-metadata">

**Author:** ![Maven\_User](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Maven\_User](https://discourse.chef.io/u/Maven_User)\
**Post date:** [October 12, 2012, 6:11am UTC](https://discourse.chef.io/t/jenkins-cookbook-s-recommendations/2936/9 "2012-10-12T06:11:09Z")

</div>

That and also how the "node name" is defaulting to FQDN - not always does  
dns register the name of a vm. Setting that to ipaddress solved my last  
hurdle and I was able to create a new jenkins slave successfully.

Sorry about all the postings here - I'm hoping someone else can also follow  
my trail if they need help. At some point, I'll submit a pull request :-/

On Fri, Oct 12, 2012 at 1:39 AM, Maven User [maven.2.user@gmail.com](mailto:maven.2.user@gmail.com) wrote:

> It really looks like someone did a search/replace/rename - anything that  
> was "hudson" to "jenkins" with this cookbook - which borks MUCH of it...
> 
> I'm still finding little bits and pieces that are wrong....
> 
> On Thu, Oct 11, 2012 at 9:49 PM, Maven User [maven.2.user@gmail.com](mailto:maven.2.user@gmail.com)wrote:
> 
> > a few other things...
> > 
> > I had to log into jenkins and make sure it is listening on a particular  
> > jnlp port.
> > 
> > Also - there was a way to pass through credentials to the groovy script  
> > that I had to add...
> > 
> > Still digging...
> > 
> > On Thu, Oct 11, 2012 at 9:13 PM, Maven User [maven.2.user@gmail.com](mailto:maven.2.user@gmail.com)wrote:
> > 
> > > Other problem(s) were the package names were wrong.
> > > 
> > > There didn't seem to be a jenkins.slaves.\* but there is a hudson.slaves.\*
> > > 
> > > Still no slave added to our cluster....
> > > 
> > > Still digging....
> > > 
> > > On Thu, Oct 11, 2012 at 9:04 PM, Maven User [maven.2.user@gmail.com](mailto:maven.2.user@gmail.com)wrote:
> > > 
> > > > heh - the "#"'s in the groovy file are not making jenkins happy....
> > > > 
> > > > First I'll pull them all out.......

---

<div class="post-metadata">

**Author:** ![Maven\_User](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Maven\_User](https://discourse.chef.io/u/Maven_User)\
**Post date:** [October 10, 2012, 10:15pm UTC](https://discourse.chef.io/t/jenkins-cookbook-s-recommendations/2936/10 "2012-10-10T22:15:09Z")

</div>

I'm really struggling with the slave setup - do you have any tips?

On Thu, Jul 19, 2012 at 11:02 AM, Bryan Baugher [bjbq4d@gmail.com](mailto:bjbq4d@gmail.com) wrote:

> I used that cookbook but had to make a few changes to get it to work for  
> myself (I also wanted the latest jenkins). The biggest issue was the groovy  
> script for setting up a slave (what a pain...).
> 
> On Thu, Jul 19, 2012 at 9:56 AM, Sebastian Wendel \<[s.wendel@sourceindex.de](mailto:s.wendel@sourceindex.de)
> 
> > wrote:
> 
> > i used Fletcher Nichol cookbook, he makes great stuff with quality.
> > 
> > [GitHub - fnichol/chef-jenkins: Former location for Jenkins Chef cookbook, now maintained by Chef Software Inc at https://github.com/chef-cookbooks/jenkins](https://github.com/fnichol/chef-jenkins)
> > 
> > regards,  
> > Sebastian
> > 
> > 2012/7/19 Maven User [maven.2.user@gmail.com](mailto:maven.2.user@gmail.com)
> > 
> > > Hi all -
> > > 
> > > A quick google search drums up several jenkins cookbooks - out  
> > > of curiosity - what have people used or does everyone write their own?
> > > 
> > > I've found five or six unique cookbooks which is why I'm asking...
> 
> --  
> -Bryan

---

<div class="post-metadata">

**Author:** ![Maven\_User](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Maven\_User](https://discourse.chef.io/u/Maven_User)\
**Post date:** [October 10, 2012, 10:31pm UTC](https://discourse.chef.io/t/jenkins-cookbook-s-recommendations/2936/11 "2012-10-10T22:31:32Z")

</div>

I keep hitting this:

================================================================================

Recipe Compile Error in  
/var/chef/cache/cookbooks/chef-jenkins/recipes/node\_jnlp.rb

## ================================================================================ NameError

Cannot find a resource for jenkins\_node on ubuntu version 12.04

## Cookbook Trace:

/var/chef/cache/cookbooks/chef-jenkins/recipes/node\_jnlp.rb:44:in  
`from\_file’

It just highlights this line:

44\>\> jenkins\_node node[:jenkins][:node][:name] do

I have all the attributes in the role already - any suggestions?

---

<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:** [October 10, 2012, 10:36pm UTC](https://discourse.chef.io/t/jenkins-cookbook-s-recommendations/2936/12 "2012-10-10T22:36:14Z")

</div>

On Wednesday, October 10, 2012 at 3:31 PM, Maven User wrote:

> I keep hitting this:
> 
> ================================================================================
> 
> Recipe Compile Error in /var/chef/cache/cookbooks/chef-jenkins/recipes/node\_jnlp.rb
> 
> ## ================================================================================ NameError
> 
> Cannot find a resource for jenkins\_node on ubuntu version 12.04
> 
> ## Cookbook Trace:
> 
> /var/chef/cache/cookbooks/chef-jenkins/recipes/node\_jnlp.rb:44:in `from\_file'
> 
> It just highlights this line:
> 
> 44\>\> jenkins\_node node[:jenkins][:node][:name] do
> 
> I have all the attributes in the role already - any suggestions?  
> It means what the error says, there is no resource type `jenkins_node`. Is there supposed to be a LWRP or resource definition that defines this?

--  
Daniel DeLeo

---

<div class="post-metadata">

**Author:** ![AJ\_Christensen](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/aj_christensen/32/525_2.png) [@AJ\_Christensen](https://discourse.chef.io/u/AJ_Christensen)\
**Post date:** [October 10, 2012, 10:37pm UTC](https://discourse.chef.io/t/jenkins-cookbook-s-recommendations/2936/13 "2012-10-10T22:37:21Z")

</div>

You've saved the cookbook as chef-jenkins when it is actually jenkins,  
so the LWRP is being created as (probably) chef-jenkins\_node

Rename the cookbook to 'jenkins' instead of 'chef-jenkins'..

--AJ

On 11 October 2012 11:31, Maven User [maven.2.user@gmail.com](mailto:maven.2.user@gmail.com) wrote:

> I keep hitting this:
> 
> ================================================================================
> 
> Recipe Compile Error in  
> /var/chef/cache/cookbooks/chef-jenkins/recipes/node\_jnlp.rb
> 
> ## ================================================================================ NameError
> 
> Cannot find a resource for jenkins\_node on ubuntu version 12.04
> 
> ## Cookbook Trace:
> 
> /var/chef/cache/cookbooks/chef-jenkins/recipes/node\_jnlp.rb:44:in  
> `from\_file'
> 
> It just highlights this line:
> 
> 44\>\> jenkins\_node node[:jenkins][:node][:name] do
> 
> I have all the attributes in the role already - any suggestions?

---

<div class="post-metadata">

**Author:** ![Sean\_OMeara](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/sean_omeara/32/435_2.png) [@Sean\_OMeara](https://discourse.chef.io/u/Sean_OMeara)\
**Post date:** [October 11, 2012, 1:27am UTC](https://discourse.chef.io/t/jenkins-cookbook-s-recommendations/2936/14 "2012-10-11T01:27:17Z")

</div>

Would making the "name" attribute in cookbook metadata mandatory help  
mitigate this kind of confusion? It's normally inferred by the  
directory name in which the cookbook is contained, which is a real  
bummer when dealing with LWRPs.

On Wed, Oct 10, 2012 at 6:37 PM, AJ Christensen [aj@junglist.gen.nz](mailto:aj@junglist.gen.nz) wrote:

> You've saved the cookbook as chef-jenkins when it is actually jenkins,  
> so the LWRP is being created as (probably) chef-jenkins\_node
> 
> Rename the cookbook to 'jenkins' instead of 'chef-jenkins'..
> 
> --AJ
> 
> On 11 October 2012 11:31, Maven User [maven.2.user@gmail.com](mailto:maven.2.user@gmail.com) wrote:
> 
> > I keep hitting this:
> > 
> > ================================================================================
> > 
> > Recipe Compile Error in  
> > /var/chef/cache/cookbooks/chef-jenkins/recipes/node\_jnlp.rb
> > 
> > ## ================================================================================ NameError
> > 
> > Cannot find a resource for jenkins\_node on ubuntu version 12.04
> > 
> > ## Cookbook Trace:
> > 
> > /var/chef/cache/cookbooks/chef-jenkins/recipes/node\_jnlp.rb:44:in  
> > `from\_file'
> > 
> > It just highlights this line:
> > 
> > 44\>\> jenkins\_node node[:jenkins][:node][:name] do
> > 
> > I have all the attributes in the role already - any suggestions?

---

<div class="post-metadata">

**Author:** ![reset](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/reset/32/490_2.png) [@reset](https://discourse.chef.io/u/reset)\
**Post date:** [October 11, 2012, 1:29am UTC](https://discourse.chef.io/t/jenkins-cookbook-s-recommendations/2936/15 "2012-10-11T01:29:01Z")

</div>

I have this ticket created regarding this issue: [http://tickets.opscode.com/browse/CHEF-3490](http://tickets.opscode.com/browse/CHEF-3490)

--  
Jamie Winsor  
@resetexistence

> **[reset - Overview](https://github.com/reset)**
>
> Founder, COO, and Game Director. reset has 70 repositories available. Follow their code on GitHub.

On Wednesday, October 10, 2012 at 6:27 PM, Sean OMeara wrote:

> Would making the "name" attribute in cookbook metadata mandatory help  
> mitigate this kind of confusion? It's normally inferred by the  
> directory name in which the cookbook is contained, which is a real  
> bummer when dealing with LWRPs.
> 
> On Wed, Oct 10, 2012 at 6:37 PM, AJ Christensen \<aj@junglist.gen.nz ([mailto:aj@junglist.gen.nz](mailto:aj@junglist.gen.nz))\> wrote:
> 
> > You've saved the cookbook as chef-jenkins when it is actually jenkins,  
> > so the LWRP is being created as (probably) chef-jenkins\_node
> > 
> > Rename the cookbook to 'jenkins' instead of 'chef-jenkins'..
> > 
> > --AJ
> > 
> > On 11 October 2012 11:31, Maven User \<[maven.2.user@gmail.com](mailto:maven.2.user@gmail.com) ([mailto:maven.2.user@gmail.com](mailto:maven.2.user@gmail.com))\> wrote:
> > 
> > > I keep hitting this:
> > > 
> > > ================================================================================
> > > 
> > > Recipe Compile Error in  
> > > /var/chef/cache/cookbooks/chef-jenkins/recipes/node\_jnlp.rb
> > > 
> > > ## ================================================================================ NameError
> > > 
> > > Cannot find a resource for jenkins\_node on ubuntu version 12.04
> > > 
> > > ## Cookbook Trace:
> > > 
> > > /var/chef/cache/cookbooks/chef-jenkins/recipes/node\_jnlp.rb:44:in  
> > > `from\_file'
> > > 
> > > It just highlights this line:
> > > 
> > > 44\>\> jenkins\_node node[:jenkins][:node][:name] do
> > > 
> > > I have all the attributes in the role already - any suggestions?

---

<div class="post-metadata">

**Author:** ![Maven\_User](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Maven\_User](https://discourse.chef.io/u/Maven_User)\
**Post date:** [October 11, 2012, 3:37pm UTC](https://discourse.chef.io/t/jenkins-cookbook-s-recommendations/2936/16 "2012-10-11T15:37:45Z")

</div>

I see this tho in the node\_jnlp.rp recipe:

jenkins\_node node[:jenkins][:node][:name] do  
description node[:jenkins][:node][:description]  
executors node[:jenkins][:node][:executors]  
remote\_fs node[:jenkins][:node][:home]  
labels node[:jenkins][:node][:labels]  
mode node[:jenkins][:node][:mode]  
launcher "jnlp"  
mode node[:jenkins][:node][:mode]  
availability node[:jenkins][:node][:availability]end

On Wed, Oct 10, 2012 at 6:36 PM, Daniel DeLeo [dan@kallistec.com](mailto:dan@kallistec.com) wrote:

> On Wednesday, October 10, 2012 at 3:31 PM, Maven User wrote:
> 
> I keep hitting this:
> 
> ================================================================================
> 
> Recipe Compile Error in  
> /var/chef/cache/cookbooks/chef-jenkins/recipes/node\_jnlp.rb
> 
> ## ================================================================================ NameError
> 
> Cannot find a resource for jenkins\_node on ubuntu version 12.04
> 
> ## Cookbook Trace:
> 
> /var/chef/cache/cookbooks/chef-jenkins/recipes/node\_jnlp.rb:44:in  
> `from\_file'
> 
> It just highlights this line:
> 
> 44\>\> jenkins\_node node[:jenkins][:node][:name] do
> 
> I have all the attributes in the role already - any suggestions?
> 
> It means what the error says, there is no resource type `jenkins_node`.  
> Is there supposed to be a LWRP or resource definition that defines this?
> 
> --  
> Daniel DeLeo

---

<div class="post-metadata">

**Author:** ![steve](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/steve/32/294_2.png) [@steve](https://discourse.chef.io/u/steve)\
**Post date:** [October 11, 2012, 6:41pm UTC](https://discourse.chef.io/t/jenkins-cookbook-s-recommendations/2936/17 "2012-10-11T18:41:24Z")

</div>

Correct, as prior posters in this thread have mentioned, you have a  
namespacing issue.

LWRPs are namespaced according to the name of the cookbook. When you  
renamed the cookbook from "jenkins" to "chef-jenkins," you renamed all  
of the LWRPs along with it (LWRP == Lightweight Resource Provider, a  
case where somebody has extended Chef to know about new resources  
and/or providers). The Jenkins cookbook has a number of LWRPs defined  
for managing Jenkins jobs and slave nodes, among other things.

Here's the page on the Chef wiki that discusses how LWRPs work:

[http://wiki.opscode.com/display/chef/Lightweight+Resources+and+Providers+(LWRP)](http://wiki.opscode.com/display/chef/Lightweight+Resources+and+Providers+(LWRP))

And here's the specific section of the article that tells you how the  
files are laid out and demonstrates the namespacing issue:

[http://wiki.opscode.com/display/chef/Lightweight+Resources+and+Providers+(LWRP)#LightweightResourcesandProviders(LWRP)-FileLocations](http://wiki.opscode.com/display/chef/Lightweight+Resources+and+Providers+(LWRP)#LightweightResourcesandProviders%28LWRP%29-FileLocations)

There are two ways to solve this problem:

- Change the name of the cookbook back to "jenkins". Make sure you  
edit your test node's run list.
- Change the name of the resource in the node.jnlp.rb recipe from  
"jenkins\_node" to "chef\_jenkins\_node" (I think dashes get converted to  
underscores...).

I prefer not to change the names on community cookbooks for this  
reason unless it's to adhere to some sort of internal namespacing  
policy ... in which case it ends up being a lot of extra work,  
renaming attributes, resources, providers, etc. ...

I do think that using the namespace generated by the cookbook is the  
proper way to do things, though -- we shouldn't start letting people  
define arbitrary resources using LWRP code. Imagine the  
troubleshooting delight that will ensue if someone downloads a  
cookbook from the community site written by some dude who decides to  
override "package."

Hope this helps you figure this out.

On Thu, Oct 11, 2012 at 8:37 AM, Maven User [maven.2.user@gmail.com](mailto:maven.2.user@gmail.com) wrote:

> I see this tho in the node\_jnlp.rp recipe:
> 
> jenkins\_node node[:jenkins][:node][:name] do  
> description node[:jenkins][:node][:description]  
> executors node[:jenkins][:node][:executors]  
> remote\_fs node[:jenkins][:node][:home]  
> labels node[:jenkins][:node][:labels]  
> mode node[:jenkins][:node][:mode]  
> launcher "jnlp"  
> mode node[:jenkins][:node][:mode]  
> availability node[:jenkins][:node][:availability]  
> end
> 
> On Wed, Oct 10, 2012 at 6:36 PM, Daniel DeLeo [dan@kallistec.com](mailto:dan@kallistec.com) wrote:
> 
> > On Wednesday, October 10, 2012 at 3:31 PM, Maven User wrote:
> > 
> > I keep hitting this:
> > 
> > ================================================================================
> > 
> > Recipe Compile Error in  
> > /var/chef/cache/cookbooks/chef-jenkins/recipes/node\_jnlp.rb
> > 
> > ## ================================================================================ NameError
> > 
> > Cannot find a resource for jenkins\_node on ubuntu version 12.04
> > 
> > ## Cookbook Trace:
> > 
> > /var/chef/cache/cookbooks/chef-jenkins/recipes/node\_jnlp.rb:44:in  
> > `from\_file'
> > 
> > It just highlights this line:
> > 
> > 44\>\> jenkins\_node node[:jenkins][:node][:name] do
> > 
> > I have all the attributes in the role already - any suggestions?
> > 
> > It means what the error says, there is no resource type `jenkins_node`. Is  
> > there supposed to be a LWRP or resource definition that defines this?
> > 
> > --  
> > Daniel DeLeo

---

<div class="post-metadata">

**Author:** ![Maven\_User](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Maven\_User](https://discourse.chef.io/u/Maven_User)\
**Post date:** [October 11, 2012, 9:34pm UTC](https://discourse.chef.io/t/jenkins-cookbook-s-recommendations/2936/18 "2012-10-11T21:34:25Z")

</div>

Thank you so much for taking the time to explain - and provide links!!!

Yep - so I renamed the cookbook and I’m wedged again - but not sure if this  
is the right place to ask.

I can see that it’s reaching out to the server to register now, but it’s  
just hanging:

java -jar /srv/jenkins/jenkins-cli.jar -s https:// groovy  
node\_info.groovy integrationtester

It ends with:

Exception in thread “main” java.io.EOFException: unexpected stream  
termination  
at  
hudson.remoting.ClassicCommandTransport.create(ClassicCommandTransport.java:100)  
at hudson.remoting.Channel.(Channel.java:391)  
at hudson.remoting.Channel.(Channel.java:387)  
at hudson.remoting.Channel.(Channel.java:348)  
at hudson.remoting.Channel.(Channel.java:344)  
at hudson.remoting.Channel.(Channel.java:332)  
at hudson.cli.CLI.connectViaHttp(CLI.java:156)  
at hudson.cli.CLI.(CLI.java:139)  
at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:68)  
at hudson.cli.CLI.\_main(CLI.java:438)  
at hudson.cli.CLI.main(CLI.java:373)

I’ll keep digging…
