All Projects → liatrio → lead-terraform

liatrio / lead-terraform

Licence: MIT license
Terraform modules and scripts to manage LEAD environments

Programming Languages

HCL
1544 projects
Smarty
1635 projects
go
31211 projects - #10 most used programming language
Open Policy Agent
39 projects
Mustache
554 projects
Makefile
30231 projects

Projects that are alternatives of or similar to lead-terraform

darwin
Avro Schema Evolution made easy
Stars: ✭ 26 (+44.44%)
Mutual labels:  ignite
Get-EventSession
Script to assist in downloading Microsoft event contents or return session information.
Stars: ✭ 55 (+205.56%)
Mutual labels:  ignite
Sohu2019
2019搜狐校园算法大赛
Stars: ✭ 26 (+44.44%)
Mutual labels:  ignite
the-apache-ignite-book
All code samples, scripts and more in-depth examples for The Apache Ignite Book. Include Apache Ignite 2.6 or above
Stars: ✭ 65 (+261.11%)
Mutual labels:  ignite
Preprocessing-Method-for-STEMI-Detection
Official source code of "Preprocessing Method for Performance Enhancement in CNN-based STEMI Detection from 12-lead ECG"
Stars: ✭ 12 (-33.33%)
Mutual labels:  lead
Ignite
Apache Ignite
Stars: ✭ 4,027 (+22272.22%)
Mutual labels:  ignite
minetorch
Build deep learning applications in a new and easy way.
Stars: ✭ 157 (+772.22%)
Mutual labels:  ignite
ignite-reactjs
Projetos desenvolvidos em ReactJS durante a trilha de ReactJS do Ignite da Rocketseat. 💜🚀
Stars: ✭ 20 (+11.11%)
Mutual labels:  ignite

Overview

This repository contains the Terraform automation to manage LEAD environments.

Additional Documentation

Tools

Install required tools with Homebrew:

brew bundle

Setup

You'll need to create a secrets/ directory with a file for each environment (e.g. liatrio-sandbox.tfvars) containing the secrets for that account.

Required Terraform variables: See Slack Operator to setup Slack App.

artifactory_license          = "Artifactory License (ask in slack)"
slack_bot_token              = "Slack Bot User OAuth Token"
slack_client_signing_secret  = "Slack App Credentials Signing Secret"
keycloak_admin_password      = "Keycloak Admin Password"
prometheus_slack_channel     = "Some Slack Channel"
prometheus_slack_webhook_url = "Some Slack Webhook Url"

See instructions for creating slack app

Testing

The tests folder contains functional test which apply individual Terraform modules and verify the final state. The tests use Terratest which uses golang tests to trigger Terraform and verify the outcome. The tests can be run with a local Kubernetes cluster (docker-for-desktop, minikube, microk8s, etc) or create an EKS cluster and run the tests there.

Local tests

Make sure your current Kubernetes context points to your local cluster

make test

AWS tests

The AWS tests create an EKS cluster, run the tests against the cluster and teardown the cluster. This usually takes 25 to 30 minutes.

The tests will not interfere with other clusters in the same account and multiple tests can safely run at the same time. You should run the tests in the sandbox account and you must use a role with sufficient privileges (administrator).

aws-vault exec AWS_PROFILE -- make test-aws

The tests will attempt to teardown the cluster on failure but sometimes it is necessary to manually delete the EKS cluster and VPC.

To speed up running tests repeatedly the --destroyCluster flag can be set to false to skip tearing down the cluster and re-use it on subsequent tests. The test-aws-nodestroy make target uses this flag.

aws-vault exec AWS_PROFILE -- make test-aws-nodestroy

Don't forget to run the test with --destroyCluster set to true to cleanup the cluster.

aws-vault exec AWS_PROFILE -- make test-aws

Running locally

Follow Setup instructions above and store secrets in secrets/docker-for-desktop.tfvars

Add these additional dependency versions in local/environment/local.auto.tfvars

sdm_version                  = "v2.0.0"
dashboard_version            = "v2.0.0"
builder_images_version       = "v2.0.0"
jenkins_image_version        = "v2.0.0"

You can find up to date versions in the lead-environments repo by looking at what is deployed to production or sandbox environments.

To test an environment locally, run:

# Setup keycloak plugin
make plugins
cd local/environment

# Validate a 'stack'
terragrunt validate

# Apply a 'stack' 
terragrunt apply

To test the product locally, run:

cd local/product

# Apply a 'stack' 
terragrunt apply
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].