e16731ebf8dc44c17de1bd37466fedf91c0839bd
[parser.git] /
1 heat_template_version: 2013-05-23
2
3 description: >
4   TOSCA simple profile with server and attached block storage using a custom
5   AttachesTo Relationship Type.
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   storage_snapshot_id:
27     type: string
28     description: Optional identifier for an existing snapshot to use when creating storage.
29     default: ssid
30
31 resources:
32   my_server:
33     type: OS::Nova::Server
34     properties:
35       flavor: m1.small
36       image: fedora-amd64-heat-config
37       key_name: userkey
38       user_data_format: SOFTWARE_CONFIG
39     depends_on:
40     - my_storage
41
42   my_storage:
43     type: OS::Cinder::Volume
44     properties:
45       size:
46         get_param: storage_size
47       snapshot_id:
48         get_param: storage_snapshot_id
49
50   mycustomattachesto_1:
51     type: OS::Cinder::VolumeAttachment
52     properties:
53       instance_uuid:
54         get_resource: my_server
55       volume_id:
56         get_resource: my_storage
57       mountpoint:
58         get_param: storage_location
59
60
61 outputs:
62   private_ip:
63     description: The private IP address of the newly created compute instance.
64     value:
65       get_attr:
66       - my_server
67       - networks
68       - private
69       - 0
70   volume_id:
71     description: The volume id of the block storage instance.
72     value:
73       get_resource: my_storage