forked from infn-bari-school/heat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
floating_ip.template
56 lines (49 loc) · 1.58 KB
/
floating_ip.template
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
heat_template_version: 2013-05-23
description: Template to deploy a single user data instance with two IP
parameters:
key_name:
type: string
description: Name of a KeyPair
image_id:
type: string
label: Image ID
description: ID of the image to be used for compute instance
instance_type:
type: string
label: Instance Type
description: Type of instance (flavor) to be used
default: m1.small
constraints:
- allowed_values: [m1.tiny, m1.small, m1.medium, m1.large]
private_net_id:
type: string
description: ID of private sub network into which servers get deployed
ext_net_id:
type: string
description: ID of private sub network into which servers get deployed
resources:
floating_ip_instance:
name: floating_ip_instance_from_heat
type: OS::Nova::Server
properties:
image: { get_param: image_id }
flavor: { get_param: instance_type }
key_name: { get_param: key_name }
networks:
- port: { get_resource: instance_port }
instance_port:
type: OS::Neutron::Port
properties:
network_id: { get_param: private_net_id }
user_floating_ip:
type: OS::Neutron::FloatingIP
properties:
floating_network_id: { get_param: ext_net_id }
port_id: { get_resource: instance_port }
outputs:
instance_ip:
description: The IP address of the deployed instance
value: { get_attr: [floating_ip_instance, first_address] }
instance_floating_ip:
description: The floating IP address of the deployed instance
value: { get_attr: [user_floating_ip, floating_ip_address] }