Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit87280cf

Browse files
committed
update from gdoc
1 parentfae0a0c commit87280cf

File tree

1 file changed

+89
-114
lines changed

1 file changed

+89
-114
lines changed

‎docs/install/rancher.md

Lines changed: 89 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -5,120 +5,95 @@ You can deploy Coder on Rancher using a
55

66
##Requirements
77

8-
-[Rancher](https://ranchermanager.docs.rancher.com/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster)
9-
- alternative link:[Deploy Rancher Manager](https://ranchermanager.docs.rancher.com/getting-started/quick-start-guides/deploy-rancher-manager)
10-
- other requirements
11-
12-
##Configure Rancher
13-
14-
The first thing to do
15-
16-
##Install Coder with Helm
17-
18-
```shell
19-
helm repo add coder-v2 https://helm.coder.com/v2
20-
```
21-
22-
Create a`values.yaml` with the configuration settings you'd like for your
23-
deployment. For example:
24-
25-
```yaml
26-
coder:
27-
# You can specify any environment variables you'd like to pass to Coder
28-
# here. Coder consumes environment variables listed in
29-
# `coder server --help`, and these environment variables are also passed
30-
# to the workspace provisioner (so you can consume them in your Terraform
31-
# templates for auth keys etc.).
32-
#
33-
# Please keep in mind that you should not set `CODER_HTTP_ADDRESS`,
34-
# `CODER_TLS_ENABLE`, `CODER_TLS_CERT_FILE` or `CODER_TLS_KEY_FILE` as
35-
# they are already set by the Helm chart and will cause conflicts.
36-
env:
37-
-name:CODER_PG_CONNECTION_URL
38-
valueFrom:
39-
secretKeyRef:
40-
# You'll need to create a secret called coder-db-url with your
41-
# Postgres connection URL like:
42-
# postgres://coder:password@postgres:5432/coder?sslmode=disable
43-
name:coder-db-url
44-
key:url
45-
46-
# (Optional) For production deployments the access URL should be set.
47-
# If you're just trying Coder, access the dashboard via the service IP.
48-
# - name: CODER_ACCESS_URL
49-
# value: "https://coder.example.com"
50-
51-
#tls:
52-
# secretNames:
53-
# - my-tls-secret-name
54-
```
55-
56-
>You can view our
57-
>[Helm README](https://github.com/coder/coder/blob/main/helm#readme) for
58-
>details on the values that are available, or you can view the
59-
>[values.yaml](https://github.com/coder/coder/blob/main/helm/coder/values.yaml)
60-
>file directly.
61-
62-
We support two release channels: mainline and stable - read the
63-
[Releases](./releases.md) page to learn more about which best suits your team.
64-
65-
-**Mainline** Coder release:
66-
67-
<!-- autoversion(mainline): "--version [version]"-->
68-
69-
```shell
70-
helm install coder coder-v2/coder \
71-
--namespace coder \
72-
--values values.yaml \
73-
--version 2.19.0
74-
```
75-
76-
-**Stable** Coder release:
77-
78-
<!-- autoversion(stable): "--version [version]"-->
79-
80-
```shell
81-
helm install coder coder-v2/coder \
82-
--namespace coder \
83-
--values values.yaml \
84-
--version 2.18.5
85-
```
86-
87-
You can watch Coder start up by running`kubectl get pods -n coder`. Once Coder
88-
has started, the`coder-*` pods should enter the`Running` state.
89-
90-
##Log in to Coder
91-
92-
Use`kubectl get svc -n coder` to get the IP address of the LoadBalancer. Visit
93-
this in the browser to set up your first account.
94-
95-
If you do not have a domain, you should set`CODER_ACCESS_URL` to this URL in
96-
the Helm chart and upgrade Coder (see below). This allows workspaces to connect
97-
to the proper Coder URL.
98-
99-
##Upgrading Coder in Rancher
100-
101-
To upgrade Coder in the future or change values, you can run the following
102-
command:
103-
104-
```shell
105-
helm repo update
106-
helm upgrade coder coder-v2/coder \
107-
--namespace coder \
108-
-f values.yaml
109-
```
110-
111-
##Coder Observability Chart
112-
113-
Use the[Observability Helm chart](https://github.com/coder/observability) for a
114-
pre-built set of dashboards to monitor your control plane over time. It includes
115-
Grafana, Prometheus, Loki, and Alert Manager out-of-the-box, and can be deployed
116-
on your existing Grafana instance.
117-
118-
We recommend that all administrators deploying on Kubernetes set the
119-
observability bundle up with the control plane from the start. For installation
120-
instructions, visit the
121-
[observability repository](https://github.com/coder/observability?tab=readme-ov-file#installation).
8+
-[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+)
9+
- Helm 3.5+ installed
10+
- Workload Kubernetes cluster for Coder
11+
12+
##Install Coder with SUSE Rancher Manager
13+
14+
1. Create a namespace for the Coder control plane. In this tutorial, we call it`coder`:
15+
16+
```shell
17+
kubectl create namespace coder
18+
```
19+
20+
1. Create a PostgreSQL instance:
21+
22+
<divclass="tabs">
23+
24+
Coder does not manage a database server for you. This is required for storing
25+
data about your Coder deployment and resources.
26+
27+
###Managed PostgreSQL (recommended)
28+
29+
If you're in a public cloud such as
30+
[Google Cloud](https://cloud.google.com/sql/docs/postgres/),
31+
[AWS](https://aws.amazon.com/rds/postgresql/),
32+
[Azure](https://docs.microsoft.com/en-us/azure/postgresql/), or
33+
[DigitalOcean](https://www.digitalocean.com/products/managed-databases-postgresql),
34+
you can use the managed PostgreSQL offerings they provide. Make sure that the
35+
PostgreSQL service is running and accessible from your cluster. It should be in
36+
the same network, same project, etc.
37+
38+
###In-Cluster PostgreSQL (for proof of concepts)
39+
40+
You can install Postgres manually on your cluster using the
41+
[Bitnami PostgreSQL Helm chart](https://github.com/bitnami/charts/tree/master/bitnami/postgresql#readme).
42+
There are some[helpful guides](https://phoenixnap.com/kb/postgresql-kubernetes)
43+
on the internet that explain sensible configurations for this chart.
44+
45+
Here's one example:
46+
47+
```console
48+
# Install PostgreSQL
49+
helm repo add bitnami https://charts.bitnami.com/bitnami
50+
helm install coder-db bitnami/postgresql \
51+
--namespace coder \
52+
--set auth.username=coder \
53+
--set auth.password=coder \
54+
--set auth.database=coder \
55+
--set persistence.size=10Gi
56+
```
57+
58+
The cluster-internal DB URL for the above database is:
59+
60+
```shell
61+
postgres://coder:coder@coder-db-postgresql.coder.svc.cluster.local:5432/coder?sslmode=disable
62+
```
63+
64+
You can optionally use the
65+
[Postgres operator](https://github.com/zalando/postgres-operator) to manage
66+
PostgreSQL deployments on your Kubernetes cluster.
67+
68+
</div>
69+
70+
1. Create the PostgreSQL secret.
71+
72+
Create a secret with the PostgreSQL database URL string. In the case of the
73+
self-managed PostgreSQL, the address will be:
74+
75+
```shell
76+
kubectl create secret generic coder-db-url -n coder \
77+
--from-literal=url="postgres://coder:coder@coder-db-postgresql.coder.svc.cluster.local:5432/coder?sslmode=disable"
78+
```
79+
80+
1. Select the target workload K8s cluster for Coder in the Rancher Manager console and access the Kubectl shell.
81+
82+
1. From the Cluster Manager console, go to**Apps** >**Charts** and select**Partners**.
83+
84+
1. From the Chart providers, search for Coder.
85+
86+
1. Select**Coder**, then**Install**.
87+
88+
1. Select the target namespace you created for Coder and select**Customize Helm options before install**, then**Next**.
89+
90+
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.
91+
92+
1. Accept the defaults on the last pane and select Install.
93+
94+
A Helm install output shell will be displayed and should indicate success when completed.
95+
96+
1. To update a Coder deployment, select Coder from the Installed Apps and update as desired.
12297

12398
##Next steps
12499

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp