Skip to content

add: install formatting & proxy config #1012

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 36 additions & 23 deletions setup/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,15 @@ resources from
> Both the Big Bang and Ironbank repositories are one release behind the latest
> version of Coder.

## Create the Coder namespace (optional)
## Install Coder

We recommend running Coder in a separate
[namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/);
to do so, run
1. Create the Coder [namespace](https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/):

```console
kubectl create namespace coder
```

Next, change the kubectl context to point to your newly created namespace:

```console
kubectl config set-context --current --namespace=coder
```

## Install Coder

1. Add the Coder Helm repo
1. Add the Coder Helm repo:

```console
helm repo add coder https://helm.coder.com
Expand All @@ -59,7 +49,7 @@ kubectl config set-context --current --namespace=coder

> This step will install Coder with the default configuration. This does not
> set up dev URLs, TLS, ingress controllers, or an external database. To
> configure these recommended features, please go to step 4.
> configure these recommended features, please see the following sections.

```console
helm install coder coder/coder --namespace coder --version=<VERSION>
Expand Down Expand Up @@ -91,13 +81,15 @@ kubectl config set-context --current --namespace=coder
1. Create a `values.yaml` file to configure Coder:

```console
helm show values coder/coder --version=<VERSION> > values.yaml
helm show values coder/coder --namespace coder --version=<VERSION> > values.yaml
```

> View the
> [configuration options available in the `values.yaml` file.](https://github.com/coder/enterprise-helm#values)

1. **Optional**: change the admin user password by updating `values.yaml` as
## Set the super admin password

**Optional**: change the admin user password by updating `values.yaml` as
follows:

```yaml
Expand All @@ -115,7 +107,9 @@ kubectl config set-context --current --namespace=coder
key: "password"
```

1. **Optional**: To configure an externally hosted database, set the following
## Connect an external database

**Optional**: To configure an externally hosted database, set the following
in `values.yaml`:

> Ensure that you have superuser privileges to your PostgreSQL database.
Expand Down Expand Up @@ -151,15 +145,19 @@ kubectl config set-context --current --namespace=coder
For more detailed configuration instructions,
[see our PostgreSQL setup guide](../guides/deployments/postgres.md).

1. **Optional**: Enable dev URL usage.
## Enable dev URLs

**Optional**: Enable dev URL usage.
[You must provide a wildcard domain in the Helm chart](../admin/devurls.md).

```yaml
coderd:
devurlsHost: "*.my-custom-domain.io"
```

1. **Optional:** To set up TLS:
## Enable TLS

**Optional:** To set up TLS:

a. You will need to create a TLS secret. To do so, run the following with the
`.pem` files provided by your certificate:
Expand All @@ -180,7 +178,9 @@ kubectl config set-context --current --namespace=coder
devurlsHostSecretName: <tls-secret>
```

1. **Optional:** If you cannot use a load balancer, you may need an ingress
## Set up an ingress controller

**Optional:** If you cannot use a load balancer, you may need an ingress
controller. To configure one with Coder, set the following in `values.yaml`:

> We assume that you already have an ingress controller installed in your
Expand All @@ -206,11 +206,24 @@ kubectl config set-context --current --namespace=coder
annotations: {}
```

1. Once you've implemented all of the changes in `values.yaml`, install Coder
with the following command:
## Configure a proxy

**Optional:** To have Coder initiate outbound connections via a proxy, set
the following (applicable) values:

```yaml
coderd:
proxy:
http: ""
https: ""
exempt: "cluster.local"
```

Once you've implemented all of the changes in `values.yaml`, upgrade Coder
with the following command:

```console
helm install coder coder/coder --namespace coder --version=<VERSION> -f values.yaml
helm upgrade coder coder/coder --namespace coder --version=<VERSION> -f values.yaml
```

## Logging
Expand Down
6 changes: 6 additions & 0 deletions setup/upgrade/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,9 @@ resources from
```console
helm upgrade coder coder/coder -n coder --version=<VERSION> --values current-values.yaml
```

## Downgrading

When attempting to troubleshoot Coder, you may want to roll back to an older
version of Coder. Doing so requires you to make and use a database snapshot
since the database schema will be out of date.