Azure-plugin not sending REST calls to Azure cloud
[multicloud/azure.git] / azure / aria / aria-extension-cloudify / src / aria / examples / tosca-simple-1.0 / use-cases / block-storage-5 / block-storage-5.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0
2
3 description: >-
4   TOSCA simple profile with a single Block Storage node shared by 2-Tier Application with custom
5   AttachesTo Type and explicit Relationship Templates.
6
7 metadata:
8   template_name: block-storage-5
9   template_author: TOSCA Simple Profile in YAML
10   template_version: '1.0'
11
12 relationship_types:
13
14   MyAttachesTo:
15     derived_from: tosca.relationships.AttachesTo
16     properties:
17       location:
18         type: string
19         default: /default_location
20
21 topology_template:
22
23   inputs:
24     cpus:
25       type: integer
26       description: Number of CPUs for the server.
27       constraints:
28         - valid_values: [ 1, 2, 4, 8 ]
29     storage_size:
30       type: scalar-unit.size
31       default: 1 GB
32       description: Size of the storage to be created.
33     storage_snapshot_id:
34       type: string
35       description: >-
36         Optional identifier for an existing snapshot to use when creating storage.
37     storage_location:
38       type: string
39       description: >-
40         Block storage mount point (filesystem path).
41
42   node_templates:
43
44     my_web_app_tier_1:
45       type: tosca.nodes.Compute
46       capabilities:
47         host:
48           properties:
49             disk_size: 10 GB
50             num_cpus: { get_input: cpus }
51             mem_size: 4096 MB
52         os:
53           properties:
54             architecture: x86_64
55             type: Linux
56             distribution: Fedora
57             version: 18.0
58       requirements:
59         - local_storage:
60             node: my_storage
61             relationship: storage_attachesto_1
62
63     my_web_app_tier_2:
64       type: tosca.nodes.Compute
65       capabilities:
66         host:
67           properties:
68             disk_size: 10 GB
69             num_cpus: { get_input: cpus }
70             mem_size: 4096 MB
71         os:
72           properties:
73             architecture: x86_64
74             type: Linux
75             distribution: Fedora
76             version: 18.0
77       requirements:
78         - local_storage:
79             node: my_storage
80             relationship: storage_attachesto_2
81
82     my_storage:
83       type: tosca.nodes.BlockStorage
84       properties:
85         size: { get_input: storage_size }
86         snapshot_id: { get_input: storage_snapshot_id }
87
88   relationship_templates:
89
90     storage_attachesto_1:
91       type: MyAttachesTo
92       properties:
93         location: /my_data_location
94
95     storage_attachesto_2:
96       type: MyAttachesTo
97       properties:
98         location: /some_other_data_location
99
100   outputs:
101     private_ip_1:
102       description: The private IP address of the application's first tier.
103       value: { get_attribute: [ my_web_app_tier_1, private_address ] }
104     private_ip_2:
105       description: The private IP address of the application's second tier.
106       value: { get_attribute: [ my_web_app_tier_2, private_address ] }
107     volume_id:
108       description: The volume id of the block storage instance.
109       value: { get_property: [ my_storage, volume_id ] } # ARIA NOTE: wrong in spec