
The differences between openstack_project::slave, openstack_project::slave_template, and openstack_project::bare_slave were not always clear. Keep openstack_project::slave as the default long running slave manifest, but replace slave_template with a single_use_slave.pp to make it clear where single use slave config begins. Add the ability to toggle automatic upgrades and jenkins sudo rights to this new manifest. Finally, add a more verbose comment to bare_slave explaining what it is useful for (having a jenkins like slave host that doesn't need a firewall or ntp or automatic upgrades). Change-Id: I3989c9e6ad9469f441ca5d3627f7b3b704d8a8da
31 lines
1.0 KiB
Puppet
31 lines
1.0 KiB
Puppet
# == Class: openstack_project::single_use_slave
|
|
#
|
|
# This class configures single use Jenkins slaves with a few
|
|
# toggleable options. Most importantly sudo rights for the Jenkins
|
|
# user are by default off but can be enabled. Also, automatic_upgrades
|
|
# are off by default as the assumption is the backing image for
|
|
# this single use slaves will be refreshed with new packages
|
|
# periodically.
|
|
class openstack_project::single_use_slave (
|
|
$certname = $::fqdn,
|
|
$install_users = true,
|
|
$sudo = false,
|
|
$automatic_upgrades = false,
|
|
$ssh_key = $openstack_project::jenkins_ssh_key
|
|
) inherits openstack_project {
|
|
class { 'openstack_project::template':
|
|
certname => $certname,
|
|
automatic_upgrades => $automatic_upgrades,
|
|
install_users => $install_users,
|
|
# Port 8000 from the devstack neutron public net to allow
|
|
# nova servers to reach heat-api-cfn
|
|
iptables_rules4 =>
|
|
['-p tcp --dport 8000 -s 172.24.4.0/24 -j ACCEPT'],
|
|
}
|
|
class { 'jenkins::slave':
|
|
ssh_key => $ssh_key,
|
|
sudo => $sudo,
|
|
bare => true,
|
|
}
|
|
}
|