1b4eb73f216bea382a726453d774f85f4438b8c6
[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
84       - 0
85   private_ip_2:
86     description: The private IP address of the applications second tier.
87     value:
88       get_attr:
89       - my_web_app_tier_2
90       - networks
91       - private
92       - 0
93   volume_id:
94     description: The volume id of the block storage instance.
95     value:
96       get_resource: my_storage