CodeByte
Published in

CodeByte

DevOps: What is it?

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 centre.

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 deployable format and running tests before sending 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 artefacts 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, databases from the UI is fine, the actual problem comes when you are doing these things on 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 industry accepted and a 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 the 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 centralised place for you to see your application logs. You can then set up alerts for certain kind of log events or do a broader analytics to gain insights from.

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

  • You can monitor the CPU utilisation 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 setup 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 comes 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 softwares.

With configuration managements, 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.

--

--

--

Get your programming bytes here…

Recommended from Medium

Embedded Python: Cranking Performance Knob up to Eleven! 🐍🥇

Learn Rust and Jamstack web apps through serverless functions

CS371p Spring 2022: Eric Dai

Obtain An API To Collect Lumber Prices In Canadian Dollar

Kubernetes, 1 year in production

Know Which Country Has The Highest Currency In 2022 With This API

Obtain LME Zinc Data In Real-Time With An API

5 minute masternode setup

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
Devashish Patil

Devashish Patil

Cloud Engineer at Google | IITR Alumnus

More from Medium

Intro To DevOps: What is a CI/CD Pipeline?

Introduction to Continuous Integration and Continuous Delivery with Python Flask

Secure your Cloud Platform with these tips and best practices

Installing Hadoop on Ubuntu 20.04