Skip to content

Commit e67dabb

Browse files
committed
workspaces docs
1 parent afac7ee commit e67dabb

File tree

3 files changed

+65
-12
lines changed

3 files changed

+65
-12
lines changed

docs/README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,15 @@ Some pages are coming soon. Contributions welcome!
7474
- [Why Coder](about.md#why-coder)
7575
- [What Coder is not](about.md#what-coder-is-not)
7676
- [Templates](./templates.md)
77-
- [Managing templates](./templates.md#managing-templates)
78-
- [Persistant and ephemeral resources](./templates.md#persistant-and-ephemeral-resources)
77+
- [Manage templates](./templates.md#manage-templates)
78+
- [Persistent and ephemeral resources](./templates.md#persistent-and-ephemeral-resources)
7979
- [Variables](./templates.md#variables)
8080
- [Workspaces](./workspaces.md)
81-
- [Managing workspaces](./workspaces.md)
81+
- [Create workspaces](./workspaces.md#create-workspaces)
82+
- [Connect with SSH](./workspaces.md#connect-with-ssh)
8283
- [Editors and IDEs](./workspaces.md#editors-and-ides)
83-
- Guides
84-
- Using the Coder CLI
85-
- Install Coder on a VM with Caddy + LetsEncrypt
86-
- Building templates in Coder
84+
- [Workspace lifecycle](./workspaces.md#workspace-lifecycle)
85+
- [Updating workspaces](./workspaces.md#updating-workspaces)
8786

8887
## Contributing
8988

docs/templates.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Coder admins manage *templates* to define the infrastructure behind workspaces.
44

55
Templates are shared and updates can be rolled out, or users can manually update their workspaces.
66

7-
## Managing templates
7+
## Manage templates
88

99
Coder provides production-ready template [examples](../examples/), but they can be modified with Terraform.
1010

@@ -21,9 +21,9 @@ coder templates <create/update> <template-name>
2121

2222
If you are commonly editing templates, we recommend source-controlling template code using GitOps/CI pipelines to make changes.
2323

24-
## Persistant and ephemeral resources
24+
## Persistent and ephemeral resources
2525

26-
Coder supports ephemeral and persistant resources in workspaces. Ephemeral resources are be destroyed when a workspace is not in use (stopped). Persistant resources remain. See how this works for an example "frontend" template:
26+
Coder supports ephemeral and persistent resources in workspaces. Ephemeral resources are be destroyed when a workspace is not in use (stopped). persistent resources remain. See how this works for an example "frontend" template:
2727

2828
| Resource | Type |
2929
| :--------------------------- | :--------- |

docs/workspaces.md

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,59 @@
11
# Workspaces
22

3-
Coder users create workspaces
3+
Workspaces contain the dependencies, IDEs, and configuration information needed for software development.
44

5-
## Managing workspaces
5+
## Create workspaces
6+
7+
Each Coder user has their own workspaces, created from a shared [template](./templates.md).
8+
9+
```sh
10+
# create a workspace from template, specify any variables
11+
coder workspaces create <workspace-name>
12+
13+
# show the resources behind the workspace, and how to connect
14+
coder workspaces show <workspace-name>
15+
```
16+
17+
## Connect with SSH
18+
19+
Once Coder workspaces are added to your SSH hosts, you can connect from any IDE with remote development support.
20+
21+
```sh
22+
coder config-ssh
23+
24+
ssh coder.<workspace-name>
25+
```
26+
27+
## Editors and IDEs
28+
29+
The following desktop IDEs have been tested with Coder. Any IDE with SSH support should work!
30+
31+
- VS Code (with [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) extension)
32+
- JetBrains (with [Gateway](https://www.jetbrains.com/help/idea/remote-development-a.html#launch_gateway) installed)
33+
- IntelliJ IDEA
34+
- CLion
35+
- GoLand
36+
- PyCharm
37+
- Rider
38+
- RubyMine
39+
- WebStorm
40+
41+
## Workspace lifecycle
42+
43+
Workspaces in Coder are started and stopped, often based on activity or when a [template update](./templates.md#manage-templates) is available.
44+
45+
While the exact behavior depends on the template, resources are often destroyed and re-created when a workspace is restarted. For more details, see [persistent and ephemeral resources](./templates.md#persistent-and-ephemeral-resources).
46+
47+
> ⚠️ To avoid data loss, reference your template documentation to see where to store files, install software, etc. Default templates are documented in [../examples](../examples/).
48+
>
49+
> You can use `coder workspace show <workspace-name>` to see which resources are persistent vs ephemeral.
50+
51+
When a workspace is deleted, all of the workspace's resources are deleted.
52+
53+
## Updating workspaces
54+
55+
Use the following command to update a workspace to the latest version of a template. The workspace will be stopped and started.
56+
57+
```sh
58+
coder workspaces update <workspace-name>
59+
```

0 commit comments

Comments
 (0)