From 5c8b555271fe37623c4e203e7b39975cc4cbe927 Mon Sep 17 00:00:00 2001 From: greg-the-coder Date: Wed, 22 Oct 2025 15:31:43 -0500 Subject: [PATCH 1/7] Change memory option from '6 GB' to '8 GB' Typo from initial deployment caught in workshop testing --- templates/awshp-k8s-rag-with-claude-code/main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/awshp-k8s-rag-with-claude-code/main.tf b/templates/awshp-k8s-rag-with-claude-code/main.tf index a203f8f..c42e2e0 100644 --- a/templates/awshp-k8s-rag-with-claude-code/main.tf +++ b/templates/awshp-k8s-rag-with-claude-code/main.tf @@ -54,8 +54,8 @@ data "coder_parameter" "memory" { value = "4" } option { - name = "6 GB" - value = "6" + name = "8 GB" + value = "8" } } From 0a3cbc36334729b77e89ce726fe8882845fcbeb5 Mon Sep 17 00:00:00 2001 From: greg-the-coder Date: Wed, 29 Oct 2025 12:31:03 -0500 Subject: [PATCH 2/7] Comment out Helm and kubectl installation in Dockerfile Comment out Helm and kubectl installation steps. --- .devcontainer/Dockerfile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 1f5d3fa..90ba1e3 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -17,13 +17,13 @@ RUN sudo curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "aws && sudo unzip awscliv2.zip \ && sudo ./aws/install && sudo rm awscliv2.zip -#Install Helm -RUN sudo curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 \ -&& sudo chmod 700 get_helm.sh \ -&& sudo ./get_helm.sh +#Install Helm - uncomment if desired +#RUN sudo curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 \ +#&& sudo chmod 700 get_helm.sh \ +#&& sudo ./get_helm.sh -# Install kubectl -RUN sudo curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" \ -&& sudo chmod +x kubectl \ -&& sudo mv kubectl /usr/local/bin/ +# Install kubectl - uncomment if desired +#RUN sudo curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" \ +#&& sudo chmod +x kubectl \ +#&& sudo mv kubectl /usr/local/bin/ From daea9c90a4165b423356e0a8da024e6d026b9efa Mon Sep 17 00:00:00 2001 From: default Date: Fri, 31 Oct 2025 19:26:44 +0000 Subject: [PATCH 3/7] update modules and Anthropic Models --- templates/awshp-k8s-with-claude-code/main.tf | 109 +++++++++++-------- 1 file changed, 62 insertions(+), 47 deletions(-) diff --git a/templates/awshp-k8s-with-claude-code/main.tf b/templates/awshp-k8s-with-claude-code/main.tf index da521d8..f3b64b7 100644 --- a/templates/awshp-k8s-with-claude-code/main.tf +++ b/templates/awshp-k8s-with-claude-code/main.tf @@ -18,54 +18,71 @@ terraform { variable "namespace" { type = string description = "The Kubernetes namespace to create workspaces in (must exist prior to creating workspaces). If the Coder host is itself running as a Pod on the same Kubernetes cluster as you are deploying workspaces to, set this to the same namespace." + default = "coder" } +variable "anthropic_model" { + type = string + description = "The AWS Inference profile ID of the base Anthropic model to use with Claude Code" + default = "global.anthropic.claude-sonnet-4-5-20250929-v1:0" +} + +variable "anthropic_small_fast_model" { + type = string + description = "The AWS Inference profile ID of the small fast Anthropic model to use with Claude Code" + default = "global.anthropic.claude-haiku-4-5-20251001-v1:0" +} + +locals { + home_dir = "/home/coder" +} + +# Minimum vCPUs needed data "coder_parameter" "cpu" { - name = "cpu" - display_name = "CPU" - description = "The number of CPU cores" - default = "2" - icon = "/icon/memory.svg" - mutable = true - option { - name = "2 Cores" - value = "2" - } - option { - name = "4 Cores" - value = "4" + name = "CPU cores" + type = "number" + description = "CPU cores for your individual workspace" + icon = "https://png.pngtree.com/png-clipart/20191122/original/pngtree-processor-icon-png-image_5165793.jpg" + validation { + min = 2 + max = 8 } + form_type = "input" + mutable = true + default = 4 + order = 1 } +# Minimum GB memory needed data "coder_parameter" "memory" { - name = "memory" - display_name = "Memory" - description = "The amount of memory in GB" - default = "2" - icon = "/icon/memory.svg" - mutable = true - option { - name = "2 GB" - value = "2" - } - option { - name = "4 GB" - value = "4" + name = "Memory (__ GB)" + type = "number" + description = "Memory (__ GB) for your individual workspace" + icon = "https://www.vhv.rs/dpng/d/33-338595_random-access-memory-logo-hd-png-download.png" + validation { + min = 4 + max = 16 } + form_type = "input" + mutable = true + default = 8 + order = 2 } -data "coder_parameter" "home_disk_size" { - name = "home_disk_size" - display_name = "Home disk size" - description = "The size of the home disk in GB" - default = "10" - type = "number" - icon = "/emojis/1f4be.png" - mutable = false +data "coder_parameter" "disk_size" { + name = "PVC storage size" + type = "number" + description = "Number of GB of storage for '${local.home_dir}'! This will persist after the workspace's K8s Pod is shutdown or deleted." + icon = "https://www.pngall.com/wp-content/uploads/5/Database-Storage-PNG-Clipart.png" validation { - min = 1 - max = 99999 + min = 10 + max = 50 + monotonic = "increasing" } + form_type = "slider" + mutable = true + default = 10 + order = 3 } data "coder_parameter" "ai_prompt" { @@ -88,8 +105,8 @@ resource "coder_agent" "dev" { CODER_MCP_CLAUDE_TASK_PROMPT = local.task_prompt CODER_MCP_CLAUDE_SYSTEM_PROMPT = local.system_prompt CLAUDE_CODE_USE_BEDROCK = "1", - ANTHROPIC_MODEL = "us.anthropic.claude-3-7-sonnet-20250219-v1:0", - ANTHROPIC_SMALL_FAST_MODEL = "us.anthropic.claude-3-5-haiku-20241022-v1:0", + ANTHROPIC_MODEL = var.anthropic_model, + ANTHROPIC_SMALL_FAST_MODEL = var.anthropic_small_fast_model, CODER_MCP_APP_STATUS_SLUG = "claude-code" } display_apps { @@ -102,23 +119,22 @@ resource "coder_agent" "dev" { module "coder-login" { source = "registry.coder.com/coder/coder-login/coder" - version = "1.0.15" + version = "1.1.0" agent_id = coder_agent.dev.id } -module "vscode-web" { - source = "registry.coder.com/coder/vscode-web/coder" - version = "1.2.0" +module "code-server" { + source = "registry.coder.com/coder/code-server/coder" + version = "1.3.1" agent_id = coder_agent.dev.id folder = local.home_folder - accept_license = true subdomain = false order = 0 } module "kiro" { - source = "registry.coder.com/coder/kiro/coder" - version = "1.0.0" + source = "registry.coder.com/coder/kiro/coder" + version = "1.1.0" agent_id = coder_agent.dev.id order = 1 } @@ -164,7 +180,6 @@ resource "coder_app" "preview" { locals { cost = 2 - region = "us-east-2" home_folder = "/home/coder" } @@ -240,7 +255,7 @@ resource "kubernetes_persistent_volume_claim" "home" { access_modes = ["ReadWriteOnce"] resources { requests = { - storage = "${data.coder_parameter.home_disk_size.value}Gi" + storage = "${data.coder_parameter.disk_size.value}Gi" } } } From 834cda3c6d2a4dafea9b9ef2361f7e3f650905d7 Mon Sep 17 00:00:00 2001 From: default Date: Fri, 31 Oct 2025 19:43:52 +0000 Subject: [PATCH 4/7] update modules and Anthropic Models --- .../aws-aurora/aurora-pgvector.tf | 10 +- .../awshp-k8s-rag-with-claude-code/main.tf | 127 +++++++++++------- 2 files changed, 84 insertions(+), 53 deletions(-) diff --git a/templates/awshp-k8s-rag-with-claude-code/aws-aurora/aurora-pgvector.tf b/templates/awshp-k8s-rag-with-claude-code/aws-aurora/aurora-pgvector.tf index 9590735..df1253a 100644 --- a/templates/awshp-k8s-rag-with-claude-code/aws-aurora/aurora-pgvector.tf +++ b/templates/awshp-k8s-rag-with-claude-code/aws-aurora/aurora-pgvector.tf @@ -28,6 +28,12 @@ variable "db_master_password" { default = "YourStrongPasswordHere1" # Consider using AWS Secrets Manager for production } +variable "postgresql_version" { + description = "PostgreSQL database version" + type = string + default = "16.8" +} + # Get EKS cluster info data "aws_eks_cluster" "current" { name = var.eks_cluster_name # Add this variable @@ -90,7 +96,7 @@ resource "aws_rds_cluster" "awsrag_aurora_postgres_1" { cluster_identifier = "${var.workspace_name}-pgvector01" engine = "aurora-postgresql" engine_mode = "provisioned" - engine_version = "16.6" + engine_version = var.postgresql_version database_name = var.database_name master_username = var.db_master_username master_password = var.db_master_password # Use AWS Secrets Manager in production @@ -109,7 +115,7 @@ resource "aws_rds_cluster_instance" "awsrag_aurora_primary" { cluster_identifier = aws_rds_cluster.awsrag_aurora_postgres_1.id instance_class = "db.serverless" engine = "aurora-postgresql" - engine_version = "16.6" + engine_version = var.postgresql_version db_subnet_group_name = aws_db_subnet_group.awsrag_aurora_subnet_group.name identifier = "${var.workspace_name}-primary" } diff --git a/templates/awshp-k8s-rag-with-claude-code/main.tf b/templates/awshp-k8s-rag-with-claude-code/main.tf index c42e2e0..8396128 100644 --- a/templates/awshp-k8s-rag-with-claude-code/main.tf +++ b/templates/awshp-k8s-rag-with-claude-code/main.tf @@ -18,59 +18,83 @@ terraform { variable "eks_cluster_name" { type = string description = "The AWS EKS Kubernetes cluster name that Coder is deployed within." + default = "coder-eks-cluster" } variable "namespace" { type = string description = "The Kubernetes namespace to create workspaces in (must exist prior to creating workspaces). If the Coder host is itself running as a Pod on the same Kubernetes cluster as you are deploying workspaces to, set this to the same namespace." + default = "coder" } +variable "anthropic_model" { + type = string + description = "The AWS Inference profile ID of the base Anthropic model to use with Claude Code" + default = "global.anthropic.claude-sonnet-4-5-20250929-v1:0" +} + +variable "anthropic_small_fast_model" { + type = string + description = "The AWS Inference profile ID of the small fast Anthropic model to use with Claude Code" + default = "global.anthropic.claude-haiku-4-5-20251001-v1:0" +} + +variable "postgresql_version" { + type = string + description = "The AWS Aurora PostgreSQL Database Engine Version to deploy" + default = "16.8" +} + +locals { + home_dir = "/home/coder" +} + +# Minimum vCPUs needed data "coder_parameter" "cpu" { - name = "cpu" - display_name = "CPU" - description = "The number of CPU cores" - default = "2" - icon = "/icon/memory.svg" - mutable = true - option { - name = "2 Cores" - value = "2" - } - option { - name = "4 Cores" - value = "4" + name = "CPU cores" + type = "number" + description = "CPU cores for your individual workspace" + icon = "https://png.pngtree.com/png-clipart/20191122/original/pngtree-processor-icon-png-image_5165793.jpg" + validation { + min = 4 + max = 8 } + form_type = "input" + mutable = true + default = 4 + order = 1 } +# Minimum GB memory needed data "coder_parameter" "memory" { - name = "memory" - display_name = "Memory" - description = "The amount of memory in GB" - default = "4" - icon = "/icon/memory.svg" - mutable = true - option { - name = "4 GB" - value = "4" - } - option { - name = "8 GB" - value = "8" + name = "Memory (__ GB)" + type = "number" + description = "Memory (__ GB) for your individual workspace" + icon = "https://www.vhv.rs/dpng/d/33-338595_random-access-memory-logo-hd-png-download.png" + validation { + min = 4 + max = 16 } + form_type = "input" + mutable = true + default = 4 + order = 2 } data "coder_parameter" "home_disk_size" { - name = "home_disk_size" - display_name = "Home disk size" - description = "The size of the home disk in GB" - default = "20" - type = "number" - icon = "/emojis/1f4be.png" - mutable = false + name = "PVC storage size" + type = "number" + description = "Number of GB of storage for '${local.home_dir}'! This will persist after the workspace's K8s Pod is shutdown or deleted." + icon = "https://www.pngall.com/wp-content/uploads/5/Database-Storage-PNG-Clipart.png" validation { - min = 1 - max = 99999 + min = 10 + max = 50 + monotonic = "increasing" } + form_type = "slider" + mutable = true + default = 10 + order = 3 } data "coder_parameter" "ai_prompt" { @@ -88,7 +112,7 @@ data "coder_workspace_owner" "me" {} resource "coder_agent" "dev" { arch = "amd64" os = "linux" - dir = local.home_folder + dir = local.home_dir startup_script = <<-EOT set -e sudo apt update @@ -137,8 +161,8 @@ resource "coder_agent" "dev" { CODER_MCP_CLAUDE_TASK_PROMPT = local.task_prompt CODER_MCP_CLAUDE_SYSTEM_PROMPT = local.system_prompt CLAUDE_CODE_USE_BEDROCK = "1" - ANTHROPIC_MODEL = "us.anthropic.claude-3-7-sonnet-20250219-v1:0" - ANTHROPIC_SMALL_FAST_MODEL = "us.anthropic.claude-3-5-haiku-20241022-v1:0" + ANTHROPIC_MODEL = var.anthropic_model + ANTHROPIC_SMALL_FAST_MODEL = var.anthropic_small_fast_model CODER_MCP_APP_STATUS_SLUG = "claude-code" PGVECTOR_USER = "dbadmin" PGVECTOR_PASSWORD = "YourStrongPasswordHere1" @@ -156,7 +180,7 @@ resource "coder_agent" "dev" { module "coder-login" { source = "registry.coder.com/coder/coder-login/coder" - version = "1.0.15" + version = "1.1.0" agent_id = coder_agent.dev.id } @@ -171,19 +195,20 @@ data "coder_parameter" "git_repo" { module "git_clone" { count = data.coder_workspace.me.start_count source = "registry.coder.com/coder/git-clone/coder" - version = "1.1.1" + version = "1.2.0" agent_id = coder_agent.dev.id url = data.coder_parameter.git_repo.value } # Create a code-server instance for the cloned repository module "code-server" { - count = data.coder_workspace.me.start_count - source = "registry.coder.com/coder/code-server/coder" - version = "1.0.18" - agent_id = coder_agent.dev.id - order = 1 - folder = "/home/coder" + count = data.coder_workspace.me.start_count + source = "registry.coder.com/coder/code-server/coder" + version = "1.3.1" + agent_id = coder_agent.dev.id + order = 1 + folder = local.home_dir + subdomain = false } module "claude-code" { @@ -191,7 +216,7 @@ module "claude-code" { source = "registry.coder.com/coder/claude-code/coder" version = "2.2.0" agent_id = coder_agent.dev.id - folder = local.home_folder + folder = local.home_dir subdomain = false install_claude_code = true @@ -213,7 +238,7 @@ module "kiro" { source = "registry.coder.com/coder/kiro/coder" version = "1.1.0" agent_id = coder_agent.dev.id - folder = "/home/coder" + folder = local.home_dir } resource "coder_app" "preview" { @@ -235,8 +260,7 @@ resource "coder_app" "preview" { locals { cost = 2 - region = "us-east-2" - home_folder = "/home/coder" + region = "us-west-2" } locals { @@ -447,10 +471,11 @@ module "aurora-pgvector" { db_master_username = "dbadmin" db_master_password = "YourStrongPasswordHere1" database_name = "mydb1" + postgresql_version = var.postgresql_version } resource "coder_metadata" "pod_info" { count = data.coder_workspace.me.start_count resource_id = kubernetes_deployment.dev[0].id daily_cost = local.cost -} +} \ No newline at end of file From 7d0f8519cb0cec01c622015c682e71458eafa95c Mon Sep 17 00:00:00 2001 From: default Date: Fri, 31 Oct 2025 20:24:41 +0000 Subject: [PATCH 5/7] updates to template doco --- templates/README.md | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/templates/README.md b/templates/README.md index db4a5de..cd6becb 100644 --- a/templates/README.md +++ b/templates/README.md @@ -28,16 +28,22 @@ This directory contains Coder workspace templates designed for AWS development w **Key Tools**: Claude Code AI assistant, VS Code, Cursor, container tools **Best For**: Microservices, container orchestration, AI-driven task automation +### 🤖 [RAG with Claude Code](awshp-k8s-rag-with-claude-code/) +**Purpose**: RAG application prototyping with vector database +**Architecture**: Kubernetes pods with Aurora PostgreSQL Serverless v2 +**Key Tools**: Claude Code, pgvector, AWS Bedrock, Streamlit, Python tooling +**Best For**: AI/ML applications, vector search, RAG prototyping, data science + ## Template Comparison -| Feature | Linux Q Developer | Linux SAM | Windows DCV | K8s Claude Code | -|---------|------------------|-----------|-------------|-----------------| -| **Platform** | Ubuntu x86_64 | Ubuntu ARM64 | Windows Server | Kubernetes | -| **AI Assistant** | Q Developer CLI | Q Developer Extension | - | Claude Code | -| **Primary Use** | General AWS Dev | Serverless | Windows Dev | Container Dev | -| **Cost Efficiency** | Standard | High (ARM64) | Higher | Variable | -| **Persistence** | Full VM | Full VM | Full VM | Home directory | -| **Startup Time** | ~2-3 min | ~2-3 min | ~5-10 min | ~30-60 sec | +| Feature | Linux Q Developer | Linux SAM | Windows DCV | K8s Claude Code | RAG Claude Code | +|---------|------------------|-----------|-------------|-----------------|-----------------| +| **Platform** | Ubuntu x86_64 | Ubuntu ARM64 | Windows Server | Kubernetes | Kubernetes | +| **AI Assistant** | Q Developer CLI | Q Developer Extension | - | Claude Code | Claude Code | +| **Primary Use** | General AWS Dev | Serverless | Windows Dev | Container Dev | RAG/AI Dev | +| **Cost Efficiency** | Standard | High (ARM64) | Higher | Variable | Variable | +| **Persistence** | Full VM | Full VM | Full VM | Home directory | Home directory | +| **Startup Time** | ~2-3 min | ~2-3 min | ~5-10 min | ~30-60 sec | ~5-10 min | ## Getting Started @@ -72,6 +78,12 @@ This directory contains Coder workspace templates designed for AWS development w - Microservices architecture - Fast workspace startup times +**Choose RAG Claude Code if you want:** +- RAG application development +- Vector database integration +- AI/ML prototyping with Bedrock +- Streamlit-based data applications + ## Configuration ### IAM Instance Profile @@ -83,12 +95,14 @@ All templates support multi-region deployment with region-specific optimizations - **Linux SAM**: 4 US regions (ARM64 availability) - **Windows DCV**: 15 regions globally - **Kubernetes**: Depends on cluster location +- **RAG**: Depends on cluster location + Aurora availability ### Resource Sizing Each template offers configurable resource options: -- **CPU**: 1-4 vCPUs depending on template +- **CPU**: 1-8 vCPUs depending on template - **Memory**: 1-16 GiB RAM options - **Storage**: 10-300 GB persistent volumes +- **Database**: Aurora Serverless v2 (0.5-1.0 ACU for RAG template) ## Workshop Integration From 25a639b43ad89205d57d75441d4a89c85feaf626 Mon Sep 17 00:00:00 2001 From: default Date: Fri, 31 Oct 2025 20:27:02 +0000 Subject: [PATCH 6/7] updates to repo doco --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bbc17f4..93b0e01 100644 --- a/README.md +++ b/README.md @@ -36,11 +36,12 @@ coder login $CODER_AGENT_URL ``` ## [Coder Templates](templates/README.md) -Four specialized workspace templates for AWS development: +Five specialized workspace templates for AWS development: - **Linux Q Developer**: AI-powered development with Amazon Q Developer CLI - **Linux SAM**: Serverless development with AWS SAM CLI on ARM64 - **Windows DCV**: Windows development with NICE DCV remote desktop - **Kubernetes with Claude Code**: Cloud-native development with AI task automation +- **RAG with Claude Code**: RAG application prototyping with vector database ## Workshop Content From edcedb65243ef2903b30a99fe441e73bf7d8a915 Mon Sep 17 00:00:00 2001 From: default Date: Wed, 19 Nov 2025 17:45:19 +0000 Subject: [PATCH 7/7] base change --- templates/template_versions.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/template_versions.tf b/templates/template_versions.tf index a0e077f..9ece8a5 100644 --- a/templates/template_versions.tf +++ b/templates/template_versions.tf @@ -55,7 +55,7 @@ resource "coderd_template" "awshp-k8s-with-claude-code" { resource "coderd_template" "awshp-linux-q-base" { name = "awshp-linux-q-base" - display_name = "AWS Workshop - EC2 (Linux) Q Developer" + display_name = "AWS Workshop - EC2 (Linux) Q Developer with AI" description = "Provision AWS EC2 VMs as Q Developer enabled Coder workspaces" icon = "/icon/aws.png" versions = [{