-
Notifications
You must be signed in to change notification settings - Fork 20
/
configuring-legacy.html.md.erb
107 lines (72 loc) · 6.12 KB
/
configuring-legacy.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
---
breadcrumb: PCF Dev Documentation
title: Configuring PCF Dev (Legacy)
owner: PCF Dev
---
<p class="note"><strong>Note</strong>: This topic applies only to PCF Dev v0.30 or earlier. If you are using a later version of PCF Dev, see <a href="configuring.html">Configuring PCF Dev</a>.</p>
PCF Dev supports several different configurations. This topic describes how to start PCF Dev with specific memory usage, core count usage, domain, IP address, and Cloud Foundry services, among others. It also describes ease-of-use functionality, including automatically targeting PCF Dev and trusting PCF Dev certificates.
## <a id="start-options"></a>Configure PCF Dev
The `cf dev start` command supports the following configuration-specific flags at start up:
| flag | description |
|---|---|---|---|
| `-c number-of-cores` | Specify the number of processor cores used by VM. Default: Number of physical cores. |
| `-d domain` | Specify the domain that the PCF Dev VM will occupy. |
| `-i ip-address` | Specify the IP address that the PCF Dev VM will occupy. |
| `-k` | Import VM certificates into host's trusted certificate store. |
| `-m memory-in-mb` | Specify memory to allocate for VM. Default: Half of total memory, with a maximum of 4 GB, or 8 GB with SCS. |
| `-r registry1,registry2,...` | Specify Docker registries that PCF Dev will use without SSL validation. Use `host:port` format. |
| `-s service1,service2` | Specify the services started with PCF Dev. <br>Options: redis, rabbitmq, spring-cloud-services (scs), default, all, none <br> Default: redis, rabbitmq <br> (MySQL is always available and cannot be disabled.) |
| `-t` | Specify to perform `cf login` to PCF Dev after starting, as the 'user' user. |
### <a id="domain-and-ip"></a>Domain and IP Address
The `-d` and `-i` flags specify a custom domain and IP address that PCF Dev uses. Specify a domain and IP address if you have your own domain that you want to access using PCF Dev.
If you specify an IP address without a domain, the domain is assumed to be `<ip>.xip.io`.
If you specify a domain, you must also specify an IP address unless the domain is a standard PCF Dev domain. For example, the following are valid domains: `local.pcfdev.io`, `local2.pcfdev.io`.
When you specify both a domain and IP address, no validation occurs.
The following are examples of valid IP address and domain configurations for PCF Dev:
* `cf dev start -i 192.168.54.54`
* `cf dev start -d local3.pcfdev.io`
* `cf dev start -i 192.168.54.54 -d example.com`
However, the following is not a valid configuration:
* `cf dev start -d example.com`
### <a id="insecure-docker-registries"></a>Insecure Docker Registries
PCF Dev allows applications to be pushed from Docker images. By default, these images must be hosted on Docker Hub. The `-r` flag allows you to specify Docker registries that PCF Dev should allow you to push from, even if those registries don't have valid SSL certificates. The following example shows how to start PCF Dev and push an app using an existing insecure docker registry on your host running on port 5000.
<pre class='terminal'>
$ cf dev start -r host.pcfdev.io:5000
...
$ cf dev target
Successfully logged in to api.local.pcfdev.io as user.
$ cf push -o host.pcfdev.io:5000/repository/image
</pre>
### <a id="service-brokers"></a>Service Brokers
By default, PCF Dev starts with the MySQL, Redis, and RabbitMQ service brokers running. The service brokers that are started with PCF Dev can be changed with the `-s` flag.
* `cf dev start -s all` starts all of the service brokers: MySQL, Redis, RabbitMQ, and Spring Cloud Services
* `cf dev start -s none` starts with no additional service brokers, except for the mandatory service broker, MySQL
* `cf dev start -s redis,scs` starts with Redis and Spring Cloud Services
## <a id="target"></a>Target PCF Dev
To perform a `cf target` on your running PCF Dev instance, regardless of the domain is it currently configured to use, run the following command:
<pre class='terminal'>
$ cf dev target
Successfully logged in to api.local.pcfdev.io as user.
</pre>
The `cf dev target` command works if the PCF domain is `local.pcfdev.io` (default) or a custom value, such as `cf dev start -d pcfdev.example.com`. Running `cf dev target` performs `cf login` as the user `user` into the 'pcfdev-org' org and 'pcfdev-space' space. The `-t` option to `cf dev start` also performs this operation following the provisioning of the VM.
## <a id="trust"></a>Trust PCF Dev
Provisioning dynamically creates self-signed certificates used within its components. However, this results in various SSL validation warnings both from the Cloud Foundry Command Line interface (cf CLI), and when using Apps Manager in a browser. To remove these SSL validation warning errors, you can insert this self-signed certificate into your OS certificate store with:
<pre class='terminal'>
$ cf dev trust
***Warning: a self-signed certificate for *.local.pcfdev.io has been inserted into your OS certificate store. To remove this certificate, run: cf dev untrust***
</pre>
<p class="note"><strong>Note</strong>: Due to the nature of this operation, you may have to provide your system password to successfully insert the certificate.</p>
After running `cf dev trust`, you can log in to PCF Dev without skipping SSL validation:
<pre class='terminal'>
$ cf login -a https://api.local.pcfdev.io # --skip-ssl-validation
API endpoint: https://api.local.pcfdev.io
Email>
</pre>
The `-k` option to `cf dev start` also performs this operation following the provisioning of the VM. To remove these certificates from your certificate store, run: `cf dev untrust`. These certificates are automatically removed as part of a `cf dev destroy`.
<p class="note"><strong>Note</strong>: If you run <code>cf dev destroy</code> and are prompted to enter your password, this is because the plugin is attempting to remove PCF Dev-specific certificates from your certificate store. </p>
The following table shows conditions where `cf dev trust` is expected to remove SSL validation warnings:
| OS | CF CLI | Chrome | Firefox | Internet Explorer |
|---|---|---|---|---|
| Mac | ✓ | ✓ | X | - |
| Windows | ✓ | ✓ | X| ✓ |
| Linux | ✓ | X | X | - |