At Radify, we greatly favor immutable infrastructure, which we described in two previous posts, Reducing Infrustration and Immutable Demo Nodes. We also outlined a simple method for setting up immutable infrastructure on AWS with Ansible. We have now gone a step further and created Radiian (RADify Immutable Infrastructure for ANsible), a tool which automates the process of creating a ready-to-go Ansible playbook to deploy immutable infrastructure on AWS.
What is Radiian?
Radiian scaffolds an Ansible playbook for deploying immutable infrastructure on AWS. This playbook provides a template for deploying whatever Ansible roles you like in an immutable fashion. It will take care of all the immutable infrastructure side of things (standing up nodes, tearing them down, etc), leaving you free to focus on what you want installed on your nodes.
The generated playbook takes care of the following:
- Tagging old EC2 nodes for termination
- Standing up new EC2 nodes
- Adding the new EC2 nodes to the Elastic Load Balancer (ELB)
- Terminating tagged old EC2 nodes
Your job is then just to configure the Ansible roles that you need to provision your EC2 nodes.
Workflow
Radiian has a simple workflow:
What Radiian is not
As you can see from the diagram above, Radiian creates an Ansible playbook, but is not responsible for running and debugging that playbook. For example, from the diagram it is clear that Radiian is not responsible for creating and saving your private .pem
key. Radiian is not an Ansible installer, nor does it set up AWS for you. If you're having trouble with Ansible, there is extensive documentation. If you're new to AWS, Amazon explains how to get started.
The only service that Radiian provides is to scaffold a template Ansible playbook for deploying immutable infrastructure on AWS.
What Sets Radiian Apart
Immutable Infrastructure makes Radiian different from many other Ansible tools. Yeoman's Ansible generator creates a playbook, but without immutable architecture. Radiian does not tie you to Ubuntu, or to DigitalOcean, or to Docker. All Radiian seeks to do is to layout a simple project template that relies upon immutable infrastructure.
Sample Use Cases
- A new project: If you want to create a new project using immutable cloud infrastructure, Radiian is exactly what you need.
- An existing project: You like the idea of immutable infrastructure, but aren't sure how to migrate your existing work to such an architecture. Radiian gives you a minimal playbook from which you can begin to migrate your project to immutable infrastructure, AWS, or both.
- "Tinkering fatigue": "Who has changed what in our servers? Who has been tinkering around in EC2?" If you get tired of asking such questions (i.e., you are suffering from configuration drift), Radiian's approach to AWS architecture will keep you from having to ask those questions ever again. All changes to your AWS configuration are preserved in your Ansible playbook, which in turn is kept under version control history, so you can always know who changed something and when it was done. More importantly, every update to the playbook destroys the old nodes and creates new ones. At all times, your architecture is exactly what is described in the playbook.
Video Walkthrough
Moving forward
Radiian offers a minimal framework to get started with immutable infrastructure. Thanks to Radiian you can quickly and efficiently create a new project on, or switch an old project to, immutable infrastructure.