Refactor swift::storage::node to use device defines
This commit updates the node class from using Swift::Storage::Device to the individual defines. This change was made b/c we could not dyncamically set the names of the native types.
This commit is contained in:
@@ -1,28 +1,54 @@
|
||||
#
|
||||
# Builds out a default storage node
|
||||
# a storage node is a device that contains
|
||||
# a storage endpoint for account, container, and object
|
||||
# on the same mount point
|
||||
#
|
||||
define swift::storage::node(
|
||||
$mnt_base_dir,
|
||||
$zone,
|
||||
$weight = 1,
|
||||
$owner = 'swift',
|
||||
$group = 'swift',
|
||||
$max_connections = 25,
|
||||
$storage_local_net_ip = '127.0.0.1'
|
||||
$storage_local_net_ip = '127.0.0.1',
|
||||
$manage_ring = true
|
||||
) {
|
||||
|
||||
Swift::Storage::Device {
|
||||
devices => $mnt_base_dir,
|
||||
owner => $owner,
|
||||
group => $group,
|
||||
max_connections => $max_connections,
|
||||
swift::storage::device::object { "60${name}0":
|
||||
devices => $mnt_base_dir,
|
||||
device_name => $name,
|
||||
zone => $zone,
|
||||
weight => $weight,
|
||||
owner => $owner,
|
||||
group => $group,
|
||||
max_connections => $max_connections,
|
||||
storage_local_net_ip => $storage_local_net_ip,
|
||||
manage_ring => $manage_ring,
|
||||
}
|
||||
|
||||
swift::storage::device { "60${name}0":
|
||||
type => 'object',
|
||||
swift::storage::device::container { "60${name}1":
|
||||
devices => $mnt_base_dir,
|
||||
device_name => $name,
|
||||
zone => $zone,
|
||||
weight => $weight,
|
||||
owner => $owner,
|
||||
group => $group,
|
||||
max_connections => $max_connections,
|
||||
storage_local_net_ip => $storage_local_net_ip,
|
||||
manage_ring => $manage_ring,
|
||||
}
|
||||
|
||||
swift::storage::device { "60${name}1":
|
||||
type => 'container',
|
||||
}
|
||||
|
||||
swift::storage::device { "60${name}2":
|
||||
type => 'account',
|
||||
swift::storage::device::account { "60${name}2":
|
||||
devices => $mnt_base_dir,
|
||||
device_name => $name,
|
||||
zone => $zone,
|
||||
weight => $weight,
|
||||
owner => $owner,
|
||||
group => $group,
|
||||
max_connections => $max_connections,
|
||||
storage_local_net_ip => $storage_local_net_ip,
|
||||
manage_ring => $manage_ring,
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user