]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cookbooks.git/commitdiff
Update ceph.conf template for RGW
authorAlexandre Marangone <alexandre.marangone@inktank.com>
Mon, 22 Apr 2013 18:40:10 +0000 (11:40 -0700)
committerAlexandre Marangone <alexandre.marangone@inktank.com>
Mon, 22 Apr 2013 18:40:10 +0000 (11:40 -0700)
Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
recipes/conf.rb
templates/default/ceph.conf.erb

index 582ab5bf07e40373597311c9d510bfc2bf5cf9c3..648061179d40cc1d4027d11b113c31cfde1ee043 100644 (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
index 5422ea3369c453efc84c2cbd578ef88970560aaa..cf63ce3d05dc9093636a35bfb4d409b01294700f 100644 (file)
   <%   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| %>