Skip to main content

Configuration

To deploy an app to GCP, configure it to use a GCP sandbox and runner. We provide a GKE sandbox you can use to get started, which provisions a GKE cluster and the IAM bindings the runner needs. Create inputs for the public and private domains, since those will be different for each install.
sandbox.toml
sandbox.tfvars
runner.toml

Installation

When you create a new install, Nuon will generate a Terraform install stack your customer can use to install the runner and base infrastructure. The customer applies it locally with the Google Cloud SDK and Terraform.

Create an Install

Navigate to the Installs tab in the Nuon dashboard, and click on the “Create Install” button, and select the app you want to install. This will kick off a provision workflow. The stack will be generated and pre-configured inputs.auto.tfvars and secrets.auto.tfvars files will be provided for it. The tfvars files already have the install ID, runner ID, API token, and IAM permissions interpolated, and can be shared with your customer.

Install the Stack

Your customer must be authenticated to the GCP project they want to install your app in (typically via gcloud auth application-default login) and have permissions to create the IAM bindings, service accounts, and resources defined in the stack module. The dashboard provides four steps the customer can follow:
  1. Clone the install stack module
  2. Configure remote state (recommended) — create a backend.tf pointing at a GCS bucket so the install state is durable.
  3. Save the install configuration — copy or download the inputs.auto.tfvars and secrets.auto.tfvars content shown in the dashboard and save both files next to the module.
  4. Apply with Terraform
    Both .auto.tfvars files are loaded automatically, so no -var-file flag is needed.
The customer is prompted for gcp_project_id and gcp_region at apply time unless those are pre-populated in the install config (gcp_account.project_id / gcp_account.region), in which case they’re injected into the tfvars and applied automatically.

Try it with a sample app

We maintain gke-simple, a sample app that uses the GKE sandbox to deploy a whoami workload with a certificate and load balancer. To try it:
  • Install the CLI
  • Clone the example apps repo
  • cd into the gke-simple directory
  • Run nuon auth login
  • Run nuon apps create -n gke-simple
  • Run nuon apps sync
  • Open the Nuon dashboard and create an install

Updating

If you make changes to the install stack template, the install must be reprovisioned to update the stack.
  1. From the install’s Overview page, click on “Reprovision install” in the “Manage” drop-down menu. This will trigger a reprovision workflow.
  2. A new Terraform stack version and updated inputs.auto.tfvars and secrets.auto.tfvars files will be generated.
  3. Send the updated files to your customer to re-apply with terraform apply.