Skip to content

Commit 3762b02

Browse files
committed
workspace.md
1 parent 279ebc8 commit 3762b02

File tree

1 file changed

+20
-88
lines changed

1 file changed

+20
-88
lines changed

docs/workspaces.md

Lines changed: 20 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ A developer creates a workspace from a [shared template](./templates/index.md).
77
This lets an entire team work in environments that are identically configured
88
and provisioned with the same resources.
99

10-
<<<<<<< HEAD
11-
1210
## Creating workspaces
1311

1412
You can create a workspace in the UI. Log in to your Coder instance, go to the
@@ -23,11 +21,9 @@ You can manage your existing templates in the **Workspaces** tab.
2321

2422
You can also create a workspace from the command line:
2523

26-
======= Each Coder user has their own workspaces created from
24+
Each Coder user has their own workspaces created from
2725
[shared templates](./templates/index.md):
2826

29-
> > > > > > > main
30-
3127
```shell
3228
# create a workspace from the template; specify any variables
3329
coder create --template="<templateName>" <workspaceName>
@@ -44,8 +40,6 @@ that are currently running.
4440

4541
The following filters are supported:
4642

47-
<<<<<<< HEAD
48-
4943
- `owner` - Represents the `username` of the owner. You can also use `me` as a
5044
convenient alias for the logged-in user.
5145
- `template` - Specifies the name of the template.
@@ -105,72 +99,24 @@ coder update <workspace-name>
10599

106100
## Workspace resources
107101

108-
======= Workspaces in Coder are started and stopped, often based on whether
109-
there was any activity or if there was a
102+
Workspaces in Coder are started and stopped, often based on whether there was
103+
any activity or if there was a
110104
[template update](./templates/index.md#Start/stop) available.
111105

112-
> > > > > > > main
113-
114106
Resources are often destroyed and re-created when a workspace is restarted,
115107
though the exact behavior depends on the template. For more information, see
116108
[Resource Persistence](./templates/resource-persistence.md).
117109

118110
> ⚠️ To avoid data loss, refer to your template documentation for information on
119111
> where to store files, install software, etc., so that they persist. Default
120-
> <<<<<<< HEAD templates are documented in
112+
> templates are documented in
121113
> [../examples/templates](https://github.com/coder/coder/tree/main/examples/templates).
122-
> ======= templates are documented in
123-
> [../examples/templates](https://github.com/coder/coder/tree/c6b1daabc5a7aa67bfbb6c89966d728919ba7f80/examples/templates).
124-
>
125-
> > > > > > > main
126114
>
127115
> You can use `coder show <workspace-name>` to see which resources are
128116
> persistent and which are ephemeral.
129117
130118
When a workspace is deleted, all of the workspace's resources are deleted.
131119

132-
# <<<<<<< HEAD
133-
134-
## Workspace scheduling
135-
136-
By default, workspaces are manually turned on/off by the user. However, a
137-
schedule can be defined on a per-workspace basis to automate the workspace
138-
start/stop.
139-
140-
![Scheduling UI](./images/schedule.png)
141-
142-
### Autostart
143-
144-
The autostart feature automates the workspace build at a user-specified time and
145-
day(s) of the week. In addition, users can select their preferred timezone.
146-
147-
![Autostart UI](./images/autostart.png)
148-
149-
### Autostop
150-
151-
The autostop feature shuts off workspaces after given number of hours in the
152-
"on" state. If Coder detects workspace connection activity, the autostop timer
153-
is bumped up one hour. IDE, SSH, Port Forwarding, and coder_app activity trigger
154-
this bump.
155-
156-
![autostop UI](./images/autostop.png)
157-
158-
### Max lifetime
159-
160-
Max lifetime is a template-level setting that determines the number of hours a
161-
workspace can run before it is automatically shutdown, regardless of any active
162-
connections. This setting ensures workspaces do not run in perpetuity when
163-
connections are left open inadvertently.
164-
165-
## Updating workspaces
166-
167-
Use the following command to update a workspace to the latest template version.
168-
The workspace will be stopped and started:
169-
170-
```shell
171-
coder update <workspace-name>
172-
```
173-
174120
## Repairing workspaces
175121

176122
Use the following command to re-enter template input variables in an existing
@@ -181,39 +127,18 @@ state is out of sync with the template.
181127
coder update <your workspace name> --always-prompt
182128
```
183129

184-
> > > > > > > main
185-
186-
## Logging
187-
188-
Coder stores macOS and Linux logs at the following locations:
189-
190-
| Service | Location |
191-
| ----------------- | -------------------------------- |
192-
| `startup_script` | `/tmp/coder-startup-script.log` |
193-
| `shutdown_script` | `/tmp/coder-shutdown-script.log` |
194-
| Agent | `/tmp/coder-agent.log` |
195-
196-
> Note: Logs are truncated once they reach 5MB in size.
197-
198-
## Repairing workspaces
199-
200-
<<<<<<< HEAD There are a couple of ways you can repair a workspace if its state
201-
is out of sync with the template.
202-
203-
# First, try re-entering parameters from a workspace.
204-
205-
In the Coder UI, you can filter your workspaces using pre-defined filters or
206-
employing the Coder's filter query. Take a look at the following examples to
207-
understand how to use the Coder's filter query:
130+
First, try re-entering parameters from a workspace. In the Coder UI, you can
131+
filter your workspaces using pre-defined filters or employing the Coder's filter
132+
query. Take a look at the following examples to understand how to use the
133+
Coder's filter query:
208134

209135
- To find the workspaces that you own, use the filter `owner:me`.
210136
- To find workspaces that are currently running, use the filter
211137
`status:running`.
212-
> > > > > > > main
213138

214139
![Re-entering template variables](./images/template-variables.png)
215140

216-
<<<<<<< HEAD You can also do this in the CLI with the following command:
141+
You can also do this in the CLI with the following command:
217142

218143
```shell
219144
coder update <your workspace name> --always-prompt
@@ -229,17 +154,24 @@ coder state pull <username>/<workspace name>
229154
coder state push <username>/<workspace name>
230155
```
231156

232-
=======
233-
234157
- `owner` - Represents the `username` of the owner. You can also use `me` as a
235158
convenient alias for the logged-in user.
236159
- `template` - Specifies the name of the template.
237160
- `status` - Indicates the status of the workspace. For a list of supported
238161
statuses, please refer to the
239162
[WorkspaceStatus documentation](https://pkg.go.dev/github.com/coder/coder/v2/codersdk#WorkspaceStatus).
240-
> > > > > > > main
241163

242-
---
164+
## Logging
165+
166+
Coder stores macOS and Linux logs at the following locations:
167+
168+
| Service | Location |
169+
| ----------------- | -------------------------------- |
170+
| `startup_script` | `/tmp/coder-startup-script.log` |
171+
| `shutdown_script` | `/tmp/coder-shutdown-script.log` |
172+
| Agent | `/tmp/coder-agent.log` |
173+
174+
> Note: Logs are truncated once they reach 5MB in size.
243175
244176
## Up next
245177

0 commit comments

Comments
 (0)