398e1175f4
The patch to add nodepool to jenkins-dev (https://review.openstack.org/#/c/57333) did not work. There were a few issues with it: 1. jenkins-dev.pp was passing literal strings to the nodepool module, instead it should be passing in the variables. 2. jenkins-dev.pp was calling ::nodepool but puppet seems to think that it wants ::openstack_project::nodepool due to puppet's scoping weirdness :( 3. The script to build nodepool machines needed the jenkins_dev_ssh_key. Fixes to above issues: 1. This is trivial, just passed the variables thru instead of literal strings. 2. The nodepool.pp module is renamed to nodepool_prod.pp to prevent the scoping problem. 3. We use the dev jenkins ssh key with dev nodepool by allowing the nodepool module to pass arbitrary env settings through the defaults file. Change-Id: Id91053212f088079ff1b0f06ebdce5c381f5cd19
64 lines
1.7 KiB
Puppet
64 lines
1.7 KiB
Puppet
# == Class: openstack_project::nodepool_prod
|
|
#
|
|
class openstack_project::nodepool_prod(
|
|
$mysql_root_password,
|
|
$mysql_password,
|
|
$nodepool_ssh_private_key = '',
|
|
$nodepool_template = 'nodepool.yaml.erb',
|
|
$sysadmins = [],
|
|
$statsd_host = '',
|
|
$jenkins_api_user ='',
|
|
$jenkins_api_key ='',
|
|
$jenkins_credentials_id ='',
|
|
$rackspace_username ='',
|
|
$rackspace_password ='',
|
|
$rackspace_project ='',
|
|
$hpcloud_username ='',
|
|
$hpcloud_password ='',
|
|
$hpcloud_project ='',
|
|
$tripleo_username ='',
|
|
$tripleo_password ='',
|
|
$tripleo_project ='',
|
|
$image_log_document_root = '/var/log/nodepool/image',
|
|
$enable_image_log_via_http = true,
|
|
) {
|
|
class { 'openstack_project::server':
|
|
sysadmins => $sysadmins,
|
|
iptables_public_tcp_ports => [80],
|
|
}
|
|
|
|
class { '::nodepool':
|
|
mysql_root_password => $mysql_root_password,
|
|
mysql_password => $mysql_password,
|
|
nodepool_ssh_private_key => $nodepool_ssh_private_key,
|
|
statsd_host => $statsd_host,
|
|
image_log_document_root => $image_log_document_root,
|
|
enable_image_log_via_http => $enable_image_log_via_http,
|
|
}
|
|
|
|
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',
|
|
}
|
|
|
|
}
|