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

Commitb9edbcb

Browse files
committed
copy edit
1 parent5412a0c commitb9edbcb

File tree

1 file changed

+87
-101
lines changed

1 file changed

+87
-101
lines changed

‎docs/install/rancher.md

Lines changed: 87 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -9,163 +9,149 @@ You can deploy Coder on Rancher as a
99
- Helm 3.5+ installed
1010
- Workload Kubernetes cluster for Coder
1111

12-
##Install Coder with SUSE Rancher Manager
12+
##Overview
1313

14-
1. Create a namespace for theCodercontrol plane. In this tutorial, we call it`coder`:
14+
InstallingCoderon Rancher involves four key steps:
1515

16-
```shell
17-
kubectl create namespace coder
18-
```
16+
1. Create a namespace for Coder
17+
1. Set up PostgreSQL
18+
1. Create a database connection secret
19+
1. Install the Coder application via Rancher UI
1920

20-
1. Create aPostgreSQL instance:
21+
##Create anamespace
2122

22-
<divclass="tabs">
23+
Create a namespace for the Coder control plane. In this tutorial, we call it`coder`:
2324

24-
Coder does not manage a database server for you. This is required for storing
25-
data about your Coder deployment and resources.
25+
```shell
26+
kubectl create namespace coder
27+
```
2628

27-
###Managed PostgreSQL (recommended)
29+
##Set up PostgreSQL
2830

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.
31+
Coder requires a PostgreSQL database to store deployment data.
32+
We recommend that you use a managed PostgreSQL service, but you can use an in-cluster PostgreSQL service for non-production deployments:
3733

38-
###In-Cluster PostgreSQL (for proof of concepts)
34+
<divclass="tabs">
3935

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.
36+
###Managed PostgreSQL (Recommended)
4437

