Merge "Fixes to nodepool installation on jenkins-dev.o.o"
This commit is contained in:
commit
c1345a4a8a
@ -400,7 +400,7 @@ node 'status.openstack.org' {
|
|||||||
}
|
}
|
||||||
|
|
||||||
node 'nodepool.openstack.org' {
|
node 'nodepool.openstack.org' {
|
||||||
class { 'openstack_project::nodepool':
|
class { 'openstack_project::nodepool_prod':
|
||||||
mysql_password => hiera('nodepool_mysql_password'),
|
mysql_password => hiera('nodepool_mysql_password'),
|
||||||
mysql_root_password => hiera('nodepool_mysql_root_password'),
|
mysql_root_password => hiera('nodepool_mysql_root_password'),
|
||||||
nodepool_ssh_private_key => hiera('jenkins_ssh_private_key_contents'),
|
nodepool_ssh_private_key => hiera('jenkins_ssh_private_key_contents'),
|
||||||
|
@ -27,6 +27,7 @@ class nodepool (
|
|||||||
$vhost_name = 'nodepool.openstack.org',
|
$vhost_name = 'nodepool.openstack.org',
|
||||||
$image_log_document_root = '/var/log/nodepool/image',
|
$image_log_document_root = '/var/log/nodepool/image',
|
||||||
$enable_image_log_via_http = false,
|
$enable_image_log_via_http = false,
|
||||||
|
$environment = {},
|
||||||
) {
|
) {
|
||||||
|
|
||||||
class { 'mysql::server':
|
class { 'mysql::server':
|
||||||
|
@ -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_HOST=<%= scope.lookupvar("nodepool::statsd_host") %>
|
||||||
export STATSD_PORT=8125
|
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"
|
DAEMON_ARGS="-c /etc/nodepool/nodepool.yaml -l /etc/nodepool/logging.conf"
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ class openstack_project::jenkins_dev (
|
|||||||
$hpcloud_username ='',
|
$hpcloud_username ='',
|
||||||
$hpcloud_password ='',
|
$hpcloud_password ='',
|
||||||
$hpcloud_project ='',
|
$hpcloud_project ='',
|
||||||
|
$nodepool_template ='nodepool-dev.yaml.erb',
|
||||||
) {
|
) {
|
||||||
include openstack_project
|
include openstack_project
|
||||||
|
|
||||||
@ -139,17 +140,36 @@ class openstack_project::jenkins_dev (
|
|||||||
}
|
}
|
||||||
|
|
||||||
class { '::nodepool':
|
class { '::nodepool':
|
||||||
mysql_password => 'mysql_password',
|
mysql_root_password => $mysql_root_password,
|
||||||
mysql_root_password => 'mysql_root_password',
|
mysql_password => $mysql_password,
|
||||||
nodepool_ssh_private_key => 'nodepool_ssh_private_key',
|
nodepool_ssh_private_key => $nodepool_ssh_private_key,
|
||||||
nodepool_template => 'nodepool-dev.yaml.erb',
|
environment => {
|
||||||
sysadmins => 'sysadmins',
|
'NODEPOOL_SSH_KEY' => $openstack_project::jenkins_dev_ssh_key,
|
||||||
jenkins_api_user => 'jenkins_api_user',
|
}
|
||||||
jenkins_api_key => 'jenkins_api_key',
|
}
|
||||||
jenkins_credentials_id => 'jenkins_credentials_id',
|
|
||||||
hpcloud_username => 'hpcloud_username',
|
file { '/etc/nodepool/nodepool.yaml':
|
||||||
hpcloud_password => 'hpcloud_password',
|
ensure => present,
|
||||||
hpcloud_project => 'hpcloud_project',
|
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',
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -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_root_password,
|
||||||
$mysql_password,
|
$mysql_password,
|
||||||
$nodepool_ssh_private_key = '',
|
$nodepool_ssh_private_key = '',
|
Loading…
Reference in New Issue
Block a user