Skip to main content

Automated GCP deployment overview

DigiTrade ships a Terraform automation package that provisions a complete hosting environment for a client on Google Cloud Platform.

N
Written by Niyaz

This overview explains how DigiTrade's Terraform automation package provisions a client hosting environment on Google Cloud Platform and how the deployment layers fit together. Read it before following Deploy DigiTrade to GCP.

The deployment model

Each client has a dedicated GCP environment described by one Terraform package. The package defines the client's project boundary, networking, compute host, and public entry point. You run the package from your workstation, and Terraform creates resources in the GCP account you authenticate against. DigiTrade is a multi-service application. A single deployment hosts the storefront, the admin panel, and the backend service on one compute host, with each service served on its own port.

Where the automation starts

Open the client record under Clients, then select the Setting Up Automation tab to access the automation setup area. The setup area contains client billing information and four setup stages.

  • Client Billing Information contains the Billing account and GCP Account Email fields and the Request Access action.

  • The setup stages are Install Terraform, Install the Google Cloud SDK, Configure Instance, and Initialize.

The browser does not build the infrastructure; the setup area prepares and hands you a deployment package, while Terraform performs provisioning from your workstation. The Install Terraform link points to Terraform installation instructions.

Setting Up Automation tab with billing information and four setup stages

What the automation provisions

A completed deployment creates several GCP layers that help you verify the deployment and locate problems.

  • A dedicated GCP project contains the required Google Cloud APIs.

  • Private networking supports the host, Cloud NAT provides outbound internet access, and reserved static IP addresses support NAT and the public entry point.

  • A Google Compute Engine instance runs the DigiTrade services with a dedicated service account attached. A startup script installs dependencies and starts the services when the instance boots.

  • An external HTTP(S) load balancer uses network endpoint groups for the storefront, admin panel, and backend ports. A health check is provided for each service.

  • Cloud Armor security policies apply to the backend, with IP-based restrictions where configured.

What is in the Terraform package

The package separates infrastructure logic from client-specific values. Terraform resource definitions are organized into .tf files by responsibility, from provider configuration through the load balancer and instance startup script. Store client-specific values in a variables file, commonly terraform.tfvars, rather than in the infrastructure files. For a file-by-file breakdown of what each file provisions, see Terraform project structure. Confirm the variable filename and complete file set against the package you receive because they can differ between deliveries.

Why the layers matter

Understanding the layers helps you interpret a failed deployment by connecting symptoms to the infrastructure area that may need attention.

  • Early provisioning errors point to the project or enabled APIs.

  • An instance with no outbound access points to networking.

  • Services that do not start point to the compute instance and its startup script.

  • Public traffic that never arrives points to the load balancer and its endpoint groups.

  • Blocked or unhealthy traffic points to the health checks and Cloud Armor.

Related

Did this answer your question?