-
Notifications
You must be signed in to change notification settings - Fork 4
/
overcloud-server.yaml
244 lines (228 loc) · 6.33 KB
/
overcloud-server.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
heat_template_version: rocky
parameters:
image:
type: string
flavor:
type: string
key_name:
type: string
name:
type: string
index:
type: number
SubnetStart:
type: number
ManagementNetwork:
type: string
DeployNetwork:
type: string
PackageManagerName:
type: string
default: dnf
RoleLower:
type: string
resources:
OvercloudServer:
type: OS::Nova::Server
properties:
flavor: {get_param: flavor}
key_name: {get_param: key_name}
name: {get_param: name}
image: {get_param: image}
networks:
- network: {get_param: ManagementNetwork}
fixed_ip: {get_attr: [ManagementIP, value]}
- network: {get_param: DeployNetwork}
fixed_ip: {get_attr: [CtlplaneIP, value]}
- network: {get_param: DeployNetwork}
fixed_ip: {get_attr: [StorageIP, value]}
- network: {get_param: DeployNetwork}
fixed_ip: {get_attr: [StorageMgmtIP, value]}
- network: {get_param: DeployNetwork}
fixed_ip: {get_attr: [InternalApiIP, value]}
- network: {get_param: DeployNetwork}
fixed_ip: {get_attr: [TenantIP, value]}
- network: {get_param: DeployNetwork}
fixed_ip: {get_attr: [ExternalIP, value]}
user_data: {get_resource: OvercloudUserData}
user_data_format: SOFTWARE_CONFIG
ManagementIP:
type: OS::Heat::Value
properties:
value:
str_replace:
template: 10.98.0.<%ip%>
params:
<%ip%>:
yaql:
expression: $.data.ip_base + $.data.index
data:
ip_base: {get_param: SubnetStart}
index: {get_param: index}
CtlplaneIP:
type: OS::Heat::Value
properties:
value:
str_replace:
template: 192.168.24.<%ip%>
params:
<%ip%>:
yaql:
expression: $.data.ip_base + $.data.index
data:
ip_base: {get_param: SubnetStart}
index: {get_param: index}
StorageIP:
type: OS::Heat::Value
properties:
value:
str_replace:
template: 172.16.1.<%ip%>
params:
<%ip%>:
yaql:
expression: $.data.ip_base + $.data.index
data:
ip_base: {get_param: SubnetStart}
index: {get_param: index}
StorageMgmtIP:
type: OS::Heat::Value
properties:
value:
str_replace:
template: 172.16.3.<%ip%>
params:
<%ip%>:
yaql:
expression: $.data.ip_base + $.data.index
data:
ip_base: {get_param: SubnetStart}
index: {get_param: index}
InternalApiIP:
type: OS::Heat::Value
properties:
value:
str_replace:
template: 172.16.2.<%ip%>
params:
<%ip%>:
yaql:
expression: $.data.ip_base + $.data.index
data:
ip_base: {get_param: SubnetStart}
index: {get_param: index}
TenantIP:
type: OS::Heat::Value
properties:
value:
str_replace:
template: 172.16.0.<%ip%>
params:
<%ip%>:
yaql:
expression: $.data.ip_base + $.data.index
data:
ip_base: {get_param: SubnetStart}
index: {get_param: index}
ExternalIP:
type: OS::Heat::Value
properties:
value:
str_replace:
template: 10.0.0.<%ip%>
params:
<%ip%>:
yaql:
expression: $.data.ip_base + $.data.index
data:
ip_base: {get_param: SubnetStart}
index: {get_param: index}
OvercloudServerUserData:
type: server-user-data.yaml
OvercloudOsNetConfigUserData:
type: OS::Heat::SoftwareConfig
properties:
config:
str_replace:
template: |
#!/usr/bin/bash
sudo PACKAGE_MANAGER_NAME -y install os-net-config openvswitch
params:
PACKAGE_MANAGER_NAME: {get_param: PackageManagerName}
OvercloudUserData:
type: OS::Heat::MultipartMime
properties:
parts:
list_concat:
- {get_attr: [OvercloudServerUserData, ServerUserData]}
- - config: {get_resource: OvercloudOsNetConfigUserData}
subtype: x-shellscript
MappedName:
type: OS::Heat::Value
properties:
value:
list_join:
- '-'
- - overcloud
- {get_param: RoleLower}
- str_replace:
template: index
params:
index: {get_param: index}
MappedIP:
type: OS::Heat::Value
properties:
value:
map_replace:
- ip_address: v
- values:
v: {get_attr: [CtlplaneIP, value]}
outputs:
OS::stack_id:
description: OS::stack_id
value: {get_resource: OvercloudServer}
name:
description: name
value: {get_attr: [OvercloudServer, name]}
BaremetalDeployInput:
description: BaremetalDeployInput
value:
hostname: {get_attr: [OvercloudServer, name]}
name: {get_attr: [OvercloudServer, name]}
networks:
- network: ctlplane
fixed_ip: {get_attr: [CtlplaneIP, value]}
- network: storage
fixed_ip: {get_attr: [StorageIP, value]}
- network: storage_mgmt
fixed_ip: {get_attr: [StorageMgmtIP, value]}
- network: internal_api
fixed_ip: {get_attr: [InternalApiIP, value]}
- network: tenant
fixed_ip: {get_attr: [TenantIP, value]}
- network: external
fixed_ip: {get_attr: [ExternalIP, value]}
DeployedServerPortMap:
description: DeployedServerPortMap
value:
map_replace:
- k:
fixed_ips:
- {get_attr: [MappedIP, value]}
subnets:
- cidr: 192.168.24.0/24
- keys:
k:
list_join:
- '-'
- - {get_param: name}
- ctlplane
HostnameMap:
description: HostnameMap
value:
map_replace:
- k: v
- keys:
k: {get_attr: [MappedName, value]}
values:
v: {get_param: name}