The six hottest technologies in DevOps

Image for post
Image for post

By Jeremy Pedersen

What’s hot, and what’s not?

Before we dive in, there is one important point I should clarify, though: DevOps is not a tool and it is not a set of tools. DevOps is a methodology, a way of working. The original idea is a simple one: bring Development and Operations together. Traditionally Development’s goal is to roll out new features as fast as possible, and Operations’ goal is to limit downtime and ensure stability. DevOps is about bringing these goals into closer alignment.

Of course, a big part of that is using the right tools, and there are many many “DevOps” tools out there.

This blog post will focus on just six of them:

  1. Terraform
  2. Ansible
  3. Docker
  4. Kubernetes
  5. GitLab
  6. Jenkins

This isn’t a how-to, and it’s not an in-depth tutorial. The focus of this tutorial is just to introduce what each tool does and explain what its strengths and weaknesses are, and how they tie into the “DevOps philosophy”.

1. Terraform

With HCL, you can describe your desired infrastructure: servers, networks, storage, and so on. When run, the terraform command-line tool reads your HCL code, compares it against a state file that records the current state of your deployed infrastructure, and then makes any necessary changes.

Almost all major cloud providers are terraform compatible: they supply something called a terraform provider, which is a module that the terraform tool uses to call a given cloud provider's API to create, configure, or destroy infrastructure resources.

Terraform is a very powerful DevOps tool because it allows teams to treat their infrastructure the same way they treat their source code: as something that can be versioned, checked into a central repository, reviewed, changed incrementally, or even rolled back.

This means that Operations teams can enjoy the same flexibility and scalability as Development teams.

Terraform also makes it very easy to recreate your infrastructure: simply make a copy of your Terraform code and sent up a completely identical environment! This is very valuable for testing and enables infrastructure to be incrementally improved in the same way that source code is.

2. Ansible

Ansible, on the other hand, has limited ability to set up infrastructure such as servers (it can do this on many providers, but it isn’t its core strength), instead focusing on executing Ansible playbooks (lists of configuration steps) against a target machine. It connects to the target over SSH or Windows Remote Management.

Many people ask “should I choose Terraform or Ansible?” but they are actually complementary. In general, choose Terraform for infrastructure configuration, and choose Ansible for server configuration.

They can and do work well together. In fact, I’ve written a script for setting up GitLab on Alibaba Cloud that uses both heavily.

With Ansible, manual steps can be automated, and the Ansible playbook effectively documents the steps you took to set up a system. This makes deploying software reliably much easier and more repeatable, which is a key part of DevOps.

3. Docker

What Docker (and the concept of a container) allows you to do is package your code along with all the configuration and dependencies it needs to run. Any host that can run Docker can then run your code, exactly as it ran on your machine. No more worrying about dependencies or versions or any of that.

Docker containers are configured using Dockerfiles which are text files explaining the software + configuration steps that are needed to create a container image. You can then distribute this image, and it can be downloaded on any machine that runs Docker. That’s it!

Docker containers give developers a consistent environment in which to run and test their code, and ensure that the code will run the same way in production as it did on the developer’s machine, meaning more reliability and less failures for Operations. This enables a DevOps workflow.

4. Kubernetes

Kubernetes handles a lot of the ‘heavy lifting’ of using containers in a production environment: it helps you run containers across multiple hosts, achieve failover and redundancy, handles load balancing, and more.

Because Kubernetes is open source and can run on any cloud provider, it is also a great way to achieve a homogeneous environment across multiple providers. For instance, Alibaba Clouds Kubernetes Service actually allows you to manage Kubernetes clusters that are hosted on other clouds!

Much like Terraform, Ansible, and Docker, Kubernetes keeps track of configuration via human-readable YAML files. You can use the same YAML files on different Kubernetes clusters to make sure applications are set up and run in exactly the same way, everywhere.

Are you seeing a pattern yet? A big pat of DevOps (and modern development in general) is having configuration files that describe what the desired state of your system is in a human-readable format. This way, your code is the description of your environment.

5. GitLab

This way, you can do things like automatically run terraform when you change your Terraform HCL code, or automatically build a new Docker image when you update a Dockerfile. GitLab can also hook into other tools that help you to test code quality or run other checks.

This is important because a big part of DevOps is making sure developers get feedback about their code as fast as possible, which allows them to catch and fix mistakes before code goes into production.

GitLab is often used to achieve something called “CI/CD” (Continuos Integration / Continuous Deployment), in which changes to code are tested as soon as the code is completed, and deployed as soon as the code passes its tests.

6. Jenkins

Actually GitLab includes a component called GitLab Runner which does a lot of the same things as Jenkins. So why include Jenkins in this list? Jenkins is more full featured than the GitLab Runner and can be extended via plugins.

Like GitLab, Jenkins helps fill an important role in the DevOps ecosystem: triggering code tests, code builds, and deployments.

Putting it all together

With DevOps, the more automation, the better. Choosing the right tools can take you a long way.

Further Learning

Original Source:

Follow me to keep abreast with the latest technology news, industry insights, and developer trends.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store