hi,
i am trying to install jenkins on my node with help of a cookbook.
when i run chef-client on the node following error occurs all the time.
error:
- execute yum update -y
yum_package[jenkins] action install
No candidate version available for jenkins
================================================================================
Error executing action install on resource ‘yum_package[jenkins]’
================================================================================
Chef::Exceptions::Package
No candidate version available for jenkins
Resource Declaration:
In /var/chef/cache/cookbooks/jenkins/recipes/default.rb
11: package “jenkins” do
12: action:install
13: end
14:
Compiled Resource:
Declared in /var/chef/cache/cookbooks/jenkins/recipes/default.rb:11:in `from_file’
Running handlers:
[2016-09-12T11:10:47-05:00] ERROR: Running exception handlers
Running handlers complete
[2016-09-12T11:10:47-05:00] ERROR: Exception handlers complete
Chef Client failed. 2 resources updated in 28 seconds
[2016-09-12T11:10:47-05:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2016-09-12T11:10:47-05:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-09-12T11:10:47-05:00] ERROR: yum_package[jenkins] (jenkins::default line 11) had an error: Chef::Exceptions: No candidate version available for jenkins
[2016-09-12T11:10:47-05:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
default.rb
execute 'yum update -y’
package “jenkins” do
action:install
end
thank you so much for responding.i am a beginner.
can you suggest me any books or websites where i can learn how to write recipes by following examples.i am tired with this kind of errors.
So https://learn.chef.io/ has a lot of good info the last time I checked. I believe there are some Chef books out there, but the last time I looked, many of them were outdated. I’m not sure I have any recommendations available to give at this time, the leanpub ebook that helped me the most is both outdated and I think no longer being published. Others might have some better recommendations.
Happy to help as much as I can, this mailing list has helped me incredibly through the years, along with the IRC/Slack channels. I definitely feel your pain, my Jenkins wrapper cookbook is somewhere around 0.1.110 or so (and only got created a few months back, previous job used Bamboo). Depending on your config, it can definitely get complicated fast. (My biggest issues have been around authentication, especially after I enable the LDAP auth plugin, since it seems to disable the local account I’d created, so I had the IT folks make a new service account in AD just so that it will continue to work after the integration.)
I am curious, if you have the yum repo setup prior to running this install command.
I am not seeing a version specified, so it leads me to believe you do not have the repo setup or setup correctly.
You can manually run: yum search jenkins
or yum repolist
The first command will show whether jenkins is available and the second will show how many packages are available in the jenkins repo. (As well as other repos of course.)