All Projects → nextrevision → Terraform Rancher Ha Example

nextrevision / Terraform Rancher Ha Example

Terraform files for deploying a Rancher HA cluster in AWS

Projects that are alternatives of or similar to Terraform Rancher Ha Example

Bastions On Demand
Create and destroy bastions on demand with Fargate.
Stars: ✭ 54 (-11.48%)
Mutual labels:  terraform, hcl
Docs Examples
Open in Cloud Shell Examples for the Google provider docs
Stars: ✭ 50 (-18.03%)
Mutual labels:  terraform, hcl
Terraform Aws Github Ci
[DEPRECATED] Serverless CI for GitHub using AWS CodeBuild with PR and status support
Stars: ✭ 49 (-19.67%)
Mutual labels:  terraform, hcl
Terraform Digitalocean Docker Swarm Mode
Terraform module for provisioning a Docker Swarm mode cluster on DigitalOcean
Stars: ✭ 59 (-3.28%)
Mutual labels:  terraform, hcl
Terraform Oci Oke
The Terraform OKE Module Installer for Oracle Cloud Infrastructure provides a Terraform module that provisions the necessary resources for Oracle Container Engine.
Stars: ✭ 57 (-6.56%)
Mutual labels:  terraform, hcl
Terraform Ecs Autoscale Alb
ECS cluster with instance and service autoscaling configured and running behind an ALB with path based routing set up
Stars: ✭ 60 (-1.64%)
Mutual labels:  terraform, hcl
Terraform Aws Vpc Peering Multi Account
Terraform module to provision a VPC peering across multiple VPCs in different accounts by using multiple providers
Stars: ✭ 52 (-14.75%)
Mutual labels:  terraform, hcl
Doact
A Terraform module for hosting your own runner for CI/CD on Digital Ocean to run jobs in your GitHub Actions workflows. 🚀
Stars: ✭ 42 (-31.15%)
Mutual labels:  terraform, hcl
Terraform Aws Rds Cloudwatch Sns Alarms
Terraform module that configures important RDS alerts using CloudWatch and sends them to an SNS topic
Stars: ✭ 56 (-8.2%)
Mutual labels:  terraform, hcl
Terraform Elasticache Example
Example Terraform config for creating an Elasticache cluster
Stars: ✭ 52 (-14.75%)
Mutual labels:  terraform, hcl
Terraform Aws Dynamodb
Terraform module that implements AWS DynamoDB with support for AutoScaling
Stars: ✭ 49 (-19.67%)
Mutual labels:  terraform, hcl
Terraform Kubernetes
Terraform module for provisioning AWS resources to run a Kubernetes cluster
Stars: ✭ 61 (+0%)
Mutual labels:  terraform, hcl
Infra Personal
Terraform for setting up my personal infrastructure
Stars: ✭ 45 (-26.23%)
Mutual labels:  terraform, hcl
Terraform Aws Asg
Terraform AWS Auto Scaling Stack
Stars: ✭ 58 (-4.92%)
Mutual labels:  terraform, hcl
Atlantis On Gke
A set of @HashiCorp Terraform configurations for running Atlantis on @GoogleCloud GKE
Stars: ✭ 44 (-27.87%)
Mutual labels:  terraform, hcl
Terraform Aws Alb
Terraform module to provision a standard ALB for HTTP/HTTP traffic
Stars: ✭ 53 (-13.11%)
Mutual labels:  terraform, hcl
Terraform Gcp Kubernetes Traefik
Little example of how to deploy a gke cluster with terraform and use traefik as ingress controller
Stars: ✭ 39 (-36.07%)
Mutual labels:  terraform, hcl
Terraform Aws Jenkins Ha Agents
A terraform module for a highly available Jenkins deployment.
Stars: ✭ 41 (-32.79%)
Mutual labels:  terraform, hcl
Airflow Toolkit
Any Airflow project day 1, you can spin up a local desktop Kubernetes Airflow environment AND one in Google Cloud Composer with tested data pipelines(DAGs) 🖥 >> [ 🚀, 🚢 ]
Stars: ✭ 51 (-16.39%)
Mutual labels:  terraform, hcl
Terraform Aws Multi Az Subnets
Terraform module for multi-AZ public and private subnets provisioning
Stars: ✭ 58 (-4.92%)
Mutual labels:  terraform, hcl

terraform-rancher-ha-example

Terraform files for deploying a Rancher HA cluster in AWS

Update: since v1.2.0 simplified the HA deployment process, master reflects the latest way to deploy Rancher HA. If you are looking for the previous code, it is tagged under v1.0.0.

These files are meant as a companion to the following blog post:

https://thisendout.com/2016/12/10/update-deploying-rancher-in-production-aws-terraform-rancheros/

Usage

Clone this repo:

git clone https://github.com/nextrevision/terraform-rancher-ha-example
cd terraform-rancher-ha-example

Edit the terraform.tfvars file:

# AWS key for the instances
key_name = "rancher-example"

# RDS database password
db_pass = "rancherdbpass"

# To enable SSL termination on the ELBs, uncomment the lines below.
#enable_https = true
#cert_body = "certs/cert1.pem"              # Signed Certificate
#cert_private_key = "certs/privkey1.pem"    # Certificate Private Key
#cert_chain = "certs/chain1.pem"            # CA chain

To create the cluster:

terraform apply

To destroy:

terraform destroy

Variables

AWS Infrastructure

  • region: AWS region (default: us-east-1)
  • count: number of HA servers to deploy (default: 3)
  • name_prefix: prefix for all AWS resource names (default: rancher-ha)
  • ami: instance AMI ID (default: ami-dfdff3c8; RancherOS in us-east-1)
  • key_name: SSH key name in your AWS account for AWS instances (required)
  • instance_type: AWS instance type (default: t2.large for RAM requirement)
  • root_volume_size: size in GB of the instance root volume (default: 16)
  • vpc_cidr: subnet in CIDR format to assign to the VPC (default: 192.168.199.0/24)
  • subnet_cidrs: list of subnet ranges (3 required) (default: ["192.168.199.0/26", "192.168.199.64/26", "192.168.199.128/26")
  • availability_zones: AZs for placing instances and subnets (may change based on your account's availability) (default: ["us-east-1a", "us-east-1b", "us-east-1d"])
  • internal_elb: Make ELB internal to VPC vs externally accessible (default: false)

Note: if you use an AMI other than RancherOS, the automatic launching of the Rancher server container will not work. You will need to update the user-data template according to the needs of your AMI.

Database

  • db_name: name of the RDS DB (default: rancher)
  • db_user: username used to connect to the RDS database (default: rancher)
  • db_pass: password used to connect to the RDS database (required)

SSL

  • enable_https: enable HTTPS termination on the loadbalancer (default: false)
  • cert_body: required if enable_https is set to true
  • cert_private_key: required if enable_https is set to true
  • cert_chain: required if enable_https is set to true

Rancher

  • rancher_version: Rancher version to deploy (default: stable)
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].