Merge "add nodepool to jenkins-dev server"

This commit is contained in:
Jenkins 2013-12-07 01:44:40 +00:00 committed by Gerrit Code Review
commit dac9a30496
4 changed files with 83 additions and 4 deletions

View File

@ -135,8 +135,17 @@ node 'jenkins04.openstack.org' {
node 'jenkins-dev.openstack.org' {
class { 'openstack_project::jenkins_dev':
jenkins_ssh_private_key => hiera('jenkins_dev_ssh_private_key_contents'),
sysadmins => hiera('sysadmins'),
jenkins_ssh_private_key => hiera('jenkins_dev_ssh_private_key_contents'),
sysadmins => hiera('sysadmins'),
mysql_password => hiera('nodepool_dev_mysql_password'),
mysql_root_password => hiera('nodepool_dev_mysql_root_password'),
nodepool_ssh_private_key => hiera('jenkins_dev_ssh_private_key_contents'),
jenkins_api_user => hiera('jenkins_dev_api_user'),
jenkins_api_key => hiera('jenkins_dev_api_key'),
jenkins_credentials_id => hiera('jenkins_dev_credentials_id'),
hpcloud_username => hiera('nodepool_hpcloud_username'),
hpcloud_password => hiera('nodepool_hpcloud_password'),
hpcloud_project => hiera('nodepool_hpcloud_project'),
}
}

View File

@ -2,7 +2,16 @@
#
class openstack_project::jenkins_dev (
$jenkins_ssh_private_key = '',
$sysadmins = []
$sysadmins = [],
$mysql_root_password,
$mysql_password,
$nodepool_ssh_private_key = '',
$jenkins_api_user ='',
$jenkins_api_key ='',
$jenkins_credentials_id ='',
$hpcloud_username ='',
$hpcloud_password ='',
$hpcloud_project ='',
) {
include openstack_project
@ -33,4 +42,19 @@ class openstack_project::jenkins_dev (
mode => '0644',
source => 'puppet:///modules/openstack_project/jenkins/jenkins.default',
}
class { '::nodepool':
mysql_password => 'mysql_password',
mysql_root_password => 'mysql_root_password',
nodepool_ssh_private_key => 'nodepool_ssh_private_key',
nodepool_template => 'nodepool-dev.yaml.erb',
sysadmins => 'sysadmins',
jenkins_api_user => 'jenkins_api_user',
jenkins_api_key => 'jenkins_api_key',
jenkins_credentials_id => 'jenkins_credentials_id',
hpcloud_username => 'hpcloud_username',
hpcloud_password => 'hpcloud_password',
hpcloud_project => 'hpcloud_project',
}
}

View File

@ -4,6 +4,7 @@ class openstack_project::nodepool(
$mysql_root_password,
$mysql_password,
$nodepool_ssh_private_key = '',
$nodepool_template = 'nodepool.yaml.erb',
$sysadmins = [],
$statsd_host = '',
$jenkins_api_user ='',
@ -35,7 +36,7 @@ class openstack_project::nodepool(
owner => 'nodepool',
group => 'root',
mode => '0400',
content => template('openstack_project/nodepool/nodepool.yaml.erb'),
content => template("openstack_project/nodepool/${nodepool_template}"),
require => [
File['/etc/nodepool'],
User['nodepool'],

View File

@ -0,0 +1,45 @@
script-dir: /etc/nodepool/scripts
dburi: 'mysql://nodepool:<%= mysql_password %>@localhost/nodepool'
cron:
cleanup: '*/5 * * * *'
check: '*/15 * * * *'
update-image: '14 2 * * *'
zmq-publishers:
- tcp://jenkins-dev.openstack.org:8888
gearman-servers:
- host: zuul.openstack.org
providers:
- name: hpcloud-az2
region-name: 'az-2.region-a.geo-1'
service-type: 'compute'
service-name: 'Compute'
username: '<%= hpcloud_username %>'
password: '<%= hpcloud_password %>'
project-id: '<%= hpcloud_project %>'
auth-url: 'https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0'
boot-timeout: 120
max-servers: 2
images:
- name: devstack-precise
base-image: 'Ubuntu Precise 12.04 LTS Server 64-bit 20121026 (b)'
min-ram: 8192
setup: prepare_node_devstack.sh
username: jenkins
private-key: /home/nodepool/.ssh/id_rsa
targets:
- name: jenkins-dev
jenkins:
url: 'https://jenkins-dev.openstack.org/'
user: '<%= jenkins_dev_api_user %>'
apikey: '<%= jenkins_dev_api_key %>'
credentials-id: '<%= jenkins_dev_credentials_id %>'
images:
- name: devstack-precise
min-ready: 0
providers:
- name: hpcloud-az2