-
Notifications
You must be signed in to change notification settings - Fork 943
docs: add new best practice doc to speed up templates and workspaces #15296
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
3886e0b
4a42588
3073ab7
30417eb
2df6c0b
00d394b
913c6ca
0725931
209671d
5a0ab2a
4d3b220
348fcbb
3ff3499
046a07b
4b4032f
869ac35
858fb12
6ad8e41
62deabc
72dd419
460ef1e
baf32ae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,22 +21,19 @@ pre-built set of monitoring integrations. | |
With the Observability Helm chart, you can monitor [which specific startup | ||
metrics are a part of the Helm chart?] | ||
|
||
To install it with Helm: | ||
|
||
```shell | ||
helm repo add coder-observability https://helm.coder.com/observability | ||
helm upgrade --install coder-observability coder-observability/coder-observability --version 0.1.1 --namespace coder-observability --create-namespace | ||
``` | ||
Visit the | ||
[observability repository](https://github.com/coder/observability?tab=readme-ov-file#installation) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm into this + we should add it to the kubernetes doc which, aside, something looks busted here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe the observability bundle used to be in the k8s install docs. Unsure where it went :( Yeah, if you want to fix the numbers, go for it. This is definitely an annoyance in our parser. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
to install it with Helm. | ||
|
||
### Enable Prometheus metrics for Coder | ||
|
||
Our observability bundle gives you this for free which is nice and has | ||
instructions on how to do it with Coder | ||
|
||
[Prometheus.io](https://prometheus.io/docs/introduction/overview/#what-is-prometheus) | ||
is included as part of the [observability chart](#coder-observability-chart).It | ||
offers a variety of | ||
[available metrics](../../admin/integrations/prometheus.md#available-metrics). | ||
[available metrics](../../admin/integrations/prometheus.md#available-metrics), | ||
such as `coderd_provisionerd_job_timings_seconds` and | ||
`coderd_agentstats_startup_script_seconds`, which measure how long the workspace | ||
takes to provision and how long the startup script takes. | ||
|
||
You can | ||
[install it separately](https://prometheus.io/docs/prometheus/latest/getting_started/) | ||
|
@@ -73,9 +70,10 @@ state until a provisioner becomes available. | |
|
||
Provisioners are queue-based to reduce unpredictable load to the Coder server. | ||
However, they can be scaled up to allow more concurrent provisioners. You risk | ||
overloading the central Coder server if you use too many local provisioners, so | ||
we recommend a maximum of five provisioners. For more than five provisioners, we | ||
recommend that you move to [external provisioners](../../admin/provisioners.md). | ||
overloading the central Coder server if you use too many built-in provisioners, | ||
so we recommend a maximum of five provisioners. For more than five provisioners, | ||
we recommend that you move to | ||
[external provisioners](../../admin/provisioners.md). | ||
|
||
If you can’t move to external provisioners, use the `provisioner-daemons` flag | ||
to increase the number of provisioner daemons to five: | ||
|
@@ -86,7 +84,8 @@ coder server --provisioner-daemons=5 | |
|
||
Visit the | ||
[CLI documentation](../../reference/cli/server.md#--provisioner-daemons) for | ||
more information about increasing provisioner daemons and other options. | ||
more information about increasing provisioner daemons, configuring external | ||
provisioners, and other options. | ||
|
||
### Adjust provisioner CPU/memory | ||
|
||
|
@@ -115,24 +114,30 @@ Visit the | |
[validated architecture documentation](../../admin/infrastructure/validated-architectures/index.md#workspace-nodes) | ||
for more information. | ||
|
||
## Set up Terraform Provider Caching | ||
## Set up Terraform provider caching | ||
|
||
Use `terraform init` to cache providers: | ||
By default, Coder downloads each Terraform provider when a workspace starts. | ||
This can create unnecessary network and disk I/O. | ||
|
||
Pull the templates to your local device: | ||
`terraform init` generates a `.teraform.lock.hcl` which instructs Coder | ||
provisioners to cache specific versions of your providers. | ||
|
||
```shell | ||
coder templates pull | ||
``` | ||
To use `terraform init` to cache providers: | ||
|
||
Run `terraform init` to initialize the directory: | ||
1. Pull the templates to your local device: | ||
|
||
```shell | ||
terraform init | ||
``` | ||
```shell | ||
coder templates pull | ||
``` | ||
|
||
Push the templates back to your Coder deployment: | ||
1. Run `terraform init` to initialize the directory: | ||
|
||
```shell | ||
coder templates push | ||
``` | ||
```shell | ||
terraform init | ||
``` | ||
|
||
1. Push the templates back to your Coder deployment: | ||
|
||
```shell | ||
coder templates push | ||
``` |
Uh oh!
There was an error while loading. Please reload this page.