487501d99c56af446ee9d0c813193be8a04b301d
[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 implied relationships.
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_size:
19     type: number
20     description: Size of the storage to be created.
21     default: 1
22   storage_snapshot_id:
23     type: string
24     description: Optional identifier for an existing snapshot to use when creating storage.
25     default: ssid
26
27 resources:
28   my_storage:
29     type: OS::Cinder::Volume
30     properties:
31       size:
32         get_param: storage_size
33       snapshot_id:
34         get_param: storage_snapshot_id
35
36   my_web_app_tier_1:
37     type: OS::Nova::Server
38     properties:
39       flavor: m1.medium
40       image: fedora-amd64-heat-config
41       user_data_format: SOFTWARE_CONFIG
42       software_config_transport: POLL_SERVER_HEAT
43     depends_on:
44     - my_storage
45
46   myattachesto_2:
47     type: OS::Cinder::VolumeAttachment
48     properties:
49       instance_uuid:
50         get_resource: my_web_app_tier_1
51       mountpoint: /default_location
52       volume_id:
53         get_resource: my_storage
54
55   my_web_app_tier_2:
56     type: OS::Nova::Server
57     properties:
58       flavor: m1.medium
59       image: fedora-amd64-heat-config
60       user_data_format: SOFTWARE_CONFIG
61       software_config_transport: POLL_SERVER_HEAT
62     depends_on:
63     - my_storage
64
65   myattachesto_1:
66     type: OS::Cinder::VolumeAttachment
67     properties:
68       instance_uuid:
69         get_resource: my_web_app_tier_2
70       mountpoint: /some_other_data_location
71       volume_id:
72         get_resource: my_storage
73
74 outputs:
75   private_ip_1:
76     description: The private IP address of the applications first tier.
77     value:
78       get_attr:
79       - my_web_app_tier_1
80       - first_address
81   private_ip_2:
82     description: The private IP address of the applications second tier.
83     value:
84       get_attr:
85       - my_web_app_tier_2
86       - first_address
87   volume_id:
88     description: The volume id of the block storage instance.
89     value:
90       get_resource: my_storage