Newer
Older
class iaas::profile::cinder (
$password = undef,
$public_ipaddress = hiera('iaas::public_ipaddress', undef),
$admin_ipaddress = hiera('iaas::admin_ipaddress', undef),
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
$secret = undef,
$volume_size = undef,
$region = hiera('iaas::region', undef),
$endpoint = hiera('iaas::role::endpoint::main_address', undef),
$rabbitmq_user = hiera('iaas::profile::rabbitmq::user', undef),
$rabbitmq_password = hiera('iaas::profile::rabbitmq::password', undef),
) {
include iaas::resources::connectors
iaas::resources::database { 'cinder': }
class { '::cinder':
database_connection => $iaas::resources::connectors::cinder,
rabbit_host => $endpoint,
rabbit_userid => $rabbitmq_user,
rabbit_password => $rabbitmq_password,
mysql_module => '2.3',
database_idle_timeout => 50, # Important to avoid facing "MySQL server has gone away" while using HAProxy+Galera. Should be < HAProxy server timeout (default: 60s)
}
class { '::cinder::glance':
glance_api_servers => [ "${endpoint}:9292" ],
}
class { '::cinder::keystone::auth':
password => $password,
public_address => $public_ipaddress,
admin_address => $admin_ipaddress,
internal_address => $admin_ipaddress,
region => $region,
}
class { '::cinder::api':
keystone_password => $password,
keystone_auth_host => $endpoint,
enabled => true,
}
class { '::cinder::scheduler':
scheduler_driver => 'cinder.scheduler.simple.SimpleScheduler',
enabled => true,
}
class { '::cinder::setup_test_volume':
volume_name => 'cinder-volumes',
size => $volume_size
} ->
class { '::cinder::volume':
package_ensure => present,
enabled => true,
}
class { '::cinder::volume::rbd':
rbd_pool => 'volumes',
rbd_user => 'cinder',
rbd_secret_uuid => $secret, #FIXME Necessary ?
}
@@haproxy::balancermember { "cinder_api_${::fqdn}":
listening_service => 'cinder_api_cluster',
server_names => $::hostname,
ipaddresses => $public_ipaddress,
ports => '8776',
options => 'check inter 2000 rise 2 fall 5',
}
}