summaryrefslogtreecommitdiffstats
path: root/azure/aria/aria-extension-cloudify/src/aria/examples/clearwater/types/clearwater.yaml
blob: 10212622726f1df551bab4c2e099dccb8c8ae84e (plain)
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
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

imports:
  - ims.yaml
  - smtp.yaml
  - cassandra.yaml

dsl_definitions:

  clearwater_operation_dependencies: &CLEARWATER_OPERATION_DEPENDENCIES
    - "ssh.user > { get_property: [ HOST, host, ssh.user ] }"
    - "ssh.password > { get_property: [ HOST, host, ssh.password ] }"
    - "ssh.address > { get_attribute: [ HOST, public_address ] }"
    - "ssh.use_sudo > true"

policy_types:

  clearwater.Configuration:
    derived_from: tosca.policies.Root
    properties:
      zone:
        description: >-
          The domain name for SIP addresses, for example if its "example.com" then a SIP address
          could be "6505550243@example.com".
        type: string
      geographically_redundant:
        description: >-
          Enable a geographically redundant deployment.
        
          See: http://clearwater.readthedocs.io/en/stable/Geographic_redundancy.html
        type: boolean
        default: false
      site_name:
        description: >-
          Used by geographically redundant deployments.
        type: string
        required: false
      secret:
        description: >-
          Used for registration via Ellis.
        type: string

capability_types:

  clearwater.Container:
    description: >-
      Clearwater container capability.
    derived_from: tosca.capabilities.Container
    properties:
      hostname:
        type: string
      ssh.user:
        type: string
      ssh.password:
        type: string
      max_log_directory_size:
        type: scalar-unit.size
        default: 0 B # 0 means no max size
      reduce_cassandra_mem_usage:
        type: boolean
        default: false

  # http://clearwater.readthedocs.io/en/stable/Clearwater_IP_Port_Usage.html

  # SIP endpoints

  clearwater.Endpoint.SIP.Upstream:
    derived_from: tosca.capabilities.Endpoint
    properties:
      protocol: # override
        type: string
        default: sip
      port: # override
        type: tosca.datatypes.network.PortDef
        default: 5052

  clearwater.Endpoint.SIP.Upstream.Secure:
    derived_from: tosca.capabilities.Endpoint
    properties:
      protocol: # override
        type: string
        default: sip
      port: # override
        type: tosca.datatypes.network.PortDef
        default: 5054
      secure: # override
        type: boolean
        default: true

  clearwater.Endpoint.SIP.Proxy:
    derived_from: tosca.capabilities.Endpoint
    properties:
      protocol: # override
        type: string
        default: sip
      port: # override
        type: tosca.datatypes.network.PortDef
        default: 5058

  clearwater.Endpoint.SIP.Public:
    derived_from: tosca.capabilities.Endpoint.Public
    properties:
      protocol: # override
        type: string
        default: sip
      port: # override
        type: tosca.datatypes.network.PortDef
        default: 5060

  clearwater.Endpoint.SIP.Public.Secure:
    derived_from: tosca.capabilities.Endpoint.Public
    properties:
      protocol: # override
        type: string
        default: sip
      port: # override
        type: tosca.datatypes.network.PortDef
        default: 5062
      secure: # override
        type: boolean
        default: true

  # STUN endpoints

  clearwater.Endpoint.STUN:
    derived_from: tosca.capabilities.Endpoint
    properties:
      protocol: # override
        type: string
        default: stun
      port: # override
        type: tosca.datatypes.network.PortDef
        default: 3478

  # Diameter endpoints

  clearwater.Endpoint.Diameter.HSS:
    description: >-
      In shared_config: hs_listen_port
    derived_from: tosca.capabilities.Endpoint
    properties:
      protocol: # override
        type: string
        default: diameter
      port: # override
        type: tosca.datatypes.network.PortDef
        default: 3868

  clearwater.Endpoint.Diameter.CTF:
    description: >-
      In shared_config: ralf_listen_port
    derived_from: tosca.capabilities.Endpoint
    properties:
      protocol: # override
        type: string
        default: diameter
      port: # override
        type: tosca.datatypes.network.PortDef
        default: 3869

  # Management endpoints

  clearwater.Endpoint.Management.Homer:
    derived_from: ims.interfaces.HTTP
    properties:
      port: # override
        type: tosca.datatypes.network.PortDef
        default: 7888

  clearwater.Endpoint.Management.Homestead:
    derived_from: ims.interfaces.HTTP
    properties:
      port: # override
        type: tosca.datatypes.network.PortDef
        default: 8888

  clearwater.Endpoint.Management.Homestead.Provisioning:
    description: >-
      In shared_config: homestead_provisioning_port
    derived_from: ims.interfaces.HTTP
    properties:
      port: # override
        type: tosca.datatypes.network.PortDef
        default: 8889

  clearwater.Endpoint.Management.Sprout:
    derived_from: ims.interfaces.HTTP
    properties:
      port: # override
        type: tosca.datatypes.network.PortDef
        default: 9886

  clearwater.Endpoint.Management.Ralf:
    derived_from: ims.interfaces.HTTP
    properties:
      port: # override
        type: tosca.datatypes.network.PortDef
        default: 9888 # note: some documentation shows 10888

  # Web endpoints

  clearwater.Endpoint.Public.Web:
    derived_from: tosca.capabilities.Endpoint.Public
    properties:
      protocol: # override
        type: string
        default: http
      port: # override
        type: tosca.datatypes.network.PortDef
        default: 80
      url_path: # override
        type: string
        default: /

  clearwater.Endpoint.Public.Web.Secure:
    derived_from: tosca.capabilities.Endpoint.Public
    properties:
      protocol: # override
        type: string
        default: https
      port: # override
        type: tosca.datatypes.network.PortDef
        default: 443
      secure: # override
        type: boolean
        default: true
      url_path: # override
        type: string
        default: /        

  # Other endpoints

  clearwater.Endpoint.Chronos:
    derived_from: tosca.capabilities.Endpoint
    properties:
      port: # override
        type: tosca.datatypes.network.PortDef
        default: 7253

  clearwater.Endpoint.Memcached:
    derived_from: tosca.capabilities.Endpoint
    properties:
      port: # override
        type: tosca.datatypes.network.PortDef
        default: 11211

  clearwater.Endpoint.Astaire:
    derived_from: tosca.capabilities.Endpoint
    properties:
      port: # override
        type: tosca.datatypes.network.PortDef
        default: 11311

