Files
puppet-swift/manifests/storage/node.pp
Dan Bode 310ca91b59 Removed swift::storage::device::* defines
Previously, I had created a define intended to
wrap the creation of the storage device endpoints
with their associated ring configs.

I wound up decided against this for two reasons:
  - Abtstracting storage endpoints together with
the ring configurations can be confusing b/c it
conflates actions associated with the storage role
with actions associated with the ringbuilding role.
  - Abstracting the ring building hides side effects
of this manifest from the user (that it will effect
the ringbuilder role)

This pull request does the following:

- removes the swift::storage::device::* defines

- update the following code to use
swift::storage::device in combination with
ring_*_device
 -- examples/multi
 -- swift::storage::node
2012-02-13 16:50:41 -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::Device {
storage_local_net_ip => $storage_local_net_ip,
devices => $mnt_base_dir,
max_connections => $max_connections,
owner => $owner,
group => $group,
}
swift::storage::device { "60${name}0":
type => 'object',
}
ring_object_device { "${storage_local_net_ip}:60${name}0":
zone => $zone,
device_name => $name,
weight => $weight,
}
swift::storage::device { "60${name}1":
type => 'container',
}
ring_container_device { "${storage_local_net_ip}:60${name}1":
zone => $zone,
device_name => $name,
weight => $weight,
}
swift::storage::device { "60${name}2":
type => 'account',
}
ring_account_device { "${storage_local_net_ip}:60${name}2":
zone => $zone,
device_name => $name,
weight => $weight,
}
}