puppet-swift/manifests/storage/node.pp
Dan Bode 44b1c56d74 Renamed storage::device to storage::server
Changed the name of the defined resource type:
swift::storage::device to be swift::storage::server.

This change was made in order to better align with
the swift terminology since this define was
configuring a swift component server which has no
direct association with a device.

This commit also makes the swift::storage::server
the only place where the swift server template is
used. This allowed me to assume that the variables
device and bind_port will always be available.

Also updates declarations of the renamed type to
use the correct type name.

Removes the direct server file config from
swift::storage, replacing it instead with
declarations of swift::storage::server.
2012-02-14 14:09:01 -08:00

54 lines
1.2 KiB
Puppet

#
# 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',
$manage_ring = true
) {
Swift::Storage::Server {
storage_local_net_ip => $storage_local_net_ip,
devices => $mnt_base_dir,
max_connections => $max_connections,
owner => $owner,
group => $group,
}
swift::storage::server { "60${name}0":
type => 'object',
}
ring_object_device { "${storage_local_net_ip}:60${name}0":
zone => $zone,
device_name => $name,
weight => $weight,
}
swift::storage::server { "60${name}1":
type => 'container',
}
ring_container_device { "${storage_local_net_ip}:60${name}1":
zone => $zone,
device_name => $name,
weight => $weight,
}
swift::storage::server { "60${name}2":
type => 'account',
}
ring_account_device { "${storage_local_net_ip}:60${name}2":
zone => $zone,
device_name => $name,
weight => $weight,
}
}