-
Notifications
You must be signed in to change notification settings - Fork 929
docs: add new doc on how to deploy Coder on Rancher #16534
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
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
f41b95d
init rancher doc
EdwardAngert 0262af7
Merge remote-tracking branch 'origin/main' into deploy-on-rancher
EdwardAngert fae0a0c
version numbers
EdwardAngert 87280cf
update from gdoc
EdwardAngert 735e221
Apply suggestions from code review
EdwardAngert 5412a0c
values.yaml step and small edits
EdwardAngert b9edbcb
copy edit
EdwardAngert 26ca647
Merge remote-tracking branch 'origin/main' into deploy-on-rancher
EdwardAngert e16a879
update icon
EdwardAngert 2e8c09b
add rancher screenshot
EdwardAngert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# Deploy Coder on Rancher | ||
|
||
You can deploy Coder on Rancher as a | ||
[Workload](https://ranchermanager.docs.rancher.com/getting-started/quick-start-guides/deploy-workloads/workload-ingress). | ||
|
||
## Requirements | ||
|
||
- [SUSE Rancher Manager](https://ranchermanager.docs.rancher.com/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster) running Kubernetes (K8s) 1.19+ with [SUSE Rancher Prime distribution](https://documentation.suse.com/cloudnative/rancher-manager/latest/en/integrations/kubernetes-distributions.html) (Rancher Manager 2.10+) | ||
- Helm 3.5+ installed | ||
- Workload Kubernetes cluster for Coder | ||
|
||
## Install Coder with SUSE Rancher Manager | ||
|
||
1. Create a namespace for the Coder control plane. In this tutorial, we call it `coder`: | ||
|
||
```shell | ||
kubectl create namespace coder | ||
``` | ||
|
||
1. Create a PostgreSQL instance: | ||
|
||
<div class="tabs"> | ||
|
||
Coder does not manage a database server for you. This is required for storing | ||
data about your Coder deployment and resources. | ||
|
||
### Managed PostgreSQL (recommended) | ||
|
||
If you're in a public cloud such as | ||
[Google Cloud](https://cloud.google.com/sql/docs/postgres/), | ||
[AWS](https://aws.amazon.com/rds/postgresql/), | ||
[Azure](https://docs.microsoft.com/en-us/azure/postgresql/), or | ||
[DigitalOcean](https://www.digitalocean.com/products/managed-databases-postgresql), | ||
you can use the managed PostgreSQL offerings they provide. Make sure that the | ||
PostgreSQL service is running and accessible from your cluster. It should be in | ||
the same network, same project, etc. | ||
|
||
### In-Cluster PostgreSQL (for proof of concepts) | ||
|
||
You can install Postgres manually on your cluster using the | ||
[Bitnami PostgreSQL Helm chart](https://github.com/bitnami/charts/tree/master/bitnami/postgresql#readme). | ||
There are some [helpful guides](https://phoenixnap.com/kb/postgresql-kubernetes) | ||
on the internet that explain sensible configurations for this chart. | ||
|
||
Here's one example: | ||
|
||
```console | ||
# Install PostgreSQL | ||
helm repo add bitnami https://charts.bitnami.com/bitnami | ||
helm install coder-db bitnami/postgresql \ | ||
--namespace coder \ | ||
--set auth.username=coder \ | ||
--set auth.password=coder \ | ||
--set auth.database=coder \ | ||
--set persistence.size=10Gi | ||
``` | ||
|
||
The cluster-internal DB URL for the above database is: | ||
|
||
```shell | ||
postgres://coder:coder@coder-db-postgresql.coder.svc.cluster.local:5432/coder?sslmode=disable | ||
``` | ||
|
||
You can optionally use the | ||
[Postgres operator](https://github.com/zalando/postgres-operator) to manage | ||
PostgreSQL deployments on your Kubernetes cluster. | ||
|
||
</div> | ||
|
||
1. Create the PostgreSQL secret. | ||
|
||
Create a secret with the PostgreSQL database URL string. In the case of the | ||
self-managed PostgreSQL, the address will be: | ||
|
||
```shell | ||
kubectl create secret generic coder-db-url -n coder \ | ||
--from-literal=url="postgres://coder:coder@coder-db-postgresql.coder.svc.cluster.local:5432/coder?sslmode=disable" | ||
``` | ||
|
||
1. Select the target workload K8s cluster for Coder in the Rancher Manager console and access the Kubectl shell. | ||
|
||
1. From the Cluster Manager console, go to **Apps** > **Charts** and select **Partners**. | ||
|
||
1. From the Chart providers, search for Coder. | ||
|
||
1. Select **Coder**, then **Install**. | ||
|
||
1. Select the target namespace you created for Coder and select **Customize Helm options before install**, then **Next**. | ||
|
||
1. Configure Values used by Helm that help define the Coder App. Review step 4 from the standard Kubernetes installation for suggested values, then Next. | ||
|
||
1. Accept the defaults on the last pane and select Install. | ||
|
||
A Helm install output shell will be displayed and should indicate success when completed. | ||
|
||
1. To update a Coder deployment, select Coder from the Installed Apps and update as desired. | ||
|
||
## Next steps | ||
|
||
- [Create your first template](../tutorials/template-from-scratch.md) | ||
- [Control plane configuration](../admin/setup/index.md) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.