Skip to content

Deploy Concourse

The first step in this lab is to configure your bosh cli to talk to your newly-minted bosh director. The objective is to bosh deploy Concourse.

Configure CLI access to the bosh director

The om command provides a convenient subcommand named bosh-env.

  • Read the command-specific help documentation for bosh-env

The bosh cli communicates with the bosh director using an ssh tunnel via the Ops Manager.

Setup an authorized key

When you use the gcloud cli to ssh to a VM, google configures your GCP ssh key as an authorized key.

  • Use the gcloud cli to ssh to the Ops Manager VM as user ubuntu.

Hints:

  1. gcloud compute instances list helps determine the name of the target VM
  2. Use the help documentation for the command gcloud compute ssh

If prompted for a passphrase, make it blank (press enter).

Exit the Ops Manager VM.

Your GCP private key, located in ${HOME}/.ssh/google_compute_engine, is now authorized to ssh to the Ops Manager VM.

Execute om bosh-env

  • Run the om bosh-env command, passing in your private key

Inspect the output. The output is a script that creates a list of environment variables that the bosh cli needs to target your bosh director.

The environment variables can be set by eval-ing this output.

  • Insert the following command into your opsman-director's .envrc file:

    eval "$(om bosh-env -i ${HOME}/.ssh/google_compute_engine)"
    

direnv allow your updated .envrc file. The bosh cli is now configured.

Test it

Try the following two bosh commands:

  • bosh env
  • bosh deployments

Run bosh --help and take some time to familiarize yourself with the bosh cli commands.

Deploy Concourse

  • Navigate to the following GitHub repository
  • On your jumpbox, navigate to ~/workspace
  • Clone the above git repository and navigate into it

Study the contents of your copy of the repository.

  • concourse.yml is the deployment manifest
  • operations/ contains bosh operations files used to further configure and customized the deployment
  • deploy.sh is the command to execute to deploy concourse with bosh
  • vars.yml.template is used to generate an input to the deployment command

Setup direnv

  • Copy the .envrc file from the opsman-director directory to the concousre-bosh-deployment directory.

Question: Why is this step necessary?

Review and follow the README

  • Vet that all assumptions are met
  • Review the steps outlined

Questions

  1. Why do we create a user in the first step?
  2. What does the second command (om interpolate) do?
  3. Why is it necessary to upload a stemcell?
  4. Look inside deploy.sh. Can you make sense of what this command does?

Kick off the bosh deployment by executing all of the steps outlined in the README.

Challenge

Study the concourse manifest, and operations files used to deploy Concourse.

Volunteer to share with the rest of the class what you have learned, as well as your questions about how this deployment works.

Wrapping up

After bosh is done provisioning concourse, run the following commands:

bosh deployments
bosh -d concourse instances

Questions

  • How many VMs does the Concourse deployment consist of?
  • How many worker VMs are there?
  • How do you find out the url to your running Concourse instance?
  • Can you figure out how to look up the password for the local user that you generated?