forked from oasis-open/tosca-community-contributions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
node.yaml
531 lines (510 loc) · 18.3 KB
/
node.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
tosca_definitions_version: tosca_simple_yaml_1_2
namespace: http://docs.oasis-open.org/tosca/ns/simple/yaml/1.2
metadata:
template_name: tosca-normative-node-types
template_author: TOSCA TC
template_version: 1.2.0
description: >-
This TOSCA definitions document contains the TOSCA Simple Profile
node types as defined in the TOSCA Simple Profile for YAML v1.2
specification.
imports:
- data.yaml
- capability.yaml
- interface.yaml
- relationship.yaml
node_types:
tosca.nodes.Root:
description: >
This is the default (root) TOSCA Node Type that all other TOSCA
nodes should extends. This allows all TOSCA nodes to have a
consistent set of features for modeling and management (e.g,
consistent definitions for requirements, capabilities, and
lifecycle interfaces).
attributes:
tosca_id:
type: string
description: >-
A unique identifier of the realized instance of a Node
Template that derives from any TOSCA normative type.
tosca_name:
type: string
description: >
This attribute reflects the name of the Node Template as
defined in the TOSCA service template. This name is not
unique to the realized instance model of corresponding
deployed application as each template in the model can
result in one or more instances (e.g., scaled) when
orchestrated to a provider environment.
state:
type: string
description: >-
The state of the node instance. See section “Node States”
for allowed values.
default: initial
capabilities:
feature:
type: tosca.capabilities.Node
requirements:
- dependency:
capability: tosca.capabilities.Node
node: tosca.nodes.Root
relationship: tosca.relationships.DependsOn
occurrences: [ 0, UNBOUNDED ]
interfaces:
Standard:
type: tosca.interfaces.node.lifecycle.Standard
tosca.nodes.Abstract.Compute:
derived_from: tosca.nodes.Root
description: >-
The TOSCA Abstract.Compute node represents an abstract compute
resource without any requirements on storage or network
resources.
capabilities:
host:
type: tosca.capabilities.Compute
valid_source_types: []
tosca.nodes.Compute:
derived_from: tosca.nodes.Abstract.Compute
description: >
The TOSCA Compute node represents one or more real or virtual
processors of software applications or services along with other
essential local resources. Collectively, the resources the
compute node represents can logically be viewed as a (real or
virtual) “server”.
attributes:
private_address:
type: string
description: >-
The primary private IP address assigned by the cloud
provider that applications may use to access the Compute
node.
public_address:
type: string
description: >-
The primary public IP address assigned by the cloud provider
that applications may use to access the Compute node.
networks:
type: map
entry_schema:
type: tosca.datatypes.network.NetworkInfo
ports:
type: map
entry_schema:
type: tosca.datatypes.network.PortInfo
requirements:
- local_storage:
capability: tosca.capabilities.Attachment
node: tosca.nodes.BlockStorage
relationship: tosca.relationships.AttachesTo
occurrences: [0, UNBOUNDED]
capabilities:
host:
type: tosca.capabilities.Compute
valid_source_types: [tosca.nodes.SoftwareComponent]
os:
type: tosca.capabilities.OperatingSystem
endpoint:
type: tosca.capabilities.Endpoint.Admin
scalable:
type: tosca.capabilities.Scalable
binding:
type: tosca.capabilities.network.Bindable
tosca.nodes.SoftwareComponent:
derived_from: tosca.nodes.Root
description: >-
The TOSCA SoftwareComponent node represents a generic software
component that can be managed and run by a TOSCA Compute Node
Type.
properties:
# domain-specific software component version
component_version:
type: version
description: >-
The optional software component’s version.
required: false
admin_credential:
type: tosca.datatypes.Credential
description: >-
The optional credential that can be used to authenticate to
the software component.
required: false
requirements:
- host:
capability: tosca.capabilities.Compute
node: tosca.nodes.Compute
relationship: tosca.relationships.HostedOn
tosca.nodes.WebServer:
derived_from: tosca.nodes.SoftwareComponent
description: >
This TOSCA WebServer Node Type represents an abstract software
component or service that is capable of hosting and providing
management operations for one or more WebApplication nodes.
capabilities:
# Private, layer 4 endpoints
data_endpoint: tosca.capabilities.Endpoint
admin_endpoint: tosca.capabilities.Endpoint.Admin
host:
type: tosca.capabilities.Compute
valid_source_types: [ tosca.nodes.WebApplication ]
tosca.nodes.WebApplication:
derived_from: tosca.nodes.Root
description: >
The TOSCA WebApplication node represents a software application
that can be managed and run by a TOSCA WebServer node. Specific
types of web applications such as Java, etc. could be derived
from this type.
properties:
context_root:
type: string
required: false
description: >-
The web application’s context root which designates the
application’s URL path within the web server it is hosted
on.
capabilities:
app_endpoint:
type: tosca.capabilities.Endpoint
requirements:
- host:
capability: tosca.capabilities.Compute
node: tosca.nodes.WebServer
relationship: tosca.relationships.HostedOn
tosca.nodes.DBMS:
derived_from: tosca.nodes.SoftwareComponent
description: >-
The TOSCA DBMS node represents a typical relational, SQL
Database Management System software component or service.
properties:
root_password:
type: string
required: false
description: the optional root password for the DBMS service
port:
type: integer
required: false
description: the port the DBMS service will listen to for data and requests
capabilities:
host:
type: tosca.capabilities.Compute
valid_source_types: [ tosca.nodes.Database ]
tosca.nodes.Database:
derived_from: tosca.nodes.Root
description: >-
The TOSCA Database node represents a logical database that can
be managed and hosted by a TOSCA DBMS node.
properties:
name:
type: string
description: >-
the logical name of the database
required: true
port:
type: integer
description: >-
the port the underlying database service will listen to for
data
required: false
user:
type: string
description: >-
the optional user account name for DB administration
required: false
password:
type: string
description: >-
the optional password for the DB user account
required: false
requirements:
- host:
capability: tosca.capabilities.Compute
node: tosca.nodes.DBMS
relationship: tosca.relationships.HostedOn
capabilities:
database_endpoint:
type: tosca.capabilities.Endpoint.Database
tosca.nodes.Abstract.Storage:
derived_from: tosca.nodes.Root
description: >-
The TOSCA Abstract.Storage node represents an abstract storage
resource without any requirements on compute or network
resources.
properties:
name:
type: string
description: >-
The logical name (or ID) of the storage resource.
size:
type: scalar-unit.size
description: >-
The requested initial storage size (default unit is in
Gigabytes).
required: false
default: 0 MB
constraints:
- greater_or_equal: 0 MB
tosca.nodes.Storage.ObjectStorage:
derived_from: tosca.nodes.Abstract.Storage
description: >-
The TOSCA ObjectStorage node represents storage that provides
the ability to store data as objects (or BLOBs of data) without
consideration for the underlying filesystem or devices.
properties:
maxsize:
type: scalar-unit.size
description: >-
The requested maximum storage size (default unit is in
Gigabytes).
constraints:
- greater_or_equal: 0 GB
required: false
capabilities:
storage_endpoint:
type: tosca.capabilities.Endpoint
tosca.nodes.Storage.BlockStorage:
derived_from: tosca.nodes.Abstract.Storage
description: >
The TOSCA BlockStorage node currently represents a server-local
block storage device (i.e., not shared) offering evenly sized
blocks of data from which raw storage volumes can be created.
properties:
size:
default: 1 MB
constraints:
- greater_or_equal: 1 MB
volume_id:
type: string
description: >-
ID of an existing volume (that is in the accessible scope of
the requesting application).
required: false
snapshot_id:
type: string
description: >-
Some identifier that represents an existing snapshot that
should be used when creating the block storage (volume).
required: false
capabilities:
attachment:
type: tosca.capabilities.Attachment
tosca.nodes.Container.Runtime:
derived_from: tosca.nodes.SoftwareComponent
description: >
The TOSCA Container Runtime node represents operating
system-level virtualization technology used to run multiple
application services on a single Compute host.
capabilities:
host:
type: tosca.capabilities.Compute
valid_source_types: [tosca.nodes.Container.Application]
scalable:
type: tosca.capabilities.Scalable
tosca.nodes.Container.Application:
derived_from: tosca.nodes.Root
description: >
The TOSCA Container Application node represents an application
that requires Container-level virtualization technology.
requirements:
- host:
capability: tosca.capabilities.Compute
node: tosca.nodes.Container.Runtime
relationship: tosca.relationships.HostedOn
- storage:
capability: tosca.capabilities.Storage
- network:
capability: tosca.capabilities.Endpoint
tosca.nodes.LoadBalancer:
derived_from: tosca.nodes.Root
description: >
The TOSCA Load Balancer node represents logical function that be
used in conjunction with a Floating Address to distribute an
application’s traffic (load) across a number of instances of the
application (e.g., for a clustered or scaled application).
properties:
algorithm:
type: string
required: false
status: experimental
capabilities:
client:
type: tosca.capabilities.Endpoint.Public
occurrences: [0, UNBOUNDED]
description: >-
the Floating (IP) client’s on the public network can connect
to
requirements:
- application:
capability: tosca.capabilities.Endpoint
relationship: tosca.relationships.RoutesTo
occurrences: [0, UNBOUNDED]
description: >-
Connection to one or more load balanced applications
tosca.nodes.network.Network:
derived_from: tosca.nodes.Root
description: >
The TOSCA Network node represents a simple, logical network service.
properties:
ip_version:
description: >
The IP version of the requested network.
type: integer
required: false
default: 4
constraints:
- valid_values: [ 4, 6 ]
cidr:
description: >
The cidr block of the requested network.
type: string
required: false
start_ip:
description: >
The IP address to be used as the 1st one in a pool of addresses
derived from the cidr block full IP range.
type: string
required: false
end_ip:
description: >
The IP address to be used as the last one in a pool of addresses
derived from the cidr block full IP range.
type: string
required: false
gateway_ip:
description: >
The gateway IP address.
type: string
required: false
network_name:
description: >
An Identifier that represents an existing Network instance in the
underlying cloud infrastructure – OR – be used as the name of the
new created network.
. If network_name is provided along with network_id they will be
used to uniquely identify an existing network and not creating a
new one, means all other possible properties are not allowed.
. network_name should be more convenient for using. But in case
that network name uniqueness is not guaranteed then one should
provide a network_id as well.
type: string
required: false
network_id:
description: >
An Identifier that represents an existing Network instance in
the underlying cloud infrastructure.
This property is mutually exclusive with all other properties
except network_name.
. Appearance of network_id in network template instructs the
Tosca container to use an existing network instead of creating
a new one.
. network_name should be more convenient for using. But in case
that network name uniqueness is not guaranteed then one should
add a network_id as well.
. network_name and network_id can be still used together to achieve
both uniqueness and convenient.
type: string
required: false
segmentation_id:
description: >
A segmentation identifier in the underlying cloud infrastructure
(e.g., VLAN id, GRE tunnel id). If the segmentation_id is specified,
the network_type or physical_network properties should be provided
as well.
type: string
required: false
network_type:
description: >
Optionally, specifies the nature of the physical network in
the underlying cloud infrastructure. Examples are flat, vlan,
gre or vxlan. For flat and vlan types, physical_network should
be provided too.
type: string
required: false
physical_network:
description: >
Optionally, identifies the physical network on top of which the
network is implemented, e.g. physnet1. This property is required
if network_type is flat or vlan.
type: string
required: false
dhcp_enabled:
description: >
Indicates the TOSCA container to create a virtual network instance
with or without a DHCP service.
type: boolean
required: false
default: true
attributes:
segmentation_id:
description: >
The actual segmentation_id that is been assigned to the network
by the underlying cloud infrastructure.
type: string
capabilities:
link:
type: tosca.capabilities.network.Linkable
tosca.nodes.network.Port:
derived_from: tosca.nodes.Root
description: >
The TOSCA Port node represents a logical entity that associates
between Compute and Network normative types.
The Port node type effectively represents a single virtual NIC on
the Compute node instance.
properties:
ip_address:
description: >
Allow the user to set a fixed IP address.
Note that this address is a request to the provider which
they will attempt to fulfill but may not be able to dependent
on the network the port is associated with.
type: string
required: false
order:
description: >
The order of the NIC on the compute instance (e.g. eth2).
Note: when binding more than one port to a single compute
(aka multi vNICs) and ordering is desired, it is *mandatory*
that all ports will be set with an order value and. The order
values must represent a positive, arithmetic progression that
starts with 0 (e.g. 0, 1, 2, ..., n).
type: integer
required: true
default: 0
constraints:
- greater_or_equal: 0
is_default:
description: >
Set is_default=true to apply a default gateway route on the
running compute instance to the associated network gateway.
Only one port that is associated to single compute node can
set as default=true.
type: boolean
required: false
default: false
ip_range_start:
description: >
Defines the starting IP of a range to be allocated for the
compute instances that are associated by this Port.
Without setting this property the IP allocation is done from
the entire CIDR block of the network.
type: string
required: false
ip_range_end:
description: >
Defines the ending IP of a range to be allocated for the
compute instances that are associated by this Port.
Without setting this property the IP allocation is done from
the entire CIDR block of the network.
type: string
required: false
attributes:
ip_address:
description: >
The IP address would be assigned to the associated compute instance.
type: string
requirements:
- link:
capability: tosca.capabilities.network.Linkable
relationship: tosca.relationships.network.LinksTo
- binding:
capability: tosca.capabilities.network.Bindable
relationship: tosca.relationships.network.BindsTo