# Development Environment

Source: https://docs.quake.ai/resources/iac-templates/dev-environment
Markdown: https://docs.quake.ai/resources/iac-templates/dev-environment.md

---

# Development Environment

This pattern composes Compute, Network, and Block Storage.

## What this template does

Provisions a multi-VM development workspace with shared storage:

- Multiple development VMs on a private network
- A shared block storage volume formatted on the first dev VM and mounted at `/srv/shared` across the bastion and every dev VM over NFS
- Security groups for SSH and internal communication
- Floating IP on a bastion/jump host for remote access
- Cloud-init that installs the `dev_tools` packages on every instance ([cloud-init concept](/docs/compute/concepts/cloud-init))

## Parameters

| Parameter | Description | Default |
| --- | --- | --- |
| `key_name` | SSH keypair name (must already exist in your project) | required |
| `dev_vm_count` | Number of development VMs | `2` |
| `flavor_name` | Instance size | `s1a.medium` |
| `shared_volume_size` | Shared volume in GB | `100` |
| `image_name` | Operating system image | `Ubuntu-24.04` |
| `dev_tools` | Packages installed on every instance via cloud-init | `["build-essential", "git", "curl", "wget", "vim", "python3", "python3-pip", "jq", "unzip", "tmux"]` |
| `bastion_flavor` | Bastion instance size | `s1a.small` |
| `external_network` | External network for router SNAT and floating IPs | `PublicEphemeral` |
| `private_cidr` | IPv4 CIDR for the private tenant network | `192.168.30.0/24` |

## When to use this pattern

Stand up a multi-subnet lab with a bastion, NFS-backed shared storage, and developer instances. Choose [Simple VM with Floating IP](/resources/iac-templates/simple-vm) for a single public VM, or [Private Network + VPN](/resources/iac-templates/private-network-vpn) when remote access requires a WireGuard tunnel instead of a bastion host.

## Estimated cost

<PricingCompanion
  components={[
    { kind: "template", slug: "dev-environment", required: true },
  ]}
/>

## Template source

<TemplateSource slug="dev-environment" />

The template renders two cloud-init files (see [cloud-init and first-boot configuration](/docs/compute/concepts/cloud-init)). `cloud-init/nfs-server.yaml` runs on the first dev VM: it installs the `dev_tools` packages, formats and mounts the shared volume at `/srv/shared`, and exports that path over NFS to the private subnet. `cloud-init/nfs-client.yaml` runs on the bastion and the remaining dev VMs: it installs the `dev_tools` packages and mounts `/srv/shared` from the first dev VM.

<TemplateResourceMap template="dev-environment" format="opentofu" />

## Customize this pattern

- [Customize a template's image and flavor](/docs/automation/how-to/customize-template-image-flavor)
- [Add a block volume to a template](/docs/automation/how-to/add-volume-to-template)
- [Parameterize a template with a tfvars file](/docs/automation/how-to/parameterize-template-tfvars)

## See also

- [Deploy the development environment template with OpenTofu](/resources/deployments/deploy-dev-environment-template)
- [Simple VM template](/resources/iac-templates/simple-vm)
- [Compute service overview](/docs/compute)
