[chef] basic chef config question (java/jenkins)


Chronological Thread 
  • From: phil swenson < >
  • To:
  • Subject: [chef] basic chef config question (java/jenkins)
  • Date: Wed, 2 Apr 2014 12:03:11 -0600

Hi, I’m back on my jenkins/java project…..

here is the github for the Jenkins recipe:



I’m having trouble configuring the jenkins recipe.  This may be a very basic chef question.

Here is the code:


the ‘jenkins_command’ calls end up using the wrong java_home and I get an error like:

[2014-04-02T13:56:29-04:00] ERROR: jenkins_command[safe-restart] (main::default line 27) had an error: Errno::ENOENT: No such file or directory - opt/java/bin/java -jar /var/chef/cache/jenkins-cli.jar -s http://localhost:8080 safe-restart

as you can see in default.rb, I even try to set jenkins to the correct JAVA_HOME via 
node.override[:jenkins][:java_home] = "/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home"

But Jenkins doesn’t pick up this setting.

Am I configuring this properly?  Or am I missing something basic?
It also seems wrong that I can’t simply pull in the java_home form the environment I’m targeting, rather than hardcoding….

thanks for any help!
phil



Archive powered by MHonArc 2.6.16.

§