May 17, 2018 BUCC: I'll be there for you, BBL
The first thing we need is the latest bbl cli.
For this example, we are going to use
gcp. Open your favorite terminal and create a workspace folder:
You'll need to set up a service account in
gcp. This uses the gcloud sdk to provision and configure the service account.
gcloud iam service-accounts create <service-account-name> gcloud iam service-accounts keys create --iam-account='<service account name>@<project-id>.iam.gserviceaccount.com' <service account name>.key.json gcloud projects add-iam-policy-binding <project id> --member='serviceAccount:<service-account-name>@<project-id>.iam.gserviceaccount.com' --role='roles/editor'
Make sure you replace
<project-id> with your values.
Then you need to export the following
bbl environment variables to in order to start the process.
export BBL_IAAS=gcp export BBL_ENV_NAME=banana-env mkdir $BBL_ENV_NAME && cd $BBL_ENV_NAME && git init
bbl plan to see where we are at. This will let us know if we need anything else before we can run
bbl up to bootstrap the environment.
bbl plan -lb-type concourse`
You will notice that this command is pretty intuitive, as it will ask you what you need to supply next.
In our case with
gcp you need:
The service account key is a
*.key.json file you created before using the
gcloud commands. Putting all the parameters together you come up with this:
bbl plan --lb-type concourse --gcp-service-account-key ~/<service-account-name>.key.json --gcp-region europe-west4
europe-west4 is an example, your region may vary.
A Dash of BUCC
Now, it's time for some
git submodule add https://github.com/starkandwayne/bucc.git bucc ln -s bucc/bbl/*-director-override.sh . ln -sr bucc/bbl/terraform/$BBL_IAAS/* terraform/
And the next simple step, just like bucc up, is to run:
Once it's done, it will have created the following:
- bosh-director (with all the bucc goodies)
- load-balancer (so we can use concourse/uaa publicly)
What was all that
We copied down the
bucc software, and then overlaid a
bbl template that is compatible with
bucc. Find out more about how
bbl works with advanced configuration in their docs.
Friends with Benefits
Now, run the following commands so that all the goodies you get with
bucc are loaded into your command shell.
eval "$(bbl print-env)" eval "$(bucc/bin/bucc env)"
bucc info, you will see the URL of the loadbalancer here that directs to Concourse.
bucc fly so your target is set and able to login in with the fly CLI to Concourse.
bosh cloud-config, you will notice that cloud-config is already pre-populated with the environment we just set up.