forked from ocp-power-automation/ocp4-upi-powervm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
361 lines (303 loc) · 10.8 KB
/
variables.tf
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
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
################################################################
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Licensed Materials - Property of IBM
#
# ©Copyright IBM Corp. 2020
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################
################################################################
# Configure the OpenStack Provider
################################################################
variable "user_name" {
description = "The user name used to connect to OpenStack/PowerVC"
default = "my_user_name"
}
variable "password" {
description = "The password for the user"
default = "my_password"
}
variable "tenant_name" {
description = "The name of the project (a.k.a. tenant) used"
default = "ibm-default"
}
variable "domain_name" {
description = "The domain to be used"
default = "Default"
}
variable "auth_url" {
description = "The endpoint URL used to connect to OpenStack/PowerVC"
default = "https://<HOSTNAME>:5000/v3/"
}
variable "insecure" {
default = "true" # OS_INSECURE
}
variable "openstack_availability_zone" {
description = "The name of Availability Zone for deploy operation"
default = ""
}
################################################################
# Configure the Instance details
################################################################
variable "bastion" {
# only one node is supported
default = {
instance_type = "m1.xlarge"
image_id = "daa5d3f4-ab66-4b2d-9f3d-77bd61774419"
}
}
variable "bootstrap" {
default = {
# only one node is supported
count = 1
instance_type = "m1.xlarge"
# rhcos image id
image_id = "468863e6-4b33-4e8b-b2c5-c9ef9e6eedf4"
}
}
variable "master" {
default = {
count = 3
instance_type = "m1.xlarge"
# rhcos image id
image_id = "468863e6-4b33-4e8b-b2c5-c9ef9e6eedf4"
}
}
variable "worker" {
default = {
count = 2
instance_type = "m1.xlarge"
# rhcos image id
image_id = "468863e6-4b33-4e8b-b2c5-c9ef9e6eedf4"
}
}
variable "network_name" {
description = "The name of the network to be used for deploy operations"
default = "my_network_name"
}
variable "network_type" {
#Eg: SEA or SRIOV
default = "SEA"
description = "Specify the name of the network adapter type to use for creating hosts"
}
variable "scg_id" {
description = "The id of PowerVC Storage Connectivity Group to use for all nodes"
default = ""
}
variable "rhel_username" {
default = "root"
}
variable "keypair_name" {
# Set this variable to the name of an already generated
# keypair to use it instead of creating a new one.
default = ""
}
variable "public_key_file" {
description = "Path to public key file"
# if empty, will default to ${path.cwd}/data/id_rsa.pub
default = ""
}
variable "private_key_file" {
description = "Path to private key file"
# if empty, will default to ${path.cwd}/data/id_rsa
default = ""
}
variable "private_key" {
description = "content of private ssh key"
# if empty string will read contents of file at var.private_key_file
default = ""
}
variable "public_key" {
description = "Public key"
# if empty string will read contents of file at var.public_key_file
default = ""
}
variable "rhel_subscription_username" {
default = ""
}
variable "rhel_subscription_password" {
default = ""
}
variable "rhcos_kernel_options" {
description = "List of kernel arguments for the cluster nodes"
default = []
}
variable "sysctl_tuned_options" {
description = "Set to true to apply sysctl options via tuned operator. Default: false"
default = false
}
variable "sysctl_options" {
description = "List of sysctl options to apply."
default = []
}
variable "match_array" {
description = "Criteria for node/pod selection."
default = <<EOF
EOF
}
variable "chrony_config" {
description = "Set to true to setup time synchronization and setup chrony. Default: false"
default = true
}
variable "chrony_config_servers" {
description = "List of ntp servers and options to apply"
default = []
# example: chrony_config_servers = [ {server = "10.3.21.254", options = "iburst"}, {server = "10.5.21.254", options = "iburst"} ]
}
################################################################
### Instrumentation
################################################################
variable "ssh_agent" {
description = "Enable or disable SSH Agent. Can correct some connectivity issues. Default: false"
default = false
}
variable "connection_timeout" {
description = "Timeout in minutes for SSH connections"
default = 45
}
variable "jump_host" {
description = "Jump server hostname/IP to be used for SSH connections"
default = ""
}
variable "installer_log_level" {
description = "Set the log level required for openshift-install commands"
default = "info"
}
variable "helpernode_repo" {
description = "Set the repo URL for using ocp4-helpernode"
# Repo for running ocp4 helpernode setup steps.
default = "https://github.com/RedHatOfficial/ocp4-helpernode"
}
variable "helpernode_tag" {
description = "Set the branch/tag name or commit# for using ocp4-helpernode repo"
# Checkout level for https://github.com/RedHatOfficial/ocp4-helpernode which is used for setting up services required on bastion node
default = "5eab3db53976bb16be582f2edc2de02f7510050d"
}
variable "install_playbook_repo" {
description = "Set the repo URL for using ocp4-playbooks"
# Repo for running ocp4 installations steps.
default = "https://github.com/ocp-power-automation/ocp4-playbooks"
}
variable "install_playbook_tag" {
description = "Set the branch/tag name or commit# for using ocp4-playbooks repo"
# Checkout level for https://github.com/ocp-power-automation/ocp4-playbooks which is used for running ocp4 installations steps
default = "b988d620bd70284c7674e7a94e107c456c940dd0"
}
variable "ansible_extra_options" {
description = "Extra options string to append to ansible-playbook commands"
default = "-v"
}
locals {
private_key_file = "${var.private_key_file == "" ? "${path.cwd}/data/id_rsa" : "${var.private_key_file}" }"
public_key_file = "${var.public_key_file == "" ? "${path.cwd}/data/id_rsa.pub" : "${var.public_key_file}" }"
private_key = "${var.private_key == "" ? file(coalesce(local.private_key_file, "/dev/null")) : "${var.private_key}" }"
public_key = "${var.public_key == "" ? file(coalesce(local.public_key_file, "/dev/null")) : "${var.public_key}" }"
create_keypair = "${var.keypair_name == "" ? "1": "0"}"
}
################################################################
### OpenShift variables
################################################################
variable "openshift_install_tarball" {
default = "https://mirror.openshift.com/pub/openshift-v4/ppc64le/clients/ocp-dev-preview/latest-4.6/openshift-install-linux.tar.gz"
}
variable "openshift_client_tarball" {
default = "https://mirror.openshift.com/pub/openshift-v4/ppc64le/clients/ocp-dev-preview/latest-4.6/openshift-client-linux.tar.gz"
}
variable "release_image_override" {
default = ""
}
variable "pull_secret_file" {
default = "data/pull-secret.txt"
}
# Must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character
variable "cluster_domain" {
default = "rhocp.com"
}
# Must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character
# Should not be more than 14 characters
variable "cluster_id_prefix" {
default = "test-ocp"
}
# Must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character
# Length cannot exceed 14 characters when combined with cluster_id_prefix
variable "cluster_id" {
default = ""
}
variable "dns_forwarders" {
default = "8.8.8.8; 8.8.4.4"
}
variable "mount_etcd_ramdisk" {
description = "Whether mount etcd directory in the ramdisk (Only for dev/test) on low performance disk"
default = false
}
variable "setup_squid_proxy" {
description = "Flag to install and configure squid proxy server on bastion node"
default = false
}
# Applicable only when `setup_squid_proxy = false`
variable proxy {
description = "External proxy server details in a map of server, port(default=3128), user & password"
default = {}
# default = {
# server = "10.10.1.166",
# port = "3128"
# user = "pxuser",
# password = "pxpassword"
# }
}
variable "storage_type" {
#Supported values: nfs (other value won't setup a storageclass)
default = "nfs"
}
variable "volume_size" {
# If storage_type = nfs, a new volume of this size will be attached to the bastion node.
# Value in GB
default = "300"
}
variable "volume_storage_template" {
# Storage template name or ID for creating the volume.
default = ""
}
variable "upgrade_version" {
description = "OCP upgrade version eg. 4.5.4"
default = ""
}
variable "upgrade_channel" {
description = "Upgrade channel having required version availble for cluster upgrade (stable-4.x, fast-4.x, candidate-4.x) eg. stable-4.5"
default = ""
}
variable "upgrade_pause_time" {
description = "Number of minutes to pause the playbook execution before starting to check the upgrade status once the upgrade command is executed."
default = "90"
}
variable "upgrade_delay_time" {
description = "Number of seconds to wait before re-checking the upgrade status once the playbook execution resumes."
default = "600"
}
################################################################
# Local registry variables ( used only in disconnected install )
################################################################
variable "enable_local_registry" {
description = "Set to true to enable usage of local registry for restricted network install."
type = bool
default = false
}
variable "local_registry_image" {
description = "Name of the image used for creating the local registry container."
default = "docker.io/ibmcom/registry-ppc64le:2.6.2.5"
}
variable "ocp_release_tag" {
description = "The version of OpenShift you want to sync."
default = "4.4.9-ppc64le"
}