pivotal-cf/pcf-bosh-terraforming-gcp

Name: pcf-bosh-terraforming-gcp

Owner: Pivotal Cloud Foundry

Description: null

Created: 2016-12-01 22:21:19.0

Updated: 2017-06-06 20:20:54.0

Pushed: 2017-02-01 18:03:52.0

Homepage: null

Size: 44

Language: HCL

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

How Does One Use This?

Please note that the master branch is generally unstable. If you are looking for something “tested”, please consume one of our releases.

What Does This Do?

You will get some networking, just the bare bones basically.

Prerequisites

Your system needs the gcloud cli, as well as terraform:

 install Caskroom/cask/google-cloud-sdk
 install terraform

You will also want to setup a “project-wide” SSH key to allow SSH access to the VMs in your deployment. You can follow the directions here to set up a key.

Notes

This repository requires at least v0.7.7 of terraform

You will also need a key file for your service account to allow terraform to deploy resources. If you don't have one, you can create a service account and a key for it:

ud iam service-accounts create some-account-name
ud iam service-accounts keys create "terraform.key.json" --iam-account "some-account-name@yourproject.iam.gserviceaccount.com"
ud projects add-iam-policy-binding PROJECT_ID --member 'serviceAccount:some-account-name@PROJECT_ID.iam.gserviceaccount.com' --role 'roles/editor'

You will also need to enable the Google Cloud DNS API on your GCP account. The Google Cloud DNS API provides methods for creating, reading, and updating project DNS entries.

Var File

Copy the stub content below into a file called terraform.tfvars and put it in the root of this project. These vars will be used when you run terraform apply. You should fill in the stub values with the correct content.

name = "some-environment-name"
on = "us-central1"
s = ["us-central1-a", "us-central1-b", "us-central1-c"]
ect = "your-gcp-project"
suffix = "gcp.some-project.cf-app.com"
cert = "-----BEGIN CERTIFICATE-----some cert-----END CERTIFICATE-----\n"
cert_private_key = "-----BEGIN RSA PRIVATE KEY-----fake private key-----END RSA PRIVATE KEY-----\n"
ice_account_key = <<SERVICE_ACCOUNT_KEY

ype": "service_account",
roject_id": "your-gcp-project",
rivate_key_id": "another-gcp-private-key",
rivate_key": "-----BEGIN PRIVATE KEY-----fake gcp private key-----END PRIVATE KEY-----\n",
lient_email": "something@example.com",
lient_id": "11111111111111",
uth_uri": "https://accounts.google.com/o/oauth2/auth",
oken_uri": "https://accounts.google.com/o/oauth2/token",
uth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
lient_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/"

ICE_ACCOUNT_KEY
Var Details
DNS Records
Cloud SQL Configuration
ERT
Running

Note: please make sure you have created the terraform.tfvars file above as mentioned.

Standing up environment
aform apply
Tearing down environment
aform destroy

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.