Skip to content

Commit a7cfec9

Browse files
committed
add digitalocean
1 parent 7efb54a commit a7cfec9

File tree

1 file changed

+28
-13
lines changed

1 file changed

+28
-13
lines changed

examples/templates/do-linux/README.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,48 @@ maintainer_github: coder
66
verified: true
77
tags: [vm, linux, digitalocean]
88
---
9+
# Remote Development on DigitalOcean Droplets
910

10-
# do-linux
11+
Provision DigitalOcean Droplets as [Coder workspaces](https://coder.com/docs/coder-v2/latest) with this example template.
12+
13+
<!-- TODO: Add screenshot -->
14+
15+
## Prerequisites
1116

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

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

1721
- DigitalOcean project ID (you can get your project information via the `doctl`
18-
CLI by running `doctl projects list`)
22+
CLI by running `doctl projects list`)
1923

20-
- Remove the following sections from the `main.tf` file if you don't want to
21-
associate your workspaces with a project:
24+
- Remove the following sections from the `main.tf` file if you don't want to
25+
associate your workspaces with a project:
2226

23-
- `variable "step2_do_project_id"`
24-
- `resource "digitalocean_project_resources" "project"`
27+
- `variable "step2_do_project_id"`
28+
- `resource "digitalocean_project_resources" "project"`
2529

2630
- **Optional:** DigitalOcean SSH key ID (obtain via the `doctl` CLI by running
27-
`doctl compute ssh-key list`)
31+
`doctl compute ssh-key list`)
2832

29-
- Note that this is only required for Fedora images to work.
33+
- Note that this is only required for Fedora images to work.
3034

31-
## Authentication
35+
### Authentication
3236

3337
This template assumes that coderd is run in an environment that is authenticated
3438
with Digital Ocean. Obtain a [Digital Ocean Personal Access
3539
Token](https://cloud.digitalocean.com/account/api/tokens) and set the
3640
environment variable `DIGITALOCEAN_TOKEN` to the access token before starting
37-
coderd. For other ways to authenticate [consult the Terraform
38-
docs](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs).
41+
coderd. For other ways to authenticate [consult the Terraform docs](https://registry.terraform.io/providers/digitalocean/digitalocean/latest/docs).
42+
43+
## Architecture
44+
45+
This template provisions the following resources:
46+
47+
- Azure VM (ephemeral, deleted on stop)
48+
- Managed disk (persistent, mounted to `/home/coder`)
49+
50+
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).
51+
52+
> **Note**
53+
> This template is designed to be a starting point! Edit the Terraform to extend the template to support your use case.

0 commit comments

Comments
 (0)