diff --git a/manifests/storage/node.pp b/manifests/storage/node.pp index 107ca744..f307a4df 100644 --- a/manifests/storage/node.pp +++ b/manifests/storage/node.pp @@ -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, } }