Skip to content

Commit 4f68180

Browse files
greyscaledKatie Horne
and
Katie Horne
authored
hotfix: Templates language [ch14098] (#466)
* hotfix: Templates language [ch14098] This implements task 2 (documentation) for normalizing the language around workspace templates. Details: * Rename workspaces-as-code directory to workspace-templates * Replace WAC and Workspaces as code with workspace templates Co-authored-by: Katie Horne <katie@coder.com>
1 parent ea9970a commit 4f68180

File tree

14 files changed

+82
-82
lines changed

14 files changed

+82
-82
lines changed

admin/templates.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
---
22
title: Templates
3-
description: Learn how to manage your workspaces as code templates.
3+
description: Learn how to manage your workspace templates.
44
---
55

6-
The **Templates** tab features options that control the behavior of workspace
7-
templates, which are the basis of [workspaces as code](../workspaces/workspaces-as-code/index.md).
6+
The **Templates** tab features options that control the behavior of
7+
[workspace templates](../workspaces/workspace-templates/index.md).
88

9-
## Enabling workspaces as code
9+
## Enabling workspace templates
1010

11-
By default, workspaces as code is an opt-in feature. The **Enable using
11+
By default, workspace templates is an opt-in feature. The **Enable using
1212
Workspace Templates** toggle allows you to enable or disable the creation of
1313
[workspaces](../workspaces/index.md) using predefined templates located in Git
1414
repositories.
1515

16-
To enable workspaces as code, go to **Admin > Templates** and set **Enable using
17-
Workspace Templates** to **On**.
16+
To enable workspace templates, go to **Admin > Templates** and set **Enable
17+
using Workspace Templates** to **On**.
1818

19-
![Toggle workspaces as code](../assets/admin/wac_toggle.png)
19+
![Toggle workspace templates](../assets/admin/wac_toggle.png)
2020

2121
## Template policy
2222

@@ -82,7 +82,7 @@ defined by the template policy.
8282
8383
The **Embeddable Button** section features a form you can use for generating an
8484
embeddable button. This button makes it easy for developers to use your
85-
[workspace template](../workspaces/workspaces-as-code/index.md).
85+
[workspace template](../workspaces/workspace-templates/index.md).
8686
8787
To create your button:
8888

changelog/1.17.2.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ There are no breaking changes in 1.17.2.
99

1010
### Features ✨
1111

12-
- Workspaces as code (**WAC**): Workspaces as code (WAC) brings the
13-
_infrastructure as code_ paradigm to Coder environments. WAC allows you to
14-
define and create new environments using **workspace templates**.
12+
- Workspace templates: Workspace templates brings the _infrastructure as code_
13+
paradigm to Coder environments by allowing you to define and create new
14+
environments using YAML templates.
1515
- web: New page available via **Admin** > **Templates** for creating an
1616
embeddable quickstart button.
1717
- web: New options available when clicking **New Environment** from the

changelog/1.17.3.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ description: "Released on 04/09/2021"
1010
1111
### Breaking changes ❗
1212

13-
- infra: Removed `tolerations` from workspaces as code templates.
13+
- infra: Removed `tolerations` from workspace templates.
1414

1515
### Features ✨
1616

17-
- web: Added a toggle to enable/disable workspaces as code on the **Manage >
18-
Admin > Templates** page. Disabling workspaces as code has the following
17+
- web: Added a toggle to enable/disable workspace templates on the **Manage >
18+
Admin > Templates** page. Disabling workspace templates has the following
1919
impact:
2020
- New workspaces cannot be created from a template.
2121
- Existing workspaces built from a template will continue to operate and may

changelog/1.18.0.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ description: "Released on 04/21/2021"
1111

1212
### Features ✨
1313

14-
- web: Added the ability to specify a workspaces as code template filepath other
15-
than the default _coder.yaml_
14+
- web: Added the ability to specify a workspace templates filepath other than
15+
the default _coder.yaml_
1616
- web: Moved _built-in_ sign-in behind a toggle so that it does not display when
1717
OIDC is configured for authentication
1818
- web: Updated color scheme on the sign-in page
19-
- web: Added dev URL support in workspaces as code templates
20-
- web: Added admin toggle for workspaces as code feature
21-
- web: Added Bitbucket Server support for workspaces as code
19+
- web: Added dev URL support in workspace templates
20+
- web: Added admin toggle for workspace templates feature
21+
- web: Added Bitbucket Server support for workspace templates
2222
- infra: Added `CODER_WP_NAME` environment variable to workspaces
2323
- cli: Added ability to cordon and uncordon workspace providers which will
2424
allow/disallow new workspaces from being provisioned on a specific provider
2525
- cli: Added ability to rename workspace providers
2626
- web: Improved error notifications with additional details and resolutions.
27-
Added _Tip_, _Error Type_, and enumerations for workspaces as code errors.
27+
Added _Tip_, _Error Type_, and enumerations for workspace templates errors.
2828
- infra: Added a background job to update templates
2929
- web: Added a workspace status indicator in the **Switch Workspace** selector
3030
- web: Added a tooltip with an error message for workspace status indicators
@@ -39,8 +39,8 @@ description: "Released on 04/21/2021"
3939
**Open in Coder** buttons
4040
- web: Fixed the inability to delete an empty organization while workspaces were
4141
awaiting deletion in the background
42-
- web: Improved error messages regarding attempts to import a workspaces as code
43-
template from a repository using an SSH URI
42+
- web: Improved error messages regarding attempts to import a workspace template
43+
from a repository using an SSH URI
4444
- infra: Fixed a bug that had allowed updates to be made to workspaces created
4545
from local template
4646

changelog/1.19.0.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ description: "Released on 05/19/2021"
88
- infra: Workspace assets created by Coder that were previously located at
99
`/opt/coder`, such as code-server and coder-cli, have been moved to
1010
`/var/tmp/coder`
11-
- infra: Workspaces as code templates have been updated from version _0.1_ to
12-
_0.2_. Existing workspaces using version _0.1_ templates can be rebuilt,
13-
but no new workspaces can be created using the old format.
14-
- web: The workspace as code _Open in Coder_ embeddable button flow no longer
11+
- infra: Workspace templates have been updated from version _0.1_ to _0.2_.
12+
Existing workspaces using version _0.1_ templates can be rebuilt, but no new
13+
workspaces can be created using the old format.
14+
- web: The workspace templates _Open in Coder_ embeddable button flow no longer
1515
includes a _clone_ step; buttons created from prior versions will still work,
1616
but Coder will not clone the project. To automate project cloning, use
17-
[`workspace.configure.start`](../workspaces/workspaces-as-code/templates.md#workspaceconfigurestart)
18-
- web: The embedded form for workspaces as code located at **Manage** >
17+
[`workspace.configure.start`](../workspaces/workspace-templates/templates.md#workspaceconfigurestart)
18+
- web: The embedded form for workspace templates located at **Manage** >
1919
**Admin** > **Templates** no longer uses the following fields: **Project
2020
Repository URL** and **Project Git Service**
2121

changelog/1.20.0.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ There are no breaking changes in 1.20.0.
1414
the provided default.
1515
- web: Added the `node-selector`, `tolerations`, and `annotations` fields to
1616
workspace templates.
17-
- other: Added a new JSON schema for writing Coder workspace as code templates
18-
with code completion and syntax checking.
17+
- other: Added a new JSON schema for writing Coder workspace templates with code
18+
completion and syntax checking.
1919
- web: Added a service banner that's displayed to all users of the system. The
2020
message can be used with existing messages. It can be dismissed by each user
2121
at any point and will not be shown again until there is a new message.

manifest.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@
5555
"path": "./workspaces/ssh.md"
5656
},
5757
{
58-
"path": "./workspaces/workspaces-as-code/index.md",
58+
"path": "./workspaces/workspace-templates/index.md",
5959
"children": [
6060
{
61-
"path": "./workspaces/workspaces-as-code/templates.md"
61+
"path": "./workspaces/workspace-templates/templates.md"
6262
},
6363
{
64-
"path": "./workspaces/workspaces-as-code/code-completion.md"
64+
"path": "./workspaces/workspace-templates/code-completion.md"
6565
}
6666
]
6767
}

workspaces/getting-started.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ workspaces. Click the **New Environment** button and choose **Custom
1616
Workspace**.
1717

1818
> To learn more about creating an environment from templates, see
19-
> [Workspaces as code](workspaces-as-code/index.md).
19+
> [Workspace templates](workspace-templates/index.md).
2020
2121
![Create a workspace](../assets/workspaces/create-workspace.png)
2222

@@ -39,10 +39,10 @@ image, and runs custom configuration on startup. Learn about the
3939

4040
Coder provides advanced settings that allow you to customize your workspace.
4141

42-
If your Coder deployment has [container-based virtual machines
43-
enabled](../admin/workspace-management/cvms.md), Coder creates your workspace as
44-
a [CVMs](cvms.md) by default (you can opt-out of this setting by unchecking the
45-
**Run as Container-based Virtual Machine** box).
42+
If your Coder deployment has
43+
[container-based virtual machines enabled](../admin/workspace-management/cvms.md),
44+
Coder creates your workspace as a [CVM](cvms.md) by default (you can opt-out of
45+
this setting by unchecking the **Run as Container-based Virtual Machine** box).
4646

4747
You can also specify the resources Coder should allocate.
4848

workspaces/workspaces-as-code/code-completion.md renamed to workspaces/workspace-templates/code-completion.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: "Workspace template code completion"
3-
description: "Learn how to use code completion when creating workspace templates."
3+
description:
4+
"Learn how to use code completion when creating workspace templates."
45
state: alpha
56
---
67

@@ -9,8 +10,8 @@ that enables code completion and syntax checking.
910

1011
## Requirements
1112

12-
You must have the [YAML extension by Red
13-
Hat](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml)
13+
You must have the
14+
[YAML extension by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml)
1415
installed to use this feature.
1516

1617
## How to use
@@ -33,8 +34,8 @@ Some keyboard shortcuts you may find helpful include:
3334
- Document outlining (<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>O</kbd>)
3435
- Auto completion (<kbd>Ctrl</kbd> + <kbd>Space</kbd>)
3536

36-
See the [YAML extension by Red Hat
37-
docs](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml)
37+
See the
38+
[YAML extension by Red Hat docs](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml)
3839
for additional shortcuts.
3940

4041
![Code Completion Demo](../../assets/wac-intellisense-demo.gif)

workspaces/workspaces-as-code/index.md renamed to workspaces/workspace-templates/index.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
---
2-
title: "Workspaces as code"
2+
title: "Workspace templates"
33
description: "Learn how to describe workspace configuration as code."
44
state: alpha
55
---
66

7-
Workspaces as code (WAC) brings the _infrastructure as code_ paradigm to Coder
8-
workspaces. WAC allows you to define and create new workspaces using **workspace
9-
templates**.
7+
Workspace templates brings the _infrastructure as code_ paradigm to Coder
8+
workspaces. Templates allow you to define and create new workspaces using YAML.
109

1110
[Workspace templates](./templates.md) are declarative YAML files that describe
1211
how to configure workspaces and their supporting infrastructure. Coder supports
@@ -21,7 +20,7 @@ files with either the `.yaml` or `.yml` extension.
2120

2221
We strongly recommend allowing the Git provider to run a webhook capable of
2322
reaching the Coder server for immediate template updates. Otherwise, Coder will
24-
update your WAC templates daily.
23+
update your workspace templates daily.
2524

2625
## Creating a workspace template
2726

@@ -33,7 +32,7 @@ in our [syntax guide](templates.md).
3332
To create a new workspace using a template, go to **New Workspace** > **Create
3433
from Template**.
3534

36-
![Create from template button](../../assets/workspaces/workspaces-as-code/create-from-template.png)
35+
![Create from template button](../../assets/workspaces/workspace-templates/create-from-template.png)
3736

3837
When prompted, provide:
3938

@@ -46,7 +45,7 @@ When prompted, provide:
4645
will be `.coder/coder.yaml`, but if you choose a different path, provide it
4746
here
4847

49-
![Create workspace from template](../../assets/workspaces/workspaces-as-code/wac-user-form.png)
48+
![Create workspace from template](../../assets/workspaces/workspace-templates/wac-user-form.png)
5049

5150
## Adding an embeddable button
5251

workspaces/workspaces-as-code/templates.md renamed to workspaces/workspace-templates/templates.md

+31-31
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ state: alpha
1010
> supported. To update your workspace, you **must** update your templates to
1111
> version _0.2_.
1212
13-
Workspaces as code (WAC) allows you to define and create new workspaces using
13+
Workspace templates allows you to define and create new workspaces using
1414
**workspace templates**.
1515

1616
Workspace templates are written in YAML and have a `.yaml` or `.yml` extension.
17-
For assistance with creating your Coder YAML file, you can use the [template
18-
intellisense](code-completion.md) feature.
17+
For assistance with creating your Coder YAML file, you can use the
18+
[template intellisense](code-completion.md) feature.
1919

2020
Coder looks for your workspace template at the following path:
2121

2222
```text
2323
<repository-root>/.coder/<template-name>.yaml
2424
```
2525

26-
![Template Location](../../assets/workspaces/workspaces-as-code/wac-location.png)
26+
![Template Location](../../assets/workspaces/workspace-templates/wac-location.png)
2727

2828
## Workspace template sample
2929

@@ -195,47 +195,47 @@ Determines whether the workspace should be created as a
195195

196196
#### workspace.specs.kubernetes.tolerations.value
197197

198-
Adds [Kubernetes
199-
tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/)
198+
Adds
199+
[Kubernetes tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/)
200200
to the workspace pod.
201201

202202
```yaml
203-
tolerations:
204-
value:
205-
- key: example1
206-
operator: Exists
207-
value: value-1
208-
effect: NoSchedule
209-
tolerationSeconds: 200
210-
- key: example-3
211-
operator: Equal
212-
value: value-2
213-
effect: PreferNoSchedule
214-
tolerationSeconds: 400
215-
- key: example-3
216-
value: value-3
217-
effect: NoExecute
218-
```
203+
tolerations:
204+
value:
205+
- key: example1
206+
operator: Exists
207+
value: value-1
208+
effect: NoSchedule
209+
tolerationSeconds: 200
210+
- key: example-3
211+
operator: Equal
212+
value: value-2
213+
effect: PreferNoSchedule
214+
tolerationSeconds: 400
215+
- key: example-3
216+
value: value-3
217+
effect: NoExecute
218+
```
219219

220220
`tolerations` is disabled by default and must be enabled by a site admin.
221221

222222
#### workspace.specs.kubernetes.node-selector.value
223223

224-
Adds [Kubernetes
225-
NodeSelectors](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector)
224+
Adds
225+
[Kubernetes NodeSelectors](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector)
226226
to the workspace pod. The value is a sequence of key/value pairs.
227227

228228
For example, the following snippet would add two `nodeSelectors` for Kubernetes:
229229
`accelerator:nvidia` and `disktype:ssd`.
230230

231231
```yaml
232-
node-selector:
233-
value:
234-
- key: accelerator
235-
value: nvidia
236-
- key: disktype
237-
value: ssd
238-
```
232+
node-selector:
233+
value:
234+
- key: accelerator
235+
value: nvidia
236+
- key: disktype
237+
value: ssd
238+
```
239239

240240
`node-selector` is disabled by default and must be enabled by a site admin.
241241

0 commit comments

Comments
 (0)