File tree Expand file tree Collapse file tree 11 files changed +181
-6
lines changed Expand file tree Collapse file tree 11 files changed +181
-6
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,18 @@ resource "oci_core_instance_configuration" "cluster-network-instance_configurati
4444
4545 }
4646 }
47+ dynamic "platform_config" {
48+ for_each = var. BIOS ? range (1 ) : []
49+ content {
50+ type = local. platform_type
51+ are_virtual_instructions_enabled = var. virt_instr
52+ is_access_control_service_enabled = var. access_ctrl
53+ is_input_output_memory_management_unit_enabled = var. IOMMU
54+ is_symmetric_multi_threading_enabled = var. SMT
55+ numa_nodes_per_socket = var. numa_nodes_per_socket == " Default" ? (local. platform_type == " GENERIC_BM" ? " NPS1" : " NPS4" ): var. numa_nodes_per_socket
56+ percentage_of_cores_enabled = var. percentage_of_cores_enabled == " Default" ? 100 : tonumber (var. percentage_of_cores_enabled )
57+ }
58+ }
4759 shape = var. cluster_network_shape
4860 source_details {
4961 source_type = " image"
@@ -52,7 +64,7 @@ resource "oci_core_instance_configuration" "cluster-network-instance_configurati
5264 }
5365 }
5466 }
55-
67+
5668 source = " NONE"
5769}
5870
Original file line number Diff line number Diff line change @@ -29,7 +29,18 @@ resource "oci_core_instance_configuration" "instance_pool_configuration" {
2929 memory_in_gbs = var. instance_pool_custom_memory ? var. instance_pool_memory : 16 * shape_config. value
3030 }
3131 }
32-
32+ dynamic "platform_config" {
33+ for_each = var. BIOS ? range (1 ) : []
34+ content {
35+ type = local. platform_type
36+ are_virtual_instructions_enabled = var. virt_instr
37+ is_access_control_service_enabled = var. access_ctrl
38+ is_input_output_memory_management_unit_enabled = var. IOMMU
39+ is_symmetric_multi_threading_enabled = var. SMT
40+ numa_nodes_per_socket = var. numa_nodes_per_socket == " Default" ? (local. platform_type == " GENERIC_BM" ? " NPS1" : " NPS4" ): var. numa_nodes_per_socket
41+ percentage_of_cores_enabled = var. percentage_of_cores_enabled == " Default" ? 100 : tonumber (var. percentage_of_cores_enabled )
42+ }
43+ }
3344 source_details {
3445 source_type = " image"
3546 boot_volume_size_in_gbs = var. boot_volume_size
Original file line number Diff line number Diff line change @@ -38,4 +38,6 @@ locals {
3838
3939 timeout_per_batch = var. cluster_network ? var. use_multiple_ads ? 15 : 30 : var. use_multiple_ads ? 6 : 15
4040 timeout_ip = join (" " ,[ (( var. node_count - ( var. node_count % 20 ) )/ 20 + 1 ) * local . timeout_per_batch ," m" ])
41+ platform_type = local. shape == " BM.GPU4.8" ? " AMD_ROME_BM_GPU" : local. shape == " BM.GPU.B4.8" || local. shape == " BM.GPU.H100.8" || local. shape == " BM.GPU.A100-v2.8" ? " AMD_MILAN_BM_GPU" : local. shape == " BM.Standard.E3.128" ? " AMD_ROME_BM" : local. shape == " BM.Standard.E4.128" || local. shape == " BM.DenseIO.E4.128" ? " AMD_MILAN_BM" : " GENERIC_BM"
42+
4143}
Original file line number Diff line number Diff line change @@ -48,6 +48,19 @@ resource "oci_core_instance_configuration" "cluster-network-instance_configurati
4848
4949 }
5050 }
51+
52+ dynamic "platform_config" {
53+ for_each = var. BIOS ? range (1 ) : []
54+ content {
55+ type = local. platform_type
56+ are_virtual_instructions_enabled = var. virt_instr
57+ is_access_control_service_enabled = var. access_ctrl
58+ is_input_output_memory_management_unit_enabled = var. IOMMU
59+ is_symmetric_multi_threading_enabled = var. SMT
60+ numa_nodes_per_socket = var. numa_nodes_per_socket == " Default" ? (local. platform_type == " GENERIC_BM" ? " NPS1" : " NPS4" ): var. numa_nodes_per_socket
61+ percentage_of_cores_enabled = var. percentage_of_cores_enabled == " Default" ? 100 : tonumber (var. percentage_of_cores_enabled )
62+ }
63+ }
5164
5265
5366 shape = var. cluster_network_shape
Original file line number Diff line number Diff line change @@ -138,3 +138,25 @@ variable "log_vol" { default = "${log_vol}" }
138138variable "redundancy" { default = " ${redundancy}" }
139139
140140variable "instance_pool_ocpus_denseIO_flex" { default = " ##OCPU##" }
141+
142+ variable "BIOS" {
143+ default = ${BIOS}
144+ }
145+ variable "IOMMU" {
146+ default = ${IOMMU}
147+ }
148+ variable "SMT" {
149+ default = ${SMT}
150+ }
151+ variable "virt_instr" {
152+ default = ${virt_instr}
153+ }
154+ variable "access_ctrl" {
155+ default = ${access_ctrl}
156+ }
157+ variable "numa_nodes_per_socket" {
158+ default = " ${numa_nodes_per_socket}"
159+ }
160+ variable "percentage_of_cores_enabled" {
161+ default = " ${percentage_of_cores_enabled}"
162+ }
Original file line number Diff line number Diff line change @@ -438,7 +438,14 @@ resource "null_resource" "cluster" {
438438 compute_username = var.compute_username,
439439 pam = var.pam,
440440 sacct_limits = var.sacct_limits,
441- use_compute_agent = var.use_compute_agent
441+ use_compute_agent = var.use_compute_agent,
442+ BIOS = var.BIOS,
443+ IOMMU = var.IOMMU,
444+ SMT = var.SMT,
445+ virt_instr = var.virt_instr,
446+ access_ctrl = var.access_ctrl,
447+ numa_nodes_per_socket = var.numa_nodes_per_socket,
448+ percentage_of_cores_enabled = var.percentage_of_cores_enabled
442449 })
443450
444451 destination = " /opt/oci-hpc/conf/variables.tf"
Original file line number Diff line number Diff line change @@ -33,7 +33,19 @@ resource "oci_core_instance_configuration" "instance_pool_configuration" {
3333 memory_in_gbs = var. instance_pool_custom_memory ? var. instance_pool_memory : 16 * shape_config. value
3434 }
3535 }
36-
36+
37+ dynamic "platform_config" {
38+ for_each = var. BIOS ? range (1 ) : []
39+ content {
40+ type = local. platform_type
41+ are_virtual_instructions_enabled = var. virt_instr
42+ is_access_control_service_enabled = var. access_ctrl
43+ is_input_output_memory_management_unit_enabled = var. IOMMU
44+ is_symmetric_multi_threading_enabled = var. SMT
45+ numa_nodes_per_socket = var. numa_nodes_per_socket == " Default" ? (local. platform_type == " GENERIC_BM" ? " NPS1" : " NPS4" ): var. numa_nodes_per_socket
46+ percentage_of_cores_enabled = var. percentage_of_cores_enabled == " Default" ? 100 : tonumber (var. percentage_of_cores_enabled )
47+ }
48+ }
3749 source_details {
3850 source_type = " image"
3951 boot_volume_size_in_gbs = var. boot_volume_size
Original file line number Diff line number Diff line change @@ -70,4 +70,5 @@ locals {
7070 timeout_ip = join (" " ,[ (( var. node_count - ( var. node_count % 20 ) )/ 20 + 1 ) * local . timeout_per_batch ," m" ])
7171
7272 zone_name = var. use_existing_vcn ? var. zone_name : " ${ local . cluster_name } .local"
73+ platform_type = local. shape == " BM.GPU4.8" ? " AMD_ROME_BM_GPU" : local. shape == " BM.GPU.B4.8" || local. shape == " BM.GPU.H100.8" || local. shape == " BM.GPU.A100-v2.8" ? " AMD_MILAN_BM_GPU" : local. shape == " BM.Standard.E3.128" ? " AMD_ROME_BM" : local. shape == " BM.Standard.E4.128" || local. shape == " BM.DenseIO.E4.128" ? " AMD_MILAN_BM" : " GENERIC_BM"
7374}
Original file line number Diff line number Diff line change @@ -64,6 +64,14 @@ variableGroups:
6464 - ${compute_image_compartment}
6565 - ${image}
6666 - ${image_ocid}
67+ - ${BIOS}
68+ - ${IOMMU}
69+ - ${SMT}
70+ - ${virt_instr}
71+ - ${access_ctrl}
72+ - ${numa_nodes_per_socket}
73+ - ${percentage_of_cores_enabled}
74+
6775 - title : " Additional Login Node"
6876 variables :
6977 - ${login_node}
@@ -822,6 +830,65 @@ variables:
822830 - and :
823831 - ${unsupported}
824832
833+ BIOS :
834+ title : " Modify BIOS options"
835+ description : " Make sure that the BIOS options are changeable for the specific shape selected"
836+ type : boolean
837+ default : false
838+ visible : true
839+
840+ IOMMU :
841+ title : " IOMMU enabled"
842+ type : boolean
843+ default : false
844+ visible : ${BIOS}
845+
846+ SMT :
847+ title : " SMT Enabled"
848+ type : boolean
849+ default : true
850+ visible : ${BIOS}
851+
852+ virt_instr :
853+ title : " Virtualization instructions"
854+ description : " Virtualization instructions include Secure Virtual Machine for AMD shapes or VT-x for Intel shapes"
855+ type : boolean
856+ default : false
857+ visible : ${BIOS}
858+
859+ access_ctrl :
860+ title : " Access Control Service"
861+ description : " Access control service lets the platform enforce PCIe device isolation"
862+ type : boolean
863+ default : false
864+ visible : ${BIOS}
865+
866+ numa_nodes_per_socket :
867+ title : " Numa Node per Socket"
868+ description : " NUMA Settings"
869+ type : enum
870+ enum :
871+ - " Default"
872+ - " NPS0"
873+ - " NPS1"
874+ - " NPS2"
875+ - " NPS4"
876+ default : " Default"
877+ visible : ${BIOS}
878+
879+ percentage_of_cores_enabled :
880+ title : " Numa Node per Socket"
881+ description : " NUMA Settings"
882+ type : enum
883+ enum :
884+ - " Default"
885+ - " 25"
886+ - " 50"
887+ - " 75"
888+ - " 100"
889+ default : " Default"
890+ visible : ${BIOS}
891+
825892 use_advanced :
826893 type : boolean
827894 title : " Show advanced storage options"
Original file line number Diff line number Diff line change @@ -392,7 +392,14 @@ resource "null_resource" "cluster_backup" {
392392 controller_username = var.controller_username,
393393 compute_username = var.compute_username,
394394 use_multiple_ads = var.use_multiple_ads,
395- use_compute_agent = var.use_compute_agent
395+ use_compute_agent = var.use_compute_agent,
396+ BIOS = var.BIOS,
397+ IOMMU = var.IOMMU,
398+ SMT = var.SMT,
399+ virt_instr = var.virt_instr,
400+ access_ctrl = var.access_ctrl,
401+ numa_nodes_per_socket = var.numa_nodes_per_socket,
402+ percentage_of_cores_enabled = var.percentage_of_cores_enabled
396403 })
397404
398405 destination = " /opt/oci-hpc/conf/variables.tf"
You can’t perform that action at this time.
0 commit comments