You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add dev containers and scheduling to prebuilt workspaces known issues (#18816)
closes#18806
- [x] scheduling limitation
- [x] dev containers limitation
- [x] edit intro
[preview](https://coder.com/docs/@18806-prebuilds-known-limits/admin/templates/extending-templates/prebuilt-workspaces)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Clarified the introduction and administrator responsibilities for
prebuilt workspaces.
* Integrated compatibility information about DevContainers and workspace
scheduling more contextually.
* Added explicit notes on limitations with dev containers integration
and workspace autostart/autostop features.
* Improved configuration examples and clarified scheduling instructions.
* Enhanced explanations of scheduling behavior and lifecycle steps for
better understanding.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: Sas Swart <sas.swart.cdk@gmail.com>
Co-authored-by: Susana Ferreira <susana@coder.com>
Copy file name to clipboardExpand all lines: docs/admin/templates/extending-templates/prebuilt-workspaces.md
+18-28Lines changed: 18 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,12 @@
1
1
# Prebuilt workspaces
2
2
3
-
> [!WARNING]
4
-
> Prebuilds Compatibility Limitations:
5
-
> Prebuilt workspaces currently do not work reliably with [DevContainers feature](../managing-templates/devcontainers/index.md).
6
-
> If your project relies on DevContainer configuration, we recommend disabling prebuilds or carefully testing behavior before enabling them.
7
-
>
8
-
> We’re actively working to improve compatibility, but for now, please avoid using prebuilds with this feature to ensure stability and expected behavior.
3
+
Prebuilt workspaces (prebuilds) reduce workspace creation time with an automatically-maintained pool of
4
+
ready-to-use workspaces for specific parameter presets.
9
5
10
-
Prebuilt workspaces allow template administrators to improve the developer experience by reducing workspace
11
-
creation time with an automatically maintained pool of ready-to-use workspaces for specific parameter presets.
12
-
13
-
The template administrator configures a template to provision prebuilt workspaces in the background, and then when a developer creates
14
-
a new workspace that matches the preset, Coder assigns them an existing prebuilt instance.
15
-
Prebuilt workspaces significantly reduce wait times, especially for templates with complex provisioning or lengthy startup procedures.
6
+
The template administrator defines the prebuilt workspace's parameters and number of instances to keep provisioned.
7
+
The desired number of workspaces are then provisioned transparently.
8
+
When a developer creates a new workspace that matches the definition, Coder assigns them an existing prebuilt workspace.
9
+
This significantly reduces wait times, especially for templates with complex provisioning or lengthy startup procedures.
16
10
17
11
Prebuilt workspaces are:
18
12
@@ -21,6 +15,9 @@ Prebuilt workspaces are:
21
15
- Monitored and replaced automatically to maintain your desired pool size.
22
16
- Automatically scaled based on time-based schedules to optimize resource usage.
23
17
18
+
Prebuilt workspaces are a special type of workspace that don't follow the
19
+
[regular workspace scheduling features](../../../user-guides/workspace-scheduling.md) like autostart and autostop. Instead, they have their own reconciliation loop that handles prebuild-specific scheduling features such as TTL and prebuild scheduling.
20
+
24
21
## Relationship to workspace presets
25
22
26
23
Prebuilt workspaces are tightly integrated with [workspace presets](./parameters.md#workspace-presets):
@@ -53,7 +50,7 @@ instances your Coder deployment should maintain, and optionally configure a `exp
53
50
prebuilds {
54
51
instances = 3 # Number of prebuilt workspaces to maintain
55
52
expiration_policy {
56
-
ttl = 86400 # Time (in seconds) after which unclaimed prebuilds are expired (1 day)
53
+
ttl = 86400 # Time (in seconds) after which unclaimed prebuilds are expired (86400 = 1 day)
57
54
}
58
55
}
59
56
}
@@ -159,17 +156,17 @@ data "coder_workspace_preset" "goland" {
159
156
160
157
**Scheduling configuration:**
161
158
162
-
-**`timezone`**: The timezone for all cron expressions (required). Only a single timezone is supported per scheduling configuration.
163
-
-**`schedule`**: One or more schedule blocks defining when to scale to specific instance counts.
164
-
-**`cron`**: Cron expression interpreted as continuous time ranges (required).
165
-
-**`instances`**: Number of prebuilt workspaces to maintain during this schedule (required).
159
+
-`timezone`: (Required) The timezone for all cron expressions. Only a single timezone is supported per scheduling configuration.
160
+
-`schedule`: One or more schedule blocks defining when to scale to specific instance counts.
161
+
-`cron`: (Required) Cron expression interpreted as continuous time ranges.
162
+
-`instances`: (Required) Number of prebuilt workspaces to maintain during this schedule.
166
163
167
164
**How scheduling works:**
168
165
169
166
1. The reconciliation loop evaluates all active schedules every reconciliation interval (`CODER_WORKSPACE_PREBUILDS_RECONCILIATION_INTERVAL`).
170
-
2. The schedule that matches the current time becomes active. Overlapping schedules are disallowed by validation rules.
171
-
3. If no schedules match the current time, the base `instances` count is used.
172
-
4. The reconciliation loop automatically creates or destroys prebuilt workspaces to match the target count.
167
+
1. The schedule that matches the current time becomes active. Overlapping schedules are disallowed by validation rules.
168
+
1. If no schedules match the current time, the base `instances` count is used.
169
+
1. The reconciliation loop automatically creates or destroys prebuilt workspaces to match the target count.
173
170
174
171
**Cron expression format:**
175
172
@@ -227,7 +224,7 @@ When a template's active version is updated:
227
224
1. Prebuilt workspaces for old versions are automatically deleted.
228
225
1. New prebuilt workspaces are created for the active template version.
229
226
1. If dependencies change (e.g., an [AMI](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) update) without a template version change:
230
-
- You may delete the existing prebuilt workspaces manually.
227
+
- You can delete the existing prebuilt workspaces manually.
231
228
- Coder will automatically create new prebuilt workspaces with the updated dependencies.
232
229
233
230
The system always maintains the desired number of prebuilt workspaces for the active template version.
@@ -285,13 +282,6 @@ For example, the [`ami`](https://registry.terraform.io/providers/hashicorp/aws/l
285
282
has [`ForceNew`](https://github.com/hashicorp/terraform-provider-aws/blob/main/internal/service/ec2/ec2_instance.go#L75-L81) set,
0 commit comments