DevOps: What is it?

Devashish Patil
CodeByte
Published in
5 min readApr 2, 2022

--

Photo by AltumCode on Unsplash

What is DevOps?

DevOps is a culture in recent software engineering, which aims to streamline the software development process and the operations that go along with while releasing that software to the end-users.

DevOps aims to provide a developer experience such that the developers will only have to focus on writing the code. It also gives teams the ability to be agile so that they can efficiently cater to the fast-changing business and consumer needs.

Benefits

  • It reduces the manual work by automation
  • Reduces time to market
  • Increases adaptability
  • Maintains system stability and reliability
  • Improves recovery time in case of disasters.

Application Lifecycle

DevOps guides the application lifecycle from the planning, developing, operating and monitoring stages.

  • DevOps streamlines the whole process and makes it more agile.
  • It brings automation to the whole process so that more focus can be shifted to planning and development.
Source: Google Images

DevOps Practices

Version Control

Although a very old practice, version control is also one of the important DevOps practices. And you guessed it right, Git is at the forefront of it.

Version control tools can be the very well-known ones like Github, Gitlab, Bitbucket, or some managed offerings from various cloud providers like AWS, GCP, and Azure, or it can even be hosted and managed completely by yourself in your own data center.

Continuous Integration and Continuous Delivery — CICD

CICD is a set of processes that fills the gap between writing code in your local machine and serving the application to your users from live servers.

The CI part generally involves packaging your application code into the deployable format and running tests before sending it for deployments. This will look something like this:

  • Let’s say you have a JavaScript codebase, you’ve made some changes to it, and started running it on localhost.
  • You seem pretty happy with the improvements and now you want to publish it to the development environment. You push the code to the remote git repository.
  • The CI tool that has been set up will sense this change in the git repository and start running a new instance of the CI pipeline.
  • It’ll run the pre-configured unit tests and once passed, will create a build file via a command like npm build.
  • It’ll then store the build artifacts somewhere like a cloud bucket, which can be deployed in the CD part.

CD or Continuous Delivery ensures that the live systems are up to date with the latest code that got successfully built. There are various methods and multiple tools for continuous delivery all of which I won’t be covering here, but at a high level, it looks like this:

As soon as the build process succeeds, the CD pipeline will take over and access the live servers, stop the application, remove the old build and push the new one, and start the application again.

Tools: Jenkins, Gitlab CI, Circle CI, ArgoCD

Infrastructure as Code (IaC)

Cloud platforms provide you with very nice and intuitive user interfaces to explore their services. And creating one or two virtual machines, and databases from the UI is fine, the actual problem comes when you are doing these things on a scale, that too across multiple production and non-production environments.

You can see things going out of hand very soon and managing the cloud infrastructure will become a nightmare. Not only that, you will be performing repeatable and mundane operations multiple times.

This is where Infrastructure as code comes, which is a very effective way to provision and manage your cloud infrastructure and services.

With IaC, you can launch multi-tier applications as a single-click deployment without any limitations on the architectural complexity. Most cloud providers provide their own IaC solutions, but personally, I prefer using Terraform which can be used with all the major cloud platforms and is the industry-accepted and widely used solution.

Just for your reference, these are the IaC services from the major cloud providers:

  • AWS: CloudFormation
  • GCP: Deployment Manager
  • Azure: ARM templates

These tools work in a declarative manner, i.e., you’d write your desired infrastructure state in a JSON or YAML file, with a pre-defined set of rules and these templates can then be easily deployed.

Major advantages from this is that you’d be able to version your infrastructure, and it’d get very easy to replicate and promote changes from one environment to another.

Monitoring and Logging

Monitoring is considered to be the basis for modern application development. It provides you with real-time visibility over your infrastructure while enabling you to take timely measures to spare you from unexpected outages and application downtimes.

Logging over the cloud gives you a centralized place for you to see your application logs. You can then set up alerts for certain kinds of log events or do broader analytics to gain insights.

Some of the examples where monitoring and logging can be helpful:

  • You can monitor the CPU utilization of your virtual machines, as soon as it reaches a threshold, say 90%, you want to be alerted. Monitoring can help you with that so that you can scale your infrastructure(and this scaling can be set up automatically as well, based on the alerts).
  • Logging can help you find potential bugs with your application. You can also put filters and conditions on the logs to create insights or set up alerts on.

Configuration management

Configuration management enables you to maintain systems in a desired and consistent state.

Configuration management helps you roll out changes in a systematic way while reducing the risks of downtime that come while playing with system configuration.

Configuration management comes somewhere in between IaC and CICD in a way, as it aims to maintain the state of your servers, virtual machines, and databases as well as software.

With configuration management, you might look to manage these things:

  • Environment variables
  • Application configuration files
  • Secrets and encryption keys
  • CPU, RAM, etc.

DevOps is a fast-growing field in the current software development world which is addressing a lot of pain points while also giving birth to a number of new and exciting opportunities.

I tried to cover the basics and overview of DevOps in this article and I would love to do a deep dive into the aforementioned topics in the upcoming articles.

Until then, check out more stories from me and stay tuned for more.

And if you wish to, join my Discord server to have more interactive chats with like-minded folks.

--

--