Update ceph.conf template for RGW

Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
This commit is contained in:
Alexandre Marangone 2013-04-22 11:40:10 -07:00
parent 866fed0864
commit 3dca84b734
2 changed files with 20 additions and 1 deletions

View File

@ -3,10 +3,16 @@ raise "mon_initial_members must be set in config" if node["ceph"]["config"]['mon
mon_addresses = get_mon_addresses()
is_rgw = false
if node['roles'].include? 'ceph-radosgw'
is_rgw = true
end
template '/etc/ceph/ceph.conf' do
source 'ceph.conf.erb'
variables(
:mon_addresses => mon_addresses
:mon_addresses => mon_addresses,
:is_rgw => is_rgw
)
mode '0644'
end

View File

@ -29,6 +29,19 @@
<% end -%>
<% end -%>
<% if (@is_rgw) -%>
[client.radosgw.<%= node['hostname'] %>]
host = <%= node['hostname'] %>
rgw socket path = /var/run/ceph/radosgw.<%= node['hostname'] %>
keyring = /etc/ceph/ceph.client.radosgw.<%= node['hostname'] %>.keyring
log file = /var/log/ceph/radosgw.log
<% if (! node['ceph']['config']['rgw'].nil?) -%>
<% node['ceph']['config']['rgw'].each do |k, v| %>
<%= k %> = <%= v %>
<% end %>
<% end -%>
<% end -%>
<% node['ceph']['config-sections'].each do |name, sect| %>
[<%= name %>]
<% sect.each do |k, v| %>