edit

Deploying BOSH for CFCR on GCP

This topic describes how to deploy BOSH for Cloud Foundry Container Runtime (CFCR) on Google Cloud Platform (GCP). Installing CFCR requires deploying a BOSH Director.

In the procedures below, you deploy a BOSH Director from the bastion VM you created in Paving Infrastructure on GCP.

Before completing the procedures in this topic, you must have performed the steps in Configuring IaaS Routing for GCP. After finishing this topic, continue to Deploying CFCR.

(Optional) Step 1: Set Up Your Environment

If you are still working in the same Google Cloud Shell session from the Paving Infrastructure on GCP topic, skip to Step 2: Deploy BOSH Director.

If you have started a new Google Cloud Shell session, perform the following steps:

  1. Set the prefix and zone from the Step 1: Set Up Your Shell Environment section of the Paving Infrastructure on GCP topic as environment variables. For example:

    $ export prefix=my-kubo $ export zone=us-west1-a $ export network=kubo-network $ export subnet_ip_prefix="10.0.1"

  2. SSH onto the bastion VM. Enter the following command:

    $ gcloud compute ssh "${prefix:-cfcr}-bosh-bastion" --zone ${zone}

  3. Set the kubo_env_name environment variable to kubo. Enter the following command:

    $ export kubo_env_name=kubo

Step 2: Deploy BOSH Director

Perform the following steps to deploy a BOSH Director from the bastion VM:

  1. Deploy the BOSH Director for CFCR. Enter the following command:

    $ ./bin/deploy_bosh "${kubo_env_path}" ~/terraform.key.json

    The deploy_bosh script uses the CFCR configuration and the GCP key generated previously to deploy a BOSH Director with all of the necessary components to install CFCR.

    After the script completes, KUBO_ENV contains the following:

    • Credentials and SSL certificates for the BOSH Director, stored in creds.yml

      Warning

      The creds.yml file contains sensitive information and should not be under version control.

    • The deployment state, stored in state.json

      Note

      Subsequent runs of deploy_bosh will use creds.yml and state.json to apply changes to the BOSH environment.

Step 3: Access the BOSH Director

  1. Set your environment to access the BOSH Director. Enter the following command:

    $ BOSH_ENV=${kubo_env_path} source /share/kubo-deployment/bin/set_bosh_environment

  2. Use BOSH CLI v2 commands to interact with the BOSH Director. For example, enter the following command:

    $ bosh environment

    BOSH provides information about your environment. For example:

    Using environment '10.0.1.252' as client 'bosh_admin'
    Name my-kubo-bosh UUID a7e779dd-f9cc-43f2-b491-7358556bc730 Version 264.1.0 (00000000) CPI google_cpi Features compiled_package_cache: disabled config_server: enabled dns: disabled snapshots: disabled User bosh_admin
    Succeeded

After deploying the BOSH Director, continue to Deploying CFCR.