Skip to content

Commit 5aae0b0

Browse files
Release v1.2.0 (#64)
* Pull request #46: New Networking Setup Merge in OSO/openshift-terraform-stack from yutpeng/OSO-439 to dev-1.2.0 Squashed commit of the following: commit e5ce5662158315ac1217d8e90e43f788646e4c10 Author: yutpeng <yuting.peng@oracle.com> Date: Mon Apr 21 16:45:35 2025 -0700 new networking configuration * Pull request #45: Add validations on tag namespace Merge in OSO/openshift-terraform-stack from yutpeng/update-create-instance-role-tags-description to dev-1.2.0 Squashed commit of the following: commit d414ece3270666aaca2e68f69484f9d0afca5c95 Author: yutpeng <yuting.peng@oracle.com> Date: Wed Apr 16 14:27:53 2025 -0700 add validations on tag namespace * Pull request #47: update schema for v1.2.0 Merge in OSO/openshift-terraform-stack from yutpeng/schema-update-for-v1.2.0 to dev-1.2.0 Squashed commit of the following: commit bfc6456f0036206de5bcb78d19f0b4f546864015 Author: yutpeng <yuting.peng@oracle.com> Date: Tue May 6 13:14:02 2025 -0700 update schema for v1.2.0 * set version to v1.2.0 * update default shape to E5 --------- Co-authored-by: davidfos <david.d.foster@oracle.com>
1 parent de4e654 commit 5aae0b0

37 files changed

+298
-218
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
SHELL = bash
2-
PKG_VERSION ?= v1.1.1
2+
PKG_VERSION ?= v1.2.0
33
OCI_DRIVER_VERSION ?= v1.30.0
44
PRE_COMMIT := $(shell command -v pre-commit 2> /dev/null)
55
PODMAN := $(shell command -v podman 2> /dev/null)

terraform-stacks/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ Create the OCI resources for a new OpenShift cluster.
6969
- Public Security List
7070
- Subnets
7171
- "public"
72-
- "private"
73-
- "private_two"
72+
- "private_opc"
73+
- "private_bare_metal"
7474
- NSGs (Network Security Groups)
7575
- "cluster-lb-nsg"
7676
- "cluster-controlplane-nsg"
@@ -101,15 +101,15 @@ Create the OCI resources for a new OpenShift cluster.
101101

102102
- **Control Plane**
103103
- Count: 3
104-
- Shape: VM.Standard.E4.Flex
104+
- Shape: VM.Standard.E5.Flex
105105
- OCPU: 4
106106
- Memory: 16 GB
107107
- Boot Volume
108108
- Size: 1024 GB
109109
- VPUs/GB: 100
110110
- **Compute**
111111
- Count: 3
112-
- Shape: VM.Standard.E4.Flex
112+
- Shape: VM.Standard.E5.Flex
113113
- OCPU: 6
114114
- Memory: 16 GB
115115
- Boot Volume
@@ -142,7 +142,7 @@ Create the OCI resources for a new OpenShift cluster.
142142
- **Compute**
143143
- Count: 0
144144

145-
## create-tags
145+
## create-instance-role-tags
146146

147147
OCI tagging resources that are used to tag OpenShift cluster OCI resources. The tags are used to identify cluster-specific resources and should not be deleted while in use.
148148

@@ -160,4 +160,4 @@ It is recommended but not required to create and reuse tags for your OpenShift c
160160
- "compute"
161161
- "boot-volume-type"
162162
- "PARAVIRTUALIZED"
163-
- "ISCSI"
163+
- "ISCSI"

terraform-stacks/add-nodes/checksums

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
c3687db1b25a34238ed49fbb4a74fb87886531bb43108d4a0352b65cac99fbdc data.tf
1+
1d7a1314b5d75e0feccef88d786afd68cd2cd9e9213426b15f58b1a41823064c data.tf
22
78b9bcea0d7397d2f1b4f584c2d2e76d67dc085b74e38c9cd3b32e6e1823f399 locals.tf
3-
d289fd822e5cf258f4e347280c1aefbe8e884bc5a55eba1774dd9f111914cd74 main.tf
3+
22b2c3a1ff67f77f8d05a2806460dd2f0e5112fdcfeedca07951a30024050986 main.tf
44
236fb28a0fa6c306cefa8e82b73bf938cd9c5744a8b4e70208911cab882aaf90 output.tf
5-
176825825380e478d05e18bad4d2fedb75ad5700009a665168f243ce5a65558e variables.tf
6-
b18c5f6c0199c26151872481e5e3a0e3fee05e410b074ebb501960f5fd388004 version.tf
5+
21d36d8b1c491b78fb1673c674ef1cd522969f5ef276218df1a47d89ba3190b3 variables.tf
6+
65be788ed9f950ee102fbe862a345dcbacf58b3ea18dc68e360bf4e720310529 version.tf

terraform-stacks/add-nodes/data.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ data "oci_core_vcns" "cluster_vcn" {
3434
display_name = var.cluster_name
3535
}
3636

37-
data "oci_core_subnets" "private" {
37+
data "oci_core_subnets" "private_opc" {
3838
compartment_id = var.compartment_ocid
39-
display_name = "private"
39+
display_name = "private_opc"
4040
vcn_id = data.oci_core_vcns.cluster_vcn.virtual_networks[0].id
4141
}
4242

43-
data "oci_core_subnets" "private2" {
43+
data "oci_core_subnets" "private_bare_metal" {
4444
compartment_id = var.compartment_ocid
45-
display_name = "private_two"
45+
display_name = "private_bare_metal"
4646
vcn_id = data.oci_core_vcns.cluster_vcn.virtual_networks[0].id
4747
}
4848

terraform-stacks/add-nodes/main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,12 @@ module "compute" {
9393
op_openshift_tag_instance_role = module.tags.op_openshift_tag_instance_role
9494

9595
// Depedency on image
96-
op_image_openshift_image = module.image.op_image_openshift_image
96+
op_image_openshift_image_paravirtualized = module.image.op_image_openshift_image_paravirtualized
97+
op_image_openshift_image_native = module.image.op_image_openshift_image_native
9798

9899
// Depedency on networks
99-
op_subnet_private = data.oci_core_subnets.private.subnets[0].id
100-
op_subnet_private2 = local.is_control_plane_iscsi_type || local.is_compute_iscsi_type ? data.oci_core_subnets.private2.subnets[0].id : null
100+
op_subnet_private_opc = data.oci_core_subnets.private_opc.subnets[0].id
101+
op_subnet_private_bare_metal = data.oci_core_subnets.private_bare_metal.subnets[0].id
101102
op_network_security_group_cluster_controlplane_nsg = data.oci_core_network_security_groups.cluster_controlplane_nsg.network_security_groups[0].id
102103
op_network_security_group_cluster_compute_nsg = data.oci_core_network_security_groups.cluster_compute_nsg.network_security_groups[0].id
103104

terraform-stacks/add-nodes/schema.yaml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44

55
title: Adding Nodes to OpenShift Cluster on OCI
6-
description: OpenShift on OCI
6+
description: A Terraform Stack for creating resources required for adding nodes to OpenShift Cluster on OCI
77
schemaVersion: 1.1.0
88
version: "20241106"
99
locale: "en"
@@ -18,6 +18,10 @@ variableGroups:
1818
- cluster_instance_role_tag_namespace
1919
- openshift_image_source_uri
2020

21+
- title: "OpenShift Resource Attribution Tags"
22+
variables:
23+
- tag_namespace_compartment_ocid_resource_tagging
24+
2125
- title: "Control Plane Node Configuration"
2226
variables:
2327
- control_plane_shape
@@ -41,10 +45,6 @@ variableGroups:
4145
- distribute_compute_instances_across_ads
4246
- starting_ad_name_compute
4347

44-
- title: "OpenShift Resources Attribution Tagging"
45-
variables:
46-
- tag_namespace_compartment_ocid_resource_tagging
47-
4848
###########
4949
# VARIABLES
5050
###########
@@ -86,14 +86,25 @@ variables:
8686
type: string
8787

8888
#
89-
# Control Plane Configuration Variables
89+
# OpenShift Resource Attribution Tag Variables
9090
#
91+
tag_namespace_compartment_ocid_resource_tagging:
92+
type: oci:identity:compartment:id
93+
title: Tag Namespace Compartment For OpenShift Resource Attribution Tagging
94+
description: WARNING - Please make sure this tag exists before you apply the terraform stack. The compartment where the tag namespace for resource tagging should be created. Defaults to current compartment. The tag namespace and defined tags for OpenShift Attribution on OCI resources will be `openshift-tags` and `openshift-resource`.
95+
If this namespace already exists, the field should be verified to ensure it is correctly defined and applied.
96+
Example --> "defined-tags" - {"openshift-tags"- {"openshift-resource" - "openshift-resource-infra"} }
97+
default: compartment_ocid
98+
required: true
9199

100+
#
101+
# Control Plane Configuration Variables
102+
#
92103
control_plane_shape:
93104
type: string
94105
title: Control Plane Shape
95106
description: Compute Instance shape of control plan nodes. For more detail regarding supported shapes, please visit https://docs.oracle.com/en-us/iaas/Content/openshift-on-oci/overview.htm#supported-shapes
96-
default: "VM.Standard.E4.Flex"
107+
default: "VM.Standard.E5.Flex"
97108
required: true
98109

99110
control_plane_count:
@@ -163,7 +174,7 @@ variables:
163174
type: string
164175
title: Compute Shape
165176
description: Compute Instance shape of compute nodes. For more detail regarding supported shapes, please visit https://docs.oracle.com/en-us/iaas/Content/openshift-on-oci/overview.htm#supported-shapes
166-
default: "VM.Standard.E4.Flex"
177+
default: "VM.Standard.E5.Flex"
167178
required: true
168179

169180
compute_count:
@@ -224,12 +235,3 @@ variables:
224235
dependsOn:
225236
compartmentId: ${compartment_ocid}
226237
required: false
227-
228-
tag_namespace_compartment_ocid_resource_tagging:
229-
type: oci:identity:compartment:id
230-
title: Tag Namespace Compartment For OpenShift Resource Attribution Tagging
231-
description: WARNING - Please make sure this tag exists before you apply the terraform stack. The compartment where the tag namespace for resource tagging should be created. Defaults to current compartment. The tag namespace and defined tags for OpenShift Attribution on OCI resources will be `openshift-tags` and `openshift-resource`.
232-
If this namespace already exists, the field should be verified to ensure it is correctly defined and applied.
233-
Example --> "defined-tags" - {"openshift-tags"- {"openshift-resource" - "openshift-resource-infra"} }
234-
default: compartment_ocid
235-
required: true

terraform-stacks/add-nodes/variables.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ variable "control_plane_count" {
55
}
66

77
variable "control_plane_shape" {
8-
default = "VM.Standard.E4.Flex"
8+
default = "VM.Standard.E5.Flex"
99
type = string
10-
description = "Compute shape of the control_plane nodes. The default shape is VM.Standard.E4.Flex for VM setup and BM.Standard3.64 for BM setup. For more detail regarding supported shapes, please visit https://docs.oracle.com/en-us/iaas/Content/openshift-on-oci/overview.htm#supported-shapes"
10+
description = "Compute shape of the control_plane nodes. The default shape is VM.Standard.E5.Flex for VM setup and BM.Standard3.64 for BM setup. For more detail regarding supported shapes, please visit https://docs.oracle.com/en-us/iaas/Content/openshift-on-oci/overview.htm#supported-shapes"
1111
}
1212

1313
variable "control_plane_ocpu" {
@@ -61,7 +61,7 @@ variable "compute_count" {
6161
}
6262

6363
variable "compute_shape" {
64-
default = "VM.Standard.E4.Flex"
64+
default = "VM.Standard.E5.Flex"
6565
type = string
6666
description = "Compute shape of the compute nodes. The default shape is BM.Standard3.64. For more detail regarding supported shapes, please visit https://docs.oracle.com/en-us/iaas/Content/openshift-on-oci/overview.htm#supported-shapes"
6767
}

terraform-stacks/add-nodes/version.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
locals {
2-
stack_version = "v1.1.1"
2+
stack_version = "v1.2.0"
33
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
ef66a14899c2a0e1e1c13920f29fec70f71e17ec4a9de38d6dcd294886706d3f locals.tf
2-
f9ab9d35fa6ff0f7a30196dd87658267e33e7aa2f0e6e1b8a5b11d6a177c6d57 main.tf
1+
ca99dc7e9c0636575d58aed6dbb326d7efab708d9fb88d294d87cf8006c1ccdb locals.tf
2+
fa3a9ac9d57f076c77875421aac8d7874774528c5c2eab57b8d3f37051e20116 main.tf
33
2f4a0f1b16b320f520f6b431a4bb84698fe76f45dfe7ac1946ecd494890a9654 output.tf
4-
96f0605ff7c84a6b7e2deb59687818118d3a034a1cc20b13facc61f4467c5689 variables.tf
5-
b18c5f6c0199c26151872481e5e3a0e3fee05e410b074ebb501960f5fd388004 version.tf
4+
0fd13d8de685bc03ad8474a77dc94c16d60e8e5c7e6319de54b4e7a375362dad variables.tf
5+
65be788ed9f950ee102fbe862a345dcbacf58b3ea18dc68e360bf4e720310529 version.tf

terraform-stacks/create-cluster/locals.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ locals {
1616
is_control_plane_iscsi_type = can(regex("^BM\\..*$", var.control_plane_shape))
1717
is_compute_iscsi_type = can(regex("^BM\\..*$", var.compute_shape))
1818

19-
subnet_id = var.enable_private_dns && !local.is_control_plane_iscsi_type && !local.is_compute_iscsi_type ? module.network.op_subnet_private : var.enable_private_dns ? module.network.op_subnet_private2 : module.network.op_subnet_public
19+
subnet_id = var.enable_private_dns ? module.network.op_subnet_private_opc : module.network.op_subnet_public
2020
security_list_id = var.enable_private_dns ? module.network.op_security_list_private : module.network.op_security_list_public
2121
}

terraform-stacks/create-cluster/main.tf

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ module "network" {
8989
compartment_ocid = var.compartment_ocid
9090
cluster_name = var.cluster_name
9191

92-
vcn_cidr = var.vcn_cidr
93-
private_cidr = var.private_cidr
94-
private_cidr_2 = var.private_cidr_2
95-
public_cidr = var.public_cidr
96-
vcn_dns_label = var.vcn_dns_label
92+
vcn_cidr = var.vcn_cidr
93+
private_cidr_opc = var.private_cidr_opc
94+
private_cidr_bare_metal = var.private_cidr_bare_metal
95+
public_cidr = var.public_cidr
96+
vcn_dns_label = var.vcn_dns_label
9797

9898
// Depedency on tags
9999
defined_tags = module.resource_attribution_tags.openshift_resource_attribution_tag
@@ -102,10 +102,8 @@ module "network" {
102102
module "load_balancer" {
103103
source = "./shared_modules/lb"
104104

105-
compartment_ocid = var.compartment_ocid
106-
cluster_name = var.cluster_name
107-
is_control_plane_iscsi_type = local.is_control_plane_iscsi_type
108-
is_compute_iscsi_type = local.is_compute_iscsi_type
105+
compartment_ocid = var.compartment_ocid
106+
cluster_name = var.cluster_name
109107

110108
enable_private_dns = var.enable_private_dns
111109
load_balancer_shape_details_maximum_bandwidth_in_mbps = var.load_balancer_shape_details_maximum_bandwidth_in_mbps
@@ -115,8 +113,7 @@ module "load_balancer" {
115113
defined_tags = module.resource_attribution_tags.openshift_resource_attribution_tag
116114

117115
// Depedency on networks
118-
op_subnet_private = module.network.op_subnet_private
119-
op_subnet_private2 = module.network.op_subnet_private2
116+
op_subnet_private_opc = module.network.op_subnet_private_opc
120117
op_subnet_public = module.network.op_subnet_public
121118
op_network_security_group_cluster_lb_nsg = module.network.op_network_security_group_cluster_lb_nsg
122119
}
@@ -155,11 +152,12 @@ module "compute" {
155152
op_openshift_tag_instance_role = module.tags.op_openshift_tag_instance_role
156153

157154
// Depedency on image
158-
op_image_openshift_image = module.image.op_image_openshift_image
155+
op_image_openshift_image_native = module.image.op_image_openshift_image_native
156+
op_image_openshift_image_paravirtualized = module.image.op_image_openshift_image_paravirtualized
159157

160158
// Depedency on networks
161-
op_subnet_private = module.network.op_subnet_private
162-
op_subnet_private2 = module.network.op_subnet_private2
159+
op_subnet_private_opc = module.network.op_subnet_private_opc
160+
op_subnet_private_bare_metal = module.network.op_subnet_private_bare_metal
163161
op_network_security_group_cluster_controlplane_nsg = module.network.op_network_security_group_cluster_controlplane_nsg
164162
op_network_security_group_cluster_compute_nsg = module.network.op_network_security_group_cluster_compute_nsg
165163

0 commit comments

Comments
 (0)