Skip to content

Commit b50250f

Browse files
committed
terraform/OCI: Add a bare metal shape selector
Match the same capability that is available for kdevops on AWS. Reviewed-by: Luis Chamberlain <[email protected]> Reviewed-by: Chandan Babu R <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent 65dbaa9 commit b50250f

File tree

3 files changed

+96
-0
lines changed

3 files changed

+96
-0
lines changed

playbooks/roles/gen_tfvars/templates/oci/terraform.tfvars.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ oci_config_file_profile = "{{ terraform_oci_config_file_profile }}"
44
oci_ad_number = {{ terraform_oci_ad_number }}
55
oci_compartment_name = "{{ terraform_oci_compartment_name }}"
66
oci_shape = "{{ terraform_oci_shape }}"
7+
{% if terraform_oci_instance_flex_ocpus is defined %}
78
oci_instance_flex_ocpus = {{ terraform_oci_instance_flex_ocpus }}
9+
{% endif %}
10+
{% if terraform_oci_instance_flex_memory_in_gbs is defined %}
811
oci_instance_flex_memory_in_gbs = {{ terraform_oci_instance_flex_memory_in_gbs }}
12+
{% endif %}
913
oci_os_image_ocid = "{{ terraform_oci_os_image_ocid }}"
1014
oci_assign_public_ip = "{{ terraform_oci_assign_public_ip | lower }}"
1115
oci_subnet_ocid = "{{ terraform_oci_subnet_ocid }}"

terraform/oci/kconfigs/Kconfig.compute

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,18 @@ config TERRAFORM_OCI_SHAPE_FAMILY_FLEX
1919
per instance. The network bandwidth and number of VNICs
2020
scale proportionately with the number of OCPUs.
2121

22+
config TERRAFORM_OCI_SHAPE_FAMILY_BARE_METAL
23+
bool "Bare metal"
24+
help
25+
A bare metal shape is a whole physical machine without
26+
virtualization. This gives deterministic performance
27+
characteristics but is less configurable than a flex
28+
shape.
29+
2230
endchoice
2331

2432
source "terraform/oci/kconfigs/shapes/Kconfig.flex"
33+
source "terraform/oci/kconfigs/shapes/Kconfig.bm"
2534

2635
config TERRAFORM_OCI_OS_IMAGE_OCID
2736
string "OCI OS image OCID"
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
if TERRAFORM_OCI_SHAPE_FAMILY_BARE_METAL
2+
3+
choice
4+
prompt "OCI shape"
5+
default TERRAFORM_OCI_SHAPE_BM_STANDARD3
6+
help
7+
Select the basic hardware capabilities that are in each
8+
instance. For more details, see:
9+
10+
https://docs.oracle.com/en-us/iaas/Content/Compute/References/computeshapes.htm#baremetalshapes
11+
12+
config TERRAFORM_OCI_SHAPE_BM_STANDARD3
13+
bool "BM.Standard3"
14+
depends on TARGET_ARCH_X86_64
15+
help
16+
X9-based standard compute. Processor: Intel Xeon Platinum
17+
8358. Base frequency 2.6 GHz, max turbo frequency 3.4 GHz.
18+
19+
config TERRAFORM_OCI_SHAPE_BM_STANDARD_E4
20+
bool "BM.Standard.E4"
21+
depends on TARGET_ARCH_X86_64
22+
help
23+
E4-based standard compute. Processor: AMD EPYC 7J13. Base
24+
frequency 2.55 GHz, max boost frequency 3.5 GHz.
25+
26+
config TERRAFORM_OCI_SHAPE_BM_STANDARD_E5
27+
bool "BM.Standard.E5"
28+
depends on TARGET_ARCH_X86_64
29+
help
30+
E5-based standard compute. Processor: AMD EPYC 9J14. Base
31+
frequency 2.4 GHz, max boost frequency 3.7 GHz.
32+
33+
config TERRAFORM_OCI_SHAPE_BM_STANDARD_A1
34+
bool "BM.Standard.A1"
35+
depends on TARGET_ARCH_ARM64
36+
help
37+
OCI Ampere A1 Compute Arm-based standard compute. Each
38+
OCPU corresponds to a single hardware execution thread.
39+
Processor: Ampere Altra Q80-30. Max frequency 3.0 GHz.
40+
41+
config TERRAFORM_OCI_SHAPE_BM_DENSEIO_E4
42+
bool "BM.DenseIO.E4"
43+
depends on TARGET_ARCH_X86_64
44+
help
45+
E4-based dense I/O compute. Processor: AMD EPYC 7J13.
46+
Base frequency 2.55 GHz, max boost frequency 3.5 GHz.
47+
48+
config TERRAFORM_OCI_SHAPE_BM_DENSEIO_E5
49+
bool "BM.DenseIO.E5"
50+
depends on TARGET_ARCH_X86_64
51+
help
52+
E5-based dense I/O compute. Processor: AMD EPYC 9J14.
53+
Base frequency 2.4 GHz, max boost frequency 3.7 GHz.
54+
55+
config TERRAFORM_OCI_SHAPE_BM_OPTIMIZED3
56+
bool "BM.Optimized3"
57+
depends on TARGET_ARCH_X86_64
58+
help
59+
Processor: Intel Xeon 6354. Base frequency 3.0 GHz, max
60+
turbo frequency 3.6 GHz.
61+
62+
config TERRAFORM_OCI_SHAPE_BM_HPC_E5
63+
bool "BM.HPC.E5"
64+
depends on TARGET_ARCH_X86_64
65+
help
66+
Processor: AMD EPYC 9J14. Base frequency 2.4 GHz, max
67+
boost frequency 3.7 GHz.
68+
69+
endchoice
70+
71+
config TERRAFORM_OCI_SHAPE
72+
string
73+
output yaml
74+
default "BM.Standard3" if TERRAFORM_OCI_SHAPE_BM_STANDARD3
75+
default "BM.Standard.E4" if TERRAFORM_OCI_SHAPE_BM_STANDARD_E4
76+
default "BM.Standard.E5" if TERRAFORM_OCI_SHAPE_BM_STANDARD_E5
77+
default "BM.Standard.A1" if TERRAFORM_OCI_SHAPE_BM_STANDARD_A1
78+
default "BM.DenseIO.E4" if TERRAFORM_OCI_SHAPE_BM_DENSEIO_E4
79+
default "BM.DenseIO.E5" if TERRAFORM_OCI_SHAPE_BM_DENSEIO_E5
80+
default "BM.Optimized3" if TERRAFORM_OCI_SHAPE_BM_OPTIMIZED3
81+
default "BM.HPC.E5" if TERRAFORM_OCI_SHAPE_BM_HPC_E5
82+
83+
endif # TERRAFORM_OCI_SHAPE_FAMILY_BARE_METAL

0 commit comments

Comments
 (0)