-
Notifications
You must be signed in to change notification settings - Fork 21
/
params.pp
539 lines (536 loc) · 17.8 KB
/
params.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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
# Class that gathers and provides all the paramater values to other
# modules. This class specifies default values for all the optional
# parameters. User specified values come from hiera data files create
# and specified.
#
# === Parameters:
#
# [*host_ip*]
# Control interface IP address of the server.
#
# [*uuid*]
# uuid number for the server.
#
# [*config_ip_list*]
# List of control interface IP addresses of all the servers in cluster
# configured to run contrail config node.
#
# [*control_ip_list*]
# List of control interface IP addresses of all the servers in cluster
# configured to run contrail control node.
#
# [*database_ip_list*]
# List of control interface IP addresses of all the servers in cluster
# configured to run contrail database node.
#
# [*collector_ip_list*]
# List of control interface IP addresses of all the servers in cluster
# configured to run contrail collector node.
#
# [*webui_ip_list*]
# List of control interface IP addresses of all the servers in cluster
# configured to run contrail webui node.
#
# [*openstack_ip_list*]
# List of control interface IP addresses of all the servers in cluster
# configured to run contrail openstack node.
#
# [*config_name_list*]
# List of host names of all the servers in cluster configured to run
# contrail config node.
#
# [*compute_name_list*]
# List of host names of all the servers in cluster configured to run
# contrail compute node.
#
# [*control_name_list*]
# List of host names of all the servers in cluster configured to run
# contrail control node.
#
# [*collector_name_list*]
# List of host names of all the servers in cluster configured to run
# contrail collector node.
#
# [*openstack_name_list*]
# List of host names of all the servers in cluster configured to run
# contrail openatack node.
#
# [*internal_vip*]
# Virtual IP address to be used for openstack HA functionality on
# control/data interface. UI parameter.
# (optional) - Defaults to "" (No openstack HA configured).
#
# [*external_vip*]
# Virtual IP address to be used for openstack HA functionality on
# management interface. UI parameter.
# (optional) - Defaults to "" (No openstack mgmt HA configured).
#
# [*contrail_internal_vip*]
# Virtual IP address to be used for contrail HA functionality on
# control/data interface.
# This parameter is to be specified only if contrail HA IP address is
# different from openstack HA. UI parameter.
# (optional) - Defaults to "" (Follow internal_vip setting for contrail
# HA functionality).
#
# [*contrail_external_vip*]
# Virtual IP address to be used for openstack HA functionality on
# management interface. UI parameter.
# (optional) - Defaults to "" (No contrail mgmt HA configured).
#
# [*database_ip_port*]
# IP port number used by database service.
# Not exposed to SM for modification.
# (optional) - Defaults to "9160".
#
# [*analytics_data_ttl*]
# Time to live (TTL) for analytics data in number of hours.
# (optional) - Defaults to "48". UI parameter.
#
# [*analytics_syslog_port*]
# Syslog port number used by analytics.
# (optional) - Defaults to "-1". UI parameter.
#
# [*use_certs*]
# flag to indicate if certs to be used in authenticating service access.
# Leave the value at default.
# (optional) - Defaults to false.
#
# [*puppet_server*]
# If puppet server is used to fetch/store certificates.
# Leave the value at default.
# Not exposed to SM for modification.
# (optional) - Defaults to "" (puppet CA not used).
#
# [*database_initial_token*]
# Database initial token value used for cassandra configuration.
# Leave the value at default.
# (optional) - Defaults to 0.
#
# [*database_dir*]
# Directory used for cassandra database files.
# Leave the value at default.
# (optional) - Defaults to "/var/lib/cassandra". UI parameter.
#
# [*analytics_data_dir*]
# Directory used for analytics data files.
# (optional) - Defaults to "" (use database_dir). UI parameter.
#
# [*ssd_data_dir*]
# Directory used for ssd data files.
# (optional) - Defaults to "" (use database_dir). UI parameter.
#
# [*keystone_ip*]
# Control interface IP address of server where keystone service is
# running. Used only in non-HA configuration, where keystone service
# is running on a server other than other openstack services.
# (optional) - Defaults to "" (use openstack_ip). UI parameter.
#
# [*keystone_admin_password*]
# Admin password for keystone service. Manifests also use keystone_admin_token
# to refer to this and hence is set to same value in this class.
# (optional) - Defaults to "contrail123". UI parameter.
#
# [*keystone_service_token*]
# Service token to access keystone service (MD5 hash generated). If not specified
# simple value of "keystoneservicetoken" used.
# to refer to this and hence is set to same value in this class.
# (optional) - Defaults to "contrailservicetoken".
#
# [*keystone_admin_user*]
# User Name for admin user of keystone service.
# (optional) - Defaults to "admin". UI parameter.
#
# [*keystone_admin_tenant*]
# Name for admin tenant or project of keystone service.
# (optional) - Defaults to "admin". UI parameter.
#
# [*keystone_service_tenant*]
# Name for service tenant or project of keystone service.
# (optional) - Defaults to "services". UI parameter.
#
# [*keystone_region_name*]
# Name for region in keystone..
# (optional) - Defaults to "RegionOne". UI parameter.
#
# [*multi_tenancy*]
# Flag to indicate if multi tenancy is enabled for openstack.
# (optional) - Defaults to true.
#
# [*zookeeper_ip_list*]
# List of control interface IP addresses of all the servers in cluster
# running zookeeper services. UI parameter.
# (optional) - Defaults to undef (use config_ip_list).
#
# [*quantum_port*]
# IP port used by quantum/neutron.
# Not exposed to SM for modification.
# (optional) - Defaults to "9697".
#
# [*quantum_service_protocol*]
# IP protocol used by quantum.
# Not exposed to SM for modification.
# (optional) - Defaults to "http".
#
# [*keystone_auth_protocol*]
# Authentication protocol used by keystone.
# Not exposed to SM for modification.
# (optional) - Defaults to "http".
#
# [*neutron_service_protocol*]
# IP protocol used by neutron.
# Not exposed to SM for modification.
# (optional) - Defaults to "http".
#
# [*keystone_auth_port*]
# IP port used by keystone.
# Not exposed to SM for modification.
# (optional) - Defaults to "35357".
#
# [*keystone_insecure_flag*]
# Keystone insecure flag
# Not exposed to SM for modification.
# (optional) - Defaults to false.
#
# [*api_nworkers*]
# Number of worker threads for API service.
# Not exposed to SM for modification.
# (optional) - Defaults to 1.
#
# [*haproxy_flag*]
# Flag to indicate if haproxy is to be used. If
# contrail_internal_vip/internal_vip is being used, even
# if haproxy flag is set, value of false is passed to modules.
# (optional) - Defaults to "disable". UI parameter.
#
# [*manage_neutron*]
# if manage_neutron is false, neutron service tenant/user/role
# is not created in keystone by contrail.
# Not exposed to SM for modification.
# (optional) - Defaults to true.
#
# [*openstack_manage_amqp*]
# flag to indicate if amqp server is on openstack or contrail
# config node.
# Not exposed to SM for modification.
# (optional) - Defaults to true (managed by contrail config).
#
# [*amqp_server_ip*]
# If amqp is managed by openstack, if it is running on a separate
# server, specify control interface IP of that server.
# (optional) - Defaults to "" (same as openstack_ip).
#
# [*zk_ip_port*]
# IP port used by zookeeper service.
# Not exposed to SM for modification.
# (optional) - Defaults to "2181".
#
# [*hc_interval*]
# Discovery service health check interval in seconds.
# (optional) - Defaults to 5. UI parameter.
#
# [*vmware_ip*]
# vmware ip address for cluster wth ESXi server.
# Not exposed to SM for modification.
# (optional) - Defaults to "" (No ESXi or vmware configuration).
#
# [*vmware_username*]
# vmware username for cluster with esxi server.
# Not exposed to SM for modification.
# (optional) - Defaults to "" (No ESXi or vmware configuration).
#
# [*vmware_password*]
# vmware password for cluster with ESXi server.
# Not exposed to SM for modification.
# (optional) - Defaults to "" (No ESXi or vmware configuration).
#
# [*vmware_vswitch*]
# vmware vswitch for cluster with ESXi server.
# Not exposed to SM for modification.
# (optional) - Defaults to "" (No ESXi or vmware configuration).
#
# [*keepalived_vrid*]
# Virtual router id value used by keepalived (VRRP)
# Not exposed to SM for modification.
# (optional) - Defaults to 100.
#
# [*mysql_root_password*]
# Root password for mysql access.
# Not exposed to SM for modification.
# (optional) - Defaults to "c0ntrail123"
#
# [*openstack_mgmt_ip_list*]
# List of management interface IP addresses of all the servers in cluster
# configured to run contrail openstack node.
# (optional) - Defaults to undef (same as openstack_ip_list)
#
# [*encap_priority*]
# Encapsulation priority setting.
# (optional) - Defaults to "MPLSoUDP,MPLSoGRE,VXLAN"
#
# [*router_asn*]
# Router ASN value
# (optional) - Defaults to "64512"
#
# [*metadata_secret*]
# Metadata secret value.
# Not exposed to SM for modification.
# (optional) - Defaults to ""
#
# [*vgw_public_subnet*]
# Virtual gateway public subnet value.
# Not exposed to SM for modification.
# (optional) - Defaults to "".
#
# [*vgw_public_vn_name*]
# Virtual gateway public VN name.
# Not exposed to SM for modification.
# (optional) - Defaults to "".
#
# [*vgw_interface*]
# Virtual gateway interface value.
# Not exposed to SM for modification.
# (optional) - Defaults to "".
#
# [*vgw_gateway_routes*]
# Virtual gateway routes
# Not exposed to SM for modification.
# (optional) - Defaults to "".
#
# [*orchestrator*]
# Orchestrator value.
# Not exposed to SM for modification.
# (optional) - Defaults to "openstack".
#
# [*contrail_repo_name*]
# Contrail repository name from which to fetch packages.
#
# [*contrail_repo_type*]
# Repo type for contrail repos to be created.
#
# [*contrail_repo_ip*]
# IP address of server where contrail repo is created.
# This would be same as server manager (puppet master) IP.
# (optional) - Defaults to $serverip
#
# [*kernel_upgrade*]
# Flag to indicate where to update kernel (yes/no).
# Not exposed to SM for modification.
# (optional) - Defaults to "yes".
#
# [*kernel_version*]
# kernel version to upgrade to.
# Not exposed to SM for modification.
# (optional) - Defaults to "3.13.0-34".
#
# [*storage_num_osd*]
# Storage parameter needed only if storage role is configured.
# (optional) - Defaults to "".
#
# [*storage_fsid*]
# Storage parameter needed only if storage role is configured.
# (optional) - Defaults to "".
#
# [*storage_num_hosts*]
# Storage parameter needed only if storage role is configured.
# (optional) - Defaults to "".
#
# [*storage_monitor_secret*]
# Storage parameter needed only if storage role is configured.
# (optional) - Defaults to "".
#
# [*osd_bootstrap_key*]
# Storage parameter needed only if storage role is configured.
# (optional) - Defaults to "".
#
# [*storage_admin_key*]
# Storage parameter needed only if storage role is configured.
# (optional) - Defaults to "".
#
# [*storage_virsh_uuid*]
# Storage parameter needed only if storage role is configured.
# (optional) - Defaults to "".
#
# [*storage_monitor_hosts*]
# Storage parameter needed only if storage role is configured.
# (optional) - Defaults to "".
#
# [*storage_osd_disks*]
# Storage parameter needed only if storage role is configured.
# (optional) - Defaults to "".
#
# [*storage_enabled*]
# Storage parameter needed only if storage role is configured.
# This parameter tells if storage is configured or not.
# (optional) - Defaults to "".
#
# [*nfs_server*]
# IP address of NFS server to store/get glance images. Used for
# HA configuration only. UI parameter.
# (optional) - Defaults to "" (no HA configuration).
#
# [*nfs_glance_path*]
# Complete path of NFS mount to store glance images.
# HA configuration only. UI parameter.
# (optional) - Defaults to "" (no HA configuration).
#
# [*host_non_mgmt_ip*]
# Specify address of data/control interface, only if there are separate interfaces
# for management and data/control. If system has single interface for both, leave
# default value of "".
# (optional) - Defaults to "" (no multinetting - mgmt = data/ctrl).
#
# [*host_non_mgmt_gateway*]
# Gateway IP address of the data interface of the server. If server has separate
# interfaces for management and control/data, this parameter should provide gateway
# ip address of data interface. UI parameter.
# (optional) - Defaults to "" (no multinetting - mgmt = data/ctrl).
#
# [*openstack_passwd_list*]
# List of passwords of all the nodes running openstack node
# so that SSH can be done to those hosts to setup config.
# Needed for HA configuration only.
# (optional) - Defaults to "" (no HA configuration).
#
# [*openstack_user_list*]
# List of user ids of all the nodes running openstack node
# so that SSH can be done to those hosts to setup config.
# Needed for HA configuration only.
# (optional) - Defaults to "" (no HA configuration).
#
# [*compute_passwd_list*]
# List of passwords of all the nodes running compute node
# so that SSH can be done to those hosts to setup config.
# Needed for HA configuration only.
# (optional) - Defaults to "" (no HA configuration).
#
# [*host_roles*]
# List of contrail roles configured on this server. Used
# mostly by storage module to check if storage is one of
# the roles configured on this server.
# (optional) - Defaults to "" (no storage configuration).
#
# [*external_bgp*]
# IP address of external BGP router.
# (optional) - Defaults to "" (no external BGP router).
#
# [*contrail_plugin_location*]
# path to contrail neutron plugin. Use default value.
# Not exposed to SM for modification.
# (optional) - Defaults to "NEUTRON_PLUGIN_CONFIG=\'/etc/neutron/plugins/opencontrail/ContrailPlugin.ini\'".
#
class contrail::params (
$host_ip,
$uuid,
$config_ip_list,
$control_ip_list,
$database_ip_list,
$collector_ip_list,
$webui_ip_list,
$openstack_ip_list,
$compute_ip_list,
$config_name_list,
$compute_name_list,
$control_name_list,
$collector_name_list,
$openstack_name_list,
$internal_vip = "",
$external_vip = "",
$contrail_internal_vip = "",
$contrail_external_vip = "",
$database_ip_port = "9160",
$analytics_data_ttl = 48,
$analytics_syslog_port = -1,
$use_certs = False,
$puppet_server = '',
$database_initial_token = 0,
$database_dir = "/var/lib/cassandra",
$analytics_data_dir = "",
$ssd_data_dir = "",
$keystone_ip = "",
$keystone_admin_password = "contrail123",
$keystone_service_token = "c0ntrail123",
$keystone_admin_user = "admin",
$keystone_admin_tenant = "admin",
$keystone_service_tenant = "services",
$keystone_region_name = "RegionOne",
$multi_tenancy = false,
$zookeeper_ip_list = undef,
$quantum_port = "9697",
$quantum_service_protocol = "http",
$keystone_auth_protocol = "http",
$neutron_service_protocol = "http",
$keystone_auth_port = 35357,
$keystone_insecure_flag = false,
$api_nworkers = 1,
$haproxy_flag = "disable",
$manage_neutron = true,
$openstack_manage_amqp = false,
$amqp_server_ip = "",
$zk_ip_port = '2181',
$hc_interval = 5,
$vmware_ip = "",
$vmware_username = "",
$vmware_password = "",
$vmware_vswitch = "",
$keepalived_vrid = 100,
$mysql_root_password = "c0ntrail123",
$openstack_mgmt_ip_list = undef,
$encap_priority = "MPLSoUDP,MPLSoGRE,VXLAN",
$router_asn = "64512",
$metadata_secret = "",
$vgw_public_subnet = "",
$vgw_public_vn_name = "",
$vgw_interface = "",
$vgw_gateway_routes = "",
$orchestrator = "openstack",
$contrail_repo_name,
$contrail_repo_type,
$contrail_repo_ip = $serverip,
$kernel_upgrade = "yes",
$kernel_version = "3.13.0-34",
$storage_num_osd = "",
$storage_fsid = "",
$storage_num_hosts = "",
$storage_monitor_secret = "",
$osd_bootstrap_key = "",
$storage_admin_key = "",
$storage_virsh_uuid = "",
$storage_monitor_hosts = "",
$storage_osd_disks = "",
$storage_enabled = "",
$nfs_server = "",
$nfs_glance_path = "",
$host_non_mgmt_ip = "",
$host_non_mgmt_gateway = "",
$openstack_passwd_list,
$openstack_user_list,
$compute_passwd_list,
$host_roles = "",
$external_bgp = "",
$contrail_plugin_location = "NEUTRON_PLUGIN_CONFIG=\'/etc/neutron/plugins/opencontrail/ContrailPlugin.ini\'"
) {
# Manifests use keystone_admin_token to refer to keystone_admin_password too. Hence set
# that varible here.
$keystone_admin_token = $keystone_admin_password
if (($contrail_internal_vip != "") or
($internal_vip != "") or
($haproxy_flag != "enable")) {
$haproxy = false
}
else {
$haproxy = true
}
if ($zookeeper_ip_list == undef) {
$zk_ip_list_to_use = $config_ip_list
}
else {
$zk_ip_list_to_use = $zookeeper_ip_list
}
if ($openstack_mgmt_ip_list == undef) {
$openstack_mgmt_ip_list_to_use = $openstack_ip_list
}
else {
$openstack_mgmt_ip_list_to_use = $openstack_mgmt_ip_list
}
}