Manage CDE
Configure on-demand Cloud Development Environments with workspace templates, auto-hibernation, and cost controls in Harness.
Instructions
Step 1: Establish Scope
Confirm the user's org, project, team, and technology stack.
Call MCP tool: harness_list
Parameters:
resource_type: "project"
org_id: "<organization>"
Step 2: Identify the CDE Task
Determine which workflow the user needs:
- On-Demand Environment Setup -- Environment templates with resource allocation and lifecycle
- Workspace Standardization -- Pre-configured templates per team/stack with consistent tooling
Step 3: Configure On-Demand Environments
Gather from the user:
- Technology stack and runtime version
- Cloud provider (AWS, GCP, Azure)
- IDE preference (VS Code browser, VS Code SSH, JetBrains Gateway)
- Git provider for auto-clone on start
Design the environment template:
Resource allocation:
- Default size (e.g., 4 vCPU, 8GB RAM) with upgrade options
- Persistent storage for workspace files
- Ephemeral storage that clears on stop
Lifecycle configuration:
- Provisioning trigger: developer request, PR creation, or branch push
- Start time target (under 30 seconds recommended)
- Auto-stop after idle timeout (default 30 minutes)
- Persistent mode option for long-running work
Integrations:
- Secret injection from Harness Secrets, Vault, or cloud secret managers
- Supporting services (databases, caches, message queues) via Docker Compose or Kubernetes
- Custom access URL pattern (e.g., {user}-{env}.dev.company.com)
Cost controls:
- Daily cost cap per environment
- Team-level monthly budget
- Auto-hibernation for idle environments
Step 4: Create Workspace Templates
When standardizing across teams, create templates per role/stack:
Backend Service Developer:
- Runtime, build tools, testing frameworks
- Database clients, API testing tools
- Pre-configured debugger and linter
Frontend Developer:
- Node.js runtime, package manager
- Browser dev tools, component library
- Hot-reload and preview server
Full-Stack Developer:
- Combined backend + frontend tooling
- Docker Compose for local service mesh
- API mocking tools
Platform / DevOps Engineer:
- kubectl, Helm, Terraform, cloud CLIs
- Monitoring and observability tools
- Infrastructure testing frameworks
Each template should include:
- Base image and pre-installed tools
- IDE extensions/plugins list
- Git hooks and code formatting config
- Environment variables and secrets
Examples
- "Set up cloud dev environments for our backend team" -- Configure on-demand CDEs with Java/Go tooling and auto-hibernation
- "Create workspace templates for frontend and backend developers" -- Standardized templates with stack-specific tooling
- "Configure auto-hibernation to reduce CDE costs" -- Set idle timeout and daily cost caps
- "Provision a dev environment when a PR is created" -- Configure PR-triggered ephemeral environments
Performance Notes
- Start time under 30 seconds requires pre-built images -- avoid installing tools at startup.
- Auto-hibernation timeout should balance developer productivity (too short = friction) with cost (too long = waste).
- Persistent storage should be sized for the repo plus build artifacts -- undersizing causes build failures.
- Pre-pull common base images to reduce cold start times.
Troubleshooting
Environment Slow to Start
- Check if the base image is being pulled from a remote registry -- use a local cache or pre-pull
- Reduce the number of tools installed at startup -- bake them into the base image
- Verify network connectivity to the Git provider for auto-clone
Environment Auto-Stopping Too Aggressively
- Increase the idle timeout for developers doing research or design work
- Enable persistent mode for long-running tasks
- Check that IDE keepalive signals are reaching the CDE controller
Cost Overruns
- Review environments that have been running for more than 24 hours
- Check for orphaned environments from deleted branches
- Verify auto-hibernation is enabled for all non-production environments
1---2name: manage-cde3description: Manage Harness Cloud Development Environments (CDE) via MCP. Configure on-demand development environments with pre-installed tooling, design standardized workspace templates for teams, set up auto-hibernation and cost controls, and manage environment lifecycle. Use when asked to set up cloud dev environments, create workspace templates, configure remote development, or manage CDE lifecycle and costs. Trigger phrases: cloud dev environment, CDE, remote development, workspace template, dev environment, gitpod, codespace, auto-hibernation, developer workspace, ephemeral environment.4license: Apache-2.05---67# Manage CDE89Configure on-demand Cloud Development Environments with workspace templates, auto-hibernation, and cost controls in Harness.1011## Instructions1213### Step 1: Establish Scope1415Confirm the user's org, project, team, and technology stack.1617```18Call MCP tool: harness_list19Parameters:20 resource_type: "project"21 org_id: "<organization>"22```2324### Step 2: Identify the CDE Task2526Determine which workflow the user needs:27281. **On-Demand Environment Setup** -- Environment templates with resource allocation and lifecycle292. **Workspace Standardization** -- Pre-configured templates per team/stack with consistent tooling3031### Step 3: Configure On-Demand Environments3233Gather from the user:34- Technology stack and runtime version35- Cloud provider (AWS, GCP, Azure)36- IDE preference (VS Code browser, VS Code SSH, JetBrains Gateway)37- Git provider for auto-clone on start3839Design the environment template:4041**Resource allocation:**42- Default size (e.g., 4 vCPU, 8GB RAM) with upgrade options43- Persistent storage for workspace files44- Ephemeral storage that clears on stop4546**Lifecycle configuration:**47- Provisioning trigger: developer request, PR creation, or branch push48- Start time target (under 30 seconds recommended)49- Auto-stop after idle timeout (default 30 minutes)50- Persistent mode option for long-running work5152**Integrations:**53- Secret injection from Harness Secrets, Vault, or cloud secret managers54- Supporting services (databases, caches, message queues) via Docker Compose or Kubernetes55- Custom access URL pattern (e.g., {user}-{env}.dev.company.com)5657**Cost controls:**58- Daily cost cap per environment59- Team-level monthly budget60- Auto-hibernation for idle environments6162### Step 4: Create Workspace Templates6364When standardizing across teams, create templates per role/stack:6566**Backend Service Developer:**67- Runtime, build tools, testing frameworks68- Database clients, API testing tools69- Pre-configured debugger and linter7071**Frontend Developer:**72- Node.js runtime, package manager73- Browser dev tools, component library74- Hot-reload and preview server7576**Full-Stack Developer:**77- Combined backend + frontend tooling78- Docker Compose for local service mesh79- API mocking tools8081**Platform / DevOps Engineer:**82- kubectl, Helm, Terraform, cloud CLIs83- Monitoring and observability tools84- Infrastructure testing frameworks8586Each template should include:87- Base image and pre-installed tools88- IDE extensions/plugins list89- Git hooks and code formatting config90- Environment variables and secrets9192## Examples9394- "Set up cloud dev environments for our backend team" -- Configure on-demand CDEs with Java/Go tooling and auto-hibernation95- "Create workspace templates for frontend and backend developers" -- Standardized templates with stack-specific tooling96- "Configure auto-hibernation to reduce CDE costs" -- Set idle timeout and daily cost caps97- "Provision a dev environment when a PR is created" -- Configure PR-triggered ephemeral environments9899## Performance Notes100101- Start time under 30 seconds requires pre-built images -- avoid installing tools at startup.102- Auto-hibernation timeout should balance developer productivity (too short = friction) with cost (too long = waste).103- Persistent storage should be sized for the repo plus build artifacts -- undersizing causes build failures.104- Pre-pull common base images to reduce cold start times.105106## Troubleshooting107108### Environment Slow to Start109- Check if the base image is being pulled from a remote registry -- use a local cache or pre-pull110- Reduce the number of tools installed at startup -- bake them into the base image111- Verify network connectivity to the Git provider for auto-clone112113### Environment Auto-Stopping Too Aggressively114- Increase the idle timeout for developers doing research or design work115- Enable persistent mode for long-running tasks116- Check that IDE keepalive signals are reaching the CDE controller117118### Cost Overruns119- Review environments that have been running for more than 24 hours120- Check for orphaned environments from deleted branches121- Verify auto-hibernation is enabled for all non-production environments