/
site.pp
192 lines (171 loc) · 4.88 KB
/
site.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
Exec { path => [ "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/", "/usr/local/bin/","/usr/local/sbin/" ], logoutput => true }
node /^bootstrap\d+/ {
include rjil::base
}
##
# setup ceph configuration and osds on st nodes
# These nodes wait at least one stmon to be registered in consul.
##
node /^st\d+/ {
include rjil::base
include rjil::ceph
include rjil::ceph::osd
ensure_resource('rjil::service_blocker', 'stmon', {})
Class['rjil::base'] -> Rjil::Service_blocker['stmon'] ->
Class['rjil::ceph::osd']
}
##
# single leader that will be used to ensure that all mons form a single cluster.
#
# The only difference in stmon and stmonleader is that stmonleader is the node
# which starts first in the ceph cluster initialization. After that, both
# those roles will serve the same purpose.
# All ceph servers and clients (st, stmon, cp, oc nodes) except stmonleader will wait for at least
# one "stmon" service node in consul.
#
# The leader will register the service in consul with name "stmon" (or
# any other name if overridden in hiera).
#
##
node /^stmonleader1/ {
include rjil::base
include rjil::ceph
include rjil::ceph::mon
include rjil::ceph::osd
include rjil::ceph::radosgw
rjil::jiocloud::consul::service { 'stmonleader':
port => 6789,
check_command => '/usr/lib/jiocloud/tests/check_ceph_mon.sh'
}
}
##
# setup ceph osd and mon configuration on ceph Mon nodes.
# All ceph mon nodes are registered in consul as service name "stmon" (or any
# other name if overridden)
#
# stmon nodes will wait at least one "stmon" service to be up in consul before
# initialize themselves
##
node /^stmon\d+/ {
include rjil::base
include rjil::ceph
include rjil::ceph::mon
include rjil::ceph::osd
include rjil::ceph::radosgw
ensure_resource('rjil::service_blocker', 'stmonleader', {})
Class[rjil::base] -> Rjil::Service_blocker['stmonleader']
Rjil::Service_blocker['stmonleader'] -> Class['rjil::ceph::mon::mon_config']
}
##
## Setup contrail nodes
##
node /^ct\d+/ {
include rjil::base
include rjil::redis
include rjil::cassandra
include rjil::rabbitmq
include rjil::zookeeper
include rjil::haproxy
include rjil::haproxy::contrail
include rjil::contrail::server
include rjil::neutron::contrail
}
##
## oc is openstack controller node which will have all
## openstack controller applications
##
node /^oc\d+/ {
include rjil::base
include rjil::memcached
include rjil::keystone
include openstack_extras::client
include rjil::cinder
include rjil::glance
include rjil::openstack_zeromq
include rjil::nova::controller
}
#
# this is a variation of the controller that has a database installed
#
node /^ocdb\d+/ {
include rjil::base
include rjil::memcached
include openstack_extras::client
include rjil::db
include rjil::keystone
include rjil::cinder
include rjil::glance
include rjil::nova::controller
include rjil::openstack_zeromq
include rjil::openstack_objects
}
#
# A variation of the controller that also runs a load balancer
#
node /^oclb\d+/ {
include rjil::base
include openstack_extras::client
include rjil::memcached
include rjil::db
include rjil::keystone
include rjil::cinder
include rjil::glance
include rjil::openstack_zeromq
include openstack_extras::keystone_endpoints
include rjil::keystone::test_user
include rjil::haproxy
include rjil::haproxy::openstack
}
##
# compute nodes
# gcp is a special cp node which is also used as gateway for floating IP access
# in virtual cloud and vagrant environments. This is not being used in physical
# environments (staging and production)
# NOTE: There must be ONE AND ONLY ONE gcp node supported at this point of time.
##
node /^gcp\d+/ {
include rjil::base
include rjil::ceph
include openstack_extras::client
include rjil::contrail::vrouter
include rjil::openstack_zeromq
include rjil::nova::compute
include rjil::tempest
include rjil::http_proxy
}
node /^cp\d+/ {
include rjil::base
include rjil::ceph
include openstack_extras::client
include rjil::contrail::vrouter
include rjil::openstack_zeromq
include rjil::nova::compute
}
node /^haproxy\d+/ {
include rjil::base
include rjil::haproxy
include rjil::haproxy::openstack
}
node /^uc\d+/ {
include rjil::base
include rjil::memcached
include openstack_extras::client
include rjil::db
include rjil::keystone
include rjil::glance
include rjil::neutron::ovs
include rjil::ironic
include rjil::nova::controller
include rjil::openstack_zeromq
include openstack_extras::keystone_endpoints
include rjil::keystone::test_user
ensure_resource('rjil::service_blocker', 'keystone-admin', {})
Rjil::Service_blocker['keystone-admin'] -> Class['openstack_extras::keystone_endpoints']
Rjil::Service_blocker['keystone-admin'] -> Class['rjil::keystone::test_user']
include rjil::jiocloud::aptmirror
include rjil::jiocloud::dhcp
}
node /^httpproxy\d+/ {
include rjil::base
include rjil::http_proxy
}