-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathlab8_admin.yaml
150 lines (138 loc) · 4.18 KB
/
lab8_admin.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
heat_template_version: 2016-10-14
description: This template will create an external network, create a internal and a user with a role, create internal network, and router.
parameters:
project_name:
type: string
description: Project name that will be created it.
default: 'tenant1'
user_role:
type: string
description: User role to be assigned.
default: 'ResellerAdmin'
project_user:
type: string
description: User to be created inside the project.
default: 'user1'
project_user_passwd:
type: string
description: Password for the project defined user
default: 'redhat'
public_net_name:
type: string
description: Name of the internal network.
default: 'public_net'
public_subnet_name:
type: string
description: Name of the internal subnet.
default: 'public_subnet'
public_net_cidr:
type: string
description: CIDR for the provider(external) network
default: 172.16.0.0/24
public_net_pool_start:
type: string
description: start of the IP pool for the external network
default: 172.16.0.210
public_net_pool_end:
type: string
description: end of the IP pool for the external network
default: 172.16.0.230
public_net_gateway:
type: string
description: Gateway for the public network
default: 172.16.0.1
internal_net_name:
type: string
description: Name of the internal network.
default: 'internal_net'
internal_subnet_name:
type: string
description: Name of the internal subnet.
default: 'internal_subnet'
internal_router_name:
type: string
description: Name of the internal router.
default: 'internal_router'
internal_net_cidr:
type: string
description: CIDR for the internal network
default: 192.168.0.0/24
resources:
instance_flavor1:
type: OS::Nova::Flavor
properties:
ephemeral: 40
is_public: true
name: m1.xmedium
ram: 16384
vcpus: 8
extra_specs: { "pci_passthrough:alias": "a1:2" }
instance_flavor2:
type: OS::Nova::Flavor
properties:
ephemeral: 40
is_public: true
name: m1.xall
ram: 131072
vcpus: 28
extra_specs: { "pci_passthrough:alias": "a1:2" }
openstack_project:
type: OS::Keystone::Project
properties:
name: { get_param: project_name }
domain: default
description: New project
openstack_user:
type: OS::Keystone::User
properties:
name: { get_param: project_user }
domain: default
description: User
default_project: { get_resource: openstack_project }
password: { get_param: project_user_passwd }
roles:
- role: { get_param: user_role}
project: { get_resource: openstack_project }
public_network:
type: OS::Neutron::ProviderNet
properties:
name: { get_param: public_net_name }
network_type: flat
physical_network: datacentre
router_external: True
public_subnet:
type: OS::Neutron::Subnet
properties:
name: { get_param: public_subnet_name }
network_id: { get_resource: public_network }
cidr: { get_param: public_net_cidr }
dns_nameservers: [ '8.8.8.8','192.168.0.1' ]
enable_dhcp: False
gateway_ip: { get_param: public_net_gateway }
allocation_pools:
- start: { get_param: public_net_pool_start }
end: { get_param: public_net_pool_end }
internal_net:
type: OS::Neutron::Net
properties:
name: { get_param: internal_net_name }
tenant_id: { get_resource: openstack_project }
internal_subnet:
type: OS::Neutron::Subnet
properties:
name: { get_param: internal_subnet_name }
network_id: { get_resource: internal_net }
cidr: { get_param: internal_net_cidr }
dns_nameservers: [ '8.8.8.8','192.168.0.1' ]
tenant_id: { get_resource: openstack_project }
internal_router:
type: OS::Neutron::Router
properties:
name: { get_param: internal_router_name }
external_gateway_info:
network: { get_resource: public_network }
router_interface:
type: OS::Neutron::RouterInterface
properties:
router_id: { get_resource: internal_router }
subnet_id: { get_resource: internal_subnet }