@@ -7,8 +7,6 @@ A developer creates a workspace from a [shared template](./templates/index.md).
7
7
This lets an entire team work in environments that are identically configured
8
8
and provisioned with the same resources.
9
9
10
- <<<<<<< HEAD
11
-
12
10
## Creating workspaces
13
11
14
12
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.
23
21
24
22
You can also create a workspace from the command line:
25
23
26
- ======= Each Coder user has their own workspaces created from
24
+ Each Coder user has their own workspaces created from
27
25
[ shared templates] ( ./templates/index.md ) :
28
26
29
- > > > > > > > main
30
-
31
27
``` shell
32
28
# create a workspace from the template; specify any variables
33
29
coder create --template=" <templateName>" < workspaceName>
@@ -44,8 +40,6 @@ that are currently running.
44
40
45
41
The following filters are supported:
46
42
47
- <<<<<<< HEAD
48
-
49
43
- ` owner ` - Represents the ` username ` of the owner. You can also use ` me ` as a
50
44
convenient alias for the logged-in user.
51
45
- ` template ` - Specifies the name of the template.
@@ -105,72 +99,24 @@ coder update <workspace-name>
105
99
106
100
## Workspace resources
107
101
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
110
104
[ template update] ( ./templates/index.md#Start/stop ) available.
111
105
112
- > > > > > > > main
113
-
114
106
Resources are often destroyed and re-created when a workspace is restarted,
115
107
though the exact behavior depends on the template. For more information, see
116
108
[ Resource Persistence] ( ./templates/resource-persistence.md ) .
117
109
118
110
> ⚠️ To avoid data loss, refer to your template documentation for information on
119
111
> where to store files, install software, etc., so that they persist. Default
120
- > <<<<<<< HEAD templates are documented in
112
+ > templates are documented in
121
113
> [ ../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
126
114
>
127
115
> You can use ` coder show <workspace-name> ` to see which resources are
128
116
> persistent and which are ephemeral.
129
117
130
118
When a workspace is deleted, all of the workspace's resources are deleted.
131
119
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
-
174
120
## Repairing workspaces
175
121
176
122
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.
181
127
coder update < your workspace name> --always-prompt
182
128
```
183
129
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:
208
134
209
135
- To find the workspaces that you own, use the filter ` owner:me ` .
210
136
- To find workspaces that are currently running, use the filter
211
137
` status:running ` .
212
- > > > > > > > main
213
138
214
139
![ Re-entering template variables] ( ./images/template-variables.png )
215
140
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:
217
142
218
143
``` shell
219
144
coder update < your workspace name> --always-prompt
@@ -229,17 +154,24 @@ coder state pull <username>/<workspace name>
229
154
coder state push < username> /< workspace name>
230
155
```
231
156
232
- =======
233
-
234
157
- ` owner ` - Represents the ` username ` of the owner. You can also use ` me ` as a
235
158
convenient alias for the logged-in user.
236
159
- ` template ` - Specifies the name of the template.
237
160
- ` status ` - Indicates the status of the workspace. For a list of supported
238
161
statuses, please refer to the
239
162
[ WorkspaceStatus documentation] ( https://pkg.go.dev/github.com/coder/coder/v2/codersdk#WorkspaceStatus ) .
240
- > > > > > > > main
241
163
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.
243
175
244
176
## Up next
245
177
0 commit comments