public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: Luis Chamberlain <mcgrof@kernel.org>
To: Chuck Lever <cel@kernel.org>, Daniel Gomez <da.gomez@kruces.com>,
	kdevops@lists.linux.dev
Cc: Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH v2 10/10] terraform: enable Lambda Labs cloud provider in menus
Date: Wed, 27 Aug 2025 14:29:01 -0700	[thread overview]
Message-ID: <20250827212902.4021990-11-mcgrof@kernel.org> (raw)
In-Reply-To: <20250827212902.4021990-1-mcgrof@kernel.org>

Enable Lambda Labs as a selectable cloud provider and add example
configurations to help users get started quickly. Lambda Labs is now
fully integrated and available for use.

This patch:
- Adds Lambda Labs to the cloud provider selection menu
- Sources Lambda Labs Kconfig when selected
- Provides example defconfigs for common GPU configurations
- Includes smart selection and cost-optimized examples
- Adds shared SSH key configuration example

Example configurations provided:
- lambdalabs: Basic Lambda Labs setup
- lambdalabs-gpu-1x-a10: Single A10 GPU instance
- lambdalabs-gpu-1x-a100: Single A100 GPU instance
- lambdalabs-gpu-1x-h100: Single H100 GPU instance
- lambdalabs-gpu-8x-a100: 8x A100 GPU cluster
- lambdalabs-gpu-8x-h100: 8x H100 GPU cluster
- lambdalabs-smart: Smart instance selection
- lambdalabs-shared-key: Shared SSH key setup

Lambda Labs is now ready for GPU-accelerated workloads with dynamic
configuration based on real-time API data.

Generated-by: Claude AI
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 defconfigs/lambdalabs             | 15 +++++++++++++++
 defconfigs/lambdalabs-gpu-1x-a10  |  9 +++++++++
 defconfigs/lambdalabs-gpu-1x-a100 |  8 ++++++++
 defconfigs/lambdalabs-gpu-1x-h100 |  8 ++++++++
 defconfigs/lambdalabs-gpu-8x-a100 |  8 ++++++++
 defconfigs/lambdalabs-gpu-8x-h100 |  8 ++++++++
 defconfigs/lambdalabs-shared-key  | 11 +++++++++++
 defconfigs/lambdalabs-smart       | 10 ++++++++++
 terraform/Kconfig.providers       | 10 ++++++++++
 9 files changed, 87 insertions(+)
 create mode 100644 defconfigs/lambdalabs
 create mode 100644 defconfigs/lambdalabs-gpu-1x-a10
 create mode 100644 defconfigs/lambdalabs-gpu-1x-a100
 create mode 100644 defconfigs/lambdalabs-gpu-1x-h100
 create mode 100644 defconfigs/lambdalabs-gpu-8x-a100
 create mode 100644 defconfigs/lambdalabs-gpu-8x-h100
 create mode 100644 defconfigs/lambdalabs-shared-key
 create mode 100644 defconfigs/lambdalabs-smart

