Skip to content

Latest commit

 

History

History
 
 

google

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Using Terraform to deploy demo GRR setup on Google Cloud

Installing Terraform

Please follow these instructions to install Terraform binary on your machine.

Setting up a Google Cloud Project

  1. Create a new project in GCP console (link). Let's assume it's called "grr-terraform-demo".
  2. Enable billing for the project (link).
  3. Enable Compute Engine and Cloud SQL APIs (link).

Instrumenting Terraform with credentials

  1. In Cloud Platform Console, navigate to the Create service account key page.
  2. From the Service account dropdown, select Compute Engine default service account, and leave JSON selected as the key type.
  3. Click Create, which downloads your credentials as a file named [PROJECT_ID]-[UNIQUE_ID].json.
  4. In the same shell where you're going to run Terraform (see below), run the following:
export GCLOUD_KEYFILE_JSON=/absolute/path/to/downloaded-file.json

Running Terraform

cd to the folder with Terraform configuration files (and where this README file is).

If it's the first time you run Terraform with this set of configuration files, run:

terraform init

Then run (grr-terraform-demo is the name of a project that you've previously set up):

terraform apply -var 'gce_project=grr-terraform-demo'

Run the following to get the URL of a newly deployed GRR AdminUI:

terraform output

Tip: you can use Terraform variables to specify the number of generated Windows and Linux clients:

terraform apply -var 'gce_project=grr-terraform-demo' -var 'windows_client_count=4' -var 'linux_client_count=3'