forked from Orange-OpenSource/opnfv-cloudify-clearwater
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openstack-blueprint.yaml
635 lines (556 loc) · 17.8 KB
/
openstack-blueprint.yaml
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
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
#######################################################################
#
# Copyright (c) 2017 Orange
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
########################################################################
########################################################################
# This Blueprint deploy the clearwater IMS on an openstack environment
########################################################################
tosca_definitions_version: cloudify_dsl_1_3
imports:
- http://www.getcloudify.org/spec/cloudify/4.0.1/types.yaml
- http://www.getcloudify.org/spec/openstack-plugin/2.0.1/plugin.yaml
- http://www.getcloudify.org/spec/diamond-plugin/1.3/plugin.yaml
- types/monitoring.yaml
- types/clearwater.yaml
- types/bind.yaml
inputs:
image_id:
type: string
description: Image ID of the agent VM's (Ubuntu 14.04 for clearwater)
flavor_id:
type: string
description: Flavor ID of the agent VM's (RAM >= 2 GB)
agent_user:
type: string
default: ubuntu
description: User for connecting to agent VM's
network_name:
description: Openstack network name the new server will be connected to
default: net2
external_network_name:
type: string
description: Network that will be the floating IP
public_domain:
type: string
description: Sip domain for sip users and bono load-balancing
release:
type: string
default: stable
description: Clearwater release
key_pair_name:
default: clearwater-key
description: Openstack key pair name of the key to associate with the new server
private_key_path:
description: |
Path to the private key which will be used for connecting to the server
on the manager or machine running CLI if running in local mode.
with_ellis:
type: integer
description: 1 for true 0 for false
default: 1
bono_cluster_size:
type: integer
description: number of bono instance
default: 1
sprout_cluster_size:
type: integer
description: number of sprout instance
default: 1
dime_cluster_size:
type: integer
description: number of dime instance
default: 1
vellum_cluster_size:
type: integer
description: number of vellum instance
default: 1
homer_cluster_size:
type: integer
description: number of homer instance
default: 1
dsl_definitions:
openstack_config: &openstack_config
username: { get_secret: keystone_username }
password: { get_secret: keystone_password }
project_name: { get_secret: keystone_tenant_name }
auth_url: { get_secret: keystone_url }
region: { get_secret: region }
user_domain_name: { get_secret: user_domain_name }
project_domain_name: { get_secret: project_domain_name }
custom_configuration:
keystone_client:
insecure: true
nova_client:
insecure: true
neutron_client:
insecure: true
cinder_client:
insecure: true
node_types:
# Global types for VMs
# - specifies defaults flavor, image and user agent to use for VMs
# - install monitoring agent on VMs
# - adding some monitoring collectors (CPU, RAM, DISK and Network)
clearwater.nodes.MonitoredServer:
derived_from: cloudify.openstack.nodes.Server
properties:
openstack_config:
default: *openstack_config
cloudify_agent:
default:
user: { get_input: agent_user }
key: { get_property: [ keypair, private_key_path ] }
image:
default: { get_input: image_id }
flavor:
default: { get_input: flavor_id }
management_network_name:
default: { get_input: network_name }
interfaces:
cloudify.interfaces.monitoring_agent:
install:
implementation: diamond.diamond_agent.tasks.install
inputs:
diamond_config:
default:
interval: 5
start: diamond.diamond_agent.tasks.start
stop: diamond.diamond_agent.tasks.stop
uninstall: diamond.diamond_agent.tasks.uninstall
cloudify.interfaces.monitoring:
start:
implementation: diamond.diamond_agent.tasks.add_collectors
inputs:
collectors_config:
default:
CPUCollector: {}
MemoryCollector: {}
LoadAverageCollector: {}
DiskUsageCollector:
config:
devices: x?vd[a-z]+[0-9]*$
NetworkCollector: {}
node_templates:
keypair:
type: cloudify.openstack.nodes.KeyPair
properties:
openstack_config: *openstack_config
resource_id: { get_input: key_pair_name }
use_external_resource: true
private_key_path: { get_input: private_key_path }
# Declare host VMs and attach them at floating ip or security group
sprout_host:
type: clearwater.nodes.MonitoredServer
capabilities:
scalable:
properties:
default_instances: { get_input: sprout_cluster_size }
relationships:
- type: cloudify.openstack.server_connected_to_keypair
target: keypair
- target: base_security_group
type: cloudify.openstack.server_connected_to_security_group
- target: internal_sip_security_group
type: cloudify.openstack.server_connected_to_security_group
- target: sprout_security_group
type: cloudify.openstack.server_connected_to_security_group
bono_host:
type: clearwater.nodes.MonitoredServer
relationships:
- type: cloudify.openstack.server_connected_to_keypair
target: keypair
- target: base_security_group
type: cloudify.openstack.server_connected_to_security_group
- target: bono_security_group
type: cloudify.openstack.server_connected_to_security_group
- target: internal_sip_security_group
type: cloudify.openstack.server_connected_to_security_group
- type: cloudify.openstack.server_connected_to_floating_ip
target: bono_floatingip
ellis_host:
type: clearwater.nodes.MonitoredServer
capabilities:
scalable:
properties:
default_instances: { get_input: with_ellis }
relationships:
- type: cloudify.openstack.server_connected_to_keypair
target: keypair
- target: base_security_group
type: cloudify.openstack.server_connected_to_security_group
- target: ellis_security_group
type: cloudify.openstack.server_connected_to_security_group
- type: cloudify.openstack.server_connected_to_floating_ip
target: ellis_floatingip
vellum_host:
type: clearwater.nodes.MonitoredServer
capabilities:
scalable:
properties:
default_instances: { get_input: vellum_cluster_size }
relationships:
- type: cloudify.openstack.server_connected_to_keypair
target: keypair
- target: base_security_group
type: cloudify.openstack.server_connected_to_security_group
- target: vellum_security_group
type: cloudify.openstack.server_connected_to_security_group
dime_host:
type: clearwater.nodes.MonitoredServer
capabilities:
scalable:
properties:
default_instances: { get_input: dime_cluster_size }
relationships:
- type: cloudify.openstack.server_connected_to_keypair
target: keypair
- target: base_security_group
type: cloudify.openstack.server_connected_to_security_group
- target: dime_security_group
type: cloudify.openstack.server_connected_to_security_group
homer_host:
type: clearwater.nodes.MonitoredServer
capabilities:
scalable:
properties:
default_instances: { get_input: homer_cluster_size }
relationships:
- type: cloudify.openstack.server_connected_to_keypair
target: keypair
- target: base_security_group
type: cloudify.openstack.server_connected_to_security_group
- target: homer_security_group
type: cloudify.openstack.server_connected_to_security_group
bind_host:
type: clearwater.nodes.MonitoredServer
capabilities:
scalable:
properties:
min_instances: 1
max_instances: 1
relationships:
- type: cloudify.openstack.server_connected_to_keypair
target: keypair
- target: base_security_group
type: cloudify.openstack.server_connected_to_security_group
- target: bind_security_group
type: cloudify.openstack.server_connected_to_security_group
- type: cloudify.openstack.server_connected_to_floating_ip
target: bind_floatingip
proxy_host:
type: cloudify.openstack.nodes.Server
capabilities:
scalable:
properties:
min_instances: 1
max_instances: 1
properties:
cloudify_agent:
user: { get_input: agent_user }
key: { get_property: [ keypair, private_key_path ] }
image: { get_input: image_id }
flavor: { get_input: flavor_id }
management_network_name: { get_input: network_name }
openstack_config: *openstack_config
interfaces:
cloudify.interfaces.monitoring_agent:
install:
implementation: diamond.diamond_agent.tasks.install
inputs:
diamond_config:
interval: 10
start: diamond.diamond_agent.tasks.start
stop: diamond.diamond_agent.tasks.stop
uninstall: diamond.diamond_agent.tasks.uninstall
relationships:
- type: cloudify.openstack.server_connected_to_keypair
target: keypair
# Declare clearwater and other software
sprout:
type: clearwater.nodes.sprout
properties:
private_domain: clearwater.local
release: { get_input: release }
relationships:
- type: cloudify.relationships.contained_in
target: sprout_host
- type: app_connected_to_bind
target: bind
- type: monitors_sprout_nodes
target: proxy_node
bono:
type: clearwater.nodes.bono
properties:
private_domain: clearwater.local
release: { get_input: release }
relationships:
- type: cloudify.relationships.contained_in
target: bono_host
- type: app_connected_to_bind
target: bind
- type: monitors_bono_nodes
target: proxy_node
ellis:
type: clearwater.nodes.ellis
properties:
private_domain: clearwater.local
release: { get_input: release }
relationships:
- type: cloudify.relationships.contained_in
target: ellis_host
- type: app_connected_to_bind_ellis
target: bind
dime:
type: clearwater.nodes.dime
properties:
private_domain: clearwater.local
release: { get_input: release }
relationships:
- type: cloudify.relationships.contained_in
target: dime_host
- type: app_connected_to_bind
target: bind
vellum:
type: clearwater.nodes.vellum
properties:
private_domain: clearwater.local
release: { get_input: release }
relationships:
- type: cloudify.relationships.contained_in
target: vellum_host
- type: app_connected_to_bind
target: bind
homer:
type: clearwater.nodes.homer
properties:
private_domain: clearwater.local
release: { get_input: release }
relationships:
- type: cloudify.relationships.contained_in
target: homer_host
- type: app_connected_to_bind
target: bind
bind:
type: clearwater.infra.bind
properties:
private_domain: clearwater.local
release: { get_input: release }
public_domain: { get_input: public_domain }
secret_code: secret
relationships:
- type: cloudify.relationships.contained_in
target: bind_host
proxy_node:
type: SNMPProxy
relationships:
- type: cloudify.relationships.contained_in
target: proxy_host
# Declare all security groups for clearwater and other nodes
base_security_group:
type: cloudify.openstack.nodes.SecurityGroup
properties:
openstack_config: *openstack_config
security_group:
name: clearwater-sg_base
description: SSH
rules:
- remote_ip_prefix: 0.0.0.0/0
port: 22
- remote_ip_prefix: 0.0.0.0/0
port: 4000
- remote_ip_prefix: 0.0.0.0/0
port: 2380
- remote_ip_prefix: 0.0.0.0/0
port: 161
protocol: udp
bono_security_group:
type: cloudify.openstack.nodes.SecurityGroup
properties:
openstack_config: *openstack_config
security_group:
name: clearwater-sg_bono
description: STUN SIP RTP 0MQ
rules:
- remote_ip_prefix: 0.0.0.0/0
port: 3478
protocol: tcp
- remote_ip_prefix: 0.0.0.0/0
port: 3478
protocol: udp
- remote_ip_prefix: 0.0.0.0/0
port: 5060
protocol: tcp
- remote_ip_prefix: 0.0.0.0/0
port: 5060
protocol: udp
- remote_ip_prefix: 0.0.0.0/0
port: 5062
protocol: tcp
- remote_ip_prefix: 0.0.0.0/0
port_range_min: 32768
port_range_max: 65535
protocol: udp
- remote_ip_prefix: 0.0.0.0/0
port: 6669
- remote_ip_prefix: 0.0.0.0/0
port: 5058
protocol: tcp
internal_sip_security_group:
type: cloudify.openstack.nodes.SecurityGroup
properties:
openstack_config: *openstack_config
security_group:
name: clearwater-sg_internal_sip
description: Internal SIP signalling
rules:
- remote_ip_prefix: 0.0.0.0/0
port: 5058
protocol: tcp
- remote_ip_prefix: 0.0.0.0/0
port: 5054
protocol: tcp
- remote_ip_prefix: 0.0.0.0/0
port: 5052
protocol: tcp
sprout_security_group:
type: cloudify.openstack.nodes.SecurityGroup
properties:
openstack_config: *openstack_config
security_group:
name: clearwater-sg_sprout
description: memcached Chronos 0MQ
rules:
- remote_ip_prefix: 0.0.0.0/0
port: 9888
protocol: tcp
dime_security_group:
type: cloudify.openstack.nodes.SecurityGroup
properties:
openstack_config: *openstack_config
security_group:
name: clearwater-sg_dime
description: memcached Chronos REST
rules:
- remote_ip_prefix: 0.0.0.0/0
port: 8888
protocol: tcp
- remote_ip_prefix: 0.0.0.0/0
port: 8889
protocol: tcp
- remote_ip_prefix: 0.0.0.0/0
port: 10888
protocol: tcp
vellum_security_group:
type: cloudify.openstack.nodes.SecurityGroup
properties:
openstack_config: *openstack_config
security_group:
name: clearwater-sg_vellum
description: REST Cassandra 0MQ
rules:
- remote_ip_prefix: 0.0.0.0/0
port: 11211
protocol: tcp
- remote_ip_prefix: 0.0.0.0/0
port: 11311
protocol: tcp
- remote_ip_prefix: 0.0.0.0/0
port: 7253
protocol: tcp
- remote_ip_prefix: 0.0.0.0/0
port: 7000
protocol: tcp
- remote_ip_prefix: 0.0.0.0/0
port: 9160
protocol: tcp
- remote_ip_prefix: 0.0.0.0/0
port_range_min: 6667
port_range_max: 6668
homer_security_group:
type: cloudify.openstack.nodes.SecurityGroup
properties:
openstack_config: *openstack_config
security_group:
name: clearwater-sg_homer
description: REST Cassandra 0MQ
rules:
- remote_ip_prefix: 0.0.0.0/0
port: 7888
protocol: tcp
- remote_ip_prefix: 0.0.0.0/0
port: 9160
protocol: tcp
ellis_security_group:
type: cloudify.openstack.nodes.SecurityGroup
capabilities:
scalable:
properties:
default_instances: { get_input: with_ellis }
properties:
openstack_config: *openstack_config
security_group:
name: clearwater-sg_ellis
description: Web UI
rules:
- remote_ip_prefix: 0.0.0.0/0
port: 80
protocol: tcp
- remote_ip_prefix: 0.0.0.0/0
port: 443
protocol: tcp
bind_security_group:
type: cloudify.openstack.nodes.SecurityGroup
properties:
openstack_config: *openstack_config
security_group:
name: clearwater-sg_bind
description: DNS
rules:
- remote_ip_prefix: 0.0.0.0/0
port: 53
protocol: udp
- remote_ip_prefix: 0.0.0.0/0
port: 53
# Declare floating IP for bono, bind and ellis nodes
bono_floatingip:
type: cloudify.openstack.nodes.FloatingIP
properties:
openstack_config: *openstack_config
floatingip:
floating_network_name: { get_input: external_network_name }
bind_floatingip:
type: cloudify.openstack.nodes.FloatingIP
properties:
openstack_config: *openstack_config
floatingip:
floating_network_name: { get_input: external_network_name }
ellis_floatingip:
type: cloudify.openstack.nodes.FloatingIP
capabilities:
scalable:
properties:
default_instances: { get_input: with_ellis }
properties:
openstack_config: *openstack_config
floatingip:
floating_network_name: { get_input: external_network_name }
groups:
bono_group:
members: [bono_host, bono_floatingip]
policies:
scale_bono:
type: cloudify.policies.scaling
properties:
default_instances: { get_input: bono_cluster_size }
targets: [bono_group]
outputs:
dns_ip:
value: { get_attribute: [bind_floatingip, floating_ip_address] }
ellis_ip:
value: { get_attribute: [ellis_floatingip, floating_ip_address] }