Coder Social home page Coder Social logo

tfe_v5_gcp_production_deployment's Introduction

This Repo can be used to deploy Terraform Enterprise (v5) into your GCP environment in Production Mode. This will first create a VPC, Subnet, GCS Bucket, Postgres Database, Firewalls, and SSL Certificate in your GCP ennvironment before deploying the Application.

Modules Used

Pre-Requisites

Terraform Version

  • This Repo uses Modules that require a Terraform version of <0.12.x. The recommended Terraform version to use is 0.11.14.

The following items must be configured prior to using this Module:

  • A GCP Project
  • Valid GCP Credentials stored in JSON format
  • A valid DNS Zone
  • A valid Domain
  • Enable the servicenetworking.googleapis.com API in your GCP Project
  • Enable the cloudresourcemanager.googleapis.com API in your GCP Project
  • Enable the storage-api.googleapis.com API in your GCP Project

Required Variables

  • credentials_file -- Path to credential file
  • domain -- Domain name
  • dns_zone -- Managed DNS Zone name
  • frontend_dns -- DNS name for load balancer
  • license_file -- License file
  • project -- GCP Project Name
  • postgresql_dbname -- Name of Postgres Database
  • postgresql_password -- Password for Postgres Database

Optional Variables

  • certificate -- Path to Certificate file or GCP Certificate link
  • region -- GCP Region
  • public_ip -- The public IP for the load balancer to use
  • ssl_policy -- SSL policy for the Certificate
  • subnet -- Name of the Subnet
  • primary_count -- Number of primary nodes to run, must be odd number - 3 or 5 recommended
  • secondary_count -- Number of secondary nodes to run
  • postgresql_machinetype -- Machine type to use for Postgres Database

How to Use this Repo

  • Update the values in the terraform.tfvars file
  • Run terraform plan and terraform apply

Post-Deployment Steps

  • Due to the way GCP firewalls work, the initial setup requires outside access to primary-0. After provisioning is complete, you may remove those rules from the firewall and can access the dashboard by re-enabling them as-needed or using IAP tunnels.
  • Once the Admin Dashboard has loaded and the Application has successfully started, you'll want to update the value in the 'hostname' field to ensure all URLs (ex. those used for GitHube Webhooks, SAML, etc.) point to the Load Balancer rather than directly to your primary node. Once this value has been updated, click 'Save' in the dashboard and make sure the Application is restarted.

tfe_v5_gcp_production_deployment's People

Contributors

cneralich avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.