From de56cb9c37b709248f98c9058a32659b37740e67 Mon Sep 17 00:00:00 2001 From: Mike Terhar Date: Thu, 1 Jul 2021 10:44:10 -0400 Subject: [PATCH 1/8] Update infrastructure.md --- setup/air-gapped/infrastructure.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup/air-gapped/infrastructure.md b/setup/air-gapped/infrastructure.md index 9d4afa4ee..61da45233 100644 --- a/setup/air-gapped/infrastructure.md +++ b/setup/air-gapped/infrastructure.md @@ -127,11 +127,11 @@ certs: key: "registry.crt" ``` -Then, add the flag `-f registry-cert-values.yml` to the end of the secret -verification immediately above: +Then, add the flag `-f registry-cert-values.yml` to the end of the helm upgrade +command to include the new secrets file: ```console -kubectl -n coder get secret local-registry-cert -o yaml -f registry-cert-values.yml +helm upgrade -n coder coder . -f current-values.yaml -f registry-cert-values.yml ``` ### Resolving the registry using the cluster's DNS or hostAliases From 8b7a8ac2920edd1a004de7415b7cc9bd827e5cde Mon Sep 17 00:00:00 2001 From: Mike Terhar Date: Thu, 1 Jul 2021 10:51:53 -0400 Subject: [PATCH 2/8] use the same example from the parent page --- setup/air-gapped/infrastructure.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/setup/air-gapped/infrastructure.md b/setup/air-gapped/infrastructure.md index 61da45233..ade26b375 100644 --- a/setup/air-gapped/infrastructure.md +++ b/setup/air-gapped/infrastructure.md @@ -127,11 +127,17 @@ certs: key: "registry.crt" ``` -Then, add the flag `-f registry-cert-values.yml` to the end of the helm upgrade -command to include the new secrets file: +Then, add the flag `-f registry-cert-values.yml` to the end of the helm install +or upgrade command to include the new secrets file: ```console -helm upgrade -n coder coder . -f current-values.yaml -f registry-cert-values.yml +helm install --wait --atomic --debug --namespace coder coder . \ + --set cemanager.image=$REGISTRY_DOMAIN_NAME/coderenvs/coder-service: \ + --set envproxy.image=$REGISTRY_DOMAIN_NAME/coderenvs/coder-service: \ + --set envbox.image=$REGISTRY_DOMAIN_NAME/coderenvs/envbox: \ + --set timescale.image=$REGISTRY_DOMAIN_NAME/coderenvs/timescale: \ + --set dashboard.image=$REGISTRY_DOMAIN_NAME/coderenvs/dashboard: \ + -f registry-cert-values.yml ``` ### Resolving the registry using the cluster's DNS or hostAliases From 93f05137cc574f2897790836036c7a9d87ed11fa Mon Sep 17 00:00:00 2001 From: Katie Horne Date: Thu, 1 Jul 2021 10:09:25 -0500 Subject: [PATCH 3/8] Fix formatting --- setup/air-gapped/infrastructure.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/air-gapped/infrastructure.md b/setup/air-gapped/infrastructure.md index ade26b375..02224f3de 100644 --- a/setup/air-gapped/infrastructure.md +++ b/setup/air-gapped/infrastructure.md @@ -127,8 +127,8 @@ certs: key: "registry.crt" ``` -Then, add the flag `-f registry-cert-values.yml` to the end of the helm install -or upgrade command to include the new secrets file: +Then, add the flag `-f registry-cert-values.yml` to the end of the `helm install` +or `helm upgrade` command to include the new secrets file: ```console helm install --wait --atomic --debug --namespace coder coder . \ From 7aae0efcbbf11ff569ba0ccc23526e7a1f3ab334 Mon Sep 17 00:00:00 2001 From: Mike Terhar Date: Thu, 1 Jul 2021 11:10:26 -0400 Subject: [PATCH 4/8] bash is prettier than console for code blocks --- setup/air-gapped/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup/air-gapped/index.md b/setup/air-gapped/index.md index 07281e2c5..7fafa4706 100644 --- a/setup/air-gapped/index.md +++ b/setup/air-gapped/index.md @@ -58,7 +58,7 @@ platform images are hosted in Coder's Docker Hub repo. 1. Pull down the Coder helm charts by running the following in a non-air-gapped workspace: - ```console + ```bash helm repo add coder https://helm.coder.com helm pull coder/coder ``` @@ -90,7 +90,7 @@ platform images are hosted in Coder's Docker Hub repo. You can pull each of these images from their `coderenvs/:` registry location using the image's name and Coder version: - ```console + ```bash docker pull coderenvs/coder-service: ``` @@ -118,7 +118,7 @@ platform images are hosted in Coder's Docker Hub repo. your internal registry; this registry must be accessible from your air-gapped workspace. For example, to push `coder-service`: - ```console + ```bash docker tag coderenvs/coder-service: my-registry.com/coderenvs/coder-service: docker push my-registry.com/coderenvs/coder-service: ``` @@ -141,7 +141,7 @@ platform images are hosted in Coder's Docker Hub repo. 1. Once all of the resources are in your air-gapped network, run the following to deploy Coder to your Kubernetes cluster: - ```console + ```bash kubectl create namespace coder helm --namespace coder install coder /path/to/coder-X.Y.Z.tgz \ --set cemanager.image=my-registry.com/coderenvs/coder-service: \ From b4d3711920405cfdcb4b44b1e4fe410984b88310 Mon Sep 17 00:00:00 2001 From: Mike Terhar Date: Thu, 1 Jul 2021 11:11:36 -0400 Subject: [PATCH 5/8] bash is prettier than console part 2 --- setup/air-gapped/infrastructure.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup/air-gapped/infrastructure.md b/setup/air-gapped/infrastructure.md index 02224f3de..597660df0 100644 --- a/setup/air-gapped/infrastructure.md +++ b/setup/air-gapped/infrastructure.md @@ -69,7 +69,7 @@ container runtime, but here is a partial list to help you get started: If the cluster uses containerd, apply the following to patch in certificates for images in the local registry domain: -```console +```bash update-ca-certificates cat <> /etc/containerd/config.toml [plugins."io.containerd.grpc.v1.cri".registry.configs."$REGISTRY_DOMAIN_NAME".tls] @@ -99,7 +99,7 @@ To pass a self-signed certificate to Coder's images, you'll need to: To create a secret, run: -```console +```bash kubectl -n coder create secret generic local-registry-cert --from-file=/certs ``` @@ -113,7 +113,7 @@ becomes the secret **key**. To verify the new secret: -```console +```bash kubectl -n coder get secret local-registry-cert -o yaml ``` @@ -130,7 +130,7 @@ certs: Then, add the flag `-f registry-cert-values.yml` to the end of the `helm install` or `helm upgrade` command to include the new secrets file: -```console +```bash helm install --wait --atomic --debug --namespace coder coder . \ --set cemanager.image=$REGISTRY_DOMAIN_NAME/coderenvs/coder-service: \ --set envproxy.image=$REGISTRY_DOMAIN_NAME/coderenvs/coder-service: \ @@ -147,7 +147,7 @@ registry's static IP address. One way to do this without an external DNS server is to use the node's hosts file. For example, if the registry is on 10.0.0.2, then add this to the Node configuration script: -```console +```bash echo "10.0.0.2 $REGISTRY_DOMAIN_NAME" >> /etc/hosts ``` From fe54e9e07257304554c8a9788b530237d6259d2c Mon Sep 17 00:00:00 2001 From: Katie Horne Date: Thu, 1 Jul 2021 14:02:13 -0500 Subject: [PATCH 6/8] Revert "bash is prettier than console part 2" This reverts commit b4d3711920405cfdcb4b44b1e4fe410984b88310. --- setup/air-gapped/infrastructure.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup/air-gapped/infrastructure.md b/setup/air-gapped/infrastructure.md index 597660df0..02224f3de 100644 --- a/setup/air-gapped/infrastructure.md +++ b/setup/air-gapped/infrastructure.md @@ -69,7 +69,7 @@ container runtime, but here is a partial list to help you get started: If the cluster uses containerd, apply the following to patch in certificates for images in the local registry domain: -```bash +```console update-ca-certificates cat <> /etc/containerd/config.toml [plugins."io.containerd.grpc.v1.cri".registry.configs."$REGISTRY_DOMAIN_NAME".tls] @@ -99,7 +99,7 @@ To pass a self-signed certificate to Coder's images, you'll need to: To create a secret, run: -```bash +```console kubectl -n coder create secret generic local-registry-cert --from-file=/certs ``` @@ -113,7 +113,7 @@ becomes the secret **key**. To verify the new secret: -```bash +```console kubectl -n coder get secret local-registry-cert -o yaml ``` @@ -130,7 +130,7 @@ certs: Then, add the flag `-f registry-cert-values.yml` to the end of the `helm install` or `helm upgrade` command to include the new secrets file: -```bash +```console helm install --wait --atomic --debug --namespace coder coder . \ --set cemanager.image=$REGISTRY_DOMAIN_NAME/coderenvs/coder-service: \ --set envproxy.image=$REGISTRY_DOMAIN_NAME/coderenvs/coder-service: \ @@ -147,7 +147,7 @@ registry's static IP address. One way to do this without an external DNS server is to use the node's hosts file. For example, if the registry is on 10.0.0.2, then add this to the Node configuration script: -```bash +```console echo "10.0.0.2 $REGISTRY_DOMAIN_NAME" >> /etc/hosts ``` From 9010d91b586bb73523c0caeffd55d1a4859daad8 Mon Sep 17 00:00:00 2001 From: Katie Horne Date: Thu, 1 Jul 2021 14:02:27 -0500 Subject: [PATCH 7/8] Revert "bash is prettier than console for code blocks" This reverts commit 7aae0efcbbf11ff569ba0ccc23526e7a1f3ab334. --- setup/air-gapped/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup/air-gapped/index.md b/setup/air-gapped/index.md index 7fafa4706..07281e2c5 100644 --- a/setup/air-gapped/index.md +++ b/setup/air-gapped/index.md @@ -58,7 +58,7 @@ platform images are hosted in Coder's Docker Hub repo. 1. Pull down the Coder helm charts by running the following in a non-air-gapped workspace: - ```bash + ```console helm repo add coder https://helm.coder.com helm pull coder/coder ``` @@ -90,7 +90,7 @@ platform images are hosted in Coder's Docker Hub repo. You can pull each of these images from their `coderenvs/:` registry location using the image's name and Coder version: - ```bash + ```console docker pull coderenvs/coder-service: ``` @@ -118,7 +118,7 @@ platform images are hosted in Coder's Docker Hub repo. your internal registry; this registry must be accessible from your air-gapped workspace. For example, to push `coder-service`: - ```bash + ```console docker tag coderenvs/coder-service: my-registry.com/coderenvs/coder-service: docker push my-registry.com/coderenvs/coder-service: ``` @@ -141,7 +141,7 @@ platform images are hosted in Coder's Docker Hub repo. 1. Once all of the resources are in your air-gapped network, run the following to deploy Coder to your Kubernetes cluster: - ```bash + ```console kubectl create namespace coder helm --namespace coder install coder /path/to/coder-X.Y.Z.tgz \ --set cemanager.image=my-registry.com/coderenvs/coder-service: \ From beb950215e66f45b787c723a3bba0f6fc10b09f8 Mon Sep 17 00:00:00 2001 From: Katie Horne Date: Thu, 1 Jul 2021 14:03:19 -0500 Subject: [PATCH 8/8] Fix punctuation --- setup/air-gapped/index.md | 2 +- setup/air-gapped/infrastructure.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/air-gapped/index.md b/setup/air-gapped/index.md index 07281e2c5..030d1a65e 100644 --- a/setup/air-gapped/index.md +++ b/setup/air-gapped/index.md @@ -1,5 +1,5 @@ --- -title: Air-Gapped Deployment +title: Air-gapped deployment description: Learn how to set up an air-gapped Coder deployment. --- diff --git a/setup/air-gapped/infrastructure.md b/setup/air-gapped/infrastructure.md index 02224f3de..6078f3aca 100644 --- a/setup/air-gapped/infrastructure.md +++ b/setup/air-gapped/infrastructure.md @@ -1,5 +1,5 @@ --- -title: Network Setup +title: Network setup description: Learn how to set up a network for air-gapped Coder deployment. ---