cff83f9fa3ed0ce37c1eedf9ebbec74f28d65845
[parser.git] /
1 heat_template_version: 2013-05-23
2
3 description: >
4   TOSCA simple profile with 2 servers each with different attached block storage.
5
6 parameters:
7   cpus:
8     type: number
9     description: Number of CPUs for the server.
10     default: 1
11     constraints:
12     - allowed_values:
13       - 1
14       - 2
15       - 4
16       - 8
17   storage_location:
18     type: string
19     description: Block storage mount point (filesystem path).
20     default: /dev/vdc
21   storage_size:
22     type: number
23     description: Size of the storage to be created.
24     default: 1
25   storage_snapshot_id:
26     type: string
27     description: Optional identifier for an existing snapshot to use when creating storage.
28     default: ssid
29
30 resources:
31   my_server:
32     type: OS::Nova::Server
33     properties:
34       flavor: m1.medium
35       image: fedora-amd64-heat-config
36       user_data_format: SOFTWARE_CONFIG
37     depends_on:
38     - my_storage
39
40   my_storage:
41     type: OS::Cinder::Volume
42     properties:
43       size:
44         get_param: storage_size
45       snapshot_id:
46         get_param: storage_snapshot_id
47
48   attachesto_1:
49     type: OS::Cinder::VolumeAttachment
50     properties:
51       instance_uuid:
52         get_resource: my_server
53       mountpoint:
54         get_param: storage_location
55       volume_id:
56         get_resource: my_storage
57
58   my_server2:
59     type: OS::Nova::Server
60     properties:
61       flavor: m1.medium
62       image: fedora-amd64-heat-config
63       user_data_format: SOFTWARE_CONFIG
64     depends_on:
65     - my_storage2
66
67   my_storage2:
68     type: OS::Cinder::Volume
69     properties:
70       size:
71         get_param: storage_size
72       snapshot_id:
73         get_param: storage_snapshot_id
74
75   attachesto_2:
76     type: OS::Cinder::VolumeAttachment
77     properties:
78       instance_uuid:
79         get_resource: my_server2
80       mountpoint:
81         get_param: storage_location
82       volume_id:
83         get_resource: my_storage2
84
85 outputs:
86   server_ip_1:
87     description: The private IP address of the applications first server.
88     value:
89       get_attr:
90       - my_server
91       - networks
92   server_ip_2:
93     description: The private IP address of the applications second server.
94     value:
95       get_attr:
96       - my_server2
97       - networks
98   volume_id_1:
99     description: The volume id of the first block storage instance.
100     value:
101       get_resource: my_storage
102   volume_id_2:
103     description: The volume id of the second block storage instance.
104     value:
105       get_resource: my_storage2