-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle_instance_create_vol_att.yaml
58 lines (50 loc) · 1.51 KB
/
single_instance_create_vol_att.yaml
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
heat_template_version: 2014-10-16
description: Create a single instance booting from root volume and attach data volume to it.
parameters:
index:
type: string
default: 0
instance_name:
type: string
default: Minion
network:
type: string
default: baseNet
resources:
my_root_vol:
type: OS::Cinder::Volume
properties:
description: Minion Root volume
source_volid: 47bd0be2-ef59-4098-b508-a0443cbcee99
volume_type: ClusterV
name:
list_join: ['-',[ { get_param: instance_name }, 'root', { get_param: index } ]]
my_data_vol:
type: OS::Cinder::Volume
properties:
description: Minion Data volume
source_volid: 611a885e-096d-4de2-9286-e44583b4ea52
volume_type: ClusterV
name:
list_join: ['-',[ { get_param: instance_name }, 'data', { get_param: index } ]]
server_1:
type: OS::Nova::Server
properties:
name:
list_join: ['-',[ { get_param: instance_name }, { get_param: index } ]]
flavor: m1.medium
block_device_mapping:
- volume_id: { get_resource: my_root_vol }
device_name: vda
networks: [ {network: { get_param: network } }]
depends_on: my_root_vol
vol_att:
type: OS::Cinder::VolumeAttachment
properties:
instance_uuid: { get_resource: server_1 }
volume_id: { get_resource: my_data_vol }
mountpoint: /dev/vdb
outputs:
instance_networks:
description: The IP addresses of the deployed instance
value: { get_attr: [server_1, networks] }