From: Ács Sándor Date: Fri, 31 Jul 2015 20:36:04 +0000 (+0200) Subject: Support civetweb rgw frontend X-Git-Tag: v0.8.1~2^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=37280175bf7ace441ba8734d131d45dad4088ea0;p=ceph-cookbooks.git Support civetweb rgw frontend --- diff --git a/README.md b/README.md index 493ea9c..19f473b 100644 --- a/README.md +++ b/README.md @@ -126,7 +126,7 @@ Ceph Rados Gateway nodes should use the ceph-radosgw role * `node['ceph']['radosgw']['admin_email']` - the admin email address to configure in the web server * `node['ceph']['radosgw']['rgw_addr']` - the web server's bind address, such as *:80 * `node['ceph']['radosgw']['rgw_port']` - if set, connects to the radosgw fastcgi over this port instead of a unix socket -* `node['ceph']['radosgw']['webserver_companion']` - defaults to 'apache2', but can be set to false to not configure anything +* `node['ceph']['radosgw']['webserver_companion']` - defaults to 'apache2', but it can be set to 'civetweb', or to false in order to leave it unconfigured * `node['ceph']['radosgw']['path']` - where to save the s3gw.fcgi file * `node['ceph']['config']['global']['rgw dns name']` - the main domain of the radosgw daemon, to calculate the bucket name from a subdomain diff --git a/attributes/radosgw.rb b/attributes/radosgw.rb index 11e39c2..246f744 100644 --- a/attributes/radosgw.rb +++ b/attributes/radosgw.rb @@ -23,7 +23,7 @@ default['ceph']['radosgw']['api_fqdn'] = 'localhost' default['ceph']['radosgw']['admin_email'] = 'admin@example.com' default['ceph']['radosgw']['rgw_addr'] = '*:80' default['ceph']['radosgw']['rgw_port'] = false -default['ceph']['radosgw']['webserver_companion'] = 'apache2' # can be false +default['ceph']['radosgw']['webserver_companion'] = 'apache2' # can be civetweb or false default['ceph']['radosgw']['use_apache_fork'] = true default['ceph']['radosgw']['init_style'] = node['ceph']['init_style'] diff --git a/recipes/radosgw_civetweb.rb b/recipes/radosgw_civetweb.rb new file mode 100644 index 0000000..ac8d4d1 --- /dev/null +++ b/recipes/radosgw_civetweb.rb @@ -0,0 +1 @@ +# Civetweb has no dependencies. It is included since the Firefly release. diff --git a/templates/default/ceph.conf.erb b/templates/default/ceph.conf.erb index d17fe32..c58d879 100644 --- a/templates/default/ceph.conf.erb +++ b/templates/default/ceph.conf.erb @@ -35,6 +35,13 @@ <% if (@is_rgw) -%> [client.radosgw.<%= node['hostname'] %>] +<% if node['ceph']['radosgw']['webserver_companion'] == 'civetweb' -%> + <% if node['ceph']['radosgw']['rgw_port'] == false %> + rgw frontends = "civetweb port=80" +<% else -%> + rgw frontends = "civetweb port=<%=node['ceph']['radosgw']['rgw_port']%>" +<% end -%> +<% end -%> host = <%= node['hostname'] %> rgw socket path = /var/run/ceph-radosgw/radosgw.<%= node['hostname'] %> admin socket = /var/run/ceph-radosgw/ceph-client.radosgw.<%= node['hostname'] %>.asok