diff --git a/manifests/storage/rbd/pools.pp b/manifests/storage/rbd/pools.pp index 9bea2bdf..6bca7b81 100644 --- a/manifests/storage/rbd/pools.pp +++ b/manifests/storage/rbd/pools.pp @@ -54,6 +54,36 @@ class cloud::storage::rbd::pools( require => Exec['create_cinder_volumes_pool']; } + concat::fragment { 'ceph-clients-os': + target => '/etc/ceph/ceph.conf', + order => '95', + content => template('cloud/storage/ceph/ceph-client.conf.erb') + } + + if $::ceph_keyring_glance { + ceph::key { 'glance': + secret => $::ceph_keyring_glance, + keyring_path => '/etc/ceph/ceph.client.glance.keyring' + } -> + file { '/etc/ceph/ceph.client.glance.keyring': + owner => 'glance', + group => 'glance', + mode => '0400' + } + } + + if $::ceph_keyring_cinder { + ceph::key { 'cinder': + secret => $::ceph_keyring_cinder, + keyring_path => '/etc/ceph/ceph.client.cinder.keyring' + } -> + file { '/etc/ceph/ceph.client.cinder.keyring': + owner => 'cinder', + group => 'cinder', + mode => '0400' + } + } + #exec { "create cinder backup pool": #TODO: point PG num with a cluster variable + keyring # command => "/usr/bin/ceph osd pool create ${::cinder_backup_pool} 128 128", diff --git a/templates/storage/ceph/ceph-client.conf.erb b/templates/storage/ceph/ceph-client.conf.erb new file mode 100644 index 00000000..85c007e3 --- /dev/null +++ b/templates/storage/ceph/ceph-client.conf.erb @@ -0,0 +1,6 @@ +<% @clients.each do |client| %> + +[client.<%= @client %>] + keyring = /etc/ceph/ceph.client.<%= @client %>.keyring + +<% end %>