-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinsta-example.hot
69 lines (63 loc) · 1.72 KB
/
insta-example.hot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
heat_template_version: newton
description: Simple template to deploy a single compute instance
parameters:
net_name:
type: string
label: Network Name
description: Name of the Network, to which the Instance will be connected
constraints:
- custom_constraint: neutron.network
key_name:
type: string
label: Keypair Name
description: Name of the Keypair to be injected into the Instance
constraints:
- custom_constraint: nova.keypair
flavor:
type: string
label: Flavor
description: Name of the Instance Flavor
constraints:
- custom_constraint: nova.flavor
image:
type: string
label: Image
description: Name of Instance Image
constraints:
- custom_constraint: glance.image
vol_size:
type: number
label: Volume Size (GB)
description: External Volume Size in GB
constraints:
- range: { min: 1, max: 5 }
resources:
my_volume:
type: OS::Cinder::Volume
properties:
size: { get_param: vol_size }
volume_attachement:
type: OS::Cinder::VolumeAttachment
properties:
volume_id: { get_resource: my_volume }
instance_uuid: { get_resource: my_instance }
my_instance:
type: OS::Nova::Server
properties:
key_name: { get_param: key_name }
image: { get_param: image }
flavor: { get_param: flavor }
networks: [{network: { get_param: net_name } }]
user_data_format: RAW
user_data: |
#!/bin/sh
fdisk -l
mkfs.ext3 /dev/vdb
mount /dev/vdb /mnt
hostname >> /mnt/file.txt
date >> /mnt/file.txt
outputs:
console_urls:
description: Console URL of the New Instance
value:
get_attr: [my_instance, console_urls, novnc]