-
Notifications
You must be signed in to change notification settings - Fork 5
/
swift_proxy.pp
54 lines (46 loc) · 1.41 KB
/
swift_proxy.pp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
class trystack::swift_proxy inherits trystack::swift_common {
#### Swift ####
package { 'curl': ensure => present }
#class { 'memcached': }
class { 'swift::proxy':
proxy_local_net_ip => '10.100.0.222', #swift proxy address
pipeline => [
# 'catch_errors',
'healthcheck',
'cache',
# 'ratelimit',
'authtoken',
'keystone',
'proxy-server'
],
account_autocreate => true,
}
# configure all of the middlewares
class { [
'swift::proxy::catch_errors',
'swift::proxy::healthcheck',
'swift::proxy::cache',
]: }
class { 'swift::proxy::ratelimit':
clock_accuracy => 1000,
max_sleep_time_seconds => 60,
log_sleep_time_seconds => 0,
rate_buffer_seconds => 5,
account_ratelimit => 0
}
class { 'swift::proxy::keystone':
operator_roles => ['admin', 'SwiftOperator'],
}
class { 'swift::proxy::authtoken':
admin_user => 'swift',
admin_tenant_name => 'services',
admin_password => $swift_admin_password,
# assume that the controller host is the swift api server
auth_host => '10.100.0.222', #keystone
}
firewall { '001 swift proxy incoming':
proto => 'tcp',
dport => ['8080'],
action => 'accept',
}
}