|
2 | 2 |
|
3 | 3 | ## Templates
|
4 | 4 |
|
5 |
| -Coder admins manage *templates* to define the infrastructure behind workspaces. A Coder deployment can have multiple templates for different workloads. |
| 5 | +Coder admins manage *templates* to define the infrastructure behind workspaces. A Coder deployment can have templates for different workloads. |
6 | 6 |
|
7 | 7 | ### ex. "Frontend" Template
|
8 | 8 |
|
9 |
| -| Resource name | Status | |
| 9 | +| Resource | Type | |
10 | 10 | | :---------------------- | :--------- |
|
11 | 11 | | Kubernetes pod (NodeJS) | ephemeral |
|
12 | 12 | | API token (Backend) | ephemeral |
|
13 | 13 | | Disk (Source code) | persistant |
|
14 | 14 |
|
15 | 15 | ### ex. "Data Science" Template
|
16 | 16 |
|
17 |
| -| Resource name | Status | |
| 17 | +| Resource | Type | |
18 | 18 | | :------------------------------------- | :--------- |
|
19 | 19 | | Kubernetes pod (pyCharm + JupyterLab) | ephemeral |
|
20 | 20 | | Readonly volume mount (shared dataset) | persistant |
|
21 | 21 |
|
22 | 22 | ### ex. "MacOS" Template
|
23 | 23 |
|
24 |
| -| Resource name | Status | |
| 24 | +| Resource | Type | |
25 | 25 | | :----------------- | :--------- |
|
26 | 26 | | MacOS VM | ephemeral |
|
27 | 27 | | Disk (source code) | persistant |
|
28 | 28 |
|
29 | 29 | ### ex. "Linux Debugging" Template
|
30 | 30 |
|
31 |
| -| Resource name | Status | |
| 31 | +| Resource | Type | |
32 | 32 | | :----------------------- | :--------- |
|
33 | 33 | | EC2 VM (Debian 11.3 AMI) | persistant |
|
34 | 34 |
|
35 |
| -### Templates are managed via the CLI |
| 35 | +### Ephemeral vs persistant |
| 36 | + |
| 37 | +Coder supports ephemeral and persistant resources in workspaces. Ephemeral resources will be destroyed when a workspace is stopped/not in use. Persistant resources are not. |
| 38 | + |
| 39 | +When a workspace is deleted, all resources are destroyed. |
| 40 | + |
| 41 | +### Managing templates |
36 | 42 |
|
37 | 43 | Admins can use Coder's production-ready examples, or create/modify templates with standard Terraform.
|
38 | 44 |
|
39 | 45 | ```sh
|
40 |
| -# start from an example template |
| 46 | +# start from an example |
41 | 47 | coder templates init
|
42 | 48 |
|
43 |
| -# optional: modify the template |
| 49 | +# optional: modify the template |
44 | 50 | vim <template-name>/main.tf
|
45 | 51 |
|
46 |
| -# add the template to Coder |
| 52 | +# add the template to Coder deployment |
47 | 53 | coder templates <create/update> <template-name>
|
48 | 54 | ```
|
49 | 55 |
|
50 |
| -## Workspaces |
| 56 | +If you are commonly editing templates, we recommend source-controlling template code using GitOps/CI pipelines to make changes. |
51 | 57 |
|
52 |
| -Coder users create *workspaces* to get a remote development environment. Depending on the template, |
| 58 | +### Variables |
53 | 59 |
|
| 60 | +Templates often contain *variables*. In Coder, there are two types of variables. |
54 | 61 |
|
| 62 | +**Admin variables** are set when a template is being created/updated. These are often cloud secrets, such as a ServiceAccount token. These are annotated with `sensitive = true` in the template code. |
| 63 | + |
| 64 | +**User variables** are set when a user creates a workspace. They are unique to each workspace, often personalization settings such as preferred region or workspace image. |
| 65 | + |
| 66 | +## Workspaces |
| 67 | + |
| 68 | +Coder users create *workspaces* to get a remote development environment. Depending on the template, |
55 | 69 |
|
| 70 | +### Supported IDEs |
56 | 71 |
|
0 commit comments