All you need to know to get started with DevOps
Tags: devops, docker, kubernetes, jenkins
Published: 2022-02-10 10:23:26

## DevOps 101

So, you have been following the buzz around the internet about the term "***DevOps***" but don't exactly know what DevOps is, or maybe you are someone who's trying to determine if DevOps is a career for you. Then this is the blog for you.

I once was at that stage when I had a hard time starting my learning journey in DevOps. So, this blog is dedicated to all students, complete beginners and whoever is willing to explore!

## In this blog, we will

- Make ourselves comfortable with the term DevOps.
- Understand Software Development Life Cycle
- Discuss the significance of DevOps
- Implementing DevOps, a study of the structure and tools used.
- Look at basics to get started with your DevOps journey

## Introduction

Firstly, DevOps is neither a tool, software, or programming language; it's not even a technology stack. To put it simply, DevOps is just a *philosophy* or a *mindset*.

An ideology that makes **Software development Life Cycle (SDLC)** (aka Application lifecycle management) efficient, reliable, and agile. The term "DevOps" is itself derived from two major phases of Software development Life Cycle those are **Development** and **Operations** (DevOps = **DEV**elopment + **OP**eration**S**).

DevOps is the mixture of cultural philosophies, practices, and tools aiming to deliver quality applications and services at a high rate.

It's a culture that distributes the workload as well as collaboration among various teams in an organization to achieve a common goal of developing and managing the application for the end-user.

## Scenario

Typically, in a mid-size organization, two teams handle the Software development Life Cycle.

- Development Team

![Team Developer tasks](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ijsy45jaw28qkq1xykyu.png)

- Operations team

![Team Operations tasks](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1qlyamyc3x9sl4akuto2.png)

Both teams are essential in the Software development Life Cycle, and both are dependent on each other.

Development: The development team develops the project or application from scratch, adds new features, and prepares a usable product for the end-user.

Operations: The operations team tests the application and provides the development team feedback. The product may go into the development phase again. 

When the final product is ready, the operations team deploys the application for the end-user.

### Era before DevOps

Let's first understand the term ***Software development Life Cycle***.

The software development life cycle (SDLC) is the process used by the software industry to *design*, *develop*, and *test*  software or applications. 

It consists of phases which include developing the software from scratch to delivering it to the end-user.

There are various methods of practicing the SDLC — DevOps being one of them. We will discuss two widely used ways that gave birth to the DevOps method.

Understanding these two methods is crucial as it plays a vital role in understanding the DevOps culture.

### 1. Waterfall Model

This is a linear approach of SDLC, suitable for small-scale static projects.

**Requirements —> Analysis —> Design —> Development/Code —> Test —> Deploy —> Maintenance**

1. **Requirements**: Coordinating with the client, understanding their demands, and getting a clear picture of the desired product. This phase answers *WHAT?* is the product

2. **Analysis**: It's time to analyze the requirement and specify the technology stacks, tools, languages, etc. will be used in this project, *HOW?* to develop this product. This phase also includes structuring further processes and setting up goals and timelines for the project.

3. **Design**: The developers start developing the project in this phase. Create mock-ups, design User-Interface, and make a prototype of the end product.

4. **Development/Code** : The developers start coding. This phase ends when the developers have prepared the product as decided in the previous phases, now ready to test this product.

5. **Testing**: This phase now shifts the SDLC towards the operations team. The team tests the product and checks for any bugs or loose ends. The team also ensures that the product aligns with the client's demands.

6. **Deploy**: Once the product is all set to enter the market, it is deployed by the operations team. The product is open to use for the end-user.

7. **Maintenance**: Dealing with the issues that occur in the client environment. Patches are released to fix these problems. Releasing improved and better versions to improve the product.
<br>

![Waterfall Model](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uu0zjhfvds8cgvnunlpn.png)

#### Drawbacks of the Waterfall Methodology

* Once your application is in the testing phase, it's pretty challenging to go back and change something that wasn't well thought out in the Analysis phase.

* There is no actual functioning product till the later stages of the life cycle have been completed.

* This is not an efficient model for complex, object-oriented, and Dynamic projects.

* Intense planning and scoping are required in the early stages that consume a lot of time and resources.

* The waterfall methodology is unsuitable for projects with shifting goals or requirements. For example, the application your team is developing is aimed at desktop users and is now in the testing phase. Perhaps the market has transformed, and the client demands a mobile-friendly solution too. This disruption in the objective may cause the entire life cycle to restart.

* The Waterfall Model may prove costly as any point of failure at any stage of the SDLC can lead to a restart of the entire life cycle.

This was the typical SDLC approach which required a lot of fixing. And so, a new method was being observed to replace the waterfall method.

### 2. Agile Model

This methodology patches up the shortcoming of the Waterfall methodology.

