rgw: support more Swift-related options
This change improves the support coverage of radosgw options, which are related to Swift API. Change-Id: I1d544ebcbd77b44c1772d842e021a07e243997d6
This commit is contained in:
parent
a41c255ab0
commit
dbee5bacf3
@ -68,6 +68,22 @@
|
||||
# [*rgw_swift_url*] The URL for the Ceph Object Gateway Swift API.
|
||||
# Optional. Default is http://$fqdn:7480.
|
||||
#
|
||||
# [*rgw_swift_url_prefix*] The URL prefix for the Swift API.
|
||||
# Optional. Default is 'swift'.
|
||||
#
|
||||
# [*rgw_swift_account_in_url*] Whether or not the Swift account name should
|
||||
# be included in the Swift API URL.
|
||||
# Optional. Default is false.
|
||||
#
|
||||
# [*rgw_swift_versioning_enabled*] Enables the Object Versioning of OpenStack
|
||||
# Object Storage API
|
||||
# Optional. Default is false.
|
||||
#
|
||||
# [*rgw_trust_forwarded_https*] Trust the Forwarded and X-Forwarded-Proto
|
||||
# headers sent by the proxy when determining whether the connection is
|
||||
# secure.
|
||||
# Optional. Default is false
|
||||
#
|
||||
# Deprecated Parameters:
|
||||
#
|
||||
# [*syslog*] Whether or not to log to syslog.
|
||||
@ -88,6 +104,10 @@ define ceph::rgw (
|
||||
$frontend_type = 'civetweb',
|
||||
$rgw_frontends = undef,
|
||||
$rgw_swift_url = "http://${::fqdn}:7480",
|
||||
$rgw_swift_url_prefix = 'swift',
|
||||
$rgw_swift_account_in_url = false,
|
||||
$rgw_swift_versioning_enabled = false,
|
||||
$rgw_trust_forwarded_https = false,
|
||||
$syslog = undef,
|
||||
) {
|
||||
|
||||
@ -109,6 +129,10 @@ define ceph::rgw (
|
||||
"client.${name}/user": value => $user;
|
||||
"client.${name}/rgw_dns_name": value => $rgw_dns_name;
|
||||
"client.${name}/rgw_swift_url": value => $rgw_swift_url;
|
||||
"client.${name}/rgw_swift_account_in_url": value => $rgw_swift_account_in_url;
|
||||
"client.${name}/rgw_swift_url_prefix": value => $rgw_swift_url_prefix;
|
||||
"client.${name}/rgw_swift_versioning_enabled": value => $rgw_swift_versioning_enabled;
|
||||
"client.${name}/rgw_trust_forwarded_https": value => $rgw_trust_forwarded_https;
|
||||
}
|
||||
|
||||
case $frontend_type {
|
||||
|
9
releasenotes/notes/rgw-swift-opts-471757ed33cd8853.yaml
Normal file
9
releasenotes/notes/rgw-swift-opts-471757ed33cd8853.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The ``ceph::rgw`` class now supports the following new parameters.
|
||||
|
||||
- ``rgw_swift_url_prefix``
|
||||
- ``rgw_swift_account_in_url``
|
||||
- ``rgw_swift_versioning_enabled``
|
||||
- ``rgw_trust_forwarded_https``
|
@ -40,6 +40,10 @@ describe 'ceph::rgw' do
|
||||
it { should contain_ceph_config('client.radosgw.gateway/log_file').with_value('/var/log/ceph/radosgw.log') }
|
||||
it { should contain_ceph_config('client.radosgw.gateway/rgw_dns_name').with_value('myhost.domain') }
|
||||
it { should contain_ceph_config('client.radosgw.gateway/rgw_swift_url').with_value('http://myhost.domain:7480') }
|
||||
it { should contain_ceph_config('client.radosgw.gateway/rgw_swift_url_prefix').with_value('swift') }
|
||||
it { should contain_ceph_config('client.radosgw.gateway/rgw_swift_account_in_url').with_value(false) }
|
||||
it { should contain_ceph_config('client.radosgw.gateway/rgw_swift_versioning_enabled').with_value(false) }
|
||||
it { should contain_ceph_config('client.radosgw.gateway/rgw_trust_forwarded_https').with_value(false) }
|
||||
|
||||
it { should contain_file('/var/lib/ceph/radosgw').with(
|
||||
:ensure => 'directory',
|
||||
@ -73,7 +77,11 @@ describe 'ceph::rgw' do
|
||||
:keyring_path => '/etc/ceph/ceph.radosgw.custom.keyring',
|
||||
:log_file => '/var/log/ceph/mylogfile.log',
|
||||
:rgw_dns_name => 'mydns.hostname',
|
||||
:rgw_swift_url => 'https://mydns.hostname:443'
|
||||
:rgw_swift_url => 'https://mydns.hostname:443',
|
||||
:rgw_swift_url_prefix => '/',
|
||||
:rgw_swift_account_in_url => true,
|
||||
:rgw_swift_versioning_enabled => true,
|
||||
:rgw_trust_forwarded_https => true,
|
||||
}
|
||||
end
|
||||
|
||||
@ -85,6 +93,10 @@ describe 'ceph::rgw' do
|
||||
it { should contain_ceph_config('client.radosgw.custom/user').with_value('wwwuser') }
|
||||
it { should contain_ceph_config('client.radosgw.custom/rgw_dns_name').with_value('mydns.hostname') }
|
||||
it { should contain_ceph_config('client.radosgw.custom/rgw_swift_url').with_value('https://mydns.hostname:443') }
|
||||
it { should contain_ceph_config('client.radosgw.custom/rgw_swift_url_prefix').with_value('/') }
|
||||
it { should contain_ceph_config('client.radosgw.custom/rgw_swift_account_in_url').with_value(true) }
|
||||
it { should contain_ceph_config('client.radosgw.custom/rgw_swift_versioning_enabled').with_value(true) }
|
||||
it { should contain_ceph_config('client.radosgw.custom/rgw_trust_forwarded_https').with_value(true) }
|
||||
|
||||
it { should contain_file('/var/lib/ceph/radosgw/ceph-radosgw.custom').with(
|
||||
:ensure => 'directory',
|
||||
@ -116,6 +128,12 @@ describe 'ceph::rgw' do
|
||||
it { should contain_ceph_config('client.radosgw.gateway/host').with_value('myhost') }
|
||||
it { should contain_ceph_config('client.radosgw.gateway/keyring').with_value('/etc/ceph/ceph.client.radosgw.gateway.keyring') }
|
||||
it { should contain_ceph_config('client.radosgw.gateway/log_file').with_value('/var/log/ceph/radosgw.log') }
|
||||
it { should contain_ceph_config('client.radosgw.gateway/rgw_dns_name').with_value('myhost.domain') }
|
||||
it { should contain_ceph_config('client.radosgw.gateway/rgw_swift_url').with_value('http://myhost.domain:7480') }
|
||||
it { should contain_ceph_config('client.radosgw.gateway/rgw_swift_url_prefix').with_value('swift') }
|
||||
it { should contain_ceph_config('client.radosgw.gateway/rgw_swift_account_in_url').with_value(false) }
|
||||
it { should contain_ceph_config('client.radosgw.gateway/rgw_swift_versioning_enabled').with_value(false) }
|
||||
it { should contain_ceph_config('client.radosgw.gateway/rgw_trust_forwarded_https').with_value(false) }
|
||||
|
||||
it { should contain_file('/var/lib/ceph/radosgw').with(
|
||||
:ensure => 'directory',
|
||||
@ -148,6 +166,12 @@ describe 'ceph::rgw' do
|
||||
:user => 'wwwuser',
|
||||
:keyring_path => "/etc/ceph/ceph.radosgw.custom.keyring",
|
||||
:log_file => '/var/log/ceph/mylogfile.log',
|
||||
:rgw_dns_name => 'mydns.hostname',
|
||||
:rgw_swift_url => 'https://mydns.hostname:443',
|
||||
:rgw_swift_url_prefix => '/',
|
||||
:rgw_swift_account_in_url => true,
|
||||
:rgw_swift_versioning_enabled => true,
|
||||
:rgw_trust_forwarded_https => true,
|
||||
}
|
||||
end
|
||||
|
||||
@ -157,6 +181,12 @@ describe 'ceph::rgw' do
|
||||
it { should contain_ceph_config('client.radosgw.custom/keyring').with_value('/etc/ceph/ceph.radosgw.custom.keyring') }
|
||||
it { should contain_ceph_config('client.radosgw.custom/log_file').with_value('/var/log/ceph/mylogfile.log') }
|
||||
it { should contain_ceph_config('client.radosgw.custom/user').with_value('wwwuser') }
|
||||
it { should contain_ceph_config('client.radosgw.custom/rgw_dns_name').with_value('mydns.hostname') }
|
||||
it { should contain_ceph_config('client.radosgw.custom/rgw_swift_url').with_value('https://mydns.hostname:443') }
|
||||
it { should contain_ceph_config('client.radosgw.custom/rgw_swift_url_prefix').with_value('/') }
|
||||
it { should contain_ceph_config('client.radosgw.custom/rgw_swift_account_in_url').with_value(true) }
|
||||
it { should contain_ceph_config('client.radosgw.custom/rgw_swift_versioning_enabled').with_value(true) }
|
||||
it { should contain_ceph_config('client.radosgw.custom/rgw_trust_forwarded_https').with_value(true) }
|
||||
|
||||
it { should contain_file('/var/lib/ceph/radosgw/ceph-radosgw.custom').with(
|
||||
:ensure => 'directory',
|
||||
|
Loading…
Reference in New Issue
Block a user