Puppet Class: profile::spicerack::cookbooks::production
- Defined in:
- modules/profile/manifests/spicerack/cookbooks/production.pp
Overview
SPDX-License-Identifier: Apache-2.0
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'modules/profile/manifests/spicerack/cookbooks/production.pp', line 2
class profile::spicerack::cookbooks::production {
$firmware_store_dir = '/srv/firmware'
require passwords::misc::scripts # For the databases replication credentials
wmflib::dir::mkdir_p($firmware_store_dir, {
group => 'datacenter-ops',
mode => '2775',
})
file { '/etc/spicerack/cookbooks/sre.hardware.upgrade-firmware.yaml':
ensure => file,
content => {
'firmware_store' => $firmware_store_dir,
}.to_yaml,
}
file { '/etc/spicerack/cookbooks/sre.network.cf.yaml':
ensure => file,
owner => 'root',
group => 'ops',
mode => '0440',
content => secret('spicerack/cookbooks/sre.network.cf.yaml'),
}
# Configuration file for switching services between datacenters
# For each discovery record for active-active services, extract the
# actual dns from monitoring if available.
$discovery_records = wmflib::service::fetch().filter |$label, $record| {
$record['discovery'] != undef
}
file { '/etc/spicerack/cookbooks/sre.switchdc.services.yaml':
ensure => file,
owner => 'root',
group => 'ops',
mode => '0440',
content => template('profile/cookbooks/sre.switchdc.services.yaml.erb'),
}
file { '/etc/spicerack/cookbooks/sre.switchdc.databases.yaml':
ensure => file,
owner => 'root',
group => 'ops',
mode => '0440',
content => {
'repl_user' => $passwords::misc::scripts::mysql_repl_user,
'repl_pass' => $passwords::misc::scripts::mysql_repl_pass,
}.to_yaml,
}
}
|