2012-01-23 13:12:57 -08:00
|
|
|
#
|
|
|
|
# This example file is almost the
|
2012-06-12 19:05:59 -07:00
|
|
|
# can be used to build out a sample swift all in one environment
|
2012-02-14 14:19:52 -08:00
|
|
|
#
|
2012-03-02 20:01:49 -08:00
|
|
|
$swift_local_net_ip='127.0.0.1'
|
|
|
|
|
2012-01-23 13:12:57 -08:00
|
|
|
$swift_shared_secret='changeme'
|
2012-02-13 15:39:18 -08:00
|
|
|
|
2012-01-23 13:12:57 -08:00
|
|
|
Exec { logoutput => true }
|
|
|
|
|
|
|
|
package { 'curl': ensure => present }
|
2012-02-13 15:39:18 -08:00
|
|
|
|
2012-01-27 22:11:08 -08:00
|
|
|
|
2015-03-23 18:25:34 +01:00
|
|
|
class { '::memcached':
|
2012-03-02 20:01:49 -08:00
|
|
|
listen_ip => $swift_local_net_ip,
|
2012-01-23 13:12:57 -08:00
|
|
|
}
|
2012-01-27 22:11:08 -08:00
|
|
|
|
2015-03-23 18:25:34 +01:00
|
|
|
class { '::swift':
|
2012-01-23 13:12:57 -08:00
|
|
|
# not sure how I want to deal with this shared secret
|
|
|
|
swift_hash_suffix => $swift_shared_secret,
|
2013-07-01 18:27:13 -04:00
|
|
|
package_ensure => latest,
|
2012-01-23 13:12:57 -08:00
|
|
|
}
|
2012-01-27 22:11:08 -08:00
|
|
|
|
2012-03-02 20:01:49 -08:00
|
|
|
# === Configure Storage
|
|
|
|
|
2015-03-23 18:25:34 +01:00
|
|
|
class { '::swift::storage':
|
|
|
|
storage_local_net_ip => $swift_local_net_ip,
|
2012-03-02 20:01:49 -08:00
|
|
|
}
|
|
|
|
|
2012-02-13 15:39:18 -08:00
|
|
|
# create xfs partitions on a loopback device and mounts them
|
2012-07-06 14:49:35 -07:00
|
|
|
swift::storage::loopback { '2':
|
2012-01-23 13:12:57 -08:00
|
|
|
require => Class['swift'],
|
|
|
|
}
|
|
|
|
|
2012-02-13 15:39:18 -08:00
|
|
|
# sets up storage nodes which is composed of a single
|
2012-01-27 22:11:08 -08:00
|
|
|
# device that contains an endpoint for an object, account, and container
|
2012-01-23 13:12:57 -08:00
|
|
|
|
2012-07-06 14:49:35 -07:00
|
|
|
swift::storage::node { '2':
|
2012-01-27 22:11:08 -08:00
|
|
|
mnt_base_dir => '/srv/node',
|
|
|
|
weight => 1,
|
|
|
|
manage_ring => true,
|
2012-07-06 14:49:35 -07:00
|
|
|
zone => '2',
|
2012-03-02 20:01:49 -08:00
|
|
|
storage_local_net_ip => $swift_local_net_ip,
|
2012-07-06 14:49:35 -07:00
|
|
|
require => Swift::Storage::Loopback[2] ,
|
2012-01-23 13:12:57 -08:00
|
|
|
}
|
|
|
|
|
2015-03-23 18:25:34 +01:00
|
|
|
class { '::swift::ringbuilder':
|
2012-01-23 13:12:57 -08:00
|
|
|
part_power => '18',
|
2012-07-06 14:49:35 -07:00
|
|
|
replicas => '1',
|
2012-01-23 13:12:57 -08:00
|
|
|
min_part_hours => 1,
|
|
|
|
require => Class['swift'],
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# TODO should I enable swath in the default config?
|
2015-03-23 18:25:34 +01:00
|
|
|
class { '::swift::proxy':
|
2012-03-11 23:24:53 -07:00
|
|
|
proxy_local_net_ip => $swift_local_net_ip,
|
2012-04-22 13:26:46 -07:00
|
|
|
pipeline => ['healthcheck', 'cache', 'tempauth', 'proxy-server'],
|
2012-01-23 13:12:57 -08:00
|
|
|
account_autocreate => true,
|
|
|
|
require => Class['swift::ringbuilder'],
|
|
|
|
}
|
2015-03-23 18:25:34 +01:00
|
|
|
class { ['::swift::proxy::healthcheck', '::swift::proxy::cache', '::swift::proxy::tempauth']: }
|