e17dff955b595840ddc3daa87ec1bcdbcee683d6
[parser.git] /
1 heat_template_version: 2013-05-23
2
3 description: >
4   TOSCA simple profile with server and attached block storage using a named
5   Relationship Template for the storage attachment.
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
27 resources:
28   my_server:
29     type: OS::Nova::Server
30     properties:
31       flavor: m1.small
32       image: fedora-amd64-heat-config
33       user_data_format: SOFTWARE_CONFIG
34     depends_on:
35     - my_storage
36
37   my_storage:
38     type: OS::Cinder::Volume
39     properties:
40       size:
41         get_param: storage_size
42
43   storage_attachment_1:
44     type: OS::Cinder::VolumeAttachment
45     properties:
46       instance_uuid:
47         get_resource: my_server
48       mountpoint:
49         get_input: storage_location
50       volume_id:
51         get_resource: my_storage
52
53 outputs:
54   private_ip:
55     description: The private IP address of the newly created compute instance.
56     value:
57       get_attr:
58       - my_server
59       - networks
60       - private
61       - 0
62   volume_id:
63     description: The volume id of the block storage instance.
64     value:
65       get_resource: my_storage