Update ceph.conf template for RGW
Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
This commit is contained in:
parent
866fed0864
commit
3dca84b734
@ -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
|
||||
|
@ -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| %>
|
||||
|
Loading…
x
Reference in New Issue
Block a user