Skip to content

Commit be540aa

Browse files
committed
Add vm deployment and status codes
1 parent 027110b commit be540aa

File tree

1 file changed

+57
-9
lines changed

1 file changed

+57
-9
lines changed

docs/admin/workspaceproxies.md

+57-9
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ A workspace proxy is a relay connection a developer can choose to use when conne
1111

1212
# Deploy a workspace proxy
1313

14-
Workspace deployment and management must be done by a user with the `owner` role. You must logged into the `coder` cli to create a proxy.
14+
Each workspace proxy should be a unique instance. At no point should 2 workspace proxy instances share the same authentication token.
1515

16-
```bash
17-
coder login <deployment_url>
18-
```
16+
## Requirements
17+
18+
- The [Coder CLI](../cli.md) must installed on and authenticated as a user with the Owner role.
1919

20-
# Step 1: Create the proxy
20+
## Step 1: Create the proxy
2121

22-
Create the workspace proxy and make sure to save the returned authentication token for said proxy.
22+
Create the workspace proxy and make sure to save the returned authentication token for said proxy. This is the token the workspace proxy will use to authenticate back to primary coderd.
2323

2424
```bash
2525
$ coder proxy create --name=newyork --display-name="USA East" --icon="/emojis/2194.png"
@@ -35,8 +35,56 @@ NAME URL STATUS STATUS
3535
newyork unregistered
3636
```
3737

38-
# Step 2: Deploy the proxy
38+
## Step 2: Deploy the proxy
39+
40+
Deploying the workspace proxy will also register the proxy with coderd and make the workspace proxy usable. If the proxy deployment is successful, `coder proxy ls` will show an `ok` status code:
41+
42+
```
43+
$ coder proxy lsPM
44+
NAME URL STATUS STATUS
45+
brazil-saopaulo https://brazil.example.com ok
46+
europe-frankfurt https://europe.example.com ok
47+
sydney https://sydney.example.com ok
48+
```
49+
50+
Other Status codes:
51+
- `unregistered` : The workspace proxy was created, and not yet deployed
52+
- `unreachable` : The workspace proxy was registered, but is not responding. Likely the proxy went offline.
53+
- `unhealthy` : The workspace proxy is reachable, but has some issue that is preventing the proxy from being used. `coder proxy ls` should show the error message.
54+
- `ok` : The workspace proxy is healthy and working properly!
55+
56+
### Configuration
57+
58+
Workspace proxy configuration overlaps with a subset of the coderd configuration. To see the full list of configuration options: `coder proxy server --help`
3959

40-
Deploying the workspace proxy will also register the proxy and make the workspace proxy usable.
60+
```bash
61+
# Proxy specific configuration. These are REQUIRED
62+
# Example: https://coderd.example.com
63+
CODER_PRIMARY_ACCESS_URL="https://<url_of_coderd_dashboard>"
64+
CODER_PROXY_SESSION_TOKEN="<session_token_from_proxy_create>"
65+
66+
# Runtime variables for "coder start".
67+
CODER_HTTP_ADDRESS=0.0.0.0:8080
68+
CODER_TLS_ADDRESS=0.0.0.0:8443
69+
# Example: https://east.coderd.example.com
70+
CODER_ACCESS_URL="https://<access_url_of_proxy>"
71+
# Example: *.east.coderd.example.com
72+
CODER_WILDCARD_ACCESS_URL="*.<app_hostname_of_proxy>"
73+
CODER_DERP_SERVER_ENABLE=true
74+
CODER_DERP_SERVER_RELAY_ADDRESS="https://127.0.0.1:8443"
75+
76+
CODER_TLS_ENABLE=true
77+
CODER_TLS_CLIENT_AUTH=none
78+
CODER_TLS_CERT_FILE="<cert_file_location>"
79+
CODER_TLS_KEY_FILE="<key_file_location>"
80+
81+
# Additional configuration options are available.
82+
```
83+
84+
### Running on a VM
85+
86+
```bash
87+
# Set configuration options via environment variables, a config file, or cmd flags
88+
coder proxy server
89+
```
4190

42-
// TODO: Docs to deploy a workspace proxy. Helm chart? Manually? Config sync?

0 commit comments

Comments
 (0)