13a7eeeece2a81f51f330a2d835eb039e1af7f6d
[parser.git] /
1 heat_template_version: 2014-10-16
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       software_config_transport: POLL_SERVER_HEAT
35     depends_on:
36     - my_storage
37
38   my_storage:
39     type: OS::Cinder::Volume
40     properties:
41       size:
42         get_param: storage_size
43
44   storage_attachment_1:
45     type: OS::Cinder::VolumeAttachment
46     properties:
47       instance_uuid:
48         get_resource: my_server
49       mountpoint:
50         get_input: storage_location
51       volume_id:
52         get_resource: my_storage
53
54 outputs:
55   private_ip:
56     description: The private IP address of the newly created compute instance.
57     value:
58       get_attr:
59       - my_server
60       - first_address
61   volume_id:
62     description: The volume id of the block storage instance.
63     value:
64       get_resource: my_storage