a8c114efc2a576e66bb7eb8f5534a531f675a42b
[parser.git] /
1 heat_template_version: 2013-05-23
2
3 description: >
4   TOSCA simple profile with a single Block Storage node shared by 2-Tier
5   Application with custom AttachesTo Type and explicit Relationship Templates.
6
7 parameters:
8   cpus:
9     type: number
10     description: Number of CPUs for the server.
11     default: 1
12     constraints:
13     - allowed_values:
14       - 1
15       - 2
16       - 4
17       - 8
18   storage_location:
19     type: string
20     description: Block storage mount point (filesystem path).
21     default: /dev/vdc
22   storage_size:
23     type: number
24     description: Size of the storage to be created.
25     default: 1
26   storage_snapshot_id:
27     type: string
28     description: Optional identifier for an existing snapshot to use when creating storage.
29     default: ssid
30
31 resources:
32   my_storage:
33     type: OS::Cinder::Volume
34     properties:
35       size:
36         get_param: storage_size
37       snapshot_id:
38         get_param: storage_snapshot_id
39
40   my_web_app_tier_1:
41     type: OS::Nova::Server
42     properties:
43       flavor: m1.small
44       image: fedora-amd64-heat-config
45       user_data_format: SOFTWARE_CONFIG
46     depends_on:
47     - my_storage
48
49   storage_attachesto_1_2:
50     type: OS::Cinder::VolumeAttachment
51     properties:
52       instance_uuid:
53         get_resource: my_web_app_tier_1
54       mountpoint: /my_data_location
55       volume_id:
56         get_resource: my_storage
57
58   my_web_app_tier_2:
59     type: OS::Nova::Server
60     properties:
61       flavor: m1.small
62       image: fedora-amd64-heat-config
63       user_data_format: SOFTWARE_CONFIG
64     depends_on:
65     - my_storage
66
67   storage_attachesto_2_1:
68     type: OS::Cinder::VolumeAttachment
69     properties:
70       instance_uuid:
71         get_resource: my_web_app_tier_2
72       mountpoint: /some_other_data_location
73       volume_id:
74         get_resource: my_storage
75
76 outputs:
77   private_ip_1:
78     description: The private IP address of the applications first tier.
79     value:
80       get_attr:
81       - my_web_app_tier_1
82       - networks
83   private_ip_2:
84     description: The private IP address of the applications second tier.
85     value:
86       get_attr:
87       - my_web_app_tier_2
88       - networks
89   volume_id:
90     description: The volume id of the block storage instance.
91     value:
92       get_resource: my_storage