diff --git a/install_jenkins_slave.sh b/install_jenkins_slave.sh new file mode 100755 index 0000000000..fef5961d95 --- /dev/null +++ b/install_jenkins_slave.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +lsbdistcodename=`lsb_release -c -s` +puppet_deb=puppetlabs-release-${lsbdistcodename}.deb +/usr/bin/wget http://apt.puppetlabs.com/$puppet_deb -O $puppet_deb +sudo dpkg -i $puppet_deb +sudo apt-get update +sudo apt-get install -y puppet git rubygems + +git clone https://github.com/openstack/openstack-ci-puppet +sudo bash openstack-ci-puppet/install_modules.sh + +sudo puppet apply --modulepath=`pwd`/openstack-ci-puppet/modules:/etc/puppet/modules -e 'node default {class { "openstack_project::bare_slave": install_users => false }}' diff --git a/manifests/site.pp b/manifests/site.pp index 2fd84e0af8..77c37de4d6 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -124,5 +124,5 @@ node /^.*\.slave\.openstack\.org$/ { } node /^.*\.jclouds\.openstack\.org$/ { - include openstack_project::jclouds_slave + include openstack_project::bare_slave } diff --git a/modules/openstack_project/manifests/jclouds_slave.pp b/modules/openstack_project/manifests/bare_slave.pp similarity index 59% rename from modules/openstack_project/manifests/jclouds_slave.pp rename to modules/openstack_project/manifests/bare_slave.pp index 881c6ffb8d..af87ee066e 100644 --- a/modules/openstack_project/manifests/jclouds_slave.pp +++ b/modules/openstack_project/manifests/bare_slave.pp @@ -1,7 +1,9 @@ # bare-bones slaves spun up by jclouds. Specifically need to not set ssh # login limits, because it screws up jclouds provisioning -class openstack_project::jclouds_slave { - include openstack_project::base +class openstack_project::bare_slave($install_users=true) { + class { 'openstack_project::base': + install_users => $install_users + } class { 'jenkins_slave': ssh_key => "", diff --git a/modules/openstack_project/manifests/base.pp b/modules/openstack_project/manifests/base.pp index 5757df8c97..3a22278d25 100644 --- a/modules/openstack_project/manifests/base.pp +++ b/modules/openstack_project/manifests/base.pp @@ -1,4 +1,4 @@ -class openstack_project::base { +class openstack_project::base($install_users=true) { include openstack_project::users include sudoers @@ -20,14 +20,16 @@ class openstack_project::base { "emacs23-nox"] package { $packages: ensure => "present" } - realize ( - User::Virtual::Localuser["mordred"], - User::Virtual::Localuser["corvus"], - User::Virtual::Localuser["soren"], - User::Virtual::Localuser["linuxjedi"], - User::Virtual::Localuser["devananda"], - User::Virtual::Localuser["clarkb"], - ) + if ($install_useres) { + realize ( + User::Virtual::Localuser["mordred"], + User::Virtual::Localuser["corvus"], + User::Virtual::Localuser["soren"], + User::Virtual::Localuser["linuxjedi"], + User::Virtual::Localuser["devananda"], + User::Virtual::Localuser["clarkb"], + ) + } # Download and set up puppet apt repo exec { "download:puppetlabs-release-${lsbdistcodename}.deb":