system-config/modules/openstack_project/manifests/single_use_slave.pp
Clark Boylan 54ad9496cd Optionally give mysql user all global privs.
One our single use unittest slaves we want to allow unittests to create
and destroy arbitrary mysql database schemas. The simplest way to do
this is to grant all priveleges to the test user on the mysql server
globally. This is safe because the nodes are thrown away post test.

Change-Id: Ic92ff2f9c752d955e6f82eb4b88330b5448cfa75
2014-02-26 11:48:59 -08:00

38 lines
1.3 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,
$bare = true,
$python3 = false,
$include_pypy = false,
$automatic_upgrades = false,
$all_mysql_privs = 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 => $bare,
python3 => $python3,
include_pypy => $include_pypy,
all_mysql_privs => $all_mysql_privs,
}
}