Terraform files for deploying a Rancher HA cluster in AWS
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/
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
us-east-1
)3
)rancher-ha
)ami-dfdff3c8
; RancherOS in us-east-1)t2.large
for RAM requirement)16
)192.168.199.0/24
)["192.168.199.0/26", "192.168.199.64/26", "192.168.199.128/26"
)["us-east-1a", "us-east-1b", "us-east-1d"]
)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.
rancher
)rancher
)false
)enable_https
is set to true
enable_https
is set to true
enable_https
is set to true
stable
)