Enhance the ‘Ops’ with Cloudformation

Enhance the ‘Ops’ with Cloudformation

It’s quite common, in the life of an integration consultant, to spin up a couple VM’s and/or containers to prototype a solution. In most cases it suffices to provision a virtual box or docker container on your local workstation. But when architectures get bigger, you’ll also want to prove the complete solution in a fully managed environment.

For instance, I’m working on a side project showcasing the webMethods Integration suite in a complete DevsOps environment. When taking into account a dev and a clustered test environment, this will already need 14 servers. Some integration servers, messaging servers, a management server, a Jenkins, a Sonarqube, webMethods build server, etc. You get the point; way to many servers to manually install and configure …

With the infrastructure as code (IaC) methodology in mind, I’m automating the provisioning of this infrastructure. Beside the classic tools like Chef, Puppet or Ansible there’s also the AWS service called Cloudformation. I was lured into using it via the handy architecture designing tool. So I decided to give it a try!

Let’s get technical

With Cloudformation (as with almost all IaC technologies), the infrastructure is described in a json or yaml file. In that ‘template’ file you’ll describe all the components in your architecture. Think about EC2 instances, VPC, Subnetworks, Security groups, Internet gateway etc… When the template is ready, all components are provisioned using one aws cli command.

You can follow the creation process in the Cloudformation web console. Below you’ll see an example of the creation events for a ‘simple’ template.

Cloudformation events
The template

This looks quite straightforward. The difficulty is of course in creating the template itself. When you’re new to Cloudformation, a very nice starting point to get acquainted is the architecture designing tool. This allows to drag and drop the required AWS components. As additional benefit, you’ll get a nice piece of documentation. The diagram below shows a basic example.

Dependencies and specific parameters will still need be researched via the comprehensive documentation. A simple search in the docs also offers a lot of sample templates for common setups.

The code snippet below shows a piece of the json behind the diagram. It’s the definition of the Lab1 server in the upper right corner of the diagram. Some OS configuration is defined in the “UserData” field. This part can be further extended to install custom software components.

So far I’ve found that Cloudformation is an ideal technology for this particular use case. As all needed components are within the boundaries of AWS anyway. And when you’re already familiar with AWS, learning Cloudformation is not more then a bicycle ride over small charming hill.

I’ll still need to drag & drop a couple of ec2 instances to the diagram and I’ll have an optimal starting point for my webMethods DevOps demo environment!

Author: Samuel Vandecasteele

Don’t hesitate to reach out on LinkedIn or Twitter!

Featured photo (top) by Thomas Kvistholt on Unsplash



Apply for these jobs
Working at i8c
i8c is a system integrator that strives for an informal atmosphere between its employees, who have an average age of approx 30 years old. We invest a lot of effort in the professional development of each individual, through a direct connection between the consultants and the management (no multiple layers of middle management). We are based in Kontich, near Antwerp, but our customers are mainly located in the triangle Ghent-Antwerp-Brussels and belong to the top 500 companies in Belgium (Securex, Electrabel, UCB, etc…).
Quality Assurance
i8c is committed to delivering quality services and providing customer satisfaction. That’s why we invested in the introduction of a Quality Management System, which resulted in our ISO9001:2000 certification. This guarantees that we will meet your expectations, as a reliable, efficient and mature partner for your SOA & integration projects. i8c also signed the eTIC Benelux charter, which proves our commitment to ethical service delivery.