diff --git a/manifests/rgw/apache.pp b/manifests/rgw/apache.pp deleted file mode 100644 index d17e51ec..00000000 --- a/manifests/rgw/apache.pp +++ /dev/null @@ -1,76 +0,0 @@ -# -# Copyright (C) 2014 Catalyst IT Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Author: Ricardo Rocha -# -# Configures a ceph radosgw apache frontend. -# -## == Define: ceph::rgw::apache -# -# The RGW id. An alphanumeric string uniquely identifying the RGW. -# ( example: radosgw.gateway ) -# -### == Parameters -# -# [*admin_email*] Admin email for the radosgw reports. -# Optional. Default is 'root@localhost'. -# -# [*docroot*] Location of the apache docroot. -# Optional. Default is '/var/www'. -# -# [*fcgi_file*] Path to the fcgi file. -# Optional. Default is '/var/www/s3gw.cgi'. -# -# [*rgw_port*] Port the rados gateway listens. -# Optional. Default is 80. -# -# [*rgw_dns_name*] Hostname to use for the service. -# Optional. Default is $fqdn. -# -# [*rgw_socket_path*] Path to socket file. -# Optional. Default is '/tmp/radosgw.sock'. -# -# [*syslog*] Whether or not to log to syslog. -# Optional. Default is true. -# -# [*ceph_apache_repo*] Whether to require the CEPH apache repo (ceph::repo::fastcgi). -# Optional. Default is true. Check: -# http://ceph.com/docs/master/install/install-ceph-gateway/ -# for more info on repository recommendations. -# -define ceph::rgw::apache ( - $admin_email = 'root@localhost', - $docroot = '/var/www', - $fcgi_file = '/var/www/s3gw.fcgi', - $rgw_dns_name = $::fqdn, - $rgw_port = 80, - $rgw_socket_path = $::ceph::params::rgw_socket_path, - $syslog = true, - $ceph_apache_repo = true, -) { - - warning ('Class rgw::apache is deprecated in favor of rgw::apache_fastcgi') - - ceph::rgw::apache_fastcgi { $name: - admin_email => $admin_email, - docroot => $docroot, - fcgi_file => $fcgi_file, - rgw_dns_name => $rgw_dns_name, - rgw_port => $rgw_port, - rgw_socket_path => $rgw_socket_path, - syslog => $syslog, - ceph_apache_repo => $ceph_apache_repo, - } -} diff --git a/releasenotes/notes/remove-ceph-rgw-apache-a2e1181ec92dab53.yaml b/releasenotes/notes/remove-ceph-rgw-apache-a2e1181ec92dab53.yaml new file mode 100644 index 00000000..e944ca6d --- /dev/null +++ b/releasenotes/notes/remove-ceph-rgw-apache-a2e1181ec92dab53.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Removed ceph::rgw::apache because the fastcgi support has been completely + broken for el7 and this class was deprecated in Hammer. diff --git a/spec/defines/ceph_rgw_apache_fastcgi_spec.rb b/spec/defines/ceph_rgw_apache_fastcgi_spec.rb index 44a13436..57bbf78c 100644 --- a/spec/defines/ceph_rgw_apache_fastcgi_spec.rb +++ b/spec/defines/ceph_rgw_apache_fastcgi_spec.rb @@ -138,113 +138,4 @@ exec /usr/bin/radosgw -c /etc/ceph/ceph.conf -n radosgw.gateway", end end - describe 'RedHat Family' do - - let :facts do - { - :concat_basedir => '/var/lib/puppet/concat', - :fqdn => 'myhost.domain', - :hostname => 'myhost', - :osfamily => 'RedHat', - :operatingsystem => 'RedHat', - :operatingsystemrelease => '7.2', - :operatingsystemmajrelease => '7', - :pkg_fastcgi => 'libapache2-mod-fastcgi', - } - end - - describe 'activated with default params' do - - let :title do - 'radosgw.gateway' - end - - it { is_expected.to contain_apache__vhost('myhost.domain-radosgw').with( { - 'servername' => 'myhost.domain', - 'serveradmin' => 'root@localhost', - 'port' => 80, - 'docroot' => '/var/www', - 'rewrite_rule' => '^/([a-zA-Z0-9-_.]*)([/]?.*) /s3gw.fcgi?page=$1¶ms=$2&%{QUERY_STRING} [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]', - 'access_log' => true, - 'error_log' => true, - 'fastcgi_server' => '/var/www/s3gw.fcgi', - 'fastcgi_socket' => '/tmp/radosgw.sock', - 'fastcgi_dir' => '/var/www', - })} - - it { is_expected.to contain_class('apache').with( - 'default_mods' => false, - 'default_vhost' => false, - 'purge_configs' => true, - 'purge_vhost_dir' => true, - )} - it { is_expected.to contain_class('apache::mod::alias') } - it { is_expected.to contain_class('apache::mod::auth_basic') } - it { is_expected.to contain_class('apache::mod::fastcgi') } - it { is_expected.to contain_class('apache::mod::mime') } - it { is_expected.to contain_class('apache::mod::rewrite') } - - it { is_expected.to contain_file('/var/www/s3gw.fcgi').with({ - 'ensure' => 'file', - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0750', - 'content' => "#!/bin/sh -exec /usr/bin/radosgw -c /etc/ceph/ceph.conf -n radosgw.gateway", - })} - - end - - describe "activated with custom params" do - - let :title do - 'myid' - end - - let :params do - { - :rgw_dns_name => 'mydns.hostname', - :rgw_socket_path => '/some/location/radosgw.sock', - :rgw_port => 1111, - :admin_email => 'admin@hostname', - :fcgi_file => '/some/fcgi/filepath', - :syslog => false, - :apache_mods => true, - :apache_vhost => true, - :apache_purge_configs => false, - :apache_purge_vhost => false, - :custom_apache_ports => '8888', - } - end - - it { is_expected.to contain_class('apache').with( - 'default_mods' => true, - 'default_vhost' => true, - 'purge_configs' => false, - 'purge_vhost_dir' => false, - )} - it { is_expected.to contain_apache__listen('8888') } - it { is_expected.to contain_apache__vhost('mydns.hostname-radosgw').with( { - 'servername' => 'mydns.hostname', - 'serveradmin' => 'admin@hostname', - 'port' => 1111, - 'docroot' => '/var/www', - 'rewrite_rule' => '^/([a-zA-Z0-9-_.]*)([/]?.*) /s3gw.fcgi?page=$1¶ms=$2&%{QUERY_STRING} [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]', - 'access_log' => false, - 'error_log' => false, - 'fastcgi_server' => '/some/fcgi/filepath', - 'fastcgi_socket' => '/some/location/radosgw.sock', - 'fastcgi_dir' => '/var/www', - } ) } - - it { is_expected.to contain_class('apache::mod::alias') } - it { is_expected.to contain_class('apache::mod::fastcgi') } - it { is_expected.to contain_class('apache::mod::mime') } - it { is_expected.to contain_class('apache::mod::rewrite') } - - it { is_expected.to contain_file('/some/fcgi/filepath') } - - end - end - end diff --git a/spec/defines/ceph_rgw_apache_spec.rb b/spec/defines/ceph_rgw_apache_spec.rb deleted file mode 100644 index cc9da72d..00000000 --- a/spec/defines/ceph_rgw_apache_spec.rb +++ /dev/null @@ -1,219 +0,0 @@ -# Copyright (C) 2014 Catalyst IT Limited. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# Author: Ricardo Rocha -# Author: David Gurtner -# -require 'spec_helper' - -describe 'ceph::rgw::apache' do - - let :pre_condition do - "include ceph::params - class { 'ceph::repo': - fastcgi => true, - }" - end - - describe 'Debian Family' do - - let :facts do - { - :concat_basedir => '/var/lib/puppet/concat', - :fqdn => 'myhost.domain', - :hostname => 'myhost', - :osfamily => 'Debian', - :operatingsystem => 'Ubuntu', - :operatingsystemrelease => '14.04', - :lsbdistid => 'Ubuntu', - :lsbdistcodename => 'trusty', - :lsbdistrelease => '14.04', - :pkg_fastcgi => 'libapache2-mod-fastcgi', - } - end - - describe 'activated with default params' do - - let :title do - 'radosgw.gateway' - end - - it { is_expected.to contain_apache__vhost('myhost.domain-radosgw').with( { - 'servername' => 'myhost.domain', - 'serveradmin' => 'root@localhost', - 'port' => 80, - 'docroot' => '/var/www', - 'rewrite_rule' => '^/([a-zA-Z0-9-_.]*)([/]?.*) /s3gw.fcgi?page=$1¶ms=$2&%{QUERY_STRING} [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]', - 'access_log' => true, - 'error_log' => true, - 'fastcgi_server' => '/var/www/s3gw.fcgi', - 'fastcgi_socket' => '/tmp/radosgw.sock', - 'fastcgi_dir' => '/var/www', - })} - - it { is_expected.to contain_class('apache') } - it { is_expected.to contain_class('apache::mod::alias') } - it { is_expected.to contain_class('apache::mod::auth_basic') } - it { is_expected.to contain_class('apache::mod::fastcgi') } - it { is_expected.to contain_class('apache::mod::mime') } - it { is_expected.to contain_class('apache::mod::rewrite') } - - it { is_expected.to contain_file('/var/www/s3gw.fcgi').with({ - 'ensure' => 'file', - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0750', - 'content' => "#!/bin/sh -exec /usr/bin/radosgw -c /etc/ceph/ceph.conf -n radosgw.gateway", - })} - - end - - describe "activated with custom params" do - - let :title do - 'myid' - end - - let :params do - { - :rgw_dns_name => 'mydns.hostname', - :rgw_socket_path => '/some/location/radosgw.sock', - :rgw_port => 1111, - :admin_email => 'admin@hostname', - :fcgi_file => '/some/fcgi/filepath', - :syslog => false, - } - end - - it { is_expected.to contain_apache__vhost('mydns.hostname-radosgw').with( { - 'servername' => 'mydns.hostname', - 'serveradmin' => 'admin@hostname', - 'port' => 1111, - 'docroot' => '/var/www', - 'rewrite_rule' => '^/([a-zA-Z0-9-_.]*)([/]?.*) /s3gw.fcgi?page=$1¶ms=$2&%{QUERY_STRING} [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]', - 'access_log' => false, - 'error_log' => false, - 'fastcgi_server' => '/some/fcgi/filepath', - 'fastcgi_socket' => '/some/location/radosgw.sock', - 'fastcgi_dir' => '/var/www', - } ) } - - it { is_expected.to contain_class('apache') } - it { is_expected.to contain_class('apache::mod::alias') } - it { is_expected.to contain_class('apache::mod::auth_basic') } - it { is_expected.to contain_class('apache::mod::fastcgi') } - it { is_expected.to contain_class('apache::mod::mime') } - it { is_expected.to contain_class('apache::mod::rewrite') } - - it { is_expected.to contain_file('/some/fcgi/filepath') } - - end - end - - describe 'RedHat Family' do - - let :facts do - { - :concat_basedir => '/var/lib/puppet/concat', - :fqdn => 'myhost.domain', - :hostname => 'myhost', - :osfamily => 'RedHat', - :operatingsystem => 'RedHat', - :operatingsystemrelease => '7.2', - :operatingsystemmajrelease => '7', - :pkg_fastcgi => 'libapache2-mod-fastcgi', - } - end - - describe 'activated with default params' do - - let :title do - 'radosgw.gateway' - end - - it { is_expected.to contain_apache__vhost('myhost.domain-radosgw').with( { - 'servername' => 'myhost.domain', - 'serveradmin' => 'root@localhost', - 'port' => 80, - 'docroot' => '/var/www', - 'rewrite_rule' => '^/([a-zA-Z0-9-_.]*)([/]?.*) /s3gw.fcgi?page=$1¶ms=$2&%{QUERY_STRING} [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]', - 'access_log' => true, - 'error_log' => true, - 'fastcgi_server' => '/var/www/s3gw.fcgi', - 'fastcgi_socket' => '/tmp/radosgw.sock', - 'fastcgi_dir' => '/var/www', - })} - - it { is_expected.to contain_class('apache') } - it { is_expected.to contain_class('apache::mod::alias') } - it { is_expected.to contain_class('apache::mod::auth_basic') } - it { is_expected.to contain_class('apache::mod::fastcgi') } - it { is_expected.to contain_class('apache::mod::mime') } - it { is_expected.to contain_class('apache::mod::rewrite') } - - it { is_expected.to contain_file('/var/www/s3gw.fcgi').with({ - 'ensure' => 'file', - 'owner' => 'root', - 'group' => 'root', - 'mode' => '0750', - 'content' => "#!/bin/sh -exec /usr/bin/radosgw -c /etc/ceph/ceph.conf -n radosgw.gateway", - })} - - end - - describe "activated with custom params" do - - let :title do - 'myid' - end - - let :params do - { - :rgw_dns_name => 'mydns.hostname', - :rgw_socket_path => '/some/location/radosgw.sock', - :rgw_port => 1111, - :admin_email => 'admin@hostname', - :fcgi_file => '/some/fcgi/filepath', - :syslog => false, - } - end - - it { is_expected.to contain_apache__vhost('mydns.hostname-radosgw').with( { - 'servername' => 'mydns.hostname', - 'serveradmin' => 'admin@hostname', - 'port' => 1111, - 'docroot' => '/var/www', - 'rewrite_rule' => '^/([a-zA-Z0-9-_.]*)([/]?.*) /s3gw.fcgi?page=$1¶ms=$2&%{QUERY_STRING} [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]', - 'access_log' => false, - 'error_log' => false, - 'fastcgi_server' => '/some/fcgi/filepath', - 'fastcgi_socket' => '/some/location/radosgw.sock', - 'fastcgi_dir' => '/var/www', - } ) } - - it { is_expected.to contain_class('apache') } - it { is_expected.to contain_class('apache::mod::alias') } - it { is_expected.to contain_class('apache::mod::auth_basic') } - it { is_expected.to contain_class('apache::mod::fastcgi') } - it { is_expected.to contain_class('apache::mod::mime') } - it { is_expected.to contain_class('apache::mod::rewrite') } - - it { is_expected.to contain_file('/some/fcgi/filepath') } - - end - end - -end diff --git a/spec/defines/ceph_rgw_keystone_spec.rb b/spec/defines/ceph_rgw_keystone_spec.rb index a6f8c0a1..8740621b 100644 --- a/spec/defines/ceph_rgw_keystone_spec.rb +++ b/spec/defines/ceph_rgw_keystone_spec.rb @@ -203,10 +203,9 @@ wget --no-check-certificate http://keystone.custom:5000/v2.0/certificates/signin " include ceph::params class { 'ceph': fsid => 'd5252e7d-75bc-4083-85ed-fe51fa83f62b' } - class { 'ceph::repo': fastcgi => true, } include ceph ceph::rgw { 'radosgw.gateway': } - ceph::rgw::apache_fastcgi { 'radosgw.gateway': } + ceph::rgw::apache_proxy_fcgi { 'radosgw.gateway': } " end @@ -254,9 +253,8 @@ wget --no-check-certificate http://keystone.default:5000/v2.0/certificates/signi " include ceph::params class { 'ceph': fsid => 'd5252e7d-75bc-4083-85ed-fe51fa83f62b' } - class { 'ceph::repo': fastcgi => true, } ceph::rgw { 'radosgw.custom': } - ceph::rgw::apache_fastcgi { 'radosgw.custom': } + ceph::rgw::apache_proxy_fcgi { 'radosgw.gateway': } " end @@ -310,10 +308,9 @@ wget --no-check-certificate http://keystone.custom:5000/v2.0/certificates/signin " include ceph::params class { 'ceph': fsid => 'd5252e7d-75bc-4083-85ed-fe51fa83f62b' } - class { 'ceph::repo': fastcgi => true, } include ceph ceph::rgw { 'radosgw.gateway': } - ceph::rgw::apache_fastcgi { 'radosgw.gateway': } + ceph::rgw::apache_proxy_fcgi { 'radosgw.gateway': } " end