
This commit adds puppet code to handle syncing of the ring databases. The class swift::ringserver is used to set up an rsync server that serve out the ring databases. The define swift::ringsync is used to rsync these ring databases to the other hosts.
40 lines
715 B
Puppet
40 lines
715 B
Puppet
# Used to create an rsync server to serve up the ring databases via rsync
|
|
#
|
|
# == Parameters
|
|
#
|
|
# == Dependencies
|
|
#
|
|
# Class['swift']
|
|
#
|
|
# == Examples
|
|
#
|
|
# == Authors
|
|
#
|
|
# Dan Bode dan@puppetlabs.com
|
|
#
|
|
# == Copyright
|
|
#
|
|
# Copyright 2011 Puppetlabs Inc, unless otherwise noted.
|
|
#
|
|
class swift::ringserver(
|
|
$local_net_ip,
|
|
$max_connections = 5
|
|
) {
|
|
|
|
Class['ringbuilder'] -> Class['swift::ringserver']
|
|
|
|
class { 'rsync::server':
|
|
use_xinetd => true,
|
|
address => $local_net_ip,
|
|
}
|
|
|
|
rsync::server::module { "swift_server":
|
|
path => '/etc/swift',
|
|
lock_file => "/var/lock/swift_server.lock",
|
|
uid => 'swift',
|
|
gid => 'swift',
|
|
max_connections => $max_connections,
|
|
read_only => true,
|
|
}
|
|
}
|