0450b1f007ba0d0318795bb01eed1a89da51a599
[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     depends_on:
43     - my_storage
44
45   myattachesto_1:
46     type: OS::Cinder::VolumeAttachment
47     properties:
48       instance_uuid:
49         get_resource: my_web_app_tier_1
50       mountpoint: /default_location
51       volume_id:
52         get_resource: my_storage
53
54   my_web_app_tier_2:
55     type: OS::Nova::Server
56     properties:
57       flavor: m1.medium
58       image: fedora-amd64-heat-config
59       user_data_format: SOFTWARE_CONFIG
60     depends_on:
61     - my_storage
62
63   myattachesto_2:
64     type: OS::Cinder::VolumeAttachment
65     properties:
66       instance_uuid:
67         get_resource: my_web_app_tier_2
68       mountpoint: /some_other_data_location
69       volume_id:
70         get_resource: my_storage
71
72 outputs:
73   private_ip_1:
74     description: The private IP address of the applications first tier.
75     value:
76       get_attr:
77       - my_web_app_tier_1
78       - networks
79   private_ip_2:
80     description: The private IP address of the applications second tier.
81     value:
82       get_attr:
83       - my_web_app_tier_2
84       - networks
85   volume_id:
86     description: The volume id of the block storage instance.
87     value:
88       get_resource: my_storage