-
Notifications
You must be signed in to change notification settings - Fork 20
/
work-offline.html.md.erb
75 lines (56 loc) · 4.86 KB
/
work-offline.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
breadcrumb: PCF Dev Documentation
title: Using PCF Dev Offline
owner: PCF Dev
---
<p class="note"><strong>Note</strong>: This functionality is not supported in the current version of PCF Dev. Use PCF Dev v0.30 for PCF v1.11 or earlier for this functionality.</p>
This topic describes how to use PCF Dev offline. By default, PCF Dev functions largely without a network connection. To use PCF Dev with no network connection, complete the following steps specific to your operating system.
## <a id="mac-os-x"></a>Using PCF Dev Offline with Mac OS X
For OS X, Pivotal recommends using [Dnsmasq](http://www.thekelleys.org.uk/dnsmasq/doc.html) as your DNS forwarder. Perform the following steps to install and configure Dnsmasq.
1. Check that you have Homebrew installed by running `brew -v` in your terminal. If you do not, follow [these instructions](http://brew.sh/) to install Homebrew.
1. Run the following commands to update Homebrew and install Dnsmasq:
<pre class="terminal">
$ brew update
$ brew install dnsmasq
</pre>
1. To have `launchd` start Dnsmasq and restart at startup, run the following command:
<pre class="terminal">
sudo brew services start dnsmasq
</pre>
1. Configure Dnsmasq by editing the default configuration file placed at `/usr/local/etc/dnsmasq.conf` to redirect the domain name `local.pcfdev.io` to the IP `192.168.11.11` without requiring a network connection to resolve the DNS. To perform this redirection, add the line `address=/.local.pcfdev.io/192.168.11.11` to the `dnsmasq.conf` file:
<pre class="terminal">
$ echo "address=/.local.pcfdev.io/192.168.11.11" >> /usr/local/etc/dnsmasq.conf
</pre>
<p class="note"><strong>Note</strong>: If the subnet containing <code>192.168.11.11</code> is already in use, PCF Dev picks the next available IP address that adheres to the pattern <code>192.168.xx.11</code>, and a corresponding system domain. For example, <code>192.168.44.11</code> and <code>local4.pcfdev.io</code>. If your PCF Dev reports that it is using an alternate configuration when it comes up, use the appropriate combination in your <code>dnsmasq.conf</code> file.</p>
1. Restart Dnsmasq to ensure it recognizes your change.
<pre class="terminal">
$ sudo launchctl stop homebrew.mxcl.dnsmasq
$ sudo launchctl start homebrew.mxcl.dnsmasq
</pre>
1. To configure your system to use Dnsmasq, go to your network preferences and add `127.0.0.1` as your first DNS server.
## <a id="windows"></a>Using PCF Dev Offline with Windows
For Windows, Pivotal recommends using Acrylic as your DNS proxy. Perform the following steps to install and configure Acrylic:
1. Download Acrylic from [their site](http://mayakron.altervista.org/) and follow the wizard to install it on your system.
1. Navigate to **Start** > **Programs** > **Acrylic DNS Proxy** > **Config** > **Edit Acrylic Hosts File**.
1. Add the following text to the end of the file:
```
192.168.11.11 *.local.pcfdev.io
```
1. The Acrylic site has detailed instructions to configure your computer to use Acrylic as a DNS server for [Windows 7](http://mayakron.altervista.org/wikibase/show.php?id=AcrylicWindows7Configuration), [Windows 8](http://mayakron.altervista.org/wikibase/show.php?id=AcrylicWindows8Configuration), and [Windows 10](http://mayakron.altervista.org/wikibase/show.php?id=AcrylicWindows10Configuration).
1. You may need to restart your DNS cache by navigating to **Start** > **Programs** > **Acrylic DNS Proxy** > **Config** > **Restart Acrylic Service**.
## <a id="linux"></a>Using PCF Dev Offline with Linux
### Option 1: Ubuntu 14.04+
1. Configure Dnsmasq by editing the `dnsmasq.conf` file to redirect the domain name `local.pcfdev.io` to the IP `192.168.11.11` without requiring a network connection to resolve the DNS.
<br><br>To perform this redirection, add the line `address=/.local.pcfdev.io/192.168.11.11` to `/etc/NetworkManager/dnsmasq.d/pcfdev`:
<pre class="terminal">
$ echo "address=/.local.pcfdev.io/192.168.11.11" > /etc/NetworkManager/dnsmasq.d/pcfdev
</pre>
1. Reload the service. For Ubuntu v14.04+, run `service network-manager restart`. For Ubuntu v15.04+, run `systemctl restart NetworkManager.service`
### Option 2: Other Linux Distribution
1. Configure Dnsmasq by editing the `dnsmasq.conf` file to redirect the domain name `local.pcfdev.io` to the IP `192.168.11.11` without requiring a network connection to resolve the DNS.
1. Install Dnsmasq using your distribution's package manager.
1. Configure Dnsmasq by editing the `dnsmasq.conf` file to redirect the domain name `local.pcfdev.io` to the IP `192.168.11.11` without requiring a network connection to resolve the DNS. To perform this redirection, add the line `address=/.local.pcfdev.io/192.168.11.11` to `/etc/dnsmasq.conf`:
<pre class="terminal">
$ echo "address=/.local.pcfdev.io/192.168.11.11" >> /etc/dnsmasq.conf
</pre>
<p class="note"><strong>Note</strong>: Details about configuring your Linux installation to use Dnsmasq may differ by distribution.</p>