- Notifications
You must be signed in to change notification settings - Fork1k
docs: add dev containers and scheduling to prebuilt workspaces known issues#18816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
8 commits Select commitHold shift + click to select a range
8fb0295
notes about dev containers and scheduling
EdwardAngert1b0f88c
edit intro
EdwardAngert739c4f7
Merge branch 'main' into 18806-prebuilds-known-limits
EdwardAngert336ebf3
suggestions from review
EdwardAngert038e9a3
Update docs/admin/templates/extending-templates/prebuilt-workspaces.md
SasSwart1fce907
Update docs/admin/templates/extending-templates/prebuilt-workspaces.md
SasSwart42939bc
Merge remote-tracking branch 'origin/main' into 18806-prebuilds-known…
SasSwartcde74d0
remove defunct documentation for prebuilt workspaces
SasSwartFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
46 changes: 18 additions & 28 deletionsdocs/admin/templates/extending-templates/prebuilt-workspaces.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,12 @@ | ||
# Prebuilt workspaces | ||
Prebuilt workspaces (prebuilds) reduce workspace creation time with an automatically-maintained pool of | ||
ready-to-use workspaces for specific parameter presets. | ||
The template administrator defines the prebuilt workspace's parameters and number of instances to keep provisioned. | ||
SasSwart marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
The desired number of workspaces are then provisioned transparently. | ||
When a developer creates a new workspace that matches the definition, Coder assigns them an existing prebuilt workspace. | ||
This significantly reduces wait times, especially for templates with complex provisioning or lengthy startup procedures. | ||
Prebuilt workspaces are: | ||
@@ -21,6 +15,9 @@ Prebuilt workspaces are: | ||
- Monitored and replaced automatically to maintain your desired pool size. | ||
- Automatically scaled based on time-based schedules to optimize resource usage. | ||
Prebuilt workspaces are a special type of workspace that don't follow the | ||
[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. | ||
## Relationship to workspace presets | ||
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 | ||
prebuilds { | ||
instances = 3 # Number of prebuilt workspaces to maintain | ||
expiration_policy { | ||
ttl = 86400 # Time (in seconds) after which unclaimed prebuilds are expired (86400 =1 day) | ||
} | ||
} | ||
} | ||
@@ -159,17 +156,17 @@ data "coder_workspace_preset" "goland" { | ||
**Scheduling configuration:** | ||
- `timezone`: (Required)The timezone for all cron expressions. Only a single timezone is supported per scheduling configuration. | ||
- `schedule`: One or more schedule blocks defining when to scale to specific instance counts. | ||
- `cron`: (Required)Cron expression interpreted as continuous time ranges. | ||
- `instances`: (Required)Number of prebuilt workspaces to maintain during this schedule. | ||
**How scheduling works:** | ||
1. The reconciliation loop evaluates all active schedules every reconciliation interval (`CODER_WORKSPACE_PREBUILDS_RECONCILIATION_INTERVAL`). | ||
1. The schedule that matches the current time becomes active. Overlapping schedules are disallowed by validation rules. | ||
EdwardAngert marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
1. If no schedules match the current time, the base `instances` count is used. | ||
1. The reconciliation loop automatically creates or destroys prebuilt workspaces to match the target count. | ||
**Cron expression format:** | ||
@@ -227,7 +224,7 @@ When a template's active version is updated: | ||
1. Prebuilt workspaces for old versions are automatically deleted. | ||
1. New prebuilt workspaces are created for the active template version. | ||
1. If dependencies change (e.g., an [AMI](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) update) without a template version change: | ||
- Youcan delete the existing prebuilt workspaces manually. | ||
- Coder will automatically create new prebuilt workspaces with the updated dependencies. | ||
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 | ||
has [`ForceNew`](https://github.com/hashicorp/terraform-provider-aws/blob/main/internal/service/ec2/ec2_instance.go#L75-L81) set, | ||
since the AMI cannot be changed in-place._ | ||
### Monitoring and observability | ||
#### Available metrics | ||
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.