Configuring PCF Dev (Legacy)

Note: This topic applies only to PCF Dev v0.30 or earlier. If you are using a later version of PCF Dev, see Configuring PCF Dev.

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.

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.
Options: redis, rabbitmq, spring-cloud-services (scs), default, all, none
Default: redis, rabbitmq
(MySQL is always available and cannot be disabled.)
-t Specify to perform cf login to PCF Dev after starting, as the ‘user’ user.

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

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.

$ 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

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

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:

$ cf dev target
Successfully logged in to api.local.pcfdev.io as user.

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.

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:

$ 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***

Note: Due to the nature of this operation, you may have to provide your system password to successfully insert the certificate.

After running cf dev trust, you can log in to PCF Dev without skipping SSL validation:

$ cf login -a https://api.local.pcfdev.io # --skip-ssl-validation
API endpoint: https://api.local.pcfdev.io

Email>

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.

Note: If you run cf dev destroy and are prompted to enter your password, this is because the plugin is attempting to remove PCF Dev-specific certificates from your certificate store.

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 -