Skip to content

chore(examples/templates/digitalocean-linux): make template more friendly #15938

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Dec 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: clean readme
  • Loading branch information
phorcys420 committed Dec 23, 2024
commit 51d147d15d145ea19f38f03f884cffb070d9597d
26 changes: 12 additions & 14 deletions examples/templates/digitalocean-linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,15 @@ Provision DigitalOcean Droplets as [Coder workspaces](https://coder.com/docs/wor

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

- DigitalOcean [personal access token (PAT)](https://docs.digitalocean.com/reference/api/create-personal-access-token/)
- DigitalOcean [personal access token (PAT)](https://docs.digitalocean.com/reference/api/create-personal-access-token)

- DigitalOcean project ID (you can get your project information via the `doctl`
CLI by running `doctl projects list`)
- 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:
- Remove the following sections from the `main.tf` file if you don't want to
associate your workspaces with a project:

- `variable "do_project_id"`
- `resource "digitalocean_project_resources" "project"`
- `variable "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`)
Expand All @@ -35,20 +34,19 @@ To deploy workspaces as DigitalOcean Droplets, you'll need:

### Authentication

This template assumes that coderd is run in an environment that is authenticated
with Digital Ocean. Obtain a [Digital Ocean Personal Access
Token](https://cloud.digitalocean.com/account/api/tokens) and set the
environment variable `DIGITALOCEAN_TOKEN` to the access token before starting
coderd. For other ways to authenticate [consult the Terraform docs](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs).
This template assumes that `coderd` is run in an environment that is authenticated with Digital Ocean.

Obtain a [Digital Ocean Personal Access Token](https://cloud.digitalocean.com/account/api/tokens) and set the `DIGITALOCEAN_TOKEN` environment variable to the access token before starting `coderd`.
For other ways to authenticate [consult the Terraform provider's docs](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs).

## Architecture

This template provisions the following resources:

- Azure VM (ephemeral, deleted on stop)
- DigitalOcean 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](https://registry.terraform.io/providers/coder/coder/latest/docs/resources/script).

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