coder/examples/templates/do-linux
Eric Paulsen d8a3ebef31
docs: fix example template README 404s and semantics (#11903)
* docs: fix example template README 404s and semantics

* make: gen
2024-01-29 21:34:12 +00:00
..
README.md docs: fix example template README 404s and semantics (#11903) 2024-01-29 21:34:12 +00:00
cloud-config.yaml.tftpl feat: Add examples/templates/do-linux for Digital Ocean Droplets (#1749) 2022-05-27 20:04:43 +03:00
main.tf chore: update Digital Ocean example template (#11528) (#11535) 2024-01-11 00:00:25 +00:00

README.md

display_name description icon maintainer_github verified tags
DigitalOcean Droplet (Linux) Provision DigitalOcean Droplets as Coder workspaces ../../../site/static/icon/do.png coder true
vm
linux
digitalocean

Remote Development on DigitalOcean Droplets

Provision DigitalOcean Droplets as Coder workspaces with this example template.

Prerequisites

To deploy workspaces as DigitalOcean Droplets, you'll need:

  • DigitalOcean personal access token (PAT)

  • DigitalOcean project ID (you can get your project information via the doctl CLI by running doctl projects list)

  • Remove the following sections from the main.tf file if you don't want to associate your workspaces with a project:

    • variable "step2_do_project_id"
    • resource "digitalocean_project_resources" "project"
  • Optional: DigitalOcean SSH key ID (obtain via the doctl CLI by running doctl compute ssh-key list)

  • Note that this is only required for Fedora images to work.

Authentication

This template assumes that coderd is run in an environment that is authenticated with Digital Ocean. Obtain a Digital Ocean Personal Access Token and set the environment variable DIGITALOCEAN_TOKEN to the access token before starting coderd. For other ways to authenticate consult the Terraform docs.

Architecture

This template provisions the following resources:

  • Azure VM (ephemeral, deleted on stop)
  • Managed disk (persistent, mounted to /home/coder)

This means, when the workspace restarts, any tools or files outside of the home directory are not persisted. To pre-bake tools into the workspace (e.g. python3), modify the VM image, or use a startup script.

Note This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.