Skip to content

Commit 187547d

Browse files
committed
terraform/OCI: Use "output yaml" for the OCPUs setting
Refactor: Remove the line in terraform.Makefile that sets "terraform_oci_instance_flex_ocpus" and just pass it directly from Kconfig via an "output yaml" directive. As an additional clean up, update the help text. Reviewed-by: Luis Chamberlain <[email protected]> Reviewed-by: Chandan Babu R <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent 67d662a commit 187547d

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

scripts/terraform.Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ KDEVOPS_MRPROPER += $(KDEVOPS_NODES)
4848
DEFAULT_DEPS_REQS_EXTRA_VARS += $(KDEVOPS_TFVARS)
4949

5050
ifeq (y,$(CONFIG_TERRAFORM_OCI))
51-
TERRAFORM_EXTRA_VARS += terraform_oci_instance_flex_ocpus=$(subst ",,$(CONFIG_TERRAFORM_OCI_INSTANCE_FLEX_OCPUS))
5251
TERRAFORM_EXTRA_VARS += terraform_oci_instance_flex_memory_in_gbs=$(subst ",,$(CONFIG_TERRAFORM_OCI_INSTANCE_FLEX_MEMORY_IN_GBS))
5352
TERRAFORM_EXTRA_VARS += terraform_oci_os_image_ocid=$(subst ",,$(CONFIG_TERRAFORM_OCI_OS_IMAGE_OCID))
5453
ifeq (y, $(CONFIG_TERRAFORM_OCI_ASSIGN_PUBLIC_IP))

terraform/oci/kconfigs/shapes/Kconfig.flex

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,22 @@ config TERRAFORM_OCI_SHAPE
7373
default "VM.Optimized3.Flex" if TERRAFORM_OCI_SHAPE_VM_OPTIMIZED3_FLEX
7474

7575
config TERRAFORM_OCI_INSTANCE_FLEX_OCPUS
76-
int "Number of flexible instance OCPUs"
76+
int "Instance CPU count"
77+
output yaml
7778
default 2
7879
help
79-
The number of OCPUs to use per flexible instance.
80+
The Oracle CPU (OCPU) represents physical CPU cores and is
81+
the unit of measurement for CPUs on x86 CPUs (AMD and
82+
Intel) and Arm CPUs (OCI Ampere Compute). A virtual CPU
83+
(vCPU), the industry-standard for measuring compute
84+
resources, represents one execution thread of a physical
85+
CPU core.
86+
87+
Most CPU architectures, including x86, runs two threads
88+
per physical core, so one OCPU is the equal of two vCPUs
89+
for x86-based compute. For OCI Compute, the minimum unit
90+
of provisioning starts from one OCPU on both X86 (Intel
91+
and AMD) and OCI Ampere Compute processors.
8092

8193
config TERRAFORM_OCI_INSTANCE_FLEX_MEMORY_IN_GBS
8294
int "How much RAM to use per flexible instance in GB"

0 commit comments

Comments
 (0)