The Agile Method introduces an iterative approach, **Design —> Development/Code —> Test** follows an iteration until the result is achieved.


![Agile Model](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ck1t8t4m91lsew8ydzpg.png)

The team understands the requirements of the client.

Analyze and plan to achieve the goal.

Now begins the loop of Design, Code, Test, repeat. These iterations take 2-8 weeks, and each iteration is executed quickly, thus, providing the actual product in the early stages (Unlike the waterfall approach that provides the product at the end of the cycle).

At the end of each iteration (after testing the product), the product is developed and tested. With every iteration, the product keeps getting feature-rich and stable.

This cycle continues till the final product is now feature-rich and is perfect for fulfilling the end-user demands.

#### The problem?

The problem arises between the "Final Testing" phase and "The Deployment" phase. These errors are usually regarding the dependencies, For, eg. The application may be developed in Java version 8, and the operations team has set up the environment for Java version 11.

The conversation between the Development Team and the Operations team goes like this —

_Operations team: The application looks good upon testing. It just doesn't work after deployment._

_Development team: It works on our PCs, so you may need to configure your environment right or try to duplicate our development environment (environment in which we produced the application)._

_Operations team: You need to specify your application's dependencies, so we can set up the deployment environment and make it._


The key breakpoints here are the communication and collaboration between the two teams.

Here, the *environment* refers to the Operating System, the tools and packages required to run the application. It's crucial to ensure that the deployment environment matches the development environment to ensure the proper functioning of the application in the deployed state.

*Deployment* simply means that the application is live and running on the internet or in the desired environment (for example, the client's machine).

Say you made a portfolio website on your local machine using HTML, CSS, and JS. To make that website visible on the internet, you host your website and upload all your HTML, CSS, and JS files to a server that will host your website on the internet. This uploading of data on a server and making sure that the website is up and running this process can be referred to as the deployment of your website.

Deployment was a manual and tedious process in both Waterfall and Agile methodologies.

These problems gave the inevitable birth to a new, advanced and efficient model of SDLC, which today is popularized as *DevOps*.

### DevOps Methodology

DevOps is a methodology aimed at efficiency and convenience in SDLC, with the help of modern techniques, tools, and systematic practices. DevOps is more about how you architect your SDLC to get maximum output.

It is a Continuous loop where all the phases are intended to be executed seamlessly, represented as shown in the figure,

![DevOps Model](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r1622z8quumczdd50qgj.png)

<sup>Image Courtesy : Dynatrace News</sup>

## Start with the DevOps

DevOps revolves around four phases. In the subsequent blog, we will discuss each process in detail.

1. Version Control: Version control saves a lot of time and resources. The developed code is deployed on a shared online repository (on a shared folder online), collaboration

    Maintaining a log of all the changes made by the developers in the source code. This makes bug tracing very efficient, and identifying lines of code is responsible for the errors and bugs. Version control is keeping track of

- Who made the changes.
- When were the changes made.
- What were the changes.
- Previous versions of the code.

    Tools used: Git, GitHub, GitLab.

2. Continuous Integration: Now that the code is ready with additions and patches, it's time to build and test those changes in a familiar environment; this is a manual and time-consuming process. *Jenkins* is one of those tools that help you automate and speed up this process.

    *Jenkins* is an open-source server that lets you set up an ideal environment for your application. It automatically fetches the code from the repository, integrates it with the existing source code, and re-builds the application to check for errors.

    After testing and integration, Jenkins creates an executable file (.war, .jar, etc.). These packages are now ready to be deployed on a server to make the application live.

3. Continuous Delivery: Jenkins now deploys this package on a live test server for User Acceptance Test (UAT). This is the final testing; this checks the overall functioning of the application as it will be perceived by the end-user  

4. Continuous Deployment: This is the final phase. The application is now hosted on the production server and is now up and running, live for the end-users.

### Tech Stacks required

1. A beginner-level application development knowledge (preferably Object Orient languages such as Java, C++, Python).

2. A beginner-level knowledge of Computer Networking as DevOps is deeply integrated with services that run on the internet (Syllabus of CompTIA Network+).

3. A medium-level knowledge of Cloud Infrastructure as Cloud is the pillar of DevOps (we will discuss more Cloud Technology in the upcoming blogs).

4. A medium-level knowledge of UNIX/Linux commands.

5. A medium to advanced knowledge of some tools we will discuss in other blogs.

## Conclusion

DevOps is a vast field that requires knowledge from various domains due to its deep integration in every aspect of the Software Development Lifecycle. DevOps is not only concerned with tools and technology; it also looks over collaboration, empathy, innovation, growth mindset, and effective cross-cultural communication.

## What's next?

In the upcoming blogs, we will study each phase of the DevOps Model, starting with Version Control. In the subsequent blogs, we will also look at the tools used in each of the phases of DevOps and how they contribute to the Software Development Lifecycle.