Add new jenkins masters.

Add jenkins01 and jenkins02, both of which will have unit test and
devstack slaves.  Leave jenkins.o.o alone; over time it will be
reduced so that it alone has special jobs and privileged slaves
attached to it.

Note that currently all of the jobs will be defined on all nodes,
including jobs on timers.  I think the long-term fix for that is to
have zuul schedule timed jobs.

Change-Id: I10bbd5555e5194b1031700975d5b3ae6b458b8b3
This commit is contained in:
James E. Blair 2013-07-26 15:33:06 -07:00
parent 2a743b8822
commit 49b62c5d3a
6 changed files with 59 additions and 6 deletions

View File

@ -79,6 +79,30 @@ node 'jenkins.openstack.org' {
}
}
node 'jenkins01.openstack.org' {
class { 'openstack_project::jenkins':
jenkins_jobs_password => hiera('jenkins_jobs_password'),
jenkins_ssh_private_key => hiera('jenkins_ssh_private_key_contents'),
ssl_cert_file_contents => hiera('jenkins01_ssl_cert_file_contents'),
ssl_key_file_contents => hiera('jenkins01_ssl_key_file_contents'),
ssl_chain_file_contents => hiera('jenkins01_ssl_chain_file_contents'),
sysadmins => hiera('sysadmins'),
zmq_event_receivers => ['logstash.openstack.org'],
}
}
node 'jenkins02.openstack.org' {
class { 'openstack_project::jenkins':
jenkins_jobs_password => hiera('jenkins_jobs_password'),
jenkins_ssh_private_key => hiera('jenkins_ssh_private_key_contents'),
ssl_cert_file_contents => hiera('jenkins02_ssl_cert_file_contents'),
ssl_key_file_contents => hiera('jenkins02_ssl_key_file_contents'),
ssl_chain_file_contents => hiera('jenkins02_ssl_chain_file_contents'),
sysadmins => hiera('sysadmins'),
zmq_event_receivers => ['logstash.openstack.org'],
}
}
node 'jenkins-dev.openstack.org' {
class { 'openstack_project::jenkins_dev':
jenkins_ssh_private_key => hiera('jenkins_dev_ssh_private_key_contents'),
@ -111,8 +135,9 @@ node 'graphite.openstack.org' {
graphite_admin_user => hiera('graphite_admin_user'),
graphite_admin_email => hiera('graphite_admin_email'),
graphite_admin_password => hiera('graphite_admin_password'),
statsd_hosts => ['jenkins.openstack.org',
'devstack-launch.slave.openstack.org',
statsd_hosts => ['devstack-launch.slave.openstack.org',
'devstack-launch01.slave.openstack.org',
'devstack-launch02.slave.openstack.org',
'zuul.openstack.org'],
}
}
@ -387,6 +412,29 @@ node 'devstack-launch.slave.openstack.org' {
jenkins_api_key => hiera('jenkins_api_key'),
jenkins_ssh_public_key => $openstack_project::jenkins_ssh_key,
jenkins_ssh_private_key => hiera('jenkins_ssh_private_key_contents'),
jenkins_server => 'jenkins.openstack.org',
}
}
node 'devstack-launch01.slave.openstack.org' {
include openstack_project
class { 'openstack_project::devstack_launch_slave':
jenkins_api_user => hiera('jenkins_api_user'),
jenkins_api_key => hiera('jenkins_api_key'),
jenkins_ssh_public_key => $openstack_project::jenkins_ssh_key,
jenkins_ssh_private_key => hiera('jenkins_ssh_private_key_contents'),
jenkins_server => 'jenkins01.openstack.org',
}
}
node 'devstack-launch02.slave.openstack.org' {
include openstack_project
class { 'openstack_project::devstack_launch_slave':
jenkins_api_user => hiera('jenkins_api_user'),
jenkins_api_key => hiera('jenkins_api_key'),
jenkins_ssh_public_key => $openstack_project::jenkins_ssh_key,
jenkins_ssh_private_key => hiera('jenkins_ssh_private_key_contents'),
jenkins_server => 'jenkins02.openstack.org',
}
}

View File

@ -3,6 +3,8 @@ source-url: http://logs.openstack.org
# List of zmq event inputs.
zmq-publishers:
- tcp://jenkins.openstack.org:8888
- tcp://jenkins01.openstack.org:8888
- tcp://jenkins02.openstack.org:8888
# List of files to source logs from.
source-files:

View File

@ -67,6 +67,8 @@ class openstack_project::cacti (
'etherpad.openstack.org',
'graphite.openstack.org',
'jenkins.openstack.org',
'jenkins01.openstack.org',
'jenkins02.openstack.org',
'jenkins-dev.openstack.org',
'lists.openstack.org',
'logstash.openstack.org',

View File

@ -19,6 +19,7 @@ class openstack_project::devstack_launch_slave (
$jenkins_api_key,
$jenkins_ssh_public_key,
$jenkins_ssh_private_key,
$jenkins_server,
) {
class { 'openstack_project::slave':

View File

@ -1,6 +1,7 @@
# == Class: openstack_project::jenkins
#
class openstack_project::jenkins (
$vhost_name = $::fqdn,
$jenkins_jobs_password = '',
$manage_jenkins_jobs = true,
$ssl_cert_file_contents = '',
@ -20,13 +21,12 @@ class openstack_project::jenkins (
sysadmins => $sysadmins,
}
$vhost_name = 'jenkins.openstack.org'
class { '::jenkins::master':
vhost_name => $vhost_name,
serveradmin => 'webmaster@openstack.org',
logo => 'openstack.png',
ssl_cert_file => '/etc/ssl/certs/jenkins.openstack.org.pem',
ssl_key_file => '/etc/ssl/private/jenkins.openstack.org.key',
ssl_cert_file => "/etc/ssl/certs/${vhost_name}.pem",
ssl_key_file => "/etc/ssl/private/${vhost_name}.key",
ssl_chain_file => '/etc/ssl/certs/intermediate.pem',
ssl_cert_file_contents => $ssl_cert_file_contents,
ssl_key_file_contents => $ssl_key_file_contents,

View File

@ -1,4 +1,4 @@
[jenkins]
server=https://jenkins.openstack.org
server=https://<%= jenkins_server %>
user=<%= jenkins_api_user %>
apikey=<%= jenkins_api_key %>