heavywater / chef-jenkins Goto Github PK
View Code? Open in Web Editor NEWHeavywater modifications to the Jenkins cookbook for Chef
Home Page: http://hw-ops.com
Heavywater modifications to the Jenkins cookbook for Chef
Home Page: http://hw-ops.com
I have the nginx http_proxy variant set, and during chef-client run, I'm getting the following failure:
[2012-09-07T13:50:28+00:00] INFO: Processing package[libssl-dev] action install (nginx::source line 53)
[2012-09-07T13:50:28+00:00] INFO: Processing remote_file[http://nginx.org/download/nginx-.tar.gz] action create (nginx::source line 56)
[2012-09-07T13:50:28+00:00] ERROR: remote_file[http://nginx.org/download/nginx-.tar.gz](nginx::source line 56) has had an error
[2012-09-07T13:50:28+00:00] ERROR: remote_file[http://nginx.org/download/nginx-.tar.gz](/var/chef/cache/cookbooks/nginx/recipes/source.rb:56:in from_file') had an error: remote_file[http://nginx.org/download/nginx-.tar.gz](nginx::source line 56) had an error: Net::HTTPServerException: 404 "Not Found" /usr/lib/ruby/1.9.1/net/http.rb:2632:in
error!'
/var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/rest.rb:319:inblock in streaming_request' /var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/rest.rb:334:in
retriable_rest_request'
/var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/rest.rb:297:instreaming_request' /var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/rest.rb:155:in
fetch'
/var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/provider/remote_file.rb:42:inaction_create' /var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource.rb:454:in
run_action'
/var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/runner.rb:49:inrun_action' /var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/runner.rb:85:in
block (2 levels) in converge'
/var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/runner.rb:85:ineach' /var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/runner.rb:85:in
block in converge'
/var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource_collection.rb:94:inblock in execute_each_resource' /var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource_collection/stepable_iterator.rb:116:in
call'
/var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource_collection/stepable_iterator.rb:116:incall_iterator_block' /var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource_collection/stepable_iterator.rb:85:in
step'
/var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource_collection/stepable_iterator.rb:104:initerate' /var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource_collection/stepable_iterator.rb:55:in
each_with_index'
/var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/resource_collection.rb:92:inexecute_each_resource' /var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/runner.rb:80:in
converge'
/var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/client.rb:330:inconverge' /var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/client.rb:163:in
run'
/var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/application/client.rb:254:inblock in run_application' /var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/application/client.rb:241:in
loop'
/var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/application/client.rb:241:inrun_application' /var/lib/gems/1.9.1/gems/chef-10.12.0/lib/chef/application.rb:70:in
run'
/var/lib/gems/1.9.1/gems/chef-10.12.0/bin/chef-client:26:in<top (required)>' /usr/local/bin/chef-client:19:in
load'
/usr/local/bin/chef-client:19:in`
Fails after installing repo key:
[Wed, 04 Jul 2012 22:55:04 -0400] FATAL: Stacktrace dumped to /tmp/chef-solo/chef-stacktrace.out
[Wed, 04 Jul 2012 22:55:04 -0400] FATAL: Chef::Exceptions::ShellCommandFailed: execute[rpm --import /etc/pki/rpm-gpg/jenkins] (/tmp/chef-solo/cookbooks/yum/providers/key.rb line 31) had an error: Chef::Exceptions::ShellCommandFailed: Expected process to exit with [0], but received '1'
It thinks the key is not installed and tries to re-import which leads to failure. Why does it think the key is not installed? There is some mismatch between the detection script and what RPM says is installed:
[root@somewhere ~]# cat /etc/issue
CentOS Linux release 6.0 (Final)
Kernel \r on an \m
[root@somewhere ~]# rpm -qa "gpg-pubkey*"
gpg-pubkey-f345be74-4c1b3be8
gpg-pubkey-0608b895-4bd22942
gpg-pubkey-d50582e6-4a3feef6
gpg-pubkey-c105b9de-4e0fd3a3
[root@somewhere ~]# rpm -e gpg-pubkey-d50582e6-4a3feef6
[root@somewhere ~]# gpg --with-fingerprint --with-colons --fixed-list-mode /etc/pki/rpm-gpg/jenkins
pub:-:1024:17:9B7D32F2D50582E6:1233469549:::-:Kohsuke Kawaguchi <[email protected]>:
fpr:::::::::150FDE3F7787E7D11EF4E12A9B7D32F2D50582E6:
uid:::::::::Kohsuke Kawaguchi <[email protected]>:
uat:::::::::1 3723:
sub:-:2048:16:73A99ACA10AF40FE:1233469549::::
[root@somewhere ~]# gpg --with-fingerprint --with-colons --fixed-list-mode /etc/pki/rpm-gpg/jenkins | gawk -F: '/^pub/ { print tolower(sprintf("gpg-pubkey-%s-%x\\n", substr($5, length($5)-8+1), $6)) }'
gpg-pubkey-d50582e6-4985406d\n
[root@somewhere ~]# # OK, the jenkins key package should be shown as 'gpg-pubkey-d50582e6-4985406d' 4985406d is the hex representation of the release (1233469549)
[root@somewhere ~]# rpm --import /etc/pki/rpm-gpg/jenkins
[root@somewhere ~]# rpm -qa "gpg-pubkey*"
gpg-pubkey-f345be74-4c1b3be8
gpg-pubkey-0608b895-4bd22942
gpg-pubkey-c105b9de-4e0fd3a3
gpg-pubkey-d50582e6-4a3feef6 <======== *fail* :(
[root@somewhere ~]# rpm -qi gpg-pubkey-d50582e6-4a3feef6 | head -10
Name : gpg-pubkey Relocations: (not relocatable)
Version : d50582e6 Vendor: (none)
Release : 4a3feef6 Build Date: Wed 04 Jul 2012 11:31:43 PM EDT
Install Date: Wed 04 Jul 2012 11:31:43 PM EDT Build Host: localhost
Group : Public Keys Source RPM: (none)
Size : 0 License: pubkey
Signature : (none)
Summary : gpg(Kohsuke Kawaguchi <[email protected]>)
Description :
-----BEGIN PGP PUBLIC KEY BLOCK-----
0x4a3feef6 is 1245703926
what is going on?? :s
This code does not accept a 403 Forbidden as a successful response to the test to determine whether jenkins has started. My Jenkins instance requires authentication. The Chef run hangs indefinitely:
loop do
url = URI.parse("#{node.jenkins.server.url}/job/test/config.xml")
res = Chef::REST::RESTRequest.new(:GET, url, nil).call
break if res.kind_of?(Net::HTTPSuccess) or res.kind_of?(Net::HTTPNotFound)
Chef::Log.debug "service[jenkins] not responding OK to GET / #{res.inspect}"
sleep 1
end
This change fixes it:
break if res.kind_of?(Net::HTTPSuccess) or res.kind_of?(Net::HTTPNotFound) or res.kind_of?(Net::HTTPForbidden)
Jenkins supports a variety of different authn/z mechanisms. In configuring Jenkins to support container-provided authentication, you need to modify the Jenkins root config.xml file and add in things like this:
<useSecurity>true</useSecurity>
<authorizationStrategy class="hudson.security.GlobalMatrixAuthorizationStrategy">
...
It would be great to be able to set node attributes that would allow non-anonymous setup for the installed Jenkins server.
Hello everybody, @fujin, @fnichol, @patcon, @realityforge, @atomic-penguin
as you all know there are a couple of chef-jenkins projects and forks on github.
Seeing that this repo is the one listed under
http://community.opscode.com/cookbooks/jenkins
I was wondering if there was any way to combine at least some of the forces here. So please feel free to add anyone who might be able to help with this.
Would be more then happy to help fix some issues myself.
On Ubuntu 12.04, this recipe installs the official repository version rather than the jenkins repo version. It appears to setup the third-party apt repo correctly, but the one that gets installed is the official Ubuntu-distributed version.
Or should we create a new repo?
I want to give my patch to support Gentoo... (With java_war package)
I'll send it anyway.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.