Skip to content

Commit 25e8abd

Browse files
authored
chore: rewrite provisioner docs (#6445)
* chore: rewrite provisioner docs * add checkout
1 parent b693b9f commit 25e8abd

File tree

1 file changed

+21
-23
lines changed

1 file changed

+21
-23
lines changed

docs/admin/provisioners.md

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,34 @@
11
# External provisioners
22

3-
By default, the Coder server runs [built-in provisioner daemons](../cli/coder_server.md#provisioner-daemons), which execute `terraform` during workspace and template builds. You can learn more about `provisionerd` in our [architecture documentation](../about/architecture.md#provisionerd).
3+
By default, the Coder server runs [built-in provisioner daemons](../cli/coder_server.md#provisioner-daemons), which execute `terraform` during workspace and template builds. However, there are sometimes benefits to running external provisioner daemons:
44

5-
> While external provisioners are stable, the feature is in an [alpha state](../contributing/feature-stages.md#alpha-features) and the behavior is subject to change in future releases. Use [GitHub issues](https://github.com/coder/coder) to leave feedback.
5+
- **Secure build environments:** Run build jobs in isolated containers, preventing malicious templates from gaining shell access to the Coder host.
66

7-
## Benefits of external provisioners
7+
- **Isolate APIs:** Deploy provisioners in isolated environments (on-prem, AWS, Azure) instead of exposing APIs (Docker, Kubernetes, VMware) to the Coder server. See [Provider Authentication](../templates/authentication.md) for more details.
88

9-
There are benefits in running external provisioner servers.
9+
- **Isolate secrets**: Keep Coder unaware of cloud secrets, manage/rotate secrets on provisoner servers.
1010

11-
### Security
11+
- **Reduce server load**: External provisioners reduce load and build queue times from the Coder server. See [Scaling Coder](./scale.md#concurrent-workspace-builds) for more details.
1212

13-
As you add more (template) admins in Coder, there is an increased risk of malicious code being added into templates. Isolated provisioners can prevent template admins from running code directly against the Coder server, database, or host machine.
13+
> External provisioners are in an [alpha state](../contributing/feature-stages.md#alpha-features) and the behavior is subject to change. Use [GitHub issues](https://github.com/coder/coder) to leave feedback.
1414
15-
Additionally, you can configure provisioner environments to access cloud secrets that you would like to conceal from the Coder server.
15+
## Running external provisioners
1616

17-
### Extensibility
17+
Each provisioner can run a single [concurrent workspace build](./scale.md#concurrent-workspace-builds). For example, running 30 provisioner containers will allow 30 users to start workspaces at the same time.
1818

19-
Instead of exposing an entire API and secrets (e.g. Kubernetes, Docker, VMware) to the Coder server, you can run provisioners in each environment. See [Provider authentication](../templates/authentication.md) for more details.
19+
### Requirements
2020

21-
### Scalability
21+
- The [Coder CLI](../cli.md) must installed on and authenticated as a user with the Owner or Template Admin role.
22+
- Your environment must be [authenticated](../templates/authentication.md) against the cloud environments templates need to provision against.
2223

23-
External provisioners can reduce load and build queue times from the Coder server. See [Scaling Coder](./scale.md#concurrent-workspace-builds) for more details.
24-
25-
## Run an external provisioner
26-
27-
Once authenticated as a user with the Template Admin or Owner role, the [Coder CLI](../cli.md) can launch external provisioners. There are 3 types of provisioners:
24+
### Types of provisioners
2825

2926
- **Generic provisioners** can pick up any build job from templates without provisioner tags.
3027

3128
```sh
3229
coder provisionerd start
3330
```
3431

35-
> Ensure all provisioners (including [built-in provisioners](#disable-built-in-provisioners)) have similar configuration/cloud access. Otherwise, users may run into intermittent build errors depending on which provisioner picks up a job.
36-
3732
- **Tagged provisioners** can be used to pick up build jobs from templates (and corresponding workspaces) with matching tags.
3833

3934
```sh
@@ -66,9 +61,16 @@ Once authenticated as a user with the Template Admin or Owner role, the [Coder C
6661
--provisioner-tag scope=user
6762
```
6863

69-
## Running external provisioners via Docker
64+
### Example: Running an external provisioner on a VM
65+
66+
```sh
67+
curl -L https://coder.com/install.sh | sh
68+
export CODER_URL=https://coder.example.com
69+
export CODER_SESSION_TOKEN=your_token
70+
coder provisionerd start
71+
```
7072

71-
The following command can run a Coder provisioner isolated in a Docker container.
73+
### Example: Running an external provisioner via Docker
7274

7375
```sh
7476
docker run --rm -it \
@@ -79,10 +81,6 @@ docker run --rm -it \
7981
provisionerd start
8082
```
8183

82-
Be sure to replace `https://coder.example.com` with your [access URL](./configure.md#access-url) and `your_token` with an [API token](../api.md).
83-
84-
To include [provider secrets](../templates/authentication.md), modify the `docker run` command to mount environment variables or external volumes. Alternatively, you can create a custom provisioner image.
85-
8684
## Disable built-in provisioners
8785

8886
As mentioned above, the Coder server will run built-in provisioners by default. This can be disabled with a server-wide [flag or environment variable](../cli/coder_server.md#provisioner-daemons).

0 commit comments

Comments
 (0)