include_recipe 'ceph::radosgw_install'
include_recipe 'ceph::conf'
+directory '/var/log/radosgw' do
+ owner node['apache']['user']
+ group node['apache']['group']
+ mode '0755'
+ action :create
+end
+
+file '/var/log/radosgw/radosgw.log' do
+ owner node['apache']['user']
+ group node['apache']['group']
+end
+
+directory '/var/run/ceph-radosgw' do
+ owner node['apache']['user']
+ group node['apache']['group']
+ mode '0755'
+ action :create
+end
+
if !::File.exist?("/var/lib/ceph/radosgw/ceph-radosgw.#{node['hostname']}/done")
if node['ceph']['radosgw']['webserver_companion']
include_recipe "ceph::radosgw_#{node['ceph']['radosgw']['webserver_companion']}"
ceph_client 'radosgw' do
caps('mon' => 'allow rw', 'osd' => 'allow rwx')
+ owner 'root'
+ group node['apache']['group']
+ mode 0640
end
directory "/var/lib/ceph/radosgw/ceph-radosgw.#{node['hostname']}" do
end
supports :restart => true
action [:enable, :start]
+ subscribes :restart, 'template[/etc/ceph/ceph.conf]'
end
else
Log.info('Rados Gateway already deployed')
<% if (@is_rgw) -%>
[client.radosgw.<%= node['hostname'] %>]
host = <%= node['hostname'] %>
- rgw socket path = /var/run/ceph/radosgw.<%= node['hostname'] %>
+ rgw socket path = /var/run/ceph-radosgw/radosgw.<%= node['hostname'] %>
+ admin socket = /var/run/ceph-radosgw/ceph-client.radosgw.<%= node['hostname'] %>.asok
+ pid file = /var/run/ceph-radosgw/$name.pid
keyring = /etc/ceph/ceph.client.radosgw.<%= node['hostname'] %>.keyring
- log file = /var/log/ceph/radosgw.log
+ log file = /var/log/radosgw/radosgw.log
<% if (! node['ceph']['config']['rgw'].nil?) -%>
<% node['ceph']['config']['rgw'].sort.each do |k, v| %>
<%= k %> = <%= v %>
<% if node['ceph']['radosgw']['rgw_port'] -%>
FastCgiExternalServer <%= node['ceph']['radosgw']['path'] %>/s3gw.fcgi -host 127.0.0.1:<%= node['ceph']['radosgw']['rgw_port'] %>
<% else -%>
-FastCgiExternalServer <%= node['ceph']['radosgw']['path'] %>/s3gw.fcgi -socket /var/run/ceph/radosgw.<%= node['hostname'] %>
+FastCgiExternalServer <%= node['ceph']['radosgw']['path'] %>/s3gw.fcgi -socket /var/run/ceph-radosgw/radosgw.<%= node['hostname'] %>
<% end -%>
LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" \"%{Host}i\"" proxy_combined