Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 175a415

Browse files
authored
docs: clarify requirements for offline deployments (#6418)
* docs: clarify requirements for offline deployments * fix punctuation * fix typo and add postgres * mention update check * disable update checks
1 parent 25b05ed commit 175a415

File tree

2 files changed

+41
-8
lines changed

2 files changed

+41
-8
lines changed

docs/install/offline.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
# Offline Deployments
22

3-
Coder can run in offline / air-gapped environments.
3+
All Coder features are supported in offline / behind firewalls / in air-gapped environments. However, some changes to your configuration are necessary.
44

5-
## Building & push a custom Coder image
5+
> This is a general comparison. Keep reading for a full tutorial running Coder offline with Kubernetes or Docker.
6+
7+
| | Public deployments | Offline deployments |
8+
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
9+
| Terraform binary | By default, Coder downloads Terraform binary from [releases.hashicorp.com](https://releases.hashicorp.com) | Terraform binary must be included in `PATH` for the VM or container image. [Supported versions](https://github.com/coder/coder/blob/main/provisioner/terraform/install.go#L23-L24) |
10+
| Terraform registry | Coder templates will attempt to download providers from [registry.terraform.io](https://registry.terraform.io) or [custom source addresses](https://developer.hashicorp.com/terraform/language/providers/requirements#source-addresses) specified in each template | [Custom source addresses](https://developer.hashicorp.com/terraform/language/providers/requirements#source-addresses) can be specified in each Coder template, or a custom registry/mirror can be used. More details below |
11+
| STUN | By default, Coder uses Google's public STUN server for direct workspace connections | STUN can be safely [disabled](../cli/coder_server#--derp-server-stun-addresses), users can still connect via [relayed connections](../networking.md#-geo-distribution). Alternatively, you can set a [custom DERP server](../cli/coder_server#--derp-server-stun-addresses) |
12+
| DERP | By default, Coder's built-in DERP relay can be used, or [Tailscale's public relays](../networking.md#relayed-connections). | By default, Coder's built-in DERP relay can be used, or [custom relays](../networking.md#custom-relays). |
13+
| PostgreSQL | If no [PostgreSQL connection URL](../cli/coder_server#--postgres-url) is specified, Coder will download Postgres from [repo1.maven.org](https://repo1.maven.org) | An external database is required, you must specify a [PostgreSQL connection URL](../cli/coder_server#--postgres-url) |
14+
| Telemetry | Telemetry is on by default, and [can be disabled](../cli/coder_server#--telemetry) | Telemetry [can be disabled](../cli/coder_server#--telemetry) |
15+
| Update check | By default, Coder checks for updates from [GitHub releases](https:/github.com/coder/coder/releases) | Update checks [can be disabled](../cli/coder_server#--update-check) |
16+
17+
## Offline container images
18+
19+
The following instructions walk you through how to build a custom Coder server image for Docker or Kubernetes
620

721
First, build and push a container image extending our official image with the following:
822

@@ -127,6 +141,10 @@ services:
127141
volumes:
128142
- ./plugins:/opt/terraform/plugins
129143
# ...
144+
environment:
145+
CODER_TELEMETRY_ENABLE: "false" # Disable telemetry
146+
CODER_DERP_SERVER_STUN_ADDRESSES: "" # Only use relayed connections
147+
CODER_UPDATE_CHECK: "false" # Disable automatic update checks
130148
database:
131149
image: registry.example.com/postgres:13
132150
# ...
@@ -144,5 +162,18 @@ coder:
144162
image:
145163
repo: "registry.example.com/coder"
146164
tag: "latest"
165+
env:
166+
# Disable telemetry
167+
- name: "CODER_TELEMETRY_ENABLE"
168+
value: "false"
169+
# Disable automatic update checks
170+
- name: "CODER_UPDATE_CHECK"
171+
value: "false"
172+
# Only use relayed connections
173+
- name: "CODER_DERP_SERVER_STUN_ADDRESSES"
174+
value: ""
175+
# You must set up an external PostgreSQL database
176+
- name: "CODER_PG_CONNECTION_URL"
177+
value: ""
147178
# ...
148179
```

docs/networking.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,24 @@ Direct connections are a straight line between the user and workspace, so there
5050
is no special geo-distribution configuration. To speed up direct connections,
5151
move the user and workspace closer together.
5252

53+
If a direct connection is not available (e.g. client or server is behind NAT), Coder
54+
will use a relayed connection. By default, [Coder uses Google's public STUN server](./cli/coder_server#--derp-server-stun-addresses), but
55+
this can be disabled or changed for [offline deployments](./install/offline.md).
56+
5357
### Relayed connections
5458

55-
Tailscale has graciously allowed us to use
56-
[their global DERP relays](https://tailscale.com/kb/1118/custom-derp-servers/#what-are-derp-servers).
59+
By default, your Coder server also runs a built-in DERP relay which can be used for both public and [offline deployments](./install/offline.md).
5760

58-
You can launch `coder server` with Tailscale's DERPs like so:
61+
However, Tailscale has graciously allowed us to use
62+
[their global DERP relays](https://tailscale.com/kb/1118/custom-derp-servers/#what-are-derp-servers). You can launch `coder server` with Tailscale's DERPs like so:
5963

6064
```bash
6165
$ coder server --derp-config-url https://controlplane.tailscale.com/derpmap/default
6266
```
6367

6468
#### Custom Relays
6569

66-
If you run Coder in air-gap mode or want lower latency than what Tailscale offers,
67-
you may run custom DERP servers. Refer to
68-
[Tailscale's documentation](https://tailscale.com/kb/1118/custom-derp-servers/#why-run-your-own-derp-server)
70+
If you want lower latency than what Tailscale offers or want additional DERP relays for offline deployments, you may run custom DERP servers. Refer to [Tailscale's documentation](https://tailscale.com/kb/1118/custom-derp-servers/#why-run-your-own-derp-server)
6971
to learn how to set them up.
7072

7173
After you have custom DERP servers, you can launch Coder with them like so:

0 commit comments

Comments
 (0)