Skip to content

Commit ead59f1

Browse files
committed
local preview: add docker desktop instructions
1 parent fc26906 commit ead59f1

File tree

2 files changed

+55
-6
lines changed

2 files changed

+55
-6
lines changed
162 KB
Loading

setup/kubernetes/local-preview.md

+55-6
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ title: "Local preview"
33
description: Set up a Coder deployment locally for testing.
44
---
55

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.
910

1011
> Coder currently supports local preview only on workstations running macOS or
1112
> Linux.
@@ -18,7 +19,8 @@ Before proceeding, please make sure that you have the following installed:
1819

1920
1. [Docker](https://hub.docker.com/search?q=docker&type=edition&offering=community)
2021
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)
2224
1. [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl)
2325

2426
## Limitations
@@ -31,7 +33,7 @@ deployment running entirely inside a Docker container.
3133

3234
### CVMs
3335

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
3537
requirements (if you choose not to try out CVMs, these requirements do not
3638
apply):
3739

@@ -62,11 +64,15 @@ workspace.
6264

6365
We are working on bringing Dev URL support to local previews in later releases.
6466

67+
### SSH
68+
69+
SSH is not configured to run by default on kind deployments.
70+
6571
### Air-gapped clusters
6672

6773
The local preview option does not work in an air-gapped deployment.
6874

69-
## Installing Coder
75+
## Option 1) Kind
7076

7177
To install Coder, run:
7278

@@ -97,6 +103,47 @@ Password: yfu...yu2
97103
Visit the URL, and log in using the provided credentials. The platform is
98104
automatically configured for you, so there's no first-time setup to do.
99105

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+
100147
## Removing Coder
101148

102149
To remove the local Coder deployment, run:
@@ -109,6 +156,8 @@ Because Coder runs inside Docker, you should have nothing left on your machine
109156
after tear down.
110157

111158
[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/
112161
[kind-url]: https://kind.sigs.k8s.io/
113162
[cvm-url]: https://coder.com/docs/workspaces/cvms
114163
[docker-mac-url]:

0 commit comments

Comments
 (0)