Simplify Infrastructure Provisioning with Somerford's ATIP App
Author: Jordan Phillpotts
Release Date: 05/01/2024
It’s the age-old problem, how do I host my applications or web services? Okay maybe not age old but certainly it’s something any burgeoning tech company would be thinking about, do you go for on-premises, off-site, or cloud? And how to control it all? Well I figure if you’re reading this, you probably have an idea that Terraform is one of the main options for centralised control of infrastructure. It allows you to automate and centralise the creation, destruction and manipulation of infrastructure, whether that be on-prem or cloud and is compatible with a wide variety of technologies.
Why isn’t everyone using it?
Well, we are starting to see an increased usage of Terraform in plenty of businesses, but some have encountered problems that have led us down a new avenue in our work with HashiCorp. One client in particular had a whole team that regularly required extra infrastructure quickly, but not constantly. A company manually configuring a cluster of infrastructure, even on the cloud, can take several days (even if they’re quick), which, I think, if you’re a developer waiting to start a task, can be a significant delay to a project. Now this is exactly what Terraform is good at automating, so what’s the problem? HashiCorp Configuration Language, or HCL, is the problem.
Why is this an issue?
If you have a team who is doing all this work manually, they do not have time to do the upskilling required to make effective use of Terraform to automate their task; even if they do that, while these requests will inevitably have similarities, they will not be the same. This creates a requirement for not only having some prewritten Terraform code (perhaps done by a consulting company, etc.) that they just run each time, but also actually being able to edit or customise it as well. What they need is the ability to provision infrastructure through a simpler method than using HCL, while still maintaining the ability to customise the requirements as they go along. Removing this technical barrier also opens up the provisioning infrastructure to the dev team, freeing up more of the Infrastructure team’s time.
HashiCorp calls this idea ‘No-Code Provisioning’ (for self-evident reasons) and it is currently in Beta in Terraform Cloud, giving users the ability to create infrastructure using a UI and dropdown menus to define requirements without having to learn how to use HCL or even Terraform. I hear you asking, ‘Well that seems like that’s that problem solved, why are you still going on about it?’ and don’t you worry I’m getting to it. First off, I actually do think that bringing attention to this feature for its own sake is useful anyway as I’m sure there will be businesses that can easily make use of this. However, it’s only in Terraform Cloud, so if you’re the kind of business that cannot have its information hosted in America (as Terraform Cloud does) this isn’t an option for you.
What is the solution?
Well, in trying to solve this, we came up with something. We developed our own solution to the no-code provisioning requirement and, in true Terraform style, it relies upon APIs. We developed a simple UI to enter the data which is fairly standard Bootstrap/HTML stuff. The unique part is the series of Python classes that allow you to create a Terraform file using Python. This allows us to combine those two components to automate the writing out of a Terraform file with dynamically added values on the fly, ready to be sent to Terraform through its API. This works with both Terraform Enterprise and Cloud and has been designed to be both extensible and modular, built using the simplest possible modules for both HTML and Python. So while it doesn’t eliminate the need to code at all it does make use of much more generic programming languages, meaning any vaguely experienced developer should be able to make modifications to the code/UI as required.
Our solution is called the Automated Terraform Infrastructure Provisioner and is available now from our website. We intend to keep it up to date as we discover new requirements, but only if the need is there, so the more it’s needed the more useful it will be. Get in touch with us to see if it’s right for your business.