Bootstrap an environment with BOSH, secrets management (Hashicorp Vault), Concourse, and PCF. PCF is installed with the PCF Pipelines. Uses BOSH Boot Loader plan patches to simplify setup. Currently working with AWS and GCP.
- Assure dependencies are met (see below)
- If using GCP, enable the appropriate APIs.
- Edit
lib/env.sh
to match your needs. - Run
prepare
to prepare infrastructure and the bootstrap BOSH environment - Make sure DNS for your bootstrap subdomain is delegated from your primary zone (if needed).
- Run
secrets
to make Vault available for secrets. - Configure the secrets for the bootstrap environment by running
configure
. - Add concourse to the environment with
concourse
. - (optional) Add LDAP to the environment with
ldap
. - Set the environment variable
PIVNET_TOKEN
to your Pivotal Network API token. - An SSH key in your
.ssh
directory namedconcourse_github
with the public key registered with your Github account. - Add secrets under
concourse/pcf/deploy-pcf
path for your Google Cloud Storage S3-compatible access key id (gcp_storage_access_key
) and secret access key (gcp_storage_secret_key
) in vault. - Running
pcf
now will load PCF Platform Automation with Concourse, nee PCF Pipelines, into the Concourse you just installed and trigger the right jobs to install PCF.
All your connections to BOSH will be through SSH tunnels to the Jumpbox that the
BOSH Bootloader creates. To use the bosh
CLI, make soure you source the file
work/bbl-env.sh
into your shell with . work/bbl-env.sh
, which will set up
the proxy that BOSH uses. If the tunnels times out, you can recreate it with
prepare client login
.
LDAP, Vault, Concourse, and PCF have load balancers. You can access them at the
expected URIs based on your configuration. The PCF Pipelines are available in
the concourse team pcf
, with username pivotal
. To get the password run
pcf secret concourse
Each of the scripts has a teardown
command-line argument (except prepare
). Run those, then run teardown
.
- Teardown PCF (
pcf teardown
). - If you added LDAP, remove it from the environment with
ldap teardown
. - Take down concourse with
concourse teardown
. - Get rid of Vault with
secrets teardown
. - Lastly, take down the infrastructure with
teardown
.
Each command has some subcommands for running a piece of what it does. More to come on that later.
- BOSH Boot Loader 6.x or later. It's in the Cloud Foundry tap on
Homebrew, so Mac users can run
brew install cloudfoundry/tap/bbl
. - Safe. On a Mac you can run
brew install starkandwayne/cf/safe
. - Hashicorp Vault CLI. If you're on a Mac run
brew install vault
. - The Pivotal Network CLI,
pivnet
. Again, with Homebrewbrew install pivotal/tap/pivotal-cli
. - Certbot to get certificates from Let's Encrypt. Install with
brew install certbot
.
- Deploy concourse with standard manifest plus ops files from concourse-deployment
1. Make cloud config changes idempotent. - Use Credhub (created by
bbl
or standalone) instead of deploying/managing vault. - Windows in PCF and concourse
- PCF tile support
- Split working directory from script directory to simplify having local changes
- Simple script(s) to do the manual stuff more easily.
- Forcing and/or testing without SSH multiplexing. I use it all the time, colleagues who don't are seeing some weirdness.
- Making this document more readable and useful.
- Making secrets highly available.
- Making LDAP highly available.
1. Other IaaSes. - Rewrite in a programming language for better modularity and invocation across modules