dc5fad6ffbb4eb254efa3005b0138db79ac4aa37
[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       software_config_transport: POLL_SERVER_HEAT
38     depends_on:
39     - my_storage
40
41   my_storage:
42     type: OS::Cinder::Volume
43     properties:
44       size:
45         get_param: storage_size
46       snapshot_id:
47         get_param: storage_snapshot_id
48
49   attachesto_1:
50     type: OS::Cinder::VolumeAttachment
51     properties:
52       instance_uuid:
53         get_resource: my_server
54       mountpoint:
55         get_param: storage_location
56       volume_id:
57         get_resource: my_storage
58
59   my_server2:
60     type: OS::Nova::Server
61     properties:
62       flavor: m1.medium
63       image: fedora-amd64-heat-config
64       user_data_format: SOFTWARE_CONFIG
65       software_config_transport: POLL_SERVER_HEAT
66     depends_on:
67     - my_storage2
68
69   my_storage2:
70     type: OS::Cinder::Volume
71     properties:
72       size:
73         get_param: storage_size
74       snapshot_id:
75         get_param: storage_snapshot_id
76
77   attachesto_2:
78     type: OS::Cinder::VolumeAttachment
79     properties:
80       instance_uuid:
81         get_resource: my_server2
82       mountpoint:
83         get_param: storage_location
84       volume_id:
85         get_resource: my_storage2
86
87 outputs:
88   server_ip_1:
89     description: The private IP address of the applications first server.
90     value:
91       get_attr:
92       - my_server
93       - first_address
94   server_ip_2:
95     description: The private IP address of the applications second server.
96     value:
97       get_attr:
98       - my_server2
99       - first_address
100   volume_id_1:
101     description: The volume id of the first block storage instance.
102     value:
103       get_resource: my_storage
104   volume_id_2:
105     description: The volume id of the second block storage instance.
106     value:
107       get_resource: my_storage2