Make a pared-down slave for jclouds.
Change-Id: I4ca31201362516b85ce39287270d94428895b5c8
This commit is contained in:
parent
4369225cf9
commit
063de412aa
@ -2,28 +2,47 @@ import "users"
|
||||
#
|
||||
# Abstract classes:
|
||||
#
|
||||
class openstack_base ($iptables_public_tcp_ports) {
|
||||
class openstack_base {
|
||||
include openstack_project::users
|
||||
include ssh
|
||||
include snmpd
|
||||
include sudoers
|
||||
|
||||
class { 'iptables':
|
||||
public_tcp_ports => $iptables_public_tcp_ports,
|
||||
}
|
||||
|
||||
file { '/etc/profile.d/Z98-byobu.sh':
|
||||
ensure => 'absent'
|
||||
}
|
||||
|
||||
package { "ntp":
|
||||
ensure => installed
|
||||
}
|
||||
|
||||
package { "popularity-contest":
|
||||
ensure => purged
|
||||
}
|
||||
|
||||
$packages = ["puppet",
|
||||
"git",
|
||||
"python-setuptools",
|
||||
"python-virtualenv"]
|
||||
package { $packages: ensure => "latest" }
|
||||
|
||||
realize (
|
||||
User::Virtual::Localuser["mordred"],
|
||||
User::Virtual::Localuser["corvus"],
|
||||
User::Virtual::Localuser["soren"],
|
||||
User::Virtual::Localuser["linuxjedi"],
|
||||
User::Virtual::Localuser["devananda"],
|
||||
)
|
||||
}
|
||||
|
||||
# A template host with no running services
|
||||
class openstack_template ($iptables_public_tcp_ports) {
|
||||
include openstack_base
|
||||
include ssh
|
||||
include snmpd
|
||||
|
||||
class { 'iptables':
|
||||
public_tcp_ports => $iptables_public_tcp_ports,
|
||||
}
|
||||
|
||||
package { "ntp":
|
||||
ensure => installed
|
||||
}
|
||||
|
||||
service { 'ntpd':
|
||||
name => 'ntp',
|
||||
ensure => running,
|
||||
@ -33,29 +52,11 @@ class openstack_base ($iptables_public_tcp_ports) {
|
||||
}
|
||||
|
||||
$packages = ["python-software-properties",
|
||||
"puppet",
|
||||
"bzr",
|
||||
"git",
|
||||
"python-setuptools",
|
||||
"python-virtualenv",
|
||||
"byobu"]
|
||||
package { $packages: ensure => "latest" }
|
||||
}
|
||||
|
||||
# A template host with no running services
|
||||
class openstack_template ($iptables_public_tcp_ports) {
|
||||
class { 'openstack_base':
|
||||
iptables_public_tcp_ports => $iptables_public_tcp_ports
|
||||
}
|
||||
realize (
|
||||
User::Virtual::Localuser["mordred"],
|
||||
User::Virtual::Localuser["corvus"],
|
||||
User::Virtual::Localuser["soren"],
|
||||
User::Virtual::Localuser["linuxjedi"],
|
||||
User::Virtual::Localuser["devananda"],
|
||||
)
|
||||
}
|
||||
|
||||
# A server that we expect to run for some time
|
||||
class openstack_server ($iptables_public_tcp_ports) {
|
||||
class { 'openstack_template':
|
||||
|
@ -419,3 +419,14 @@ node /^oneiric.*\.slave\.openstack\.org$/ {
|
||||
}
|
||||
}
|
||||
|
||||
# bare-bones slaves spun up by jclouds. Specifically need to not set ssh
|
||||
# login limits, because it screws up jclouds provisioning
|
||||
node /^.*\.jclouds\.openstack\.org$/ {
|
||||
|
||||
include openstack_base
|
||||
|
||||
class { 'jenkins_slave':
|
||||
ssh_key => "",
|
||||
user => false
|
||||
}
|
||||
}
|
||||
|
@ -88,3 +88,14 @@ node /^build.*\.slave\.stackforge\.org$/ {
|
||||
include stackforge_jenkins_slave
|
||||
}
|
||||
|
||||
# bare-bones slaves spun up by jclouds. Specifically need to not set ssh
|
||||
# login limits, because it screws up jclouds provisioning
|
||||
node /^.*\.jclouds\.stackforge\.org$/ {
|
||||
|
||||
include openstack_base
|
||||
|
||||
class { 'jenkins_slave':
|
||||
ssh_key => "",
|
||||
user => false
|
||||
}
|
||||
}
|
||||
|
@ -1,18 +1,11 @@
|
||||
class jenkins_slave($ssh_key, $sudo = false, $bare = false) {
|
||||
class jenkins_slave($ssh_key, $sudo = false, $bare = false, $user = true) {
|
||||
|
||||
jenkinsuser { "jenkins":
|
||||
ensure => present,
|
||||
sudo => $sudo,
|
||||
ssh_key => "${ssh_key}"
|
||||
}
|
||||
|
||||
slavecirepo { "openstack-ci":
|
||||
ensure => absent,
|
||||
require => [ Package[git], File[jenkinshome] ],
|
||||
}
|
||||
|
||||
apt::ppa { "ppa:openstack-ci/build-depends":
|
||||
ensure => absent
|
||||
if ($user == true) {
|
||||
jenkinsuser { "jenkins":
|
||||
ensure => present,
|
||||
sudo => $sudo,
|
||||
ssh_key => "${ssh_key}"
|
||||
}
|
||||
}
|
||||
|
||||
# Packages that all jenkins slaves need
|
||||
@ -92,14 +85,6 @@ class jenkins_slave($ssh_key, $sudo = false, $bare = false) {
|
||||
require => Package[python-pip],
|
||||
}
|
||||
|
||||
cron { "updateci":
|
||||
ensure => absent,
|
||||
user => jenkins,
|
||||
minute => "*/15",
|
||||
command => "cd /home/jenkins/openstack-ci && /usr/bin/git pull -q origin master",
|
||||
require => [ File[jenkinshome] ],
|
||||
}
|
||||
|
||||
file { 'profilerubygems':
|
||||
name => '/etc/profile.d/rubygems.sh',
|
||||
owner => 'root',
|
||||
|
Loading…
x
Reference in New Issue
Block a user