-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheat_create_windows_server_lab.yaml
117 lines (98 loc) · 2.86 KB
/
heat_create_windows_server_lab.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
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
104
105
106
107
108
109
110
111
112
113
114
115
116
heat_template_version: 2013-05-23
description: >
HOT template - Cria o Ambiente de teste do Windows Server
resources:
new_net:
type: OS::Neutron::Net
new_subnet:
type: OS::Neutron::Subnet
properties:
network_id: { get_resource: new_net }
cidr: "10.1.1.0/24"
dns_nameservers: [ "8.8.8.8", "8.8.4.4" ]
ip_version: 4
new_net2:
type: OS::Neutron::Net
new_subnet2:
type: OS::Neutron::Subnet
properties:
network_id: { get_resource: new_net2 }
cidr: "10.2.1.0/24"
dns_nameservers: [ "8.8.8.8", "8.8.4.4" ]
ip_version: 4
router1:
type: OS::Neutron::Router
properties:
external_gateway_info:
network: "net04_ext"
subnet1_interface:
type: OS::Neutron::RouterInterface
properties:
router_id: { get_resource: router1 }
subnet: { get_resource: new_subnet }
subnet2_interface:
type: OS::Neutron::RouterInterface
properties:
router_id: { get_resource: router1 }
subnet: { get_resource: new_subnet2 }
server:
type: OS::Nova::Server
properties:
name: "Windows Server"
image: "Windows Server"
flavor: "m1.large"
key_name: "ParDeChaves1"
networks:
- port: { get_resource: server_port }
server_port:
type: OS::Neutron::Port
properties:
network_id: { get_resource: new_net }
fixed_ips:
- subnet_id: { get_resource: new_subnet }
security_groups: [{ get_resource: server_security_group }]
server2:
type: OS::Nova::Server
properties:
name: "Linux"
image: "TestVM"
flavor: "m1.micro"
key_name: "ParDeChaves1"
networks:
- port: { get_resource: server_port2 }
server_port2:
type: OS::Neutron::Port
properties:
network_id: { get_resource: new_net2 }
fixed_ips:
- subnet_id: { get_resource: new_subnet2 }
security_groups: [{ get_resource: server_security_group }]
server_floating_ip:
type: OS::Neutron::FloatingIP
properties:
floating_network: "net04_ext"
port_id: { get_resource: server_port }
server_floating_ip2:
type: OS::Neutron::FloatingIP
properties:
floating_network: "net04_ext"
port_id: { get_resource: server_port2 }
server_security_group:
type: OS::Neutron::SecurityGroup
properties:
description: Add security group rules for server
name: security-group
rules:
- remote_ip_prefix: 0.0.0.0/0
protocol: tcp
port_range_min: 22
port_range_max: 22
- remote_ip_prefix: 0.0.0.0/0
protocol: icmp
outputs:
server_private_ip:
description: IP address of server on private network
value: { get_attr: [ server, first_address ] }
server_public_ip:
description: Floating IP address of server on public network
value: { get_attr: [ server_floating_ip, floating_ip_address ] }