@@ -3,9 +3,8 @@ title: "Local preview"
3
3
description : Set up a Coder deployment locally for testing.
4
4
---
5
5
6
- Coder is typically deployed onto Kubernetes cluster, but if you would like to
7
- set up a lightweight preview deployment, you can do so locally using using
8
- [ Docker] [ docker-url ] and [ kind] [ kind-url ] .
6
+ Coder is typically deployed to a remote data center, but you can use
7
+ [ Docker] [ docker-url ] to create a lightweight preview deployment of Coder.
9
8
10
9
> Coder currently supports local preview only on workstations running macOS or
11
10
> Linux.
@@ -18,7 +17,8 @@ Before proceeding, please make sure that you have the following installed:
18
17
19
18
1 . [ Docker] ( https://hub.docker.com/search?q=docker&type=edition&offering=community )
20
19
1 . [ helm] ( https://helm.sh/docs/intro/install )
21
- 1 . [ kind] ( https://kind.sigs.k8s.io/docs/user/quick-start/#installation )
20
+ 1 . [ kind] ( https://kind.sigs.k8s.io/docs/user/quick-start/#installation ) or
21
+ [ Docker Desktop] ( docker-desktop-url )
22
22
1 . [ kubectl] ( https://kubernetes.io/docs/tasks/tools/install-kubectl )
23
23
24
24
## Limitations
@@ -33,7 +33,7 @@ deployment running entirely inside a Docker container.
33
33
34
34
### CVMs
35
35
36
- The local preview supports [ CVMs] [ cvm-url ] if you meet the following
36
+ The kind deployment supports [ CVMs] [ cvm-url ] if you meet the following
37
37
requirements (if you choose not to try out CVMs, these requirements do not
38
38
apply):
39
39
@@ -64,11 +64,18 @@ workspace.
64
64
65
65
We are working on bringing Dev URL support to local previews in later releases.
66
66
67
+ ### SSH
68
+
69
+ When using kind for your local preview, SSH is not configured to run by default.
70
+
71
+ When using Docker Desktop for your local preview, SSH works as long as your
72
+ machine does not have an existing SSH server running on port ` 22 ` .
73
+
67
74
### Air-gapped clusters
68
75
69
76
The local preview option does not work in an air-gapped deployment.
70
77
71
- ## Installing Coder
78
+ ## Option 1: Kind
72
79
73
80
To install Coder, run:
74
81
@@ -99,6 +106,44 @@ Password: yfu...yu2
99
106
Visit the URL, and log in using the provided credentials. The platform is
100
107
automatically configured for you, so there's no first-time setup to do.
101
108
109
+ ## Option 2: Docker Desktop
110
+
111
+ [ Docker Desktop] ( docker-desktop-url ) includes a standalone Kubernetes server and
112
+ client that you can use to run Coder.
113
+
114
+ 1 . [ Enable the Kubernetes cluster] ( docker-k8s-docs ) inside Docker.
115
+
116
+ 1 . Ensure that Docker has enough resources allocated to meet
117
+ [ Coder's requirements] ( https://coder.com/docs/coder/v1.20/setup/requirements )
118
+ (you can do so by going to Docker preferences).
119
+
120
+ ![ Docker Desktop Resources] ( ../../assets/setup/docker-desktop-resources.png )
121
+
122
+ 1 . Install [ metrics-server] ( https://github.com/kubernetes-sigs/metrics-server )
123
+ so that Coder gets valid metrics from your cluster:
124
+
125
+ ``` console
126
+ helm repo add bitnami https://charts.bitnami.com/bitnami
127
+ ```
128
+
129
+ 1 . [ Install Coder] ( ../installation ) on to your cluster.
130
+
131
+ If you run into ` OutOfmemory ` errors when installing, try increasing your
132
+ resource allocation in Docker. If increasing the resource allocation doesn't fix
133
+ the error, reinstall Coder using the following Helm values:
134
+
135
+ ``` console
136
+ helm upgrade --install coder \
137
+ --set ingress.useDefault=false \
138
+ --set cemanager.resources.requests.cpu="0m" \
139
+ --set cemanager.resources.requests.memory="0Mi" \
140
+ --set envproxy.resources.requests.cpu="0m" \
141
+ --set envproxy.resources.requests.memory="0Mi" \
142
+ --set timescale.resources.requests.cpu="0m" \
143
+ --set timescale.resources.requests.memory="0Mi" \
144
+ coder/coder
145
+ ```
146
+
102
147
## Removing Coder
103
148
104
149
To remove the local Coder deployment, run:
@@ -111,6 +156,8 @@ Because Coder runs inside Docker, you should have nothing left on your machine
111
156
after tear down.
112
157
113
158
[ docker-url ] : https://www.docker.com/
159
+ [ docker-desktop-url ] : https://www.docker.com/products/docker-desktop
160
+ [ docker-k8s-docs ] : https://docs.docker.com/desktop/kubernetes/
114
161
[ kind-url ] : https://kind.sigs.k8s.io/
115
162
[ cvm-url ] : https://coder.com/docs/workspaces/cvms
116
163
[ docker-mac-url] :
0 commit comments