aa4647e778de3a048355a0a43b013f3178673fad
[parser.git] /
1 tosca_definitions_version: tosca_simple_yaml_1_0
2
3 description: >
4   TOSCA simple profile with 2 servers each with different attached block storage.
5
6 topology_template:
7   inputs:
8     cpus:
9       type: integer
10       description: Number of CPUs for the server.
11       constraints:
12         - valid_values: [ 1, 2, 4, 8 ]
13     storage_size:
14       type: scalar-unit.size
15       default: 1 GB
16       description: Size of the storage to be created.
17     storage_snapshot_id:
18       type: string
19       description: >
20         Optional identifier for an existing snapshot to use when creating storage.
21     storage_location:
22       type: string
23       description: >
24         Block storage mount point (filesystem path).
25
26   node_templates:
27     my_server:
28       type: tosca.nodes.Compute
29       capabilities:
30         host:
31           properties:
32             disk_size: 10 GB
33             num_cpus: { get_input: cpus }
34             mem_size: 4096 MB
35         os:
36           properties:
37             architecture: x86_64
38             type: Linux
39             distribution: Fedora
40             version: 18.0
41       requirements:
42         - local_storage:
43             node: my_storage
44             relationship:
45               type: AttachesTo
46               properties:
47                 location: { get_input: storage_location }
48     my_storage:
49       type: tosca.nodes.BlockStorage
50       properties:
51         size: { get_input: storage_size }
52         snapshot_id: { get_input: storage_snapshot_id }
53
54     my_server2:
55       type: tosca.nodes.Compute
56       capabilities:
57         host:
58           properties:
59             disk_size: 10 GB
60             num_cpus: { get_input: cpus }
61             mem_size: 4096 MB
62         os:
63           properties:
64             architecture: x86_64
65             type: Linux
66             distribution: Fedora
67             version: 18.0
68       requirements:
69         - local_storage:
70             node: my_storage2
71             relationship:
72               type: AttachesTo
73               properties:
74                 location: { get_input: storage_location }
75     my_storage2:
76       type: tosca.nodes.BlockStorage
77       properties:
78         size: { get_input: storage_size }
79         snapshot_id: { get_input: storage_snapshot_id }
80
81   outputs:
82     server_ip_1:
83       description: The private IP address of the application's first server.
84       value: { get_attribute: [my_server, private_address] }
85     server_ip_2:
86       description: The private IP address of the application's second server.
87       value: { get_attribute: [my_server2, private_address] }
88     volume_id_1:
89       description: The volume id of the first block storage instance.
90       value: { get_attribute: [my_storage, volume_id] }
91     volume_id_2:
92       description: The volume id of the second block storage instance.
93       value: { get_attribute: [my_storage2, volume_id] }