Giter VIP home page Giter VIP logo

terraform-google-gke-gitlab's Introduction

terraform-google-gke-gitlab

This module creates a reslient and fault tolerant GitLab installation using Google Kubernetes Engine (GKE) as the computing environment and the following services for storing data:

  • CloudSQL for PostgreSQL
  • Memorystore for Redis
  • Cloud Storage

GitLab on GKE architecture diagram

Compatibility

This module is meant for use with Terraform 0.13+ and tested using Terraform 0.14.

Usage

There are examples included in the examples folder but simple usage is as follows:

module "gke-gitlab" {
  source                     = "terraform-google-modules/gke-gitlab/google"
  project_id                 = "<PROJECT ID>"
  certmanager_email          = "[email protected]"
}

Then perform the following commands on the root folder:

  • terraform init to get the plugins
  • terraform plan to see the infrastructure plan
  • terraform apply to apply the infrastructure build
  • terraform destroy to destroy the built infrastructure

Inputs

Name Description Type Default Required
allow_force_destroy Allows full cleanup of resources by disabling any deletion safe guards bool false no
certmanager_email Email used to retrieve SSL certificates from Let's Encrypt any n/a yes
domain Domain for hosting gitlab functionality (ie mydomain.com would access gitlab at gitlab.mydomain.com) string "" no
gitlab_address_name Name of the address to use for GitLab ingress string "" no
gitlab_db_name Instance name for the GitLab Postgres database. string "gitlab-db" no
gitlab_db_password Password for the GitLab Postgres user string "" no
gitlab_db_random_prefix Sets random suffix at the end of the Cloud SQL instance name. bool false no
gitlab_deletion_protection Must be false to allow Terraform to destroy the Cloud SQL instance. bool true no
gitlab_nodes_subnet_cidr Cidr range to use for gitlab GKE nodes subnet string "10.0.0.0/16" no
gitlab_pods_subnet_cidr Cidr range to use for gitlab GKE pods subnet string "10.3.0.0/16" no
gitlab_runner_install Choose whether to install the gitlab runner in the cluster bool true no
gitlab_services_subnet_cidr Cidr range to use for gitlab GKE services subnet string "10.2.0.0/16" no
gke_machine_type Machine type used for the node-pool string "n1-standard-4" no
gke_version Version of GKE to use for the GitLab cluster string "1.20" no
helm_chart_version Helm chart version to install during deployment string "4.2.4" no
project_id GCP Project to deploy resources any n/a yes
region GCP region to deploy resources to string "us-central1" no

Outputs

Name Description
cluster_ca_certificate CA Certificate for the GKE cluster that GitLab is deployed in.
cluster_location Location of the GKE cluster that GitLab is deployed in.
cluster_name Name of the GKE cluster that GitLab is deployed in.
gitlab_address IP address where you can connect to your GitLab instance
gitlab_url URL where you can access your GitLab instance
host Host for the GKE cluster that GitLab is deployed in.
root_password_instructions Instructions for getting the root user's password for initial setup
token Token for the GKE cluster that GitLab is deployed in.

Requirements

Before this module can be used on a project, you must ensure that the following pre-requisites are fulfilled:

  1. Terraform is installed on the machine where Terraform is executed.
  2. The Service Account you execute the module with has the right permissions.

The project factory can be used to provision projects with the correct APIs active.

Software Dependencies

Terraform

Configure a Service Account

In order to execute this module you must have a Service Account with the following project roles:

  • roles/owner

Install

Terraform

Be sure you have the correct Terraform version, you can choose the binary here:

File structure

The project has the following folders and files:

  • /: root folder
  • /examples: examples for using this module
  • /helpers: Helper scripts
  • /test: Folders with files for testing the module (see Testing section on this file)
  • /main.tf: main file for this module, contains all the resources to create
  • /variables.tf: all the variables for the module
  • /output.tf: the outputs of the module
  • /README.md: this file

terraform-google-gke-gitlab's People

Contributors

release-please[bot] avatar morgante avatar henrybell avatar cloud-foundation-bot avatar bgood avatar bharathkkb avatar apeabody avatar gruberro avatar mike-ensor avatar johannes-scharlach avatar 11mariom avatar mjlshen avatar kcatro avatar knee-berts avatar st-apps avatar willbeebe avatar a200462790 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.