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

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
This commit is contained in:
James E. Blair 2014-04-16 09:50:14 -07:00 committed by Khai Do
parent f016e06bcb
commit c54b4f952e
2 changed files with 6 additions and 3 deletions

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"