blob: 95b9a137f3dc0b97703b6d75203e5253e9cd924b (
plain)
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
heat_template_version: 2014-10-16
description: Test10
parameters:
public_network:
type: string
label: Public Network name or ID
description: Public network with floating IPs
default: "provider_network"
private_net_name:
type: string
default: "private_network"
flavor:
type: string
label: Flavor
default: m1.large
image:
type: string
label: Image name
default: CentOS
availability_zone:
type: string
description: The Availability Zone to launch the instance.
default: compute1
resources:
private_network:
type: OS::Neutron::Net
private_subnet:
type: OS::Neutron::Subnet
properties:
network_id: { get_resource: private_network }
cidr: 10.10.17.0/24
dns_nameservers:
- 8.8.8.8
router_1:
type: OS::Neutron::Router
properties:
external_gateway_info:
network: { get_param: public_network }
router_interface:
type: OS::Neutron::RouterInterface
properties:
router_id: { get_resource: router_1 }
subnet: { get_resource: private_subnet }
public_port:
type: OS::Neutron::Port
properties:
network: { get_resource: private_network }
security_groups: [{ get_resource: demo1_security_Group }]
floating_ip:
type: OS::Neutron::FloatingIP
properties:
floating_network: { get_param: public_network }
floating_ip_assoc:
type: OS::Neutron::FloatingIPAssociation
properties:
floatingip_id: { get_resource: floating_ip }
port_id: { get_resource: public_port }
demo1_security_Group:
type: OS::Neutron::SecurityGroup
properties:
name: demo1_security_Group
rules:
- protocol: tcp
port_range_min: 22
port_range_max: 22
- protocol: icmp
my_instance:
type: OS::Nova::Server
properties:
image: { get_param: image}
flavor: { get_param: flavor}
availability_zone: { get_param: availability_zone }
networks:
- port: { get_resource: public_port }
outputs:
instance_ip:
description: IP address of the instance
value: { get_attr: [floating_ip, floating_ip_address] }
|