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,
|
||||
}
|
||||
class { 'swift::keystone::auth':
|
||||
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
|
||||
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
|
||||
swift::storage::loopback { ['2','3','4']:
|
||||
@@ -60,40 +63,40 @@ describe 'basic swift' do
|
||||
mnt_base_dir => '/srv/node',
|
||||
weight => 1,
|
||||
zone => '2',
|
||||
storage_local_net_ip => '127.0.0.1',
|
||||
storage_local_net_ip => $::openstack_integration::config::host,
|
||||
policy_index => 0,
|
||||
require => Swift::Storage::Loopback['2','3','4'] ,
|
||||
}
|
||||
# ring_object_devices for a storage policy start with the policy id.
|
||||
# Create 3 ring_object_device starting with "1:" to be
|
||||
# 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,
|
||||
weight => 1,
|
||||
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,
|
||||
weight => 1,
|
||||
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,
|
||||
weight => 1,
|
||||
require => Swift::Storage::Loopback['4'] ,
|
||||
}
|
||||
class { 'swift::ringbuilder':
|
||||
part_power => '18',
|
||||
replicas => '1',
|
||||
part_power => 18,
|
||||
replicas => 1,
|
||||
min_part_hours => 1,
|
||||
}
|
||||
swift::ringbuilder::policy_ring { '1':
|
||||
part_power => '18',
|
||||
replicas => '3',
|
||||
part_power => 18,
|
||||
replicas => 3,
|
||||
min_part_hours => 1,
|
||||
}
|
||||
class { 'swift::proxy':
|
||||
proxy_local_net_ip => '127.0.0.1',
|
||||
proxy_local_net_ip => $::openstack_integration::config::host,
|
||||
pipeline => [
|
||||
'catch_errors', 'gatekeeper', 'healthcheck', 'proxy-logging',
|
||||
'cache', 'authtoken', 'keystone', 'symlink', 'proxy-logging',
|
||||
@@ -102,19 +105,23 @@ describe 'basic swift' do
|
||||
account_autocreate => true,
|
||||
}
|
||||
class { 'swift::proxy::authtoken':
|
||||
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::objectexpirer':
|
||||
interval => 600,
|
||||
}
|
||||
class { 'swift::proxy::cache':
|
||||
memcache_servers => $::openstack_integration::config::swift_memcached_servers
|
||||
}
|
||||
class {
|
||||
[
|
||||
'swift::proxy::catch_errors',
|
||||
'swift::proxy::gatekeeper',
|
||||
'swift::proxy::healthcheck',
|
||||
'swift::proxy::proxy_logging',
|
||||
'swift::proxy::cache',
|
||||
'swift::proxy::keystone',
|
||||
'swift::proxy::symlink'
|
||||
]:
|
||||
@@ -161,11 +168,14 @@ describe 'basic swift' do
|
||||
package_ensure => latest,
|
||||
}
|
||||
class { 'swift::keystone::auth':
|
||||
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
|
||||
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
|
||||
swift::storage::loopback { ['2','3','4']:
|
||||
@@ -192,24 +202,24 @@ describe 'basic swift' do
|
||||
mnt_base_dir => '/srv/node',
|
||||
weight => 1,
|
||||
zone => '2',
|
||||
storage_local_net_ip => '127.0.0.1',
|
||||
storage_local_net_ip => $::openstack_integration::config::host,
|
||||
policy_index => 0,
|
||||
require => Swift::Storage::Loopback['2','3','4'] ,
|
||||
}
|
||||
# ring_object_devices for a storage policy start with the policy id.
|
||||
# Create 3 ring_object_device starting with "1:" to be
|
||||
# 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,
|
||||
weight => 1,
|
||||
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,
|
||||
weight => 1,
|
||||
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,
|
||||
weight => 1,
|
||||
require => Swift::Storage::Loopback['4'] ,
|
||||
@@ -224,17 +234,17 @@ describe 'basic swift' do
|
||||
service_provider => 'swiftinit',
|
||||
}
|
||||
class { 'swift::ringbuilder':
|
||||
part_power => '18',
|
||||
replicas => '1',
|
||||
part_power => 18,
|
||||
replicas => 1,
|
||||
min_part_hours => 1,
|
||||
}
|
||||
swift::ringbuilder::policy_ring { '1':
|
||||
part_power => '18',
|
||||
replicas => '3',
|
||||
part_power => 18,
|
||||
replicas => 3,
|
||||
min_part_hours => 1,
|
||||
}
|
||||
class { 'swift::proxy':
|
||||
proxy_local_net_ip => '127.0.0.1',
|
||||
proxy_local_net_ip => $::openstack_integration::config::host,
|
||||
pipeline => [
|
||||
'catch_errors', 'gatekeeper', 'healthcheck', 'proxy-logging',
|
||||
'cache', 'authtoken', 'keystone', 'symlink', 'proxy-logging',
|
||||
@@ -244,6 +254,8 @@ describe 'basic swift' do
|
||||
service_provider => 'swiftinit',
|
||||
}
|
||||
class { 'swift::proxy::authtoken':
|
||||
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': }
|
||||
@@ -251,13 +263,15 @@ describe 'basic swift' do
|
||||
interval => 600,
|
||||
service_provider => 'swiftinit',
|
||||
}
|
||||
class { 'swift::proxy::cache':
|
||||
memcache_servers => $::openstack_integration::config::swift_memcached_servers
|
||||
}
|
||||
class {
|
||||
[
|
||||
'swift::proxy::catch_errors',
|
||||
'swift::proxy::gatekeeper',
|
||||
'swift::proxy::healthcheck',
|
||||
'swift::proxy::proxy_logging',
|
||||
'swift::proxy::cache',
|
||||
'swift::proxy::keystone',
|
||||
'swift::proxy::symlink'
|
||||
]:
|
||||
|
Reference in New Issue
Block a user