data_types:

  clearwater.Number:
    derived_from: string
    constraints:
      - pattern: '^\d{10}$'

node_types:

  # http://clearwater.readthedocs.io/en/stable/Clearwater_Architecture.html

  clearwater.SoftwareComponent:
    description: >-
      Clearwater software components must be installed in a Clearwater-capable compute node.
    derived_from: tosca.nodes.SoftwareComponent
    requirements:
      - host: # override
          capability: clearwater.Container
          relationship: tosca.relationships.HostedOn

  clearwater.Bono:
    description: >-
      Clearwater edge proxy.

      The Bono nodes form a horizontally scalable SIP edge proxy providing both a SIP IMS Gm
      compliant interface and a WebRTC interface to clients. Client connections are load balanced
      across the nodes. The Bono node provides the anchor point for the client's connection to the
      Clearwater system, including support for various NAT traversal mechanisms. A client is
      therefore anchored to a particular Bono node for the duration of its registration, but can
      move to another Bono node if the connection or client fails.

      Clients can connect to Bono using SIP/UDP or SIP/TCP. Bono supports any WebRTC client that
      performs call setup signaling using SIP over WebSocket.

      Alternatively, Clearwater can be deployed with a third party P-CSCF or Session Border
      Controller implementing P-CSCF. In this case Bono nodes are not required.
    derived_from: clearwater.SoftwareComponent
    capabilities:
      p-cscf: ims.functions.P-CSCF
      gm: ims.interfaces.Gm
      sip_endpoint: clearwater.Endpoint.SIP.Public
      sip_secure_endpoint: clearwater.Endpoint.SIP.Public.Secure
      sip_proxy: clearwater.Endpoint.SIP.Proxy # open to Sprout
      stun_endoint: clearwater.Endpoint.STUN
    requirements:
      - sip_downstream:
          capability: clearwater.Endpoint.SIP.Upstream
          occurrences: [ 0, UNBOUNDED ]       
      - sip_secure_downstream:
          capability: clearwater.Endpoint.SIP.Upstream.Secure
          occurrences: [ 0, UNBOUNDED ]       
      - ralf: # for billable events
          capability: clearwater.Endpoint.Management.Ralf
          occurrences: [ 0, 1 ]       
    interfaces:
      Standard:
        type: tosca.interfaces.node.lifecycle.Standard
        create:
          implementation:
            primary: scripts/bono/create.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES
        delete:
          implementation:
            primary: scripts/bono/delete.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES

  clearwater.Sprout:
    description: >-
      Clearwater SIP router.

      The Sprout nodes act as a horizontally scalable, combined SIP registrar and authoritative
      routing proxy, and handle client authentication and the ISC interface to application servers.
      The Sprout nodes also contain the in-built MMTEL application server. SIP transactions are load
      balanced across the Sprout cluster, so there is no long-lived association between a client and
      a particular Sprout node. Sprout does not store any long-lived data itself and instead uses
      web service interfaces to Homestead and Homer to retrieve HSS configuration such as
      authentication data/user profiles and MMTEL service settings APIs to Vellum for storing
      subscriber registration data and for running timers.

      Sprout is where the bulk of the I-CSCF and S-CSCF function resides, with the remainder
      provided by Dime (and backed by the long-lived data stores on Vellum).            
    derived_from: clearwater.SoftwareComponent
    capabilities:
      sip_endpoint: clearwater.Endpoint.SIP.Upstream # open to Bono
      sip_secure_endpoint: clearwater.Endpoint.SIP.Upstream.Secure # open to Bono
      management_endpoint: clearwater.Endpoint.Management.Sprout
      memento:
        type: tosca.capabilities.Container
        valid_source_types: [ clearwater.Memento ]
    requirements:
