Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9edfe90

Browse files
committed
moved all content from admin/workspaces to user guides
1 parent c30652f commit 9edfe90

File tree

4 files changed

+90
-153
lines changed

4 files changed

+90
-153
lines changed

docs/admin/workspaces/README.md

Lines changed: 0 additions & 136 deletions
This file was deleted.

docs/manifest.json

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,21 @@
133133
{
134134
"title": "Workspace Management",
135135
"description": "Manage workspaces",
136-
"path": "./user-guides/workspace-management.md"
137-
// "icon_path": "./images/icons/.svg"
136+
"path": "./user-guides/workspace-management.md",
137+
"icon_path": "./images/icons/layers.svg"
138138
},
139139
{
140140
"title": "Workspace Scheduling",
141141
"description": "Cost control with workspace schedules",
142142
"path": "./user-guides/workspace-scheduling.md",
143143
"icon_path": "./images/icons/stopwatch.svg"
144144
},
145+
{
146+
"title": "Workspace Lifecycle",
147+
"description": "Cost control with workspace schedules",
148+
"path": "./user-guides/workspace-scheduling.md",
149+
"icon_path": "./images/icons/stopwatch.svg"
150+
},
145151
{
146152
"title": "Dotfiles",
147153
"description": "Personalize your environment with dotfiles",
@@ -435,19 +441,6 @@
435441
}
436442
]
437443
},
438-
{
439-
"title": "Workspaces",
440-
"description": "Learn how to manage \u0026 audit workspaces",
441-
"path": "./admin/workspaces/README.md",
442-
"icon_path": "./images/icons/layers.svg",
443-
"children": [
444-
{
445-
"title": "Workspace Lifecycle",
446-
"description": "Understand the lifecycle of a workspace",
447-
"path": "./admin/workspaces/lifecycle.md"
448-
}
449-
]
450-
},
451444
{
452445
"title": "Networking",
453446
"description": "Understand Coder's networking layer",

docs/user-guides/workspace-management.md

Lines changed: 82 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ resources.
1414
You can create a workspace in the UI. Log in to your Coder instance, go to the
1515
**Templates** tab, find the template you need, and select **Create Workspace**.
1616

17-
![Creating a workspace in the UI](./images/creating-workspace-ui.png)
17+
![Creating a workspace in the UI](../images/creating-workspace-ui.png)
1818

1919
When you create a workspace, you will be prompted to give it a name. You might
2020
also be prompted to set some parameters that the template provides.
@@ -24,7 +24,7 @@ You can manage your existing templates in the **Workspaces** tab.
2424
You can also create a workspace from the command line:
2525

2626
Each Coder user has their own workspaces created from
27-
[templates](./admin/templates/README.md):
27+
[templates](../admin/templates/README.md):
2828

2929
```shell
3030
# create a workspace from the template; specify any variables
@@ -58,6 +58,24 @@ The following filters are supported:
5858
`connecting|connected|timeout`, e.g, `has-agent:connecting`
5959
- `id` - Workspace UUID
6060

61+
## Updating workspaces
62+
63+
After updating the default version of the template that a workspace was created
64+
from, you can update the workspace.
65+
66+
![Updating a workspace](../../images/workspace-update.png)
67+
68+
If the workspace is running, Coder stops it, updates it, then starts the
69+
workspace again.
70+
71+
### Updating via the CLI
72+
73+
Update a workspace through the command line:
74+
75+
```shell
76+
coder update <workspace-name>
77+
```
78+
6179
### Automatic updates
6280

6381
It can be tedious to manually update a workspace everytime an update is pushed
@@ -70,6 +88,19 @@ manually updated the workspace.
7088

7189
![Automatic Updates](./images/workspace-automatic-updates.png)
7290

91+
## Bulk operations (enterprise)
92+
93+
Enterprise admins may apply bulk operations (update, delete, start, stop) in the
94+
**Workspaces** tab. Select the workspaces you'd like to modify with the
95+
checkboxes on the left, then use the top-right **Actions** dropdown to apply the
96+
operation.
97+
98+
The start and stop operations can only be applied to a set of workspaces which
99+
are all in the same state. For update and delete, the user will be prompted for
100+
confirmation before any action is taken.
101+
102+
![Bulk workspace actions](../../images/user-guides/workspace-bulk-actions.png)
103+
73104
## Starting and stopping workspaces
74105

75106
By default, you manually start and stop workspaces as you need. You can also
@@ -95,3 +126,52 @@ available.
95126
Resources are often destroyed and re-created when a workspace is restarted,
96127
though the exact behavior depends on the template. For more information, see
97128
[Resource Persistence](./admin/templates/extending-templates/resource-persistence.md).
129+
130+
## Repairing workspaces
131+
132+
Use the following command to re-enter template input variables in an existing
133+
workspace. This command is useful when a workspace fails to build because its
134+
state is out of sync with the template.
135+
136+
```shell
137+
coder update <your workspace name> --always-prompt
138+
```
139+
140+
First, try re-entering parameters from a workspace. In the Coder UI, you can
141+
filter your workspaces using pre-defined filters or employing the Coder's filter
142+
query. Take a look at the following examples to understand how to use the
143+
Coder's filter query:
144+
145+
- To find the workspaces that you own, use the filter `owner:me`.
146+
- To find workspaces that are currently running, use the filter
147+
`status:running`.
148+
149+
![Re-entering template variables](../../images/templates/template-variables.png)
150+
151+
You can also do this in the CLI with the following command:
152+
153+
```shell
154+
coder update <your workspace name> --always-prompt
155+
```
156+
157+
If that does not work, a Coder admin can manually push and pull the Terraform
158+
state for a given workspace. This can lead to state corruption or deleted
159+
resources if you do not know what you are doing.
160+
161+
```shell
162+
coder state pull <username>/<workspace name>
163+
# Make changes
164+
coder state push <username>/<workspace name>
165+
```
166+
167+
## Logging
168+
169+
Coder stores macOS and Linux logs at the following locations:
170+
171+
| Service | Location |
172+
| ----------------- | -------------------------------- |
173+
| `startup_script` | `/tmp/coder-startup-script.log` |
174+
| `shutdown_script` | `/tmp/coder-shutdown-script.log` |
175+
| Agent | `/tmp/coder-agent.log` |
176+
177+
> Note: Logs are truncated once they reach 5MB in size.

0 commit comments

Comments
 (0)