15 Infrastructure as Code tools you can use to automate your deployments
Automate your infrastructure deployments and configurations with these Infrastructure as Code tools.
This is the third article in our Infrastructure as Code blog series. You can read the first two here:
- Infrastructure as Code: 5 Reasons Why You Should Implement IaC Now
- Infrastructure as Code: 6 best practices to get the most out of IaC
To be notified when future posts go live, click here.
Now that you’ve read our first two blog posts about Infrastructure as Code (you’ve read them, right?), it’s time to learn about some of the tools that will help you integrate IaC into your development processes.
There are MANY tools that can help you automate your infrastructure. This post highlights a few of the more popular tools out there and some of their differentiating features.
Configuration Orchestration vs. Configuration Management
The first thing that should be clarified is the difference between “configuration orchestration” and “configuration management” tools, both of which are considered IaC tools and are included on this list.
Configuration orchestration tools, which include Terraform and AWS CloudFormation, are designed to automate the deployment of servers and other infrastructure.
Configuration management tools like Chef, Puppet, and the others on this list help configure the software and systems on this infrastructure that has already been provisioned.
Configuration orchestration tools do some level of configuration management, and configuration management tools do some level of orchestration. Companies can and many times use both types of tools together.
All right, on to the tools!
15 Infrastructure as Code tools
Terraform
Terraform is an infrastructure provisioning tool created by Hashicorp. It allows you to describe your infrastructure as code, creates “execution plans” that outline exactly what will happen when you run your code, builds a graph of your resources, and automates changes with minimal human interaction.
Terraform uses its own domain-specific language (DSL) called Hashicorp Configuration Language (HCL). HCL is JSON-compatible and is used to create these configuration files that describe the infrastructure resources to be deployed.
Terraform is cloud-agnostic and allows you to automate infrastructure stacks from multiple cloud service providers simultaneously and integrate other third-party services.
You even can write Terraform plugins to add new advanced functionality to the platform.
AWS CloudFormation
Similar to Terraform, AWS CloudFormation is a configuration orchestration tool that allows you to code your infrastructure to automate your deployments.
Primary differences lie in that CloudFormation is deeply integrated into and can only be used with AWS, and CloudFormation templates can be created with YAML in addition to JSON.
CloudFormation allows you to preview proposed changes to your AWS infrastructure stack and see how they might impact your resources, and manages dependencies between these resources.
To ensure that deployment and updating of infrastructure is done in a controlled manner, CloudFormation uses Rollback Triggers to revert infrastructure stacks to a previous deployed state if errors are detected.
You can even deploy infrastructure stacks across multiple AWS accounts and regions with a single CloudFormation template. And much more.
We’ve written a ton of CloudFormation templates, so we’ll dig much deeper into this in future posts.
Azure Resource Manager and Google Cloud Deployment Manager
If you’re using Microsoft Azure or Google Cloud Platform, these cloud service providers offer their own IaC tools similar to AWS CloudFormation.
Azure Resource Manager allows you to define the infrastructure and dependencies for your app in templates, organize dependent resources into groups that can be deployed or deleted in a single action, control access to resources through user permissions, and more.
Google Cloud Deployment Manager offers many similar features to automate your GCP infrastructure stack. You can create templates using YAML or Python, preview what changes will be made before deploying, view your deployments in a console user interface, and much more.
Chef
Chef is one of the most popular configuration management tools that organizations use in their continuous integration and delivery processes.
Chef allows you to create “recipes” and “cookbooks” using its Ruby-based DSL. These recipes and cookbooks specify the exact steps needed to achieve the desired configuration of your applications and utilities on existing servers. This is called a “procedural” approach to configuration management, as you describe the procedure necessary to get your desired state.
Chef is cloud-agnostic and works with many cloud service providers such as AWS, Microsoft Azure, Google Cloud Platform, OpenStack, and more.
Puppet
Similar to Chef, Puppet is another popular configuration management tool that helps engineers continuously deliver software.
Using Puppet’s Ruby-based DSL, you can define the desired end state of your infrastructure and exactly what you want it to do. Then Puppet automatically enforces the desired state and fixes any incorrect changes.
This “declarative” approach — where you declare what you want your configuration to look like, and then Puppet figures out how to get there — is the primary difference between Puppet and Chef. Also, Puppet is mainly directed toward system administrators, while Chef primarily targets developers.
Puppet integrates with the leading cloud providers like AWS, Azure, Google Cloud, and VMware, allowing you to automate across multiple clouds.
Saltstack
Saltstack differentiates itself from tools like Chef and Puppet by taking an “infrastructure as data” approach, instead of “infrastructure as code.”
What this means is that Saltstack’s declarative configuration patterns, while written in Python, are language-agnostic (i.e. you don’t need to learn a specific DSL to create them) and thus are more easily read and understood.
Another differentiator is that Saltstack supports remote execution of commands, whereas Chef and Puppet’s configuration code needs to be pulled from their servers.
Ansible
Ansible is an infrastructure automation tool created by Red Hat, the huge enterprise open source technology provider.
Ansible models your infrastructure by describing how your components and system relate to one another, as opposed to managing systems independently.
Ansible doesn’t use agents, and its code is written in YAML in the form of Ansible Playbooks, so configurations are very easy to understand and deploy.
You can also extend Ansible’s functionality by writing your own Ansible modules and plugins.
Juju
Juju is an IaC tool brought to you by Canonical, the company behind Ubuntu.
You can create Juju charms, which are sets of scripts that deploy and operate software, and bundles, which are collections of charms linked together to deploy entire app infrastructures all at once.
You can then use Juju to manage and apply changes to your infrastructure with simple commands.
Juju works with bare metal, private clouds, multiple public cloud providers, as well as other orchestration tools like Puppet and Chef.
Docker
Docker helps you easily create containers that package your code and dependencies together so your applications can run in any environment, from your local workstation to any cloud service provider’s servers.
YAML is used to create configuration files called Dockerfiles. These Dockerfiles are the blueprints to build the container images that include everything — code, runtime, system tools and libraries, and settings — needed to run a piece of software.
Because it increases the portability of applications, Docker has been especially valuable in organizations who use hybrid or multi-cloud environments.
The use of Docker containers has grown exponentially over the past few years and many consider it to be the future of virtualization.
Vagrant
Vagrant is another IaC tool built by HashiCorp, the makers of Terraform.
The difference is that Vagrant focuses on quickly and easily creating development environments that use a small amount of virtual machines, instead of large cloud infrastructure environments that can span hundreds or thousands of servers across multiple cloud providers.
Vagrant runs on top of virtual machine solutions from VirtualBox, VMware, AWS, and any other cloud provider, and also works well with tools like Chef and Puppet.
Pallet
is an IaC tool used to automate infrastructure in the cloud, on server racks, or virtual machines, and provides a high level of environment customization.
Pallet is an IaC tool used to automate infrastructure in the cloud, on server racks, or virtual machines, and provides a high level of environment customization.
Pallet is written in Clojure, runs in a Java Virtual Machine, and works with AWS, OpenStack, VirtualBox, and others, but not Azure nor GCP.
You can use Pallet to start, stop, and configure nodes, deploy projects, and even run administrative tasks.
(R)?ex
(R)?ex is an open-source, weirdly-spelled infrastructure automation tool. “(R)?ex” is too hard to type over and over again, so I’m going to spell it “Rex” from now on.
Rex has its own DSL for you to describe your infrastructure configuration in what are called Rexfiles, but you can use Perl to harness Rex’s full power.
Like Ansible, Rex is agent-less and uses SSH to execute commands and manage remote hosts. This makes Rex easy to use right away.
CFEngine
CFEngine is one of the oldest IaC tools out there, with its initial release in 1993.
CFEngine allows you to define the desired states of your infrastructure using its DSL. Then its agents monitor your environments to ensure that their states are converging toward the desired states, and reports the outcomes.
It’s written in C and claims to be the fastest infrastructure automation tool, with execution times under 1 second.
NixOS
NixOS is a configuration management tool that aims to make upgrading infrastructure systems as easy, reliable, and safe as possible.
The platform does this by making configuration management “transactional” and “atomic.” What this means is that if an upgrade to a new configuration is interrupted for some reason, the system will either boot up in the new or old configuration, thus staying stable and consistent.
NixOS also makes it very easy to rollback to a prior configuration, since new configuration files don’t overwrite old ones.
These configuration files are written in Nix expression language, its own unique functional language.
Conclusion
So there you have it. Check out these configuration orchestration and management tools that you can use to implement Infrastructure as Code and help you automate your infrastructure.
This list is by no means exhaustive but it should give you a starting point for tools that you can use during your IaC journey.
Stay tuned for a more in-depth dive into AWS CloudFormation. To receive an email when future posts are published, sign up for our email list by clicking here.
Like this post? It likes you too. :)
If you enjoyed this post, please give it some claps so others can discover it more easily!
This article was originally published on ThornTech.com