45-
Here's one example:
38+
For production deployments, we recommend using a managed PostgreSQL service:
4639

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-
```
40+
-[Google Cloud SQL](https://cloud.google.com/sql/docs/postgres/)
41+
-[AWS RDS for PostgreSQL](https://aws.amazon.com/rds/postgresql/)
42+
-[Azure Database for PostgreSQL](https://docs.microsoft.com/en-us/azure/postgresql/)
43+
-[DigitalOcean Managed PostgreSQL](https://www.digitalocean.com/products/managed-databases-postgresql)
5744

58-
The cluster-internal DB URL for the above database is:
45+
Ensure that your PostgreSQL service:
5946

60-
```shell
61-
postgres://coder:coder@coder-db-postgresql.coder.svc.cluster.local:5432/coder?sslmode=disable
62-
```
47+
- Is running and accessible from your cluster
48+
- Is in the same network/project as yourcluster
49+
- Has proper credentials and a database created for Coder
6350

64-
Optionally, you can use the
65-
[Postgres operator](https://github.com/zalando/postgres-operator) to manage
66-
PostgreSQL deployments on your Kubernetes cluster.
51+
###In-Cluster PostgreSQL (Development/PoC)
6752

68-
</div>
53+
For proof-of-concept deployments, you can use Bitnami Helm chart to install PostgreSQL in your Kubernetes cluster:
6954

70-
1. Create the PostgreSQL secret.
55+
```console
56+
helm repo add bitnami https://charts.bitnami.com/bitnami
57+
helm install coder-db bitnami/postgresql \
58+
--namespace coder \
59+
--set auth.username=coder \
60+
--set auth.password=coder \
61+
--set auth.database=coder \
62+
--set persistence.size=10Gi
63+
```
7164

72-
Create a secret with the PostgreSQL database URL string. In the case of the
73-
self-managed PostgreSQL, the address will be:
65+
After installation, the cluster-internal database URL will be:
7466

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-
```
67+
```text
68+
postgres://coder:coder@coder-db-postgresql.coder.svc.cluster.local:5432/coder?sslmode=disable
69+
```
70+
71+
For more advanced PostgreSQL management, consider using the
72+
[Postgres operator](https://github.com/zalando/postgres-operator).
73+
74+
</div>
75+
76+
##Create the database connection secret
7977

80-
1. Select the target workload K8s cluster for Coder in the Rancher Manager console and access the Kubectl shell.
78+
Create a Kubernetes secret with your PostgreSQL connection URL:
8179

82-
1. From the**Cluster Manager** console, go to**Apps** >**Charts**
80+
```shell
81+
kubectl create secret generic coder-db-url -n coder \
82+
--from-literal=url="postgres://coder:coder@coder-db-postgresql.coder.svc.cluster.local:5432/coder?sslmode=disable"
83+
```
8384

84-
1. Select**Partners** from the drop-down menu and search for`Coder`.
85+
>[!Important]
86+
>If you're using a managed PostgreSQL service, replace the connection URL with your specific database credentials.
8587
86-
1. Select**Coder**, then**Install**.
88+
##InstallCoder through the Rancher UI
8789

88-
1.Select thetarget namespace you created for Coder andselect**Customize Helm options before install**, then**Next**.
90+
1.In theRancher Manager console,selectyour target Kubernetes cluster for Coder.
8991

90-
1.Configure Values used by Helm that help define the Coder App.
92+
1.Navigate to**Apps** >**Charts**
9193

92-
Select**Edit YAML** andenter configuration settingsforyour deployment.
94+
1. From the dropdown menu, select**Partners** andsearchfor`Coder`
9395

94-
<details><summary>Expand for an example `values.yaml`</summary>
96+
1. Select**Coder**, then**Install**
9597

96-
<!-- from kubernetes.md-->
98+
1. Select the`coder` namespace you created earlier and check**Customize Helm options before install**.
99+
100+
Select**Next**
101+
102+
1. On the configuration screen, select**Edit YAML** and enter your Coder configuration settings:
103+
104+
<details>
105+
<summary>Example values.yaml configuration</summary>
97106

98107
```yaml
99108
coder:
100-
# You can specify any environment variables you'd like to pass to Coder
101-
# here. Coder consumes environment variables listed in
102-
# `coder server --help`, and these environment variables are also passed
103-
# to the workspace provisioner (so you can consume them in your Terraform
104-
# templates for auth keys etc.).
105-
#
106-
# Please keep in mind that you should not set `CODER_HTTP_ADDRESS`,
107-
# `CODER_TLS_ENABLE`, `CODER_TLS_CERT_FILE` or `CODER_TLS_KEY_FILE` as
108-
# they are already set by the Helm chart and will cause conflicts.
109+
# Environment variables for Coder
109110
env:
110111
-name:CODER_PG_CONNECTION_URL
111112
valueFrom:
112113
secretKeyRef:
113-
# You'll need to create a secret called coder-db-url with your
114-
# Postgres connection URL like:
115-
# postgres://coder:password@postgres:5432/coder?sslmode=disable
116114
name:coder-db-url
117115
key:url
118116

119-
# (Optional) For production deployments the access URL should be set.
120-
# If you're just trying Coder, access the dashboard via the service IP.
117+
# For production, uncomment and set your access URL
121118
# - name: CODER_ACCESS_URL
122119
# value: "https://coder.example.com"
123120

121+
# For TLS configuration (uncomment if needed)
124122
#tls:
125123
# secretNames:
126124
# - my-tls-secret-name
127125
```
128126

129-
>You can view our
130-
>[Helm README](https://github.com/coder/coder/blob/main/helm#readme) for
131-
>details on the values that are available, or you can view the
132-
>[values.yaml](https://github.com/coder/coder/blob/main/helm/coder/values.yaml)
133-
>file directly.
127+
For available configuration options, refer to the[Helm chart documentation](https://github.com/coder/coder/blob/main/helm#readme)
128+
or[values.yaml file](https://github.com/coder/coder/blob/main/helm/coder/values.yaml).
134129

135-
We support two release channels: mainline and stable - read the
136-
[Releases](./releases.md) page to learn more about which best suits your team.
137-
138-
-**Mainline** Coder release:
130+
</details>
139131

140-
<!-- autoversion(mainline): "--version [version]"-->
132+
1. Select a Coderversion:
141133

142-
```shell
143-
helm install coder coder-v2/coder \
144-
--namespace coder \
145-
--values values.yaml \
146-
--version 2.19.0
147-
```
134+
-**Mainline**:`2.20.x`
135+
-**Stable**:`2.19.x`
148136

149-
-**Stable** Coder release:
137+
Learn more about release channels in the[Releases documentation](./releases.md).
150138

151-
<!-- autoversion(stable):"--version [version]" -->
139+
1. Select**Next** when your configuration is complete.
152140

153-
```shell
154-
helm install coder coder-v2/coder \
155-
--namespace coder \
156-
--values values.yaml \
157-
--version 2.18.5
158-
```
141+
1. On the**Supply additional deployment options** screen:
159142

160-
</details>
143+
1. Accept the default settings
144+
1. Select**Install**
161145

162-
Select**Next** when you're done.
146+
1. A Helm install output shell will be displayed and indicates the installation status.
163147

164-
1. On the **Supply additional deployment options** screen, accept the default settings, then select **Install**.
148+
##Manage your Rancher Coder deployment
165149

166-
A Helm install output shell will be displayed and should indicate success when completed.
150+
To update or manage your Coder deployment later:
167151

168-
In the future, if you need to update a Coder deployment, select Coder from **Installed Apps** and use the options in the **⋮** menu.
152+
1. Navigate to**Apps** >**Installed Apps** in the Rancher UI.
153+
1. Find and select Coder.
154+
1. Use the options in the**** menu for upgrade, rollback, or other operations.
169155

170156
##Next steps
171157

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp