Skip to content

Commit 0283fcd

Browse files
committed
terraform/OCI: Add a generic shape selector
Suggested-by: Chandan Babu R <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent b50250f commit 0283fcd

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

terraform/oci/kconfigs/Kconfig.compute

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ 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_GENERIC
23+
bool "Generic shapes"
24+
help
25+
These shapes are recommended for developers who do not
26+
require a specific model of CPU for their workflows.
27+
2228
config TERRAFORM_OCI_SHAPE_FAMILY_BARE_METAL
2329
bool "Bare metal"
2430
help
@@ -30,6 +36,7 @@ config TERRAFORM_OCI_SHAPE_FAMILY_BARE_METAL
3036
endchoice
3137

3238
source "terraform/oci/kconfigs/shapes/Kconfig.flex"
39+
source "terraform/oci/kconfigs/shapes/Kconfig.generic"
3340
source "terraform/oci/kconfigs/shapes/Kconfig.bm"
3441

3542
config TERRAFORM_OCI_OS_IMAGE_OCID
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
if TERRAFORM_OCI_SHAPE_FAMILY_GENERIC
2+
3+
choice
4+
prompt "OCI shape"
5+
default TERRAFORM_OCI_SHAPE_VM_STANDARD_X86_GENERIC
6+
help
7+
Select the basic hardware capabilities that are in each
8+
instance.
9+
10+
config TERRAFORM_OCI_SHAPE_VM_STANDARD_X86_GENERIC
11+
bool "VM.Standard.x86.Generic"
12+
depends on TARGET_ARCH_X86_64
13+
14+
endchoice
15+
16+
config TERRAFORM_OCI_SHAPE
17+
string
18+
output yaml
19+
default "VM.Standard.x86.Generic" if TERRAFORM_OCI_SHAPE_VM_STANDARD_X86_GENERIC
20+
21+
config TERRAFORM_OCI_INSTANCE_FLEX_OCPUS
22+
int "Instance CPU count"
23+
output yaml
24+
default 2
25+
help
26+
The Oracle CPU (OCPU) represents physical CPU cores and is
27+
the unit of measurement for CPUs on x86 CPUs (AMD and
28+
Intel) and Arm CPUs (OCI Ampere Compute). A virtual CPU
29+
(vCPU), the industry-standard for measuring compute
30+
resources, represents one execution thread of a physical
31+
CPU core.
32+
33+
Most CPU architectures, including x86, runs two threads
34+
per physical core, so one OCPU is the equal of two vCPUs
35+
for x86-based compute. For OCI Compute, the minimum unit
36+
of provisioning starts from one OCPU on both X86 (Intel
37+
and AMD) and OCI Ampere Compute processors.
38+
39+
config TERRAFORM_OCI_INSTANCE_FLEX_MEMORY_IN_GBS
40+
int "Instance memory size"
41+
output yaml
42+
default 4
43+
help
44+
Memory per instance, in GiBs. The minimum value for this
45+
setting is a multiple of the number of OCPUS in each
46+
instance.
47+
48+
endif # TERRAFORM_OCI_SHAPE_FAMILY_GENERIC

0 commit comments

Comments
 (0)