To achieve faster application delivery, the right infrastructure automation tools must be used in DevOps environments. Unfortunately, there is no single tool that fits all your needs, such as server provisioning, configuration management, automated builds, code deployments, and monitoring.
Many factors determine the use of a tool in an infrastructure. This article will look into core tools that can be used in a typical environment practicing DevOps philosophy.
DevOps Tools for Infrastructure Automation
There are many tools available for infrastructure automation. Tool selection is decided by the platform architecture, skillsets, and needs of your infrastructure.
We have listed a few great tools below, which come under various categories like configuration management, orchestration, continuous integration, monitoring, etc.,
We have categorized the toolsets into the following.
- Infrastructure as Code
- Continuous Integration/Deployment
- Config/Secret Management
Infrastructure as Code (IaaC)
When it comes it infrastructure automation, you often hear the term infrastructure as code. In short IaaC.
IaaC tools can help you automate and manage all infrastructure components like networks, servers, cloud managed services, applications, firewalls, cloud & on-prem managed services, etc.
Like developing applications, a standard practice for IaaC code is to follow all standard coding practices like testing, review, etc. many companies follow test-driven IaaC developed to have foolproof infra change systems.
Once you have the infrastructure code ready, you can use it to create an environment anytime you want without much manual intervention. Just the parameters would change, and the code remains the same.
Most of the IaaC (Open Source) tools can be used on any cloud platform or on-prem environment s without a vendor lock-in unless you use a cloud or vendor-specific tool to manage your infrastructure.
Now let’s get started with the list.
Terraform is a cloud-agnostic infrastructure provisioning tool. It is created by Hashicorp and written in Go. It supports all public and private cloud infrastructure provisioning (Networks, servers, managed services, firewall, etc.).
Unlike other configuration management tools, terraform does a great job in maintaining the state of your infrastructure using a concept called state files.
You can get started with Terraform in days as it is easy to understand. Terraform has its own domain-specific language (DSL) called HCL (Hashicorp configuration language).
Also, you can write your own terraform plugin using Golang for custom functionalities.
Note: If you a beginner, you can get started with Terraform using this book. It’s a great book for beginners.
Terraform has huge community support and most of the modules required for infrastructure provisioning on all the cloud platforms can be found on the terraform registry.
Unlike other IaaC templating tools, Pulumi aims to provide better flexibility in terms of infrastructure code in your favorite programming language. This makes infra code testing easy with exiting testing frameworks that are native to a programming language.
Pulumi supports all the major cloud platforms like AWS, Google Cloud, and Azure. The best part is, it uses similar concepts like Terraform for state management.
If you are someone who wants to write pure code for your Infrastructure, you will give it a try for Pulumi.
Note: Terraform and Pulumi is purely infrastructure provisioning tools. It just creates networks, servers, etc., while tools like Ansible/Chef configures applications inside the server in an idempotent manner. So it is essential to understand the difference between infrastructure provisioning and configuration management.
Ansible is agent-less configuration management as well as an orchestration tool. In Ansible, the configuration modules are called “Playbooks.”
Playbooks are written in YAML format, and it is relatively easy to write compared to other configuration management tools. Like other tools, Ansible can also be used for cloud provisioning.
Ansible also supports dynamic inventory where it can fetch the server details dynamically through API calls.
But it is better to use tools like terraform and Ansible for infrastructure provision and use Ansible for just configuration management.
You can find all community playbooks from Ansible Galaxy
Chef configures virtual machines according to the rules mentioned in the cookbooks.
A chef agent would be running on all the servers which have to be configured. The agent will pull the cookbooks from the chef master server and runs those configurations on the server to reach their desired state.
You can find all the community cookbooks from Chef Supermarket.
Puppet is also a ruby-based configuration management tool like Chef. The configuration code is written using puppet DSLs and wrapped in modules.
While chef cookbooks are more developer-centric while the puppet is developed by keeping system administrators in mind.
Puppet runs a puppet agent on all servers to be configured and it pulls the compiled module from the puppet server and installs required software packages specified in the module.
You can find all community Puppet Modules from Puppetforge
Saltstack is a python based opens configuration management tool. Unlike chef and puppet, Saltstack supports remote execution of commands.
Normally in chef and puppet, the code for configuration will be pulled from the server while, in Saltstack, the code can be pushed to many nodes simultaneously. The compilation of code and configuration is very fast in Saltstack.
Note: The tool selection should be based entirely on project requirements and the team’s ability to learn and use the tool. For example, You can use Ansible to create infrastructure components and to configure VM instances. So if you have a small team and environment, terraform is not required to manage the infrastructure separately. Again it depends on how the existing team can learn and manage the toolsets
Continuous Integration/Deployment Tools
Now let’s look at the best CI/CD tools that can be part of infrastructure automation.
Jenkins is a java based continuous integration tool for faster application delivery. . Jenkins has to be associated with a version control system like GitHub or SVN.
Whenever a new code is pushed to a code repository, the Jenkins server will build and test the new code and notifies the team of the results and changes.
You Might Like: Jenkins Tutorial For Beginners
Jenkins is not just a CI tool anymore. Jenkins is used as an orchestration tool for building pipelines involving application provisioning and deployment. Its new pipeline as code functionality lets you keep the CI/CD pipelines as a complete code.
8. Github Actions
If you are using Github, Github actions are a great way to set up your CI pipelines.
Github actions provide many integrations and workflows to set up a CI pipeline. In addition, it can be used on public and enterprise Github accounts.
The concept of Github runners helps you to set up a CI execution environment in a self-hosted environment.
If you want to follow an immutable infrastructure pattern using Virtual machines, Packer comes in handy to package all dependencies and build deployable VM images.
It supports both private clouds and public cloud VM image management. You can also make Packer a part of your CI pipeline to build a VM image as a deployable artifact.
These containers can be shipped to any other server without making changes to the application. Docker is considered to be the next step in virtualization.
Docker has a huge developer community and it is gaining huge popularity among DevOps practitioners and pioneers in cloud computing.
It has great templating features that support templates for all kubernetes objects like deployments, pods, services, config maps, secrets, RBAC, PSP, etc.
You can use a single template to deploy multiple applications.
Also, look at the Kustomize. It is a native configuration management utility for Kubernetes.
12. Kubernetes Operators
Kubernetes is one of the best container orchestration tools.
If you are using Kubernetes, operators are something you should really look at. It helps in automating and managing the Kubernetes application with custom user-defined logic.
You can look at the following operator-based CD tools.
Infrastructure Development Tools
You can use the following tools for developing and testing your infrastructure code.
Vagrant is a great tool for configuring virtual machines for a development environment. Vagrant runs on top of VM solutions like VirtualBox, VMware, Hyper-V, etc.
You can follow our getting started with Vagrant guide to learn more about it.
Vagrant uses a configuration file called Vagrantfile, which contains all the configurations needed for the VM. Once a virtual machine is created and tested using a Vagrantfile, it can be shared with other developers to have identical development environments.
Vagrant also has plugins for cloud provisioning and integration with configuration management tools (chef, puppet, etc.) to configure the VM on run time.
Minikube provides a local development setup using Kubernetes. You can use Mikukube for developing and testing Kubernetes. It is lightweight and fast.
If you want a full-fledged Kubernetes setup on your local workstation, you can look at the Kubernetes vagrant setup.
Consul is an open-source highly available key-value store. It is mainly used for service discovery purposes. If you have a use case to store and retrieve configurations in real-time, consul is the right fit.
etcd is another open-source key-value store created by the CoreOS team. It is one of the key components used in Kubernetes for storing the state of cluster operations and management.
Hashicorp Vault is an open-source tool for storing and retrieving secret data. It provides many functionalities to store your secret key in an encrypted way. You can create ACLs, policies, and roles to manage how the secrets will be accessed by end-users.
You can also integrate vault with Kubernetes cluster to inject secrets into pods.
Monitoring is also an important aspect of infrastructure automation. You can use metrics and alerts from monitoring systems to automatically take decisions like scaling, notifications, remediations, etc.
Let’s look at some of the monitoring tools that can be part of your infrastructure. If you want to know about the free tools, look at the list of open source monitoring tools.
18. Prometheus & Alert Manager
It has out-of-the-box support for Kubernetes and Openshift monitoring. The alert manager manages all the alerting set up for the monitoring metrics.
Also, there are many open-source exporters available for applications. You can use these exporters to push application metrics into Prometheus.
19. New Relic
New Relic is a cloud-based (SaaS) solution for application monitoring. It supports the monitoring of various applications like Php, Ruby, Java, NodeJS, etc. It gives you real-time insights into your running application. A new relic agent should be configured in your application to get real-time data. New relic uses various metrics to provide valuable insights about the application it is monitoring.
Sensu is an open-source monitoring framework written in Ruby. Sensu is a monitoring tool specifically built for cloud environments. It can be easily deployed using tools like chef and puppet. It also has an enterprise edition for monitoring.
Datadog is also a cloud-based (Saas) application and server monitoring solution. You can monitor docker containers and other applications using Datadog.
Other tools worth considering,
- Riemann (Open Source Monitoring Tool)
- AppDynamics (For application monitoring)
- Logz.io (For log analysis and management)
- ELK stack (Elasticsearch, Logstash, Kibana)
- Splunk (Log analysis and alerting)
Infrastructure automation is a requirement for every DevOps team. Usage and selection of a tool depend on factors like cost, skillset, functionality, etc.
Again one tool will not definitely fit your needs. The selection of toolsets should be based on the organization’s/team requirements rather than the functionality of the tool.
You can also check out this article on 90 DevOps tools list
So what tools are you using for infrastructure automation?