@@ -3,9 +3,10 @@ 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
+ Docker
7
+
8
+ Coder is typically deployed to a remote datacenter but [ Docker] [ docker-url ] can
9
+ be used to create a lightweight preview deployment of Coder.
9
10
10
11
> Coder currently supports local preview only on workstations running macOS or
11
12
> Linux.
@@ -18,7 +19,8 @@ Before proceeding, please make sure that you have the following installed:
18
19
19
20
1 . [ Docker] ( https://hub.docker.com/search?q=docker&type=edition&offering=community )
20
21
1 . [ helm] ( https://helm.sh/docs/intro/install )
21
- 1 . [ kind] ( https://kind.sigs.k8s.io/docs/user/quick-start/#installation )
22
+ 1 . [ kind] ( https://kind.sigs.k8s.io/docs/user/quick-start/#installation ) or
23
+ [ Docker Desktop] ( docker-desktop-url )
22
24
1 . [ kubectl] ( https://kubernetes.io/docs/tasks/tools/install-kubectl )
23
25
24
26
## Limitations
@@ -31,7 +33,7 @@ deployment running entirely inside a Docker container.
31
33
32
34
### CVMs
33
35
34
- 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
35
37
requirements (if you choose not to try out CVMs, these requirements do not
36
38
apply):
37
39
@@ -62,11 +64,15 @@ workspace.
62
64
63
65
We are working on bringing Dev URL support to local previews in later releases.
64
66
67
+ ### SSH
68
+
69
+ SSH is not configured to run by default on kind deployments.
70
+
65
71
### Air-gapped clusters
66
72
67
73
The local preview option does not work in an air-gapped deployment.
68
74
69
- ## Installing Coder
75
+ ## Option 1) Kind
70
76
71
77
To install Coder, run:
72
78
@@ -97,6 +103,47 @@ Password: yfu...yu2
97
103
Visit the URL, and log in using the provided credentials. The platform is
98
104
automatically configured for you, so there's no first-time setup to do.
99
105
106
+ ## Option 2) Docker Desktop
107
+
108
+ [ Docker Desktop] ( docker-desktop-url ) includes a standalone Kubernetes server and
109
+ client, which can be used to run Coder.
110
+
111
+ > Note: While this option does support [ SSH access] ( ../../workspaces/ssh ) to
112
+ > workspaces, you must not have an existing SSH server running on port 22.
113
+
114
+ 1 . Follow [ Docker's docs] ( docker-k8s-docs ) to enable the Kubernetes cluster
115
+ 1 . Ensure Docker has enough resources allocated to meet
116
+ [ Coder's requirements] ( https://coder.com/docs/coder/v1.20/setup/requirements )
117
+ in Docker preferences
118
+
119
+ ![ Docker Desktop Resources] ( ../../assets/setup/docker-desktop-resources.png )
120
+
121
+ 1 . Install [ metrics-server] ( https://github.com/kubernetes-sigs/metrics-server )
122
+ for Coder to get valid metrics from your cluster
123
+
124
+ ``` console
125
+ helm repo add bitnami https://charts.bitnami.com/bitnami
126
+ ```
127
+
128
+ 1 . Proceed to our [ install docs] ( ../installation ) to install Coder on your
129
+ cluster
130
+
131
+ If you run into ` OutOfmemory ` errors when installing, try increasing your
132
+ resource allocation in Docker. If that fails install Coder with the following
133
+ 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
+
100
147
## Removing Coder
101
148
102
149
To remove the local Coder deployment, run:
@@ -109,6 +156,8 @@ Because Coder runs inside Docker, you should have nothing left on your machine
109
156
after tear down.
110
157
111
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/
112
161
[ kind-url ] : https://kind.sigs.k8s.io/
113
162
[ cvm-url ] : https://coder.com/docs/workspaces/cvms
114
163
[ docker-mac-url] :
0 commit comments