Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation for #200 #214

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

.terraform/*
TW_var.tfvars
12 changes: 12 additions & 0 deletions docs/var.tfvars-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,18 @@ The following variable is used to set the network adapter type for the VMs. By d
network_type = "SRIOV"
```

The following variable is used to define the amount of SR-IOV Logical Ports used for VNIC failover of the 1st network adapter for the VMs. By default the VMs will use 1, which defines `no VNIC failover`. Any setting higher then 1 creates additional LPs and configures them in a VNIC failover setup. `Be aware of the fact, that RHCOS and some Linux releases might not handle VNIC failover with more then 2 SR-IOV Logical Ports properly. The recommended value is 2 for VNIC failover.`
Valid options are: Any number supported for VNIC failover adapters
```
sriov_vnic_failover_adapter = 2
```

The following variable is used to define the capacity of SR-IOV Logical Ports of the 1st network adapter for the VMs. By default the VMs will use 2%.
Valid options are: Any number which can be devided by 2 and results in an integer. 100% = 1.0; 80% = 0.80; 60% = 0.60; etc
```
sriov_capacity = 0.02
```

The following variable is used to specify the PowerVC [Storage Connectivity Group](https://www.ibm.com/support/knowledgecenter/SSVSPA_1.4.4/com.ibm.powervc.cloud.help.doc/powervc_storage_connectivity_groups_cloud.html) (SCG). Empty value will use the default SCG
```
scg_id = ""
Expand Down
4 changes: 2 additions & 2 deletions modules/2_network/network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ locals {
sriov = <<EOF
{
"delete_with_instance": 1,
"vnic_required_vfs": 1,
"capacity": 0.02,
"vnic_required_vfs": ${var.sriov_vnic_failover_adapter},
"capacity": ${var.sriov_capacity},
"vlan_type": "allowed"
}
EOF
Expand Down
2 changes: 2 additions & 0 deletions modules/2_network/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ variable "master" {}
variable "worker" {}

variable "network_type" {}
variable "sriov_vnic_failover_adapter" {}
variable "sriov_capacity" {}
2 changes: 2 additions & 0 deletions ocp.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ module "network" {
master = var.master
worker = var.worker
network_type = var.network_type
sriov_vnic_failover_adapter = var.sriov_vnic_failover_adapter
sriov_capacity = var.sriov_capacity
}

module "helpernode" {
Expand Down
3 changes: 2 additions & 1 deletion var.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ cluster_id = "" # It will use random generated id with

#network_type = "SRIOV"
#scg_id = "df21cec9-c244-4d3d-b927-df1518672e87"

#sriov_vnic_failover_adapter = 2
#sriov_capacity = 0.20

#enable_local_registry = false #Set to true to enable usage of local registry for restricted network install.
#local_registry_image = "docker.io/ibmcom/registry-ppc64le:2.6.2.5"
Expand Down
12 changes: 12 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,18 @@ variable "network_type" {
description = "Specify the name of the network adapter type to use for creating hosts"
}

variable "sriov_vnic_failover_adapter" {
# Eg: 1 = VNIC without failover; 2 = VNIC failover with 2 SR-IOV LPs
default = 1
description = "Specifies the amount of VNIC failover adapters"
}

variable "sriov_capacity" {
# Eg: 0.02 = 2%; 0.20 = 20%; 1.00 = 100%
default = 0.02
description = "Specifies the SR-IOV LP capacity"
}

variable "scg_id" {
description = "The id of PowerVC Storage Connectivity Group to use for all nodes"
default = ""
Expand Down