Skip to content

Commit fc323cd

Browse files
author
Katie Horne
authored
Revert "local preview: add instructions for dev urls (coder#483)" (coder#495)
This reverts commit bff0e40.
1 parent bff0e40 commit fc323cd

File tree

1 file changed

+12
-107
lines changed

1 file changed

+12
-107
lines changed

setup/kubernetes/local-preview.md

Lines changed: 12 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,15 @@ apply):
5454

5555
1. Docker Desktop for Mac **must** use version [2.5.0.1][docker-mac-url]. This
5656
specific version is required because of a recent downgrade to Linux Kernel
57-
4.9 due to a [bug][docker-bug-url].
57+
4.9 due to a [bug](docker-bug-url).
58+
59+
### Dev URLs
60+
61+
Currently, the local preview doesn't support [dev URLs][devurl-url]. Instead,
62+
you can use tools like [ngrok][ngrok-url] to preview webpages from inside an
63+
workspace.
64+
65+
We are working on bringing Dev URL support to local previews in later releases.
5866

5967
### SSH
6068

@@ -72,19 +80,19 @@ The local preview option does not work in an air-gapped deployment.
7280
To install Coder, run:
7381

7482
```console
75-
curl -fsSL https://coder.com/try.sh | PORT="80" sh -s --
83+
curl -fsSL https://coder.com/try.sh | PORT="8080" sh -s --
7684
```
7785

7886
> Note: you can edit the value of `PORT` to control where the Coder dashboard
79-
> will be available. However, dev URLs will only work when `PORT` is set to `80`.
87+
> will be available.
8088
8189
When the installation process completes, you'll see the URL and login
8290
credentials you need to access Coder:
8391

8492
```txt
8593
You can now access Coder at
8694
87-
http://localhost:80
95+
http://localhost:8080
8896
8997
You can tear down the deployment with
9098
@@ -98,90 +106,6 @@ Password: yfu...yu2
98106
Visit the URL, and log in using the provided credentials. The platform is
99107
automatically configured for you, so there's no first-time setup to do.
100108

101-
### Dev URLs
102-
103-
Coder allows you to access services you're developing in your workspace via [dev
104-
URLs](../../workspaces/devurls.md). You can enable dev URLs after you've
105-
installed Coder.
106-
107-
> If you do not want to enable dev URLs, you can use SSH port forwarding or
108-
> tools like [ngrok][ngrok-url] to preview webpages from inside you workspace.
109-
110-
1. To use dev URLs, you must have a wildcard subdomain. One option to meet this
111-
requirement is to use a service such as [nip.io][nip-url] to route domains to
112-
a local IP address.
113-
114-
1. [Update Coder](../updating.md#update-coder) with the following Helm values
115-
added for either your local (`127.0.0.1`) or private (e.g., `192.168.1.x`)
116-
address:
117-
118-
```yaml
119-
ingress:
120-
host: "127.0.0.1.nip.io"
121-
devurls:
122-
host: "*.127.0.0.1.nip.io"
123-
```
124-
125-
Alternatively, you can use [dnsmasq][dnsmasq-url] to create local domains (e.g.,
126-
`http://dashboard.coder` and `http://*.coder`). This may be useful if you do not
127-
want to rely on an external service/network or if your network has DNS rebinding
128-
protection. Here's how to do this:
129-
130-
1. Install dnsmasq
131-
132-
```console
133-
# Mac OS
134-
brew install dnsmasq
135-
136-
# Linux (Ubuntu)
137-
sudo apt-get install dnsmasq
138-
```
139-
140-
1. Create a dnsmasq configuration for the `.coder` domain
141-
142-
```console
143-
# Mac OS
144-
sudo touch $(brew --prefix)/etc/dnsmasq.d/coder.conf
145-
sudo vim $(brew --prefix)/etc/dnsmasq.d/coder.conf
146-
147-
# Linux (Ubuntu)
148-
sudo touch /etc/dnsmasq.d/coder.conf
149-
sudo vim /etc/dnsmasq.d/coder.conf
150-
```
151-
152-
```conf
153-
# coder.conf
154-
address=/coder/127.0.0.1
155-
```
156-
157-
1. Add dnsmasq as DNS resolver on your machine
158-
159-
```console
160-
# Mac OS: this will only route
161-
# .coder domains to dnsmasq
162-
sudo mkdir -p /etc/resolver
163-
sudo touch /etc/resolver/
164-
sudo vim /etc/resolver/coder
165-
166-
# Linux (Ubuntu)
167-
# add to top of the file
168-
sudo vim /etc/resolv.conf
169-
```
170-
171-
```text
172-
nameserver 127.0.0.1
173-
```
174-
175-
1. [Update Coder](../updating#update-coder) with these Helm values added to use
176-
your new domains:
177-
178-
```yaml
179-
ingress:
180-
host: "dashboard.coder"
181-
devurls:
182-
host: "*.coder"
183-
```
184-
185109
## Option 2: Docker Desktop
186110

187111
[Docker Desktop](docker-desktop-url) includes a standalone Kubernetes server and
@@ -231,25 +155,7 @@ curl -fsSL https://coder.com/try.sh | sh -s -- down
231155
Because Coder runs inside Docker, you should have nothing left on your machine
232156
after tear down.
233157

234-
If you added a custom DNS to use [dev URLs](#dev-urls), you can
235-
revert these changes by uninstalling dnsmasq and removing the resolver config:
236-
237-
```console
238-
# MacOS
239-
brew remove dnsmasq
240-
sudo rm -r /etc/resolver/coder
241-
242-
# Linux (Ubuntu)
243-
sudo apt-get remove dnsmasq
244-
sudo vim /etc/resolv.conf
245-
# remove "nameserver 127.0.0.1"
246-
# and ensure you have another
247-
# nameserver specified
248-
# e.g "nameserver 127.0.0.53"
249-
```
250-
251158
[docker-url]: https://www.docker.com/
252-
[dnsmasq-url]: https://linux.die.net/man/8/dnsmasq
253159
[docker-desktop-url]: https://www.docker.com/products/docker-desktop
254160
[docker-k8s-docs]: https://docs.docker.com/desktop/kubernetes/
255161
[kind-url]: https://kind.sigs.k8s.io/
@@ -261,4 +167,3 @@ sudo vim /etc/resolv.conf
261167
[docker-bug-url]: https://github.com/docker/for-mac/issues/5044
262168
[ngrok-url]: https://ngrok.com
263169
[devurl-url]: https://coder.com/docs/workspaces/devurls
264-
[nip-url]: https://nip.io

0 commit comments

Comments
 (0)