AWS Multi – AZ Ansible Tower Cluster backed by RDS and fronted by ALB

Ever wondered how you could run ansible tower in clustered mode across multiple AZ in AWS?  This post will describe how you can build the following architecture:

 

First, build 3 ec2 instances each in a different AZ’s. You should be more than ok with t2.large instance sizes. The subnets in the VPC can be private. If you have a private VPC make sure you have a nat gateway so that the instance can talk to the internet.

Then make sure you are adding the correct security group (sg) settings to the instances

Once you have the security groups attached to the ec2 instances you can go ahead to the RDS tab and create the postrges 9.4 database. Choose production and multi-az. If you filled out everything correctly you should see something like

The connection string can be found all the way on the bottom of the page

tower.cqdtdsqmastk.us-east-1.rds.amazonaws.com

Also, make sure that your instance has the RDS SG attached so it can talk to the database.

Next login into your main ansible tower node and download the latest tower

Untar the directory and cd into it


Next, edit the inventory file


As you are in AWS you will need to enable the following 2 repos


Install ansible

Once finished launch the installation


If the installation is successful you should no be able to login to one of the tower hosts via its public fqdn assigned by AWS.

As we want to have a single entry point to the cluster we front end it with an ALB ( you will also need to have Route53 setup correctly for this to work) Go ahead and create the ELB. The cert and key for SSL can be found in /etc/tower. Make sure you upload the cert when creating the ALB. You also see that it spans across the 3 AZ’s.

Lastly, create an alias in route53 pointing to the ALB.

It will take a few minutes until the alias is available. Log in into your Tower instance

You can then go to configuration instance groups to validate your config

 

 

Congratulations if you read until here. You now have a fully HA Tower installation with AWS managed ELB and RDS.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.


Hit Counter provided by laptop reviews