Skip to content

Commit 677b211

Browse files
author
Mike Terhar
authored
chore: update air-gapped / offline installation instructions (coder#237)
1 parent faed71f commit 677b211

File tree

4 files changed

+352
-115
lines changed

4 files changed

+352
-115
lines changed

manifest.json

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -132,20 +132,13 @@
132132
}
133133
]
134134
},
135+
{ "path": "./setup/installation.md" },
136+
{ "path": "./setup/configuration.md" },
137+
{ "path": "./setup/licensing.md" },
138+
{ "path": "./setup/updating.md" },
135139
{
136-
"path": "./setup/installation.md"
137-
},
138-
{
139-
"path": "./setup/configuration.md"
140-
},
141-
{
142-
"path": "./setup/licensing.md"
143-
},
144-
{
145-
"path": "./setup/air-gapped.md"
146-
},
147-
{
148-
"path": "./setup/updating.md"
140+
"path": "./setup/air-gapped/index.md",
141+
"children": [{ "path": "./setup/air-gapped/infrastructure.md" }]
149142
}
150143
]
151144
},

setup/air-gapped.md

Lines changed: 0 additions & 102 deletions
This file was deleted.

setup/air-gapped/index.md

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
---
2+
title: Air-Gapped Deployment
3+
description: Learn how to set up an air-gapped Coder deployment.
4+
---
5+
6+
If you need increased security for your Coder deployments, you can set up an
7+
air-gapped deployment.
8+
9+
To do so, you must:
10+
11+
- Pull all Coder deployment resources into your air-gapped environment
12+
- Push the images to your Docker registry,
13+
- Deploy Coder from within your air-gapped environment
14+
15+
> Coder licenses issued as part of the trial program do not support air-gapped
16+
> deployments.
17+
18+
## Dependencies
19+
20+
Before proceeding, please ensure that you've installed the following software
21+
dependencies:
22+
23+
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)
24+
- [helm](https://helm.sh/docs/intro/install/)
25+
26+
Next, configure the following items in the same network as the Kubernetes
27+
cluster that will run Coder (we've provided links to a suggested option for each
28+
item type, but you're welcome to use the alternatives of your choice):
29+
30+
- [Docker Registry](https://hub.docker.com/_/registry)
31+
- A [DNS server](https://coredns.io) (or you can use
32+
[HostAliases](https://kubernetes.io/docs/concepts/services-networking/add-entries-to-pod-etc-hosts-with-host-aliases/))
33+
- A
34+
[certificate authority](https://github.com/activecm/docker-ca/blob/master/Dockerfile)
35+
or [self-signed certificates](#self-signed-certificate-for-the-registry)
36+
37+
## Network configuration
38+
39+
Coder requires several preliminary steps to be performed on your network before
40+
you can deploy Coder. If don't already have the following on your network,
41+
please see our [infrastructure setup guide](infrastructure.md):
42+
43+
- A certificate authority
44+
- A domain name service
45+
- A local Docker Registry
46+
47+
## Version controlling your changes to the Coder install files
48+
49+
Throughout this article, we will suggest changes to the Helm chart that you'll
50+
obtain from the `.tgz` that's returned when you run `helm pull`. We recommend
51+
version controlling your files.
52+
53+
## Step 1: Pull all Coder resources into your air-gapped environment
54+
55+
Coder is deployed through [helm](https://helm.sh/docs/intro/install/), and the
56+
platform images are hosted in Coder's Docker Hub repo.
57+
58+
1. Pull down the Coder helm charts by running the following in a non-air-gapped
59+
environment:
60+
61+
```console
62+
helm repo add coder https://helm.coder.com
63+
helm pull coder/coder
64+
```
65+
66+
These commands will add Coder's helm charts and pull the latest stable
67+
release into a tarball file whose name uses the following format:
68+
`coder-X.Y.Z.tgz` (X.Y.Z is the Coder release number).
69+
70+
1. Pull the images for the Coder platform from the following Docker Hub
71+
locations:
72+
73+
> Timescale is an internal database meant for evaluation deployments. It is
74+
> not It is not recommended to run this service in production. Connect to an
75+
> external Postgres database for production deployments.
76+
77+
[coder-service](https://hub.docker.com/r/coderenvs/coder-service)
78+
79+
[envbox](https://hub.docker.com/r/coderenvs/envbox)
80+
81+
[envbuilder](https://hub.docker.com/r/coderenvs/envbuilder)
82+
83+
[timescale](https://hub.docker.com/r/coderenvs/timescale) (**Note**: We
84+
recommend you only use timescale for evaluation purposes if you don't have an
85+
external PostgreSQL database available. For production environments, we
86+
strong recommend that you use an external PostgreSQL database; the
87+
installation section will cover more on updating your Helm chart with your
88+
database information.)
89+
90+
[dashboard](https://hub.docker.com/r/coderenvs/dashboard)
91+
92+
You can pull each of these images from their `coderenvs/<img-name>:<version>`
93+
registry location using the image's name and Coder version:
94+
95+
```console
96+
docker pull coderenvs/coder-service:<version>
97+
```
98+
99+
To access Coder, you'll need an ingress controller; you can use
100+
[nginx-ingress-controller](https://quay.io/kubernetes-ingress-controller/nginx-ingress-controller),
101+
or you can use your own.
102+
103+
The following images are optional, though you're welcome to take advantage of
104+
Coder's versions instead of building your own:
105+
106+
[OpenVSX](https://github.com/orgs/eclipse/packages/container/package/openvsx-server)
107+
108+
[enterprise-node](https://hub.docker.com/r/codercom/enterprise-node)
109+
110+
[enterprise-intellij](https://hub.docker.com/r/codercom/enterprise-intellij)
111+
112+
[ubuntu](https://hub.docker.com/_/ubuntu)
113+
114+
When building images for your environments that rely on a custom certificate
115+
authority, be sure to follow the
116+
[docs for adding certificates](../../images/ssl-certificates#adding-certificates-for-coder)
117+
to images.
118+
119+
1. Tag and push all of the images that you've downloaded in the previous step to
120+
your internal registry; this registry must be accessible from your air-gapped
121+
environment. For example, to push `coder-service`:
122+
123+
```console
124+
docker tag coderenvs/coder-service:<version> my-registry.com/coderenvs/coder-service:<version>
125+
docker push my-registry.com/coderenvs/coder-service:<version>
126+
```
127+
128+
1. Modify the image used for the ingress controller. In `coder-X.Y.Z.tgz`, which
129+
you obtained by running `helm pull`, find the `templates/ingress.yaml` file.
130+
You'll see that this file has only one instance of `image:`. Replace this
131+
line:
132+
133+
```yaml
134+
quay.io/kubernetes-ingress-controller/nginx-ingress-controller:<version>
135+
```
136+
137+
with the image for your local ingress controller image:
138+
139+
```yaml
140+
<your_registry>/nginx-ingress-controller:<version>
141+
```
142+
143+
1. Once all of the resources are in your air-gapped network, run the following
144+
to deploy Coder to your Kubernetes cluster:
145+
146+
```console
147+
kubectl create namespace coder
148+
helm --namespace coder install coder /path/to/coder-X.Y.Z.tgz \
149+
--set cemanager.image=my-registry.com/coderenvs/coder-service:<version> \
150+
--set envproxy.image=my-registry.com/coderenvs/coder-service:<version> \
151+
--set envbuilder.image=my-registry.com/coderenvs/envbuilder:<version> \
152+
--set timescale.image=my-registry.com/coderenvs/timescale:<version> \
153+
--set dashboard.image=my-registry.com/coderenvs/dashboard:<version> \
154+
--set envbox.image=my-registry.com/coderenvs/envbox:<version>
155+
```
156+
157+
If you'd like to run this command after navigating _into_ the `coder.tgz`
158+
directory, you can replace the `coder.tgz` path with a period:
159+
160+
```bash
161+
helm install --wait --atomic --debug --namespace coder coder . \
162+
--set cemanager.image=$REGISTRY_DOMAIN_NAME/coderenvs/coder-service:<version> \
163+
--set envproxy.image=$REGISTRY_DOMAIN_NAME/coderenvs/coder-service:<version> \
164+
--set envbox.image=$REGISTRY_DOMAIN_NAME/coderenvs/envbox:<version> \
165+
--set envbuilder.image=$REGISTRY_DOMAIN_NAME/coderenvs/envbuilder:<version> \
166+
--set timescale.image=$REGISTRY_DOMAIN_NAME/coderenvs/timescale:<version> \
167+
--set dashboard.image=$REGISTRY_DOMAIN_NAME/coderenvs/dashboard:<version> \
168+
-f registry-cert-values.yml
169+
```
170+
171+
1. Next, follow the [Installation](../installation.md) guide beginning with
172+
**step 6** to get the access URL and the temporary admin password, which
173+
allows you to proceed with setting up and configuring Coder.
174+
175+
## Extensions marketplace
176+
177+
Coder users in an air-gapped environment cannot access the public VS Code
178+
marketplace. However, you can point Coder to an air-gapped instance of
179+
[OpenVSX](https://github.com/eclipse/openvsx) to serve assets to users. For
180+
instructions on implementing this, see
181+
[Extensions](../../admin/environment-management/extensions.md).
182+
183+
You can also review the [OpenVSX deployment wiki] for more information.
184+
185+
[openvsx deployment wiki]:
186+
https://github.com/eclipse/openvsx/wiki/Deploying-Open-VSX

0 commit comments

Comments
 (0)