Skip to content

Commit 0725931

Browse files
committed
suggestions from code review
1 parent 913c6ca commit 0725931

File tree

1 file changed

+33
-28
lines changed

1 file changed

+33
-28
lines changed

docs/tutorials/best-practices/speed-up-templates.md

Lines changed: 33 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,19 @@ pre-built set of monitoring integrations.
2121
With the Observability Helm chart, you can monitor [which specific startup
2222
metrics are a part of the Helm chart?]
2323

24-
To install it with Helm:
25-
26-
```shell
27-
helm repo add coder-observability https://helm.coder.com/observability
28-
helm upgrade --install coder-observability coder-observability/coder-observability --version 0.1.1 --namespace coder-observability --create-namespace
29-
```
24+
Visit the
25+
[observability repository](https://github.com/coder/observability?tab=readme-ov-file#installation)
26+
to install it with Helm.
3027

3128
### Enable Prometheus metrics for Coder
3229

33-
Our observability bundle gives you this for free which is nice and has
34-
instructions on how to do it with Coder
35-
3630
[Prometheus.io](https://prometheus.io/docs/introduction/overview/#what-is-prometheus)
3731
is included as part of the [observability chart](#coder-observability-chart).It
3832
offers a variety of
39-
[available metrics](../../admin/integrations/prometheus.md#available-metrics).
33+
[available metrics](../../admin/integrations/prometheus.md#available-metrics),
34+
such as `coderd_provisionerd_job_timings_seconds` and
35+
`coderd_agentstats_startup_script_seconds`, which measure how long the workspace
36+
takes to provision and how long the startup script takes.
4037

4138
You can
4239
[install it separately](https://prometheus.io/docs/prometheus/latest/getting_started/)
@@ -73,9 +70,10 @@ state until a provisioner becomes available.
7370

7471
Provisioners are queue-based to reduce unpredictable load to the Coder server.
7572
However, they can be scaled up to allow more concurrent provisioners. You risk
76-
overloading the central Coder server if you use too many local provisioners, so
77-
we recommend a maximum of five provisioners. For more than five provisioners, we
78-
recommend that you move to [external provisioners](../../admin/provisioners.md).
73+
overloading the central Coder server if you use too many built-in provisioners,
74+
so we recommend a maximum of five provisioners. For more than five provisioners,
75+
we recommend that you move to
76+
[external provisioners](../../admin/provisioners.md).
7977

8078
If you can’t move to external provisioners, use the `provisioner-daemons` flag
8179
to increase the number of provisioner daemons to five:
@@ -86,7 +84,8 @@ coder server --provisioner-daemons=5
8684

8785
Visit the
8886
[CLI documentation](../../reference/cli/server.md#--provisioner-daemons) for
89-
more information about increasing provisioner daemons and other options.
87+
more information about increasing provisioner daemons, configuring external
88+
provisioners, and other options.
9089

9190
### Adjust provisioner CPU/memory
9291

@@ -115,24 +114,30 @@ Visit the
115114
[validated architecture documentation](../../admin/infrastructure/validated-architectures/index.md#workspace-nodes)
116115
for more information.
117116

118-
## Set up Terraform Provider Caching
117+
## Set up Terraform provider caching
119118

120-
Use `terraform init` to cache providers:
119+
By default, Coder downloads each Terraform provider when a workspace starts.
120+
This can create unnecessary network and disk I/O.
121121

122-
Pull the templates to your local device:
122+
`terraform init` generates a `.teraform.lock.hcl` which instructs Coder
123+
provisioners to cache specific versions of your providers.
123124

124-
```shell
125-
coder templates pull
126-
```
125+
To use `terraform init` to cache providers:
127126

128-
Run `terraform init` to initialize the directory:
127+
1. Pull the templates to your local device:
129128

130-
```shell
131-
terraform init
132-
```
129+
```shell
130+
coder templates pull
131+
```
133132

134-
Push the templates back to your Coder deployment:
133+
1. Run `terraform init` to initialize the directory:
135134

136-
```shell
137-
coder templates push
138-
```
135+
```shell
136+
terraform init
137+
```
138+
139+
1. Push the templates back to your Coder deployment:
140+
141+
```shell
142+
coder templates push
143+
```

0 commit comments

Comments
 (0)