Skip to content

Latest commit

 

History

History
86 lines (59 loc) · 3.37 KB

README.md

File metadata and controls

86 lines (59 loc) · 3.37 KB

Lattice Terraform templates for Google Cloud

This project contains Terraform templates to help you deploy Lattice on Google Cloud.

Usage

Prerequisites

Configure

Here are some step-by-step instructions for configuring a Lattice cluster via Terraform:

  1. Visit the Lattice GitHub Releases page
  2. Select the Lattice version you wish to deploy and download the Terraform example file for your target platform. The filename will be lattice.google.tf
  3. Create an empty folder and place the lattice.google.tf file in that folder.
  4. Update the lattice.google.tf by filling in the values for the variables. Details for the values of those variables are below.

The available variables that can be configured are:

  • gce_account_file: Path to the JSON file used to describe your account credentials, downloaded from Google Cloud Console
  • gce_project: The name of the project to apply any resources to
  • gce_ssh_user: SSH user
  • gce_ssh_private_key_file: Path to the SSH private key file
  • gce_region: The region to operate under (default us-central1)
  • gce_zone: The zone that the machines should be created in (default us-central1-a)
  • gce_ipv4_range: The IPv4 address range that machines in the network are assigned to, represented as a CIDR block (default 10.0.0.0/16)
  • gce_image: The name of the image to base the launched instances (default ubuntu-1404-trusty-v20141212)
  • gce_machine_type_brain: The machine type to use for the Lattice Brain instance (default n1-standard-1)
  • gce_machine_type_cell: The machine type to use for the Lattice Cells instances (default n1-standard-4)
  • num_cells: The number of Lattice Cells to launch (default 3)
  • lattice_username: Lattice username (default user)
  • lattice_password: Lattice password (default pass)

Refer to the Terraform Google Cloud provider documentation for more details about how to configure the proper credentials.

Deploy

Here are some step-by-step instructions for deploying a Lattice cluster via Terraform:

  1. Run the following commands in the folder containing the lattice.google.tf file
terraform get -update
terraform apply

This will deploy the cluster.

Upon success, terraform will print the Lattice target:

Outputs:

  lattice_target = x.x.x.x.xip.io
  lattice_username = xxxxxxxx
  lattice_password = xxxxxxxx

which you can use with the Lattice CLI to ltc target x.x.x.x.xip.io.

Terraform will generate a terraform.tfstate file. This file describes the cluster that was built - keep it around in order to modify/tear down the cluster.

Use

Refer to the Lattice CLI documentation.

Destroy

Destroy the cluster:

terraform destroy

Copyright

See LICENSE for details. Copyright (c) 2015 Pivotal Software, Inc.