CentOS: Use consistent host parameters instead of hard-codes
This change replaces hard-coded host address by the one from the base config class, to make sure we use the consistent value. Change-Id: I6092105916e3c49ad0e0a45156b43cce99cbe3ce
This commit is contained in:
@@ -29,11 +29,14 @@ describe 'basic swift' do
|
|||||||
package_ensure => latest,
|
package_ensure => latest,
|
||||||
}
|
}
|
||||||
class { 'swift::keystone::auth':
|
class { 'swift::keystone::auth':
|
||||||
password => 'a_big_secret',
|
public_url => "http://${::openstack_integration::config::ip_for_url}:8080/v1/AUTH_%(tenant_id)s",
|
||||||
|
admin_url => "http://${::openstack_integration::config::ip_for_url}:8080",
|
||||||
|
internal_url => "http://${::openstack_integration::config::ip_for_url}:8080/v1/AUTH_%(tenant_id)s",
|
||||||
|
password => 'a_big_secret',
|
||||||
}
|
}
|
||||||
# === Configure Storage
|
# === Configure Storage
|
||||||
class { 'swift::storage':
|
class { 'swift::storage':
|
||||||
storage_local_net_ip => '127.0.0.1',
|
storage_local_net_ip => $::openstack_integration::config::host,
|
||||||
}
|
}
|
||||||
# create xfs partitions on a loopback device and mounts them
|
# create xfs partitions on a loopback device and mounts them
|
||||||
swift::storage::loopback { ['2','3','4']:
|
swift::storage::loopback { ['2','3','4']:
|
||||||
@@ -60,40 +63,40 @@ describe 'basic swift' do
|
|||||||
mnt_base_dir => '/srv/node',
|
mnt_base_dir => '/srv/node',
|
||||||
weight => 1,
|
weight => 1,
|
||||||
zone => '2',
|
zone => '2',
|
||||||
storage_local_net_ip => '127.0.0.1',
|
storage_local_net_ip => $::openstack_integration::config::host,
|
||||||
policy_index => 0,
|
policy_index => 0,
|
||||||
require => Swift::Storage::Loopback['2','3','4'] ,
|
require => Swift::Storage::Loopback['2','3','4'] ,
|
||||||
}
|
}
|
||||||
# ring_object_devices for a storage policy start with the policy id.
|
# ring_object_devices for a storage policy start with the policy id.
|
||||||
# Create 3 ring_object_device starting with "1:" to be
|
# Create 3 ring_object_device starting with "1:" to be
|
||||||
# added to an object-1 ring for storage policy 1.
|
# added to an object-1 ring for storage policy 1.
|
||||||
ring_object_device { "1:127.0.0.1:6000/2":
|
ring_object_device { "1:${::openstack_integration::config::ip_for_url}:6000/2":
|
||||||
zone => 2,
|
zone => 2,
|
||||||
weight => 1,
|
weight => 1,
|
||||||
require => Swift::Storage::Loopback['2'],
|
require => Swift::Storage::Loopback['2'],
|
||||||
}
|
}
|
||||||
ring_object_device { "1:127.0.0.1:6000/3":
|
ring_object_device { "1:${::openstack_integration::config::ip_for_url}:6000/3":
|
||||||
zone => 2,
|
zone => 2,
|
||||||
weight => 1,
|
weight => 1,
|
||||||
require => Swift::Storage::Loopback['3'] ,
|
require => Swift::Storage::Loopback['3'] ,
|
||||||
}
|
}
|
||||||
ring_object_device { "1:127.0.0.1:6000/4":
|
ring_object_device { "1:${::openstack_integration::config::ip_for_url}:6000/4":
|
||||||
zone => 2,
|
zone => 2,
|
||||||
weight => 1,
|
weight => 1,
|
||||||
require => Swift::Storage::Loopback['4'] ,
|
require => Swift::Storage::Loopback['4'] ,
|
||||||
}
|
}
|
||||||
class { 'swift::ringbuilder':
|
class { 'swift::ringbuilder':
|
||||||
part_power => '18',
|
part_power => 18,
|
||||||
replicas => '1',
|
replicas => 1,
|
||||||
min_part_hours => 1,
|
min_part_hours => 1,
|
||||||
}
|
}
|
||||||
swift::ringbuilder::policy_ring { '1':
|
swift::ringbuilder::policy_ring { '1':
|
||||||
part_power => '18',
|
part_power => 18,
|
||||||
replicas => '3',
|
replicas => 3,
|
||||||
min_part_hours => 1,
|
min_part_hours => 1,
|
||||||
}
|
}
|
||||||
class { 'swift::proxy':
|
class { 'swift::proxy':
|
||||||
proxy_local_net_ip => '127.0.0.1',
|
proxy_local_net_ip => $::openstack_integration::config::host,
|
||||||
pipeline => [
|
pipeline => [
|
||||||
'catch_errors', 'gatekeeper', 'healthcheck', 'proxy-logging',
|
'catch_errors', 'gatekeeper', 'healthcheck', 'proxy-logging',
|
||||||
'cache', 'authtoken', 'keystone', 'symlink', 'proxy-logging',
|
'cache', 'authtoken', 'keystone', 'symlink', 'proxy-logging',
|
||||||
@@ -102,19 +105,23 @@ describe 'basic swift' do
|
|||||||
account_autocreate => true,
|
account_autocreate => true,
|
||||||
}
|
}
|
||||||
class { 'swift::proxy::authtoken':
|
class { 'swift::proxy::authtoken':
|
||||||
password => 'a_big_secret',
|
www_authenticate_uri => "${::openstack_integration::config::keystone_auth_uri}/v3",
|
||||||
|
auth_url => "${::openstack_integration::config::keystone_admin_uri}/",
|
||||||
|
password => 'a_big_secret',
|
||||||
}
|
}
|
||||||
class { 'swift::keystone::dispersion': } -> class { 'swift::dispersion': }
|
class { 'swift::keystone::dispersion': } -> class { 'swift::dispersion': }
|
||||||
class { 'swift::objectexpirer':
|
class { 'swift::objectexpirer':
|
||||||
interval => 600,
|
interval => 600,
|
||||||
}
|
}
|
||||||
|
class { 'swift::proxy::cache':
|
||||||
|
memcache_servers => $::openstack_integration::config::swift_memcached_servers
|
||||||
|
}
|
||||||
class {
|
class {
|
||||||
[
|
[
|
||||||
'swift::proxy::catch_errors',
|
'swift::proxy::catch_errors',
|
||||||
'swift::proxy::gatekeeper',
|
'swift::proxy::gatekeeper',
|
||||||
'swift::proxy::healthcheck',
|
'swift::proxy::healthcheck',
|
||||||
'swift::proxy::proxy_logging',
|
'swift::proxy::proxy_logging',
|
||||||
'swift::proxy::cache',
|
|
||||||
'swift::proxy::keystone',
|
'swift::proxy::keystone',
|
||||||
'swift::proxy::symlink'
|
'swift::proxy::symlink'
|
||||||
]:
|
]:
|
||||||
@@ -161,11 +168,14 @@ describe 'basic swift' do
|
|||||||
package_ensure => latest,
|
package_ensure => latest,
|
||||||
}
|
}
|
||||||
class { 'swift::keystone::auth':
|
class { 'swift::keystone::auth':
|
||||||
password => 'a_big_secret',
|
public_url => "http://${::openstack_integration::config::ip_for_url}:8080/v1/AUTH_%(tenant_id)s",
|
||||||
|
admin_url => "http://${::openstack_integration::config::ip_for_url}:8080",
|
||||||
|
internal_url => "http://${::openstack_integration::config::ip_for_url}:8080/v1/AUTH_%(tenant_id)s",
|
||||||
|
password => 'a_big_secret',
|
||||||
}
|
}
|
||||||
# === Configure Storage
|
# === Configure Storage
|
||||||
class { 'swift::storage':
|
class { 'swift::storage':
|
||||||
storage_local_net_ip => '127.0.0.1',
|
storage_local_net_ip => $::openstack_integration::config::host,
|
||||||
}
|
}
|
||||||
# create xfs partitions on a loopback device and mounts them
|
# create xfs partitions on a loopback device and mounts them
|
||||||
swift::storage::loopback { ['2','3','4']:
|
swift::storage::loopback { ['2','3','4']:
|
||||||
@@ -192,27 +202,27 @@ describe 'basic swift' do
|
|||||||
mnt_base_dir => '/srv/node',
|
mnt_base_dir => '/srv/node',
|
||||||
weight => 1,
|
weight => 1,
|
||||||
zone => '2',
|
zone => '2',
|
||||||
storage_local_net_ip => '127.0.0.1',
|
storage_local_net_ip => $::openstack_integration::config::host,
|
||||||
policy_index => 0,
|
policy_index => 0,
|
||||||
require => Swift::Storage::Loopback['2','3','4'] ,
|
require => Swift::Storage::Loopback['2','3','4'] ,
|
||||||
}
|
}
|
||||||
# ring_object_devices for a storage policy start with the policy id.
|
# ring_object_devices for a storage policy start with the policy id.
|
||||||
# Create 3 ring_object_device starting with "1:" to be
|
# Create 3 ring_object_device starting with "1:" to be
|
||||||
# added to an object-1 ring for storage policy 1.
|
# added to an object-1 ring for storage policy 1.
|
||||||
ring_object_device { "1:127.0.0.1:6000/2":
|
ring_object_device { "1:${::openstack_integration::config::ip_for_url}:6000/2":
|
||||||
zone => 2,
|
zone => 2,
|
||||||
weight => 1,
|
weight => 1,
|
||||||
require => Swift::Storage::Loopback['2'],
|
require => Swift::Storage::Loopback['2'],
|
||||||
}
|
}
|
||||||
ring_object_device { "1:127.0.0.1:6000/3":
|
ring_object_device { "1:${::openstack_integration::config::ip_for_url}:6000/3":
|
||||||
zone => 2,
|
zone => 2,
|
||||||
weight => 1,
|
weight => 1,
|
||||||
require => Swift::Storage::Loopback['3'] ,
|
require => Swift::Storage::Loopback['3'] ,
|
||||||
}
|
}
|
||||||
ring_object_device { "1:127.0.0.1:6000/4":
|
ring_object_device { "1:${::openstack_integration::config::ip_for_url}:6000/4":
|
||||||
zone => 2,
|
zone => 2,
|
||||||
weight => 1,
|
weight => 1,
|
||||||
require => Swift::Storage::Loopback['4'] ,
|
require => Swift::Storage::Loopback['4'] ,
|
||||||
}
|
}
|
||||||
class { 'swift::storage::account':
|
class { 'swift::storage::account':
|
||||||
service_provider => 'swiftinit',
|
service_provider => 'swiftinit',
|
||||||
@@ -224,17 +234,17 @@ describe 'basic swift' do
|
|||||||
service_provider => 'swiftinit',
|
service_provider => 'swiftinit',
|
||||||
}
|
}
|
||||||
class { 'swift::ringbuilder':
|
class { 'swift::ringbuilder':
|
||||||
part_power => '18',
|
part_power => 18,
|
||||||
replicas => '1',
|
replicas => 1,
|
||||||
min_part_hours => 1,
|
min_part_hours => 1,
|
||||||
}
|
}
|
||||||
swift::ringbuilder::policy_ring { '1':
|
swift::ringbuilder::policy_ring { '1':
|
||||||
part_power => '18',
|
part_power => 18,
|
||||||
replicas => '3',
|
replicas => 3,
|
||||||
min_part_hours => 1,
|
min_part_hours => 1,
|
||||||
}
|
}
|
||||||
class { 'swift::proxy':
|
class { 'swift::proxy':
|
||||||
proxy_local_net_ip => '127.0.0.1',
|
proxy_local_net_ip => $::openstack_integration::config::host,
|
||||||
pipeline => [
|
pipeline => [
|
||||||
'catch_errors', 'gatekeeper', 'healthcheck', 'proxy-logging',
|
'catch_errors', 'gatekeeper', 'healthcheck', 'proxy-logging',
|
||||||
'cache', 'authtoken', 'keystone', 'symlink', 'proxy-logging',
|
'cache', 'authtoken', 'keystone', 'symlink', 'proxy-logging',
|
||||||
@@ -244,20 +254,24 @@ describe 'basic swift' do
|
|||||||
service_provider => 'swiftinit',
|
service_provider => 'swiftinit',
|
||||||
}
|
}
|
||||||
class { 'swift::proxy::authtoken':
|
class { 'swift::proxy::authtoken':
|
||||||
password => 'a_big_secret',
|
www_authenticate_uri => "${::openstack_integration::config::keystone_auth_uri}/v3",
|
||||||
|
auth_url => "${::openstack_integration::config::keystone_admin_uri}/",
|
||||||
|
password => 'a_big_secret',
|
||||||
}
|
}
|
||||||
class { 'swift::keystone::dispersion': } -> class { 'swift::dispersion': }
|
class { 'swift::keystone::dispersion': } -> class { 'swift::dispersion': }
|
||||||
class { 'swift::objectexpirer':
|
class { 'swift::objectexpirer':
|
||||||
interval => 600,
|
interval => 600,
|
||||||
service_provider => 'swiftinit',
|
service_provider => 'swiftinit',
|
||||||
}
|
}
|
||||||
|
class { 'swift::proxy::cache':
|
||||||
|
memcache_servers => $::openstack_integration::config::swift_memcached_servers
|
||||||
|
}
|
||||||
class {
|
class {
|
||||||
[
|
[
|
||||||
'swift::proxy::catch_errors',
|
'swift::proxy::catch_errors',
|
||||||
'swift::proxy::gatekeeper',
|
'swift::proxy::gatekeeper',
|
||||||
'swift::proxy::healthcheck',
|
'swift::proxy::healthcheck',
|
||||||
'swift::proxy::proxy_logging',
|
'swift::proxy::proxy_logging',
|
||||||
'swift::proxy::cache',
|
|
||||||
'swift::proxy::keystone',
|
'swift::proxy::keystone',
|
||||||
'swift::proxy::symlink'
|
'swift::proxy::symlink'
|
||||||
]:
|
]:
|
||||||
|
Reference in New Issue
Block a user