Google Cloud

Please note that these are instructions for installing a Rack via the command line. The easiest way to install a Rack is with the Convox Web Console

Initial Setup

Google Cloud CLI

Terraform

Convox CLI

Environment

The following environment variables are required:

  • GOOGLE_CREDENTIALS
  • GOOGLE_PROJECT

Create Project

    $ gcloud projects create <id> --set-as-default
  • GOOGLE_PROJECT is the id you selected

You will likely need to set up Billing on this new project at https://console.cloud.google.com/billing before proceeding You can find the full documentation on this here: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_an_existing_project

Create Service Account

    $ serviceaccount=$(gcloud iam service-accounts create convox --format="value(email)")
    $ gcloud iam service-accounts keys create ~/gcloud.convox --iam-account=${serviceaccount}
  • GOOGLE_CREDENTIALS is ~/gcloud.convox

Grant Permissions

    $ gcloud projects add-iam-policy-binding $GOOGLE_PROJECT --member=serviceAccount:${serviceaccount} --role=roles/owner

Enable GCP APIs

    $ gcloud services enable compute.googleapis.com
    $ gcloud services enable cloudresourcemanager.googleapis.com

Install Rack

    $ convox rack install gcp <name> [param1=value1]...

Available Parameters

Name Default Description
cert_duration 2160h Certification renew period
node_type n1-standard-1 Node instance type
preemptible true Use preemptible instances
region us-east1 GCP Region
syslog Forward logs to a syslog endpoint (e.g. tcp+tls://example.org:1234)