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 ,bestranjibOn 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.xmltemplates/windows/jenkins-slave.xmltemplates/default/jenkins-slave.xmlThis 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.rb44: template "#{home}/jenkins-slave.xml" do45: source "jenkins-slave.xml"46: variables(:jenkins_home => home,47: :jnlp_url => "#{url}/computer/#{node[:jenkins][:node][:name]}/slave-agent.jnlp")48: end49:Compiled Resource:------------------# Declared in c:/chef/cache/cookbooks/jenkins/recipes/node_windows.rb:44:in `from_file'template("C:/jenkins/jenkins-slave.xml") doprovider Chef::Provider::Templateaction "create"retries 0retry_delay 2path "C:/jenkins/jenkins-slave.xml"backup 5source "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.xmltemplates/windows/jenkins-slave.xmltemplates/default/jenkins-slave.xmlThis 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.