Skip to content

Commit 684ef43

Browse files
Apply suggestions from code review
Co-authored-by: Danny Kopping <danny@coder.com>
1 parent 4b3b0a9 commit 684ef43

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

docs/admin/templates/extending-templates/prebuilt-workspaces.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
# Prebuilt workspaces
22

3-
Prebuilt workspaces (Prebuilds) allow template administrators to improve the developer experience by reducing workspace
3+
Prebuilt workspaces allow template administrators to improve the developer experience by reducing workspace
44
creation time with an automatically maintained pool of ready-to-use workspaces for specific parameter presets.
55

6-
The template administrator configures a template to be available with prebuilt workspaces, and then when a developer creates
6+
The template administrator configures a template to provision prebuilt workspaces in the background, and then when a developer creates
77
a new workspace with matching parameters, Coder assigns them an existing prebuilt instance.
88
Prebuilt workspaces significantly reduce wait times, especially for templates with complex provisioning or lengthy startup procedures.
99

1010
Prebuilt workspaces are:
1111

1212
- Created and maintained automatically by Coder to match your specified preset configurations.
13-
- Claimed transparently when developers request matching workspaces.
13+
- Claimed transparently when developers create workspaces.
1414
- Monitored and replaced automatically to maintain your desired pool size.
1515

1616
## Prerequisites
1717

1818
- [**Premium license**](../../licensing/index.md)
19-
- [**Template administrator privileges**](../../users/groups-roles.md)
2019
- **Compatible Terraform provider**: Use `coder/coder` Terraform provider `>= 2.3.0-pre2`. (**TODO: update with latest version**)
2120
- **Feature flag**: Enable the `workspace-prebuilds` [experiment](../../../reference/cli/server.md#--experiments).
2221

@@ -34,7 +33,7 @@ instances your Coder deployment should maintain:
3433
memory = 16
3534
}
3635
prebuilds {
37-
instances = 3 // Number of prebuilt workspaces to maintain
36+
instances = 3 # Number of prebuilt workspaces to maintain
3837
}
3938
}
4039
```
@@ -67,11 +66,11 @@ Expand each item in this list for more information about the stage:
6766

6867
1. The workspace is provisioned like a regular workspace.
6968
1. The workspace reaches `running` state.
70-
1. The agent connects and reports `ready` status.
71-
1. All bootstrap procedures and startup scripts complete successfully.
72-
1. The workspace is marked as `eligible` to be claimed.
69+
1. The agent connects to coderd.
70+
1. The agent starts its bootstrap procedures and startup scripts complete successfully.
71+
1. The agent reports `ready` status.
7372

74-
Prebuilds that fail during provisioning are retried with an exponential backoff to prevent resource waste.
73+
Prebuilds that fail during provisioning are retried with an exponential backoff to prevent transient failures.
7574

7675
</details>
7776

@@ -112,11 +111,9 @@ Prebuilt workspaces are tightly integrated with [workspace presets](./parameters
112111

113112
1. Each Prebuild is associated with a specific template preset.
114113
1. The preset must define all required parameters needed to build the workspace.
115-
1. Parameters that are not defined in the preset can still be customized by users when they claim a workspace.
116114
1. The preset parameters define the base configuration and are immutable after they're claimed.
117-
1. Prebuilds help presets deliver even faster workspace creation.
115+
1. Parameters that are not defined in the preset can still be customized by users when they claim a workspace.
118116

119-
_Note: In future releases, we will allow operators to invalidate their prebuilt workspaces programmatically._
120117

121118
## Administration and troubleshooting
122119

@@ -127,15 +124,14 @@ Because unclaimed prebuilt workspaces are owned by the `prebuilds` user, you can
127124

128125
1. Configure quotas for any group that includes this user.
129126
1. Set appropriate limits to balance Prebuild availability with resource constraints.
130-
1. Monitor quota utilization through Coder's dashboard.
131127

132128
If a quota is exceeded, the prebuilt workspace will fail provisioning the same way other workspaces do.
133129

134130
### Template configuration best practices
135131

136132
#### Preventing resource replacement
137133

138-
When a prebuilt workspace is claimed, Terraform runs again with new values for the workspace owner and name.
134+
When a prebuilt workspace is claimed, another `terraform apply` run occurs with new values for the workspace owner and name.
139135

140136
This can cause issues:
141137

@@ -214,5 +210,4 @@ These logs provide information about:
214210

215211
1. Creation and deletion attempts for prebuilds.
216212
1. Backoff events after failed builds.
217-
1. Eligibility state changes.
218213
1. Claiming operations.

0 commit comments

Comments
 (0)