Merge "Fixes to nodepool installation on jenkins-dev.o.o"

This commit is contained in:
Jenkins 2014-05-01 02:04:23 +00:00 committed by Gerrit Code Review
commit c1345a4a8a
5 changed files with 40 additions and 17 deletions

View File

@ -400,7 +400,7 @@ node 'status.openstack.org' {
}
node 'nodepool.openstack.org' {
class { 'openstack_project::nodepool':
class { 'openstack_project::nodepool_prod':
mysql_password => hiera('nodepool_mysql_password'),
mysql_root_password => hiera('nodepool_mysql_root_password'),
nodepool_ssh_private_key => hiera('jenkins_ssh_private_key_contents'),

View File

@ -27,6 +27,7 @@ class nodepool (
$vhost_name = 'nodepool.openstack.org',
$image_log_document_root = '/var/log/nodepool/image',
$enable_image_log_via_http = false,
$environment = {},
) {
class { 'mysql::server':

View File

@ -1,6 +1,8 @@
<% if scope.lookupvar("nodepool::statsd_host") != "" %>
<% if scope.lookupvar("nodepool::statsd_host") != "" -%>
export STATSD_HOST=<%= scope.lookupvar("nodepool::statsd_host") %>
export STATSD_PORT=8125
<% end %>
<% end -%>
<% scope.lookupvar("nodepool::environment").keys.sort.each do |key| -%>
export <%= key %>='<%= scope.lookupvar("nodepool::environment")[key] %>'
<% end -%>
DAEMON_ARGS="-c /etc/nodepool/nodepool.yaml -l /etc/nodepool/logging.conf"

View File

@ -12,6 +12,7 @@ class openstack_project::jenkins_dev (
$hpcloud_username ='',
$hpcloud_password ='',
$hpcloud_project ='',
$nodepool_template ='nodepool-dev.yaml.erb',
) {
include openstack_project
@ -139,17 +140,36 @@ class openstack_project::jenkins_dev (
}
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',
mysql_root_password => $mysql_root_password,
mysql_password => $mysql_password,
nodepool_ssh_private_key => $nodepool_ssh_private_key,
environment => {
'NODEPOOL_SSH_KEY' => $openstack_project::jenkins_dev_ssh_key,
}
}
file { '/etc/nodepool/nodepool.yaml':
ensure => present,
owner => 'nodepool',
group => 'root',
mode => '0400',
content => template("openstack_project/nodepool/${nodepool_template}"),
require => [
File['/etc/nodepool'],
User['nodepool'],
],
}
file { '/etc/nodepool/scripts':
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
recurse => true,
purge => true,
force => true,
require => File['/etc/nodepool'],
source => 'puppet:///modules/openstack_project/nodepool/scripts',
}
}

View File

@ -1,6 +1,6 @@
# == Class: openstack_project::nodepool
# == Class: openstack_project::nodepool_prod
#
class openstack_project::nodepool(
class openstack_project::nodepool_prod(
$mysql_root_password,
$mysql_password,
$nodepool_ssh_private_key = '',