pivotal-cf/terraforming-gcp

Name: terraforming-gcp

Owner: Pivotal Cloud Foundry

Description: use terraform, deploy yourself a pcf

Created: 2016-10-06 19:08:25.0

Updated: 2018-05-16 13:58:29.0

Pushed: 2018-05-03 15:52:44.0

Homepage:

Size: 200

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 a booted ops-manager VM plus some networking, just the bare bones basically.

Looking to setup a different IAAS

We have have other terraform templates to help you!

This list will be updated when more infrastructures come along.

Prerequisites

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

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

You will 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 ACCOUNT_NAME --display-name "Some Account Name"
ud iam service-accounts keys create "terraform.key.json" --iam-account "ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com"
ud projects add-iam-policy-binding PROJECT_ID --member 'serviceAccount:ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com' --role 'roles/owner'

You will need to enable the following Google Cloud APIs:

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"
ect          = "your-gcp-project"
on           = "us-central1"
s            = ["us-central1-a", "us-central1-b", "us-central1-c"]
suffix       = "gcp.some-project.cf-app.com"
an_image_url = "https://storage.googleapis.com/ops-manager-us/pcf-gcp-2.0-build.264.tar.gz"

ets_location = "US"

cert = <<SSL_CERT
-BEGIN CERTIFICATE-----
 cert
-END CERTIFICATE-----
CERT

private_key = <<SSL_KEY
-BEGIN RSA PRIVATE KEY-----
 cert private key
-END RSA PRIVATE KEY-----
KEY

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-----another 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
Isolation Segments (optional)
Cloud SQL Configuration (optional)
Ops Manager (optional)
PAS (optional)
PAS Cloud Controller's Google Cloud Storage Buckets (optional)
PKS (optional)
Running

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

Standing up environment
aform init
aform plan -out=plan
aform apply plan
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.