From d38e1a399cb0793690781d95f688ce7061f9072d Mon Sep 17 00:00:00 2001 From: Michael Polenchuk Date: Wed, 15 Mar 2017 16:55:55 +0400 Subject: [PATCH] [ceph] Employ radosgw built-in frontend As of firefly (v0.80), ceph object gateway is running on civetweb (embedded into the ceph-radosgw daemon) instead of apache and fastcgi. Using civetweb simplifies the ceph object gateway installation and configuration. Change-Id: Idba61e094390e3c75a6e5d9b35a8e8e47a2a696f Closes-Bug: #1671808 --- deployment/puppet/openstack/manifests/ha/radosgw.pp | 2 +- .../spec/classes/openstack_ha_radosgw_spec.rb | 4 ++-- .../puppet/osnailyfacter/manifests/ceph/radosgw.pp | 12 ++---------- .../osnailyfacter/manifests/firewall/firewall.pp | 2 +- tests/noop/spec/hosts/ceph/radosgw_spec.rb | 3 ++- tests/noop/spec/hosts/firewall/firewall_spec.rb | 2 +- .../openstack-haproxy-radosgw_spec.rb | 4 ++-- 7 files changed, 11 insertions(+), 18 deletions(-) diff --git a/deployment/puppet/openstack/manifests/ha/radosgw.pp b/deployment/puppet/openstack/manifests/ha/radosgw.pp index 607975e2ac..82bb89aad7 100644 --- a/deployment/puppet/openstack/manifests/ha/radosgw.pp +++ b/deployment/puppet/openstack/manifests/ha/radosgw.pp @@ -43,7 +43,7 @@ class openstack::ha::radosgw ( internal_virtual_ip => $internal_virtual_ip, ipaddresses => $ipaddresses, listen_port => 8080, - balancermember_port => 6780, + balancermember_port => 7480, public_virtual_ip => $public_virtual_ip, server_names => $server_names, haproxy_config_options => { diff --git a/deployment/puppet/openstack/spec/classes/openstack_ha_radosgw_spec.rb b/deployment/puppet/openstack/spec/classes/openstack_ha_radosgw_spec.rb index 5894b30a67..23d3e10bbe 100644 --- a/deployment/puppet/openstack/spec/classes/openstack_ha_radosgw_spec.rb +++ b/deployment/puppet/openstack/spec/classes/openstack_ha_radosgw_spec.rb @@ -33,7 +33,7 @@ require 'spec_helper' should contain_openstack__ha__haproxy_service('object-storage').with( 'order' => '130', 'listen_port' => 8080, - 'balancermember_port' => 6780, + 'balancermember_port' => 7480, 'public' => true, 'public_ssl' => true, 'public_ssl_path' => '/var/lib/fuel/haproxy/public_radosgw.pem', @@ -45,7 +45,7 @@ require 'spec_helper' should contain_openstack__ha__haproxy_service('object-storage-baremetal').with( 'order' => '135', 'listen_port' => 8080, - 'balancermember_port' => 6780, + 'balancermember_port' => 7480, 'public_virtual_ip' => false, 'internal_virtual_ip' => '192.168.0.2', 'haproxy_config_options' => haproxy_config_opts, diff --git a/deployment/puppet/osnailyfacter/manifests/ceph/radosgw.pp b/deployment/puppet/osnailyfacter/manifests/ceph/radosgw.pp index 192c4646bb..40e1a22fda 100644 --- a/deployment/puppet/osnailyfacter/manifests/ceph/radosgw.pp +++ b/deployment/puppet/osnailyfacter/manifests/ceph/radosgw.pp @@ -55,7 +55,6 @@ class osnailyfacter::ceph::radosgw { fsid => $fsid, } - include ::tweaks::apache_wrappers include ::ceph::params ####################################### @@ -70,7 +69,8 @@ class osnailyfacter::ceph::radosgw { ####################################### ceph::rgw { $gateway_name: - frontend_type => 'apache-proxy-fcgi', + frontend_type => 'civetweb', + rgw_frontends => 'civetweb port=7480', rgw_print_continue => true, keyring_path => "/etc/ceph/client.${gateway_name}", rgw_data => "/var/lib/ceph/radosgw-${gateway_name}", @@ -91,14 +91,6 @@ class osnailyfacter::ceph::radosgw { ensure => directory, } - ceph::rgw::apache_proxy_fcgi { $gateway_name: - docroot => '/var/www/radosgw', - rgw_port => '6780', - apache_purge_configs => false, - apache_purge_vhost => false, - custom_apache_ports => hiera_array('apache_ports', ['0.0.0.0:80']), - } - if ! $use_syslog { ceph_config { "client.${gateway_name}/log_file": value => $rgw_log_file; diff --git a/deployment/puppet/osnailyfacter/manifests/firewall/firewall.pp b/deployment/puppet/osnailyfacter/manifests/firewall/firewall.pp index 4738ac34c6..cc1a5e9113 100644 --- a/deployment/puppet/osnailyfacter/manifests/firewall/firewall.pp +++ b/deployment/puppet/osnailyfacter/manifests/firewall/firewall.pp @@ -65,7 +65,7 @@ class osnailyfacter::firewall::firewall { $vxlan_udp_port = 4789 $ceph_mon_port = 6789 $ceph_osd_port = '6800-7100' - $radosgw_port = 6780 + $radosgw_port = 7480 $corosync_networks = get_routable_networks_for_network_role($network_scheme, 'mgmt/corosync') $memcache_networks = get_routable_networks_for_network_role($network_scheme, 'mgmt/memcache') diff --git a/tests/noop/spec/hosts/ceph/radosgw_spec.rb b/tests/noop/spec/hosts/ceph/radosgw_spec.rb index f427e7fe4d..854d04bc05 100644 --- a/tests/noop/spec/hosts/ceph/radosgw_spec.rb +++ b/tests/noop/spec/hosts/ceph/radosgw_spec.rb @@ -75,7 +75,8 @@ describe manifest do it 'should contain ceph::rgw' do should contain_ceph__rgw(gateway_name).with( - 'frontend_type' => 'apache-proxy-fcgi', + 'frontend_type' => 'civetweb', + 'rgw_frontends' => 'civetweb port=7480', ) end diff --git a/tests/noop/spec/hosts/firewall/firewall_spec.rb b/tests/noop/spec/hosts/firewall/firewall_spec.rb index 5dd4c0bb73..541423d6aa 100644 --- a/tests/noop/spec/hosts/firewall/firewall_spec.rb +++ b/tests/noop/spec/hosts/firewall/firewall_spec.rb @@ -304,7 +304,7 @@ describe manifest do it 'should configure firewall' do should contain_firewall('012 RadosGW allow').with( 'chain' => 'INPUT', - 'dport' => [ '6780', '8080' ], + 'dport' => [ '7480', '8080' ], 'proto' => 'tcp', 'action' => 'accept', ) diff --git a/tests/noop/spec/hosts/openstack-haproxy/openstack-haproxy-radosgw_spec.rb b/tests/noop/spec/hosts/openstack-haproxy/openstack-haproxy-radosgw_spec.rb index b12dc5f7e2..80ff2069e4 100644 --- a/tests/noop/spec/hosts/openstack-haproxy/openstack-haproxy-radosgw_spec.rb +++ b/tests/noop/spec/hosts/openstack-haproxy/openstack-haproxy-radosgw_spec.rb @@ -46,7 +46,7 @@ describe manifest do 'ipaddresses' => ipaddresses, 'server_names' => server_names, 'listen_port' => 8080, - 'balancermember_port' => 6780, + 'balancermember_port' => 7480, 'public' => true, 'public_ssl' => public_ssl_radosgw, 'require_service' => 'radosgw-api', @@ -63,7 +63,7 @@ describe manifest do 'ipaddresses' => ipaddresses, 'server_names' => server_names, 'listen_port' => 8080, - 'balancermember_port' => 6780, + 'balancermember_port' => 7480, 'public_virtual_ip' => false, 'internal_virtual_ip' => baremetal_virtual_ip, 'haproxy_config_options' => {