Currently, automating Pivotal Cloud Foundry (PCF) uses OCB (OpsManager, Concourse, BOSH). In the future, there will be BOSH-Native PCF.
Before running pipelines for OCB, one must bootstrap an environment. At a minimum, you need a BOSH Director, so you can deploy and maintain Concourse.
Following are steps to go from an IaaS to deployed PCF plus a set of tiles to provide "AppTone". As a final layer of automation, a set of pipelines to maintain PCF and tiles are added.
- Deploy a linux VM
- Add support for Docker to this VM
- We use cfjump, which is installed by
docker pull ramxx/cfjump:latest
A helper shell, cfj
, should be installed on your PATH (e.g., ~/bin/cfj). cfj
simplifies using the jumpbox for multiple environments. (Show raw on github, copy, and paste into vim on your jumpbox is one way to get this helper installed.)
Decide on a name for the PCF instance you are bootstraping (e.g., bootstrap). After logging into you jumpbox VM, cfj bootstrap
.
Next, clone these repos:
The repos have var file templates. Copy and fill out these templates for your own deployment(s):
- ./bosh-deployment/{aws,azure,gcp,vsphere}/params.yml
- ./bootstrap-pcf/concourse-param.yml
There are a couple helper shells, which you can adjust for the location and name of your vars files:
- ./bootstrap-pcf/{aws,azure,gcp,vsphere}/ may contain an init-*.sh to ease creating all the resources needed before bootstrapping
- ./bootstrap-pcf/{aws,azure,gcp,vsphere}/mkboshadmin.sh
- ./bootstrap-pcf/{aws,azure,gcp,vsphere}/mkconcourse.sh provide your own certificate/key
- ./bootstrap-pcf/{aws,azure,gcp,vsphere}/mkconcourseca.sh BOSH created certificate/key
Using your modified helper shells, run mkboshadmin.sh
. Once you have successfully deployed director, run mkconcourse.sh
or mkconcourseca.sh
.
Now, we get on with installing OpsManager and Elastic Runtime. The pcf-pipelines project is creating day 1 (initial install) and day 2 (ongoing upgrade) pipelines. PCF-Pipelines are available on PivNet. For vSphere, I recommend using a fork of concourse-vsphere, which has modifications to support the portfolio of tiles you will install after OpsManager and Elastic Runtime.
Pipelines for the initial deploy of a set of tiles, which I refer to as AppTone, are available in a fork of pcf-pipelines. The order is somewhat important, as some tiles depend on others. A suggested order is:
- Isolation Segment
- Redis
- APM (aka PCF Metrics)
- RabbitMQ
- MySQL
- Spring Cloud Services
Finally, create a params.yml for each of the upgrade pipelines. There should be upgrades for:
- OpsManager
- Elastic Runtime
- Buildpacks
- and one for each tile deployed in the preceding section