[chef] Re: Re: Setting up jenkins slaves using chef


Chronological Thread 
  • From: Peter Hoellig < >
  • To: " " < >
  • Subject: [chef] Re: Re: Setting up jenkins slaves using chef
  • Date: Mon, 24 Jun 2013 19:43:30 +0000
  • Accept-language: en-US

OK, so I pulled the cookbook from github and gave that version a shot. I had to tweak the node_windows.rb file a little. It seems to have several references to a variable named 'home' which is never defined and was causing errors, I changed them to home_dir which is what I think was intended from looking at the code.

It's still failing, it appears to be puling the winsw installer from maven.dyndns.org which is not available (http://www.downforeveryoneorjustme.com/maven.dyndns.org). I'm not sure if that's temporary or if the code needs to be updated with a new url.

[2013-06-24T19:28:33+00:00] FATAL: Errno::ETIMEDOUT: remote_file[C:/jenkins/jenkins-slave.exe] (jenkins::node_windows line 49) had an error: Errno::ETIMEDOUT: Error connecting to http://maven.dyndns.org/2/com/sun/winsw/winsw/1.8/winsw-1.8-bin.exe - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. - connect(2)

Thoughts?
      ~Peter


sorry, not recently , 5 months ago :-D



On Mon, Jun 24, 2013 at 11:59 AM, Ranjib Dey < " target="_blank"> > wrote:
it was a bug, fixed by schiasmo recently https://github.com/opscode-cookbooks/jenkins/commit/45f87c1ab95fe28d51df38370df76bbc6703ddd6 , use the cookbook from github. should be easy if you are using berkshelf ,
best
ranjib


On Mon, Jun 24, 2013 at 11:38 AM, Peter Hoellig < " target="_blank"> > wrote:
Hello and thanks in advance,

Is there any setup that must be done on the jenkins master before the jenkins chef cookbook can create a slave node?

I'm working with the Jenkins cookbook (0.6.3 from http://community.opscode.com/cookbooks/jenkins) trying to setup a windows slave and having a bit of trouble. I was able to setup a Jenkins master on Ubuntu without issue and I'm getting errors creating the jenkins-slave.xml when running chef-client on the slave node. I've already verified that my DNS settings are correct and that I'm hitting the server. 

I've created a role on my chef server which contains the java:windows (this works and installs fine) and jenkins:node_windows recipes and overridden attributes as follows. 
{
    "java":
    {
        "jdk_version":"7",
        "windows":{"url":"http://pathToJavaInstaller"}
    },
    "jenkins":
    {
        "server":
        {
             "url":"http://pathToJenkinsMaster:8080"
}}}

Here is the relevant output that I'm seeing:
 ================================================================================
 Error executing action `create` on resource 'template[C:/jenkins/jenkins-slave.xml]'
 ================================================================================
 
 
 Chef::Exceptions::FileNotFound
 ------------------------------
 Cookbook 'jenkins' (0.6.3) does not contain a file at any of these locations:
   templates/windows-6.1.7601/jenkins-slave.xml
   templates/windows/jenkins-slave.xml
   templates/default/jenkins-slave.xml
 
 This cookbook _does_ contain: ['apache_jenkins.erb','htpasswd.erb','jenkins.erb','nginx_jenkins.conf.erb','port_jenkins.erb','sv-hudson-slave-log-run.erb','sv-hudson-slave-run.erb']
 
 
 Resource Declaration:
 ---------------------
 # In c:/chef/cache/cookbooks/jenkins/recipes/node_windows.rb
 
  44: template "#{home}/jenkins-slave.xml" do
  45:   source "jenkins-slave.xml"
  46:   variables(:jenkins_home => home,
  47:             :jnlp_url => "#{url}/computer/#{node[:jenkins][:node][:name]}/slave-agent.jnlp")
  48: end
  49: 
 
 
 
 Compiled Resource:
 ------------------
 # Declared in c:/chef/cache/cookbooks/jenkins/recipes/node_windows.rb:44:in `from_file'
 
 template("C:/jenkins/jenkins-slave.xml") do
   provider Chef::Provider::Template
   action "create"
   retries 0
   retry_delay 2
   path "C:/jenkins/jenkins-slave.xml"
   backup 5
   source "jenkins-slave.xml"
   variables {:jenkins_home=>"C:/jenkins", :jnlp_url=>"http://pathToJenkinsMaster:8080/computer/nodeDNS/slave-agent.jnlp"}
   cookbook_name "jenkins"
   recipe_name "node_windows"
 end
 
 
 
 [2013-06-24T18:03:11+00:00] INFO: Running queued delayed notifications before re-raising exception
 [2013-06-24T18:03:11+00:00] ERROR: Running exception handlers
 [2013-06-24T18:03:11+00:00] FATAL: Saving node information to c:/chef/cache/failed-run-data.json
 [2013-06-24T18:03:11+00:00] ERROR: Exception handlers complete
 [2013-06-24T18:03:11+00:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out
 [2013-06-24T18:03:11+00:00] FATAL: Chef::Exceptions::FileNotFound: template[C:/jenkins/jenkins-slave.xml] (jenkins::node_windows line 44) had an error: Chef::Exceptions::FileNotFound: Cookbook 'jenkins' (0.6.3) does not contain a file at any of these locations:
   templates/windows-6.1.7601/jenkins-slave.xml
   templates/windows/jenkins-slave.xml
   templates/default/jenkins-slave.xml
 
 This cookbook _does_ contain: ['apache_jenkins.erb','htpasswd.erb','jenkins.erb','nginx_jenkins.conf.erb','port_jenkins.erb','sv-hudson-slave-log-run.erb','sv-hudson-slave-run.erb']

Thanks!





Archive powered by MHonArc 2.6.16.

§