- start managing ceph configuration file - manage ceph-radosgw - merge the ceph::conf and ceph::node profiles - ensure the ceph repos exist - mange nginx frontend and consul service Reviewed-on: #380
42 lines
1.0 KiB
Puppet
42 lines
1.0 KiB
Puppet
class profiles::ceph::rgw (
|
|
Boolean $enable = true,
|
|
Hash[String, String] $ceph_client_keys = {},
|
|
Stdlib::Absolutepath $base_path = '/var/lib/ceph'
|
|
){
|
|
|
|
$key = $ceph_client_keys[$facts['networking']['hostname']]
|
|
|
|
if $enable {
|
|
|
|
include profiles::ceph::conf
|
|
|
|
package {'ceph-radosgw':
|
|
ensure => installed,
|
|
}
|
|
|
|
file { [
|
|
"${base_path}/radosgw",
|
|
"${base_path}/radosgw/ceph-${facts['networking']['hostname']}"
|
|
]:
|
|
ensure => directory,
|
|
owner => 'ceph',
|
|
group => 'ceph',
|
|
mode => '0750',
|
|
}
|
|
|
|
file { "${base_path}/radosgw/ceph-${facts['networking']['hostname']}/keyring":
|
|
ensure => file,
|
|
owner => 'ceph',
|
|
group => 'ceph',
|
|
mode => '0750',
|
|
content => Sensitive("[client.${facts['networking']['hostname']}]\n key = ${key}\n")
|
|
}
|
|
|
|
service {"ceph-radosgw@${facts['networking']['hostname']}":
|
|
ensure => true,
|
|
enable => true,
|
|
subscribe => File["${base_path}/radosgw/ceph-${facts['networking']['hostname']}/keyring"]
|
|
}
|
|
}
|
|
}
|