Custom Coder workspace templates for DataKnife. Templates are written in Terraform and define the underlying infrastructure that Coder workspaces run on.
This repository contains reusable Coder templates for provisioning development workspaces. Use these as starting points or import them directly into your Coder deployment.
| Template | Description |
|---|---|
| kubernetes | Kubernetes Deployments with code-server — base template for K8s workspaces |
DKAI DevPod (dkai-dev) |
Cursor IDE on Kubernetes (Ubuntu) — 2/4 CPU, 4/8 GB RAM, 50–100 GB disk (no subdomain required) |
DKAI Arch (dkai-arch) |
Same as DKAI DevPod on Arch Linux (archlinux image, pacman, gh/glab from repos) |
DKAI Agent (dkai-agent) |
DKAI Arch plus Cloud Agent worker (start-cursor-worker), second PVC for tool configs (kubectl / rancher / gh / glab), individual API key |
DKAI Hermes (dkai-hermes) |
Hermes Agent controller → remote Enodios vLLM (vllm.dataknife.net; Enodios does not run in the workspace) |
- Coder Registry — Explore official and community templates
- Kubernetes Template — Official Kubernetes (Deployment) template by Coder
- Coder Templates Docs — Learn how to create and extend templates
- Coder deployment
- Terraform familiarity
- Access to your target infrastructure (Kubernetes, AWS, Docker, etc.)
- From Coder UI: Create a template → Import from registry or Git
- From CLI:
coder templates create <name> --directory ./path/to/template - From Terraform: Reference this repo as a module or copy the template files
Validate templates locally before pushing:
make test| Target | Description |
|---|---|
make test |
Init, validate, and format-check all templates |
make fmt |
Format Terraform files |
make clean |
Remove .terraform and lock files |
make debug |
Run tests with verbose Terraform output (V=1) |
Debug a live workspace (Coder CLI + optional kubectl): scripts/coder-workspace-debug.sh <workspace-name>.
- Templates = Terraform configs that provision workspace infrastructure
- Parameters = User-configurable options (CPU, memory, disk, etc.)
- Resources = The actual infrastructure (pods, VMs, volumes)
coder-templates/
├── README.md
├── Makefile # Local validation (make test)
├── docs/
│ └── build-parameters.md
└── templates/
├── kubernetes/
│ ├── main.tf
│ └── README.md
├── dkai-dev/
│ ├── main.tf
│ └── README.md
├── dkai-arch/
│ ├── main.tf
│ └── README.md
├── dkai-agent/
│ ├── main.tf
│ └── README.md
└── dkai-hermes/
├── main.tf
└── README.md
Common customizations:
- Images — Use custom Docker images with preinstalled tools
- Parameters — Add disk size, instance type, region options
- IDEs — Add JetBrains, RDP, Cursor, or other IDE support
- Persistence — Configure volume mounts and backup behavior
See Coder's extending templates guide for details.
- Build Parameters — Reference for template parameters (types, validation, mutability)
- Wildcard Subdomain — Why workspaces need it, how to check via CLI
- Cursor Server Troubleshooting — Fix "Code server did not start successfully"
- Workspace Sync — rsync, cron, inotifywait, lsyncd, Unison options for syncing Coder ↔ local
GitHub Actions runs on every push and pull request:
- Test —
terraform init,terraform validate, andterraform fmt -checkfor each template - Push to GitLab — After tests pass on
main, syncs to a GitLab mirror (optional)
To enable pushing to GitLab after tests pass, add this repository secret (same as freya):
| Secret | Description |
|---|---|
GITLAB_TOKEN |
GitLab Personal Access Token or Project Access Token with write_repository scope |
Mirror URL: https://gitlab.com/dk-raas/dkai/devops/coder-templates
The GitLab pipeline tests templates and pushes updates to Coder when changes land on main. Configure these CI/CD variables (Settings > CI/CD > Variables):
| Variable | Type | Description |
|---|---|---|
CODER_URL |
Variable | Coder instance URL (e.g. https://coder.dataknife.net) |
CODER_SESSION_TOKEN |
Masked | Long-lived token: coder token create --lifetime 8760h --name "GitLab CI" |