# cyclical: see ARIA-327
#      - sip_upstream:
#          capability: clearwater.Endpoint.SIP.Proxy      
#          occurrences: [ 0, UNBOUNDED ]       
      - homer: # for subscriber profiles
          capability: clearwater.Endpoint.Management.Homer
      - ralf: # for billable events
          capability: clearwater.Endpoint.Management.Ralf
          occurrences: [ 0, 1 ]       
      - chronos:
          capability: clearwater.Endpoint.Chronos
          node: clearwater.Vellum
      - astaire:
          capability: clearwater.Endpoint.Astaire
          node: clearwater.Vellum
    interfaces:
      Standard:
        type: tosca.interfaces.node.lifecycle.Standard
        create:
          implementation:
            primary: scripts/sprout/create.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES
        delete:
          implementation:
            primary: scripts/sprout/delete.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES

  clearwater.Memento:
    derived_from: tosca.nodes.Root
    capabilities:
      sip-as: ims.functions.SIP-AS
      web_secure_endpoint: clearwater.Endpoint.Public.Web.Secure
    requirements:
      - host:
          capability: tosca.capabilities.Container
          node: clearwater.Sprout
      - cassandra_thrift:
          capability: cassandra.Endpoint.Thrift
          node: clearwater.Vellum
    interfaces:
      Standard:
        type: tosca.interfaces.node.lifecycle.Standard
        create:
          implementation:
            primary: scripts/memento/create.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES
        delete:
          implementation:
            primary: scripts/memento/delete.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES

  clearwater.Dime:
    description: >-
      Clearwater Diameter gateway.

      Dime nodes run Clearwater's Homestead and Ralf components.
    derived_from: clearwater.SoftwareComponent
    capabilities:
      host:
         type: tosca.capabilities.Container
         valid_source_types: [ clearwater.DimeSoftwareComponent ]
    interfaces:
      Standard:
        type: tosca.interfaces.node.lifecycle.Standard
        create:
          implementation:
            primary: scripts/dime/create.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES
        delete:
          implementation:
            primary: scripts/dime/delete.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES

  clearwater.DimeSoftwareComponent:
    description: >-
      Base type for Dime software components.
    derived_from: clearwater.SoftwareComponent
    requirements:
      - host: # override
          capability: tosca.capabilities.Container
          node: clearwater.Dime

  clearwater.Homestead:
    description: >-
      Clearwater HSS cache.

      Homestead provides a web services interface to Sprout for retrieving authentication
      credentials and user profile information. It can either master the data (in which case it
      exposes a web services provisioning interface) or can pull the data from an IMS compliant HSS
      over the Cx interface. The Homestead nodes themselves are stateless - the mastered / cached
      subscriber data is all stored on Vellum (via Cassandra's Thrift interface).

      In the IMS architecture, the HSS mirror function is considered to be part of the I-CSCF and
      S-CSCF components, so in Clearwater I-CSCF and S-CSCF function is implemented with a
      combination of Sprout and Dime clusters.
    derived_from: clearwater.DimeSoftwareComponent
    capabilities:
      hss: ims.functions.HSS
      cx: ims.interfaces.Cx
      diameter_endpoint: clearwater.Endpoint.Diameter.HSS
      management_endpoint: clearwater.Endpoint.Management.Homestead # open to Ellis
      provisioning_management_endpoint: clearwater.Endpoint.Management.Homestead.Provisioning # open to Ellis
    requirements:
      - cassandra_thrift:
          capability: cassandra.Endpoint.Thrift
          node: clearwater.Vellum
    interfaces:
      Standard:
        type: tosca.interfaces.node.lifecycle.Standard
        create:
          implementation:
            primary: scripts/homestead/create.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES
        delete:
          implementation:
            primary: scripts/homestead/delete.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES

  clearwater.Ralf:
    description: >-
      Clearwater CTF.

      Ralf provides an HTTP API that both Bono and Sprout can use to report billable events that
      should be passed to the CDF (Charging Data Function) over the Rf billing interface. Ralf is
      stateless, using Vellum to maintain the long lived session state and run the timers necessary
      to enable it to conform to the Rf protocol.
    derived_from: clearwater.DimeSoftwareComponent
    capabilities:
      ctf: ims.functions.CTF
      rf: ims.interfaces.Rf
      diameter_endpoint: clearwater.Endpoint.Diameter.CTF
      management_endpoint: clearwater.Endpoint.Management.Ralf # open to Sprout, Bono, Vellum
    requirements:
      - chronos:
          capability: clearwater.Endpoint.Chronos
          node: clearwater.Vellum
      - astaire:
          capability: clearwater.Endpoint.Astaire
          node: clearwater.Vellum
    interfaces:
      Standard:
        type: tosca.interfaces.node.lifecycle.Standard
        create:
          implementation:
            primary: scripts/ralf/create.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES
        delete:
          implementation:
            primary: scripts/ralf/delete.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES

  clearwater.Vellum:
    description: >-
      Clearwater state store.

      Vellum is used to maintain all long-lived state in the deployment. It does this by running a
      number of cloud optimized, distributed storage clusters.

      - Cassandra. Cassandra is used by Homestead to store authentication credentials and profile
      information, and is used by Homer to store MMTEL service settings. Vellum exposes Cassandra's
      Thrift API.

      - etcd. etcd is used by Vellum itself to share clustering information between Vellum nodes and
      by other nodes in the deployment for shared configuration.

      - Chronos. Chronos is a distributed, redundant, reliable timer service developed by
      Clearwater. It is used by Sprout and Ralf nodes to enable timers to be run (e.g. for SIP
      Registration expiry) without pinning operations to a specific node (one node can set the timer
      and another act on it when it pops). Chronos is accessed via an HTTP API.

      - Memcached / Astaire. Vellum also runs a Memcached cluster fronted by Astaire. Astaire is a
      service developed by Clearwater that enabled more rapid scale up and scale down of memcached
      clusters. This cluster is used by Sprout and Ralf for storing registration and session state.
    derived_from: clearwater.SoftwareComponent
    capabilities:
      cassandra_endpoint: cassandra.Endpoint # open to other Vellum
      cassandra_thrift_endpoint: cassandra.Endpoint.Thrift # open to Homer, Dime (Homestead), Sprout (Memento)
      chronos_endpoint: clearwater.Endpoint.Chronos # open to other Vellum, Sprout, Dime (Ralf)
      memcached_endpoint: clearwater.Endpoint.Memcached # open to other Vellum
      astaire_endpoint: clearwater.Endpoint.Astaire # open to Sprout, Dime (Ralf)
# cyclical: see ARIA-327
#    requirements:
#      - ralf:
#          capability: clearwater.Endpoint.Management.Ralf
#          occurrences: [ 0, 1 ]       
    interfaces:
      Standard:
        type: tosca.interfaces.node.lifecycle.Standard
        create:
          implementation:
            primary: scripts/vellum/create.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES
        delete:
          implementation:
            primary: scripts/vellum/delete.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES

  clearwater.Homer:
    description: >-
      Clearwater XDMS.

      Homer is a standard XDMS used to store MMTEL service settings documents for each user of the
      system. Documents are created, read, updated and deleted using a standard XCAP interface. As
      with Homestead, the Homer nodes use Vellum as the data store for all long lived data.
    derived_from: clearwater.SoftwareComponent
    capabilities:
      xdms: ims.functions.XDMS
      management_endpoint: clearwater.Endpoint.Management.Homer # open to Sprout, Ellis
    requirements:
      - cassandra_thrift:
          capability: cassandra.Endpoint.Thrift
          node: clearwater.Vellum
    interfaces:
      Standard:
        type: tosca.interfaces.node.lifecycle.Standard
        create:
          implementation:
            primary: scripts/homer/create.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES
        delete:
          implementation:
            primary: scripts/homer/delete.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES

  clearwater.Ellis:
    description: >-
      Ellis is a sample provisioning portal providing self sign-up, password management, line
      management and control of MMTEL service settings. It is not intended to be a part of
      production Clearwater deployments (it is not easy to horizontally scale because of the MySQL
      underpinnings for one thing) but to make the system easy to use out of the box.
    derived_from: clearwater.SoftwareComponent
    properties:
      provision_numbers_start:
        type: clearwater.Number
        default: '6505550000'
      provision_numbers_count:
        type: integer
        default: 0 # 0 means do not provision numbers
        constraints:
          - greater_or_equal: 0
    capabilities:
      web_endpoint: clearwater.Endpoint.Public.Web
      web_secure_endpoint: clearwater.Endpoint.Public.Web.Secure
    requirements:
      - homer: # for subscriber profiles
          capability: clearwater.Endpoint.Management.Homer
      - homestead: # for subscriber authentication
          capability: clearwater.Endpoint.Management.Homestead
      - homestead_provisioning:
          capability: clearwater.Endpoint.Management.Homestead.Provisioning
      - ralf: # TODO: really?
          capability: clearwater.Endpoint.Management.Ralf
          occurrences: [ 0, 1 ]       
      - smtp:
          capability: smtp.SMTP
    interfaces:
      Standard:
        type: tosca.interfaces.node.lifecycle.Standard
        create:
          implementation:
            primary: scripts/ellis/create.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES
        configure:
          implementation:
            primary: scripts/ellis/configure.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES
        delete:
          implementation:
            primary: scripts/ellis/delete.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES

  clearwater.I-CSCF:
    description: >-
      Clearwater I-CSCF.

      Logical node encompassing Sprout and Homestead. Required only if you need to expose the I-CSCF
      function.
    derived_from: tosca.nodes.Root
    capabilities:
      i-cscf: ims.functions.I-CSCF
    requirements:
      - sprout:
          capability: tosca.capabilities.Node
          node: clearwater.Sprout
      - homestead:
          capability: tosca.capabilities.Node
          node: clearwater.Homestead

  clearwater.S-CSCF:
    description: >-
      Clearwater S-CSCF.

      Logical node encompassing Sprout and Homestead. Required only if you need to expose the S-CSCF
      function.
    derived_from: tosca.nodes.Root
    capabilities:
      s-cscf: ims.functions.S-CSCF
    requirements:
      - sprout:
          capability: tosca.capabilities.Node
          node: clearwater.Sprout
      - homestead:
          capability: tosca.capabilities.Node
          node: clearwater.Homestead

  clearwater.LiveTest:
    derived_from: tosca.nodes.SoftwareComponent
    interfaces:
      Standard:
        type: tosca.interfaces.node.lifecycle.Standard
        create:
          implementation:
            primary: scripts/live-test/create.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES
        delete:
          implementation:
            primary: scripts/live-test/delete.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES

  clearwater.HostBase:
    derived_from: tosca.nodes.Compute
    interfaces:
      Standard:
        type: tosca.interfaces.node.lifecycle.Standard
        configure:
          implementation:
            primary: scripts/host-base/configure.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES
    capabilities:
      host: # override
        type: clearwater.Container
        valid_source_types: [ tosca.nodes.SoftwareComponent ]
      os: # override
        type: tosca.capabilities.OperatingSystem
        properties:
          architecture:
            type: string
            default: x86_64
          type:
            type: string
            default: linux
          distribution:
            type: string
            default: ubuntu
          version:
            type: version
            default: 14.04

  clearwater.Host:
    description: >-
      Default Clearwater host.

      Note that any node can function as a Clearwater host as long as it has a clearwater.Container
      capability.
    derived_from: clearwater.HostBase
    capabilities:
      host: # override
        type: clearwater.Container
        valid_source_types: [ tosca.nodes.SoftwareComponent ]
        properties:
          mem_size:
            type: scalar-unit.size
            constraints:
              - greater_or_equal: 0 MB
            default: 4 GB # will run out of memory with less than this 
    interfaces:
      Standard:
        type: tosca.interfaces.node.lifecycle.Standard
        configure:
          implementation:
            primary: scripts/host/configure.sh
            dependencies: *CLEARWATER_OPERATION_DEPENDENCIES