This repository was archived by the owner on Feb 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathHOT-2vm-1lnet.yaml
More file actions
71 lines (63 loc) · 1.87 KB
/
HOT-2vm-1lnet.yaml
File metadata and controls
71 lines (63 loc) · 1.87 KB
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
70
71
heat_template_version: 2013-05-23
description: >
A simple Heat template that spins up 2 instances and a private network.
# Create command: heat stack-create <stack-name> --template-file=<path-to-this-file> --parameters="flavor_name=<flavor-name>;image_name=<image-name>"
parameters:
flavor_name:
type: string
label: flavor name
description: Name of the flavor to be used for the instances.
image_name:
type: string
label: image name
description: Name of the image from which to create the instances.
resources:
lnet_1:
type: OS::Neutron::Net
properties:
admin_state_up: true
name: lnet_1
subnet_1:
type: OS::Neutron::Subnet
properties:
name: subnet_1
cidr: 10.10.10.0/24
enable_dhcp: true
network_id: { get_resource: lnet_1 }
instance1_port1:
type: OS::Neutron::Port
properties:
admin_state_up: true
network_id: { get_resource: lnet_1 }
security_groups:
- default
instance2_port1:
type: OS::Neutron::Port
properties:
admin_state_up: true
network_id: { get_resource: lnet_1 }
security_groups:
- default
instance1:
type: OS::Nova::Server
properties:
name: instance_1
image: { get_param: image_name }
flavor: { get_param: flavor_name }
networks:
- port: { get_resource: instance1_port1 }
instance2:
type: OS::Nova::Server
properties:
name: instance_2
image: { get_param: image_name }
flavor: { get_param: flavor_name }
networks:
- port: { get_resource: instance2_port1 }
outputs:
instance1_ip:
description: Fixed IP address of instance1 on the private network.
value: { get_attr: [ instance1, first_address] }
instance2_ip:
description: Fixed IP address of instance2 on the private network.
value: { get_attr: [ instance2, first_address] }