From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BA4F24B29 for ; Tue, 1 Apr 2025 01:00:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743469217; cv=none; b=TQOag4A1MZmXXbaaGLGbZonL7DGYKUJS6JfVWzYyPBNGHR6FyoG5atuprBJy3HCj75IGX4qxqYkimIpxJLyNszVCOYPZRyE8FHgXGheJSxxs9qxiO24QX8w4xu1y166jcwtq3ukOj70+vU6jXYATI8aE46Xi0BWWDAJSE5850RQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743469217; c=relaxed/simple; bh=5FeGc9SJyAiv6rrC9LQD2FCz6F5028djlFVuLQQA32U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZE6wRSm6Oa3RVAuvrbH2IMkuJ+qlmywCdlEOp2Rhr4F/ObNTU3vYaoLPmKU+kyRL1XBA3JTuKyL5oKti+F6n97WoKVDMWMRwdiY6/7qINket8kGU/vlijyeCgMj8813YQtFwlOX5Dfw7XN4+cwaiBsn07I0Cn7Wq4xWc59N7pxQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CvfmoU/Z; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CvfmoU/Z" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD3CAC4CEE3; Tue, 1 Apr 2025 01:00:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743469217; bh=5FeGc9SJyAiv6rrC9LQD2FCz6F5028djlFVuLQQA32U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CvfmoU/Z9Mx03Z1GEIr+M/i8Kl2iK+QLortnEiV3Ww4rSSnEx4PKqUseeDK/LC19R 3P1vkbNh7vk0nTz2gYrh48AMI7/luLNZlyssf2h3eRml5BNxSxL8yILScsnYC+vvIe yZREGCkoLQsjalDcwHC7TmpATZSSm0jZLyMY1T9z+h7S2YDsdbiY3lweemzzAbcNwN Gx0nauX+wmy7pD1AmdhhtyQFHtWW78nW3Gfxeg3mqxHBplK9wNetZbPNNjG9YKtfp8 sWa1rMBAb9TodEs2xEE5SVmvBHnteaTplHGAYMnCeidc26XnG+9W2Q111de65LHvsC DhqDOvpNVqADw== From: cel@kernel.org To: Cc: Chandan Babu R , Chuck Lever Subject: [RFC PATCH 16/31] terraform/OCI: Add a shape selector for Flex shapes Date: Mon, 31 Mar 2025 20:59:45 -0400 Message-ID: <20250401010000.764234-17-cel@kernel.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250401010000.764234-1-cel@kernel.org> References: <20250401010000.764234-1-cel@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Chuck Lever It's easier for users to select from a menu of choices rather than to enter a free-form string. The selector is moved to a separate file to make it straightforward to update (either by a human or a script). Signed-off-by: Chuck Lever --- terraform/oci/kconfigs/Kconfig.compute | 20 +---- terraform/oci/kconfigs/shapes/Kconfig.flex | 85 ++++++++++++++++++++++ 2 files changed, 86 insertions(+), 19 deletions(-) create mode 100644 terraform/oci/kconfigs/shapes/Kconfig.flex diff --git a/terraform/oci/kconfigs/Kconfig.compute b/terraform/oci/kconfigs/Kconfig.compute index c9e125dcf37a..dc6427d18f42 100644 --- a/terraform/oci/kconfigs/Kconfig.compute +++ b/terraform/oci/kconfigs/Kconfig.compute @@ -1,22 +1,4 @@ -config TERRAFORM_OCI_SHAPE - string "OCI shape name" - output yaml - help - The name of the shape - Read this: - https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/terraformproviderconfiguration.htm - -config TERRAFORM_OCI_INSTANCE_FLEX_OCPUS - int "Number of flexiable instance OCPUs" - default 2 - help - The number of OCPUs to use per flexible instance. - -config TERRAFORM_OCI_INSTANCE_FLEX_MEMORY_IN_GBS - int "How much RAM to use per flexible instance in GB" - default 4 - help - How much GiB of RAM to use per flexible instance. +source "terraform/oci/kconfigs/shapes/Kconfig.flex" config TERRAFORM_OCI_OS_IMAGE_OCID string "OCI OS image OCID" diff --git a/terraform/oci/kconfigs/shapes/Kconfig.flex b/terraform/oci/kconfigs/shapes/Kconfig.flex new file mode 100644 index 000000000000..80ebccc59d6a --- /dev/null +++ b/terraform/oci/kconfigs/shapes/Kconfig.flex @@ -0,0 +1,85 @@ +choice + prompt "OCI shape" + default TERRAFORM_OCI_SHAPE_VM_STANDARD3_FLEX + help + Select the basic hardware capabilities that are in each + instance. For more detail, see: + + https://docs.oracle.com/en-us/iaas/Content/Compute/References/computeshapes.htm#flexible + +config TERRAFORM_OCI_SHAPE_VM_STANDARD3_FLEX + bool "VM.Standard3.Flex" + depends on TARGET_ARCH_X86_64 + help + Selecting this option provisions each guest with between 1 + and 32 OCPUs (physical cores) and up to 512MB of memory. + +config TERRAFORM_OCI_SHAPE_VM_STANDARD_E4_FLEX + bool "VM.Standard.E4.Flex" + depends on TARGET_ARCH_X86_64 + help + Selecting this option provisions each guest with between 1 + and 114 OCPUs (physical AMD cores) and up to 1760MB of memory. + +config TERRAFORM_OCI_SHAPE_VM_STANDARD_E5_FLEX + bool "VM.Standard.E5.Flex" + depends on TARGET_ARCH_X86_64 + help + Selecting this option provisions each guest with between 1 + and 94 OCPUs (physical AMD cores) and up to 1048MB of memory. + +config TERRAFORM_OCI_SHAPE_VM_STANDARD_A1_FLEX + bool "VM.Standard.A1.Flex" + depends on TARGET_ARCH_ARM64 + help + Selecting this option provisions each guest with between 1 + and 80 OCPUs (physical ARM cores) and up to 512MB of memory. + +config TERRAFORM_OCI_SHAPE_VM_STANDARD_A2_FLEX + bool "VM.Standard.A2.Flex" + depends on TARGET_ARCH_ARM64 + help + Selecting this option provisions each guest with between 1 + and 78 OCPUs (physical ARM cores) and up to 946MB of memory. + +config TERRAFORM_OCI_SHAPE_VM_DENSEIO_E4_FLEX + bool "VM.DenseIO.E4.Flex" + depends on TARGET_ARCH_X86_64 + help + Selecting this option provisions each instance with either + 8 OCPUs and 128 GB memory, 16 OCPUs and 256 GB memory, or + 32 OCPUs and 512 GB memory. CPUs are based on the AMD + x86_64 platform. + +config TERRAFORM_OCI_SHAPE_VM_OPTIMIZED3_FLEX + bool "VM.Optimized3.Flex" + depends on TARGET_ARCH_X86_64 + help + Selecting this option provisions each instance with up to + 18 OCPUS. The memory provisioned for each instance is + typically matches a multiple of the number of OCPUS. + +endchoice + +config TERRAFORM_OCI_SHAPE + string + output yaml + default "VM.Standard3.Flex" if TERRAFORM_OCI_SHAPE_VM_STANDARD3_FLEX + default "VM.Standard.E4.Flex" if TERRAFORM_OCI_SHAPE_VM_STANDARD_E4_FLEX + default "VM.Standard.E5.Flex" if TERRAFORM_OCI_SHAPE_VM_STANDARD_E5_FLEX + default "VM.Standard.A1.Flex" if TERRAFORM_OCI_SHAPE_VM_STANDARD_A1_FLEX + default "VM.Standard.A2.Flex" if TERRAFORM_OCI_SHAPE_VM_STANDARD_A2_FLEX + default "VM.DenseIO.E4.Flex" if TERRAFORM_OCI_SHAPE_VM_DENSEIO_E4_FLEX + default "VM.Optimized3.Flex" if TERRAFORM_OCI_SHAPE_VM_OPTIMIZED3_FLEX + +config TERRAFORM_OCI_INSTANCE_FLEX_OCPUS + int "Number of flexible instance OCPUs" + default 2 + help + The number of OCPUs to use per flexible instance. + +config TERRAFORM_OCI_INSTANCE_FLEX_MEMORY_IN_GBS + int "How much RAM to use per flexible instance in GB" + default 4 + help + How much GiB of RAM to use per flexible instance. -- 2.48.1