diff --git a/defconfigs/lambdalabs b/defconfigs/lambdalabs
new file mode 100644
index 0000000..3314954
--- /dev/null
+++ b/defconfigs/lambdalabs
@@ -0,0 +1,15 @@
+# Lambda Labs default configuration with smart cheapest instance selection
+# Automatically:
+# 1. Detects your location from public IP
+# 2. Finds the cheapest available GPU instance
+# 3. Selects the closest region where it's available
+# 4. Creates unique SSH key per project directory for security
+# 5. Auto-uploads SSH key to Lambda Labs on first run
+CONFIG_TERRAFORM=y
+CONFIG_TERRAFORM_LAMBDALABS=y
+CONFIG_TERRAFORM_LAMBDALABS_SMART_CHEAPEST=y
+CONFIG_TERRAFORM_LAMBDALABS_SSH_KEY_UNIQUE=y
+CONFIG_TERRAFORM_LAMBDALABS_SSH_KEY_AUTO_CREATE=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_OVERWRITE=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_EMPTY_PASSPHRASE=y
diff --git a/defconfigs/lambdalabs-gpu-1x-a10 b/defconfigs/lambdalabs-gpu-1x-a10
new file mode 100644
index 0000000..7a2b4f5
--- /dev/null
+++ b/defconfigs/lambdalabs-gpu-1x-a10
@@ -0,0 +1,9 @@
+# Lambda Labs GPU 1x A10 instance - budget-friendly option ($0.75/hr)
+# Automatically selects the best available region
+CONFIG_TERRAFORM=y
+CONFIG_TERRAFORM_LAMBDALABS=y
+CONFIG_TERRAFORM_LAMBDALABS_REGION_SMART_INFER=y
+CONFIG_TERRAFORM_LAMBDALABS_INSTANCE_TYPE_GPU_1X_A10=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_OVERWRITE=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_EMPTY_PASSPHRASE=y
diff --git a/defconfigs/lambdalabs-gpu-1x-a100 b/defconfigs/lambdalabs-gpu-1x-a100
new file mode 100644
index 0000000..961b9a2
--- /dev/null
+++ b/defconfigs/lambdalabs-gpu-1x-a100
@@ -0,0 +1,8 @@
+# Lambda Labs GPU 1x A100 instance - high performance single GPU
+CONFIG_TERRAFORM=y
+CONFIG_TERRAFORM_LAMBDALABS=y
+CONFIG_TERRAFORM_LAMBDALABS_REGION_SMART_INFER=y
+CONFIG_TERRAFORM_LAMBDALABS_INSTANCE_TYPE_GPU_1X_A100_SXM4=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_OVERWRITE=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_EMPTY_PASSPHRASE=y
diff --git a/defconfigs/lambdalabs-gpu-1x-h100 b/defconfigs/lambdalabs-gpu-1x-h100
new file mode 100644
index 0000000..7ee1568
--- /dev/null
+++ b/defconfigs/lambdalabs-gpu-1x-h100
@@ -0,0 +1,8 @@
+# Lambda Labs GPU 1x H100 instance - latest generation single GPU
+CONFIG_TERRAFORM=y
+CONFIG_TERRAFORM_LAMBDALABS=y
+CONFIG_TERRAFORM_LAMBDALABS_REGION_SMART_INFER=y
+CONFIG_TERRAFORM_LAMBDALABS_INSTANCE_TYPE_GPU_1X_H100_SXM5=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_OVERWRITE=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_EMPTY_PASSPHRASE=y
diff --git a/defconfigs/lambdalabs-gpu-8x-a100 b/defconfigs/lambdalabs-gpu-8x-a100
new file mode 100644
index 0000000..81bd6c0
--- /dev/null
+++ b/defconfigs/lambdalabs-gpu-8x-a100
@@ -0,0 +1,8 @@
+# Lambda Labs GPU 8x A100 instance - multi-GPU compute cluster
+CONFIG_TERRAFORM=y
+CONFIG_TERRAFORM_LAMBDALABS=y
+CONFIG_TERRAFORM_LAMBDALABS_REGION_SMART_INFER=y
+CONFIG_TERRAFORM_LAMBDALABS_INSTANCE_TYPE_GPU_8X_A100=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_OVERWRITE=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_EMPTY_PASSPHRASE=y
diff --git a/defconfigs/lambdalabs-gpu-8x-h100 b/defconfigs/lambdalabs-gpu-8x-h100
new file mode 100644
index 0000000..cd4f895
--- /dev/null
+++ b/defconfigs/lambdalabs-gpu-8x-h100
@@ -0,0 +1,8 @@
+# Lambda Labs GPU 8x H100 instance - top-tier multi-GPU cluster
+CONFIG_TERRAFORM=y
+CONFIG_TERRAFORM_LAMBDALABS=y
+CONFIG_TERRAFORM_LAMBDALABS_REGION_SMART_INFER=y
+CONFIG_TERRAFORM_LAMBDALABS_INSTANCE_TYPE_GPU_8X_H100_SXM5=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_OVERWRITE=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_EMPTY_PASSPHRASE=y
diff --git a/defconfigs/lambdalabs-shared-key b/defconfigs/lambdalabs-shared-key
new file mode 100644
index 0000000..a7c0ac7
--- /dev/null
+++ b/defconfigs/lambdalabs-shared-key
@@ -0,0 +1,11 @@
+# Lambda Labs configuration with shared SSH key (legacy mode)
+# Uses a single SSH key name across all projects
+# Less secure but simpler for testing
+CONFIG_TERRAFORM=y
+CONFIG_TERRAFORM_LAMBDALABS=y
+CONFIG_TERRAFORM_LAMBDALABS_SMART_CHEAPEST=y
+CONFIG_TERRAFORM_LAMBDALABS_SSH_KEY_SHARED=y
+# Manual key name can be set via menuconfig
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_OVERWRITE=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_EMPTY_PASSPHRASE=y
diff --git a/defconfigs/lambdalabs-smart b/defconfigs/lambdalabs-smart
new file mode 100644
index 0000000..9c8721e
--- /dev/null
+++ b/defconfigs/lambdalabs-smart
@@ -0,0 +1,10 @@
+# Lambda Labs with smart defaults - cheapest instance and best region
+# Automatically selects the cheapest available instance type
+# Automatically selects the best available region for that instance
+CONFIG_TERRAFORM=y
+CONFIG_TERRAFORM_LAMBDALABS=y
+CONFIG_TERRAFORM_LAMBDALABS_REGION_SMART_INFER=y
+CONFIG_TERRAFORM_LAMBDALABS_INSTANCE_TYPE_GPU_1X_A10=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_OVERWRITE=y
+CONFIG_TERRAFORM_SSH_CONFIG_GENKEY_EMPTY_PASSPHRASE=y
diff --git a/terraform/Kconfig.providers b/terraform/Kconfig.providers
index abe9151..944abb9 100644
--- a/terraform/Kconfig.providers
+++ b/terraform/Kconfig.providers
@@ -1,5 +1,6 @@
 choice
 	prompt "Choose your cloud provider"
+	default TERRAFORM_LAMBDALABS if CLOUD_INITIALIZED
 	default TERRAFORM_AWS
 
 config TERRAFORM_GCE
@@ -36,6 +37,14 @@ config TERRAFORM_OPENSTACK
 	  Enabling this means you are going to use OpenStack for your cloud
 	  solution.
 
+config TERRAFORM_LAMBDALABS
+	bool "Lambda Labs"
+	depends on TARGET_ARCH_X86_64
+	help
+	  Enabling this means you are going to use Lambda Labs for your cloud
+	  solution. Lambda Labs provides GPU-accelerated instances optimized
+	  for machine learning and high-performance computing workloads.
+
 endchoice
 
 source "terraform/gce/Kconfig"
@@ -43,3 +52,4 @@ source "terraform/aws/Kconfig"
 source "terraform/azure/Kconfig"
 source "terraform/oci/Kconfig"
 source "terraform/openstack/Kconfig"
+source "terraform/lambdalabs/Kconfig"
-- 
2.50.1


      parent reply	other threads:[~2025-08-27 21:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-27 21:28 [PATCH v2 00/10] terraform: add Lambda Labs cloud provider support with dynamic API-driven configuration Luis Chamberlain
2025-08-27 21:28 ` [PATCH v2 01/10] gitignore: add entries for Lambda Labs dynamic configuration Luis Chamberlain
2025-08-27 21:28 ` [PATCH v2 02/10] scripts: add Lambda Labs Python API library Luis Chamberlain
2025-08-28 18:59   ` Chuck Lever
2025-08-28 19:33     ` Luis Chamberlain
2025-08-28 20:00       ` Chuck Lever
2025-08-28 20:03         ` Luis Chamberlain
2025-08-28 20:13           ` Chuck Lever
2025-08-28 20:16             ` Luis Chamberlain
2025-08-29 11:24               ` Luis Chamberlain
2025-08-29 13:48                 ` Chuck Lever
2025-08-27 21:28 ` [PATCH v2 03/10] scripts: add Lambda Labs credentials management Luis Chamberlain
2025-08-27 21:28 ` [PATCH v2 04/10] scripts: add Lambda Labs SSH key management utilities Luis Chamberlain
2025-08-27 21:28 ` [PATCH v2 05/10] kconfig: add dynamic cloud provider configuration infrastructure Luis Chamberlain
2025-08-27 21:28 ` [PATCH v2 06/10] terraform/lambdalabs: add Kconfig structure for Lambda Labs Luis Chamberlain
2025-08-27 21:28 ` [PATCH v2 07/10] terraform/lambdalabs: add terraform provider implementation Luis Chamberlain
2025-08-27 21:28 ` [PATCH v2 08/10] ansible/terraform: integrate Lambda Labs into build system Luis Chamberlain
2025-08-27 21:29 ` [PATCH v2 09/10] scripts: add Lambda Labs testing and debugging utilities Luis Chamberlain
2025-08-27 21:29 ` Luis Chamberlain [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250827212902.4021990-11-mcgrof@kernel.org \
    --to=mcgrof@kernel.org \
    --cc=cel@kernel.org \
    --cc=da.gomez@kruces.com \
    --cc=kdevops@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox