Puppet Class: swift::ringbuilder
- Defined in:
- manifests/ringbuilder.pp
Overview
Used to configure nodes that are responsible for managing swift rings. Rings are used to make decisions about how to map objects in the cluster
Specifies the following relationship:
Rings should be created before any devices are added to them
Rings should be rebalanced if anything changes
Parameters
[*part_power*] The total number of partitions that should exist in the ring.
  This is expressed as a power of 2.
[*replicas*] Number of replicas that should be maintained of each stored object.
[*min_part_hours*] Minimum amount of time before partitions can be moved.
Dependencies
Class['swift']
Examples
Authors
Dan Bode dan@puppetlabs.com
Copyright
Copyright 2011 Puppetlabs Inc, unless otherwise noted.
| 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | # File 'manifests/ringbuilder.pp', line 27
class swift::ringbuilder(
  $part_power = undef,
  $replicas = undef,
  $min_part_hours = undef
) {
  include swift::deps
  Class['swift'] -> Class['swift::ringbuilder']
  swift::ringbuilder::create{ ['object', 'account', 'container']:
    part_power     => $part_power,
    replicas       => $replicas,
    min_part_hours => $min_part_hours,
  }
  Swift::Ringbuilder::Create['object'] -> Ring_object_device <| |> ~> Swift::Ringbuilder::Rebalance['object']
  Swift::Ringbuilder::Create['container'] -> Ring_container_device <| |> ~> Swift::Ringbuilder::Rebalance['container']
  Swift::Ringbuilder::Create['account'] -> Ring_account_device <| |> ~> Swift::Ringbuilder::Rebalance['account']
  swift::ringbuilder::rebalance{ ['object', 'account', 'container']: }
} |