DevOps

Introduction to DevOps - Learn What DevOps is and How It Works


Introduction to DevOps

A software development methodology called DevOps helps to overcome the communication gap between developers and IT personnel. Small features may be released fast with DevOps, and companies can quickly integrate feedback they receive. The development, testing, deployment of technology for automated CI/CD pipelines are all part of the DevOps process.

 

DevOps chart

 

 

DevOps Features

  • Easily Scalable
  • Continuous Build
  • Provide Collaborations
  • Continuous Build, Test, Integrate and Deploy
  • Enables Automation
  • Ops Alignment
  • Improved Business Agility
  • Faster Delivery
  • Better Response Time
  • Reduced IT Costs
  • Increase Customer Satisfaction

 

Why DevOps?

Before DevOps came, IT Companies developed software using traditional methods such as Waterfall Model and Agile Methodology. Let's have a quick overview of what these methodologies are and how exactly do they work

Waterfall Model:

One simple software development approach is the Waterfall approach. This appraoch takes a top-down methodology.

 

DevOps waterfall modal

 

 

Difficulties in the above model:

  • Uncertain and dangerous
  • Not able to see the present status is inappropriate when the criteria are constantly changing.
  • Changes are challenging to implement during the testing process.
  • Only after the cycle is the final product available.
  • It is not appropriate for large projects.

 

Agile Methodology:

 Agile is an iterative software development methodology in which the project is divided into multiple sprints or iterations. Similar to waterfall approach, each iteration includes phases for requirements collection, design, development, testing, and maintenance.

 

DevOps Agile Modal

 

 

Difficulties

  • heavily reliant on precise client specifications
  • For bigger projects, it might be challenging to forecast time and effort.
  • Unsuitable for intricate projects
  • Ineffective documentation
  • Risks to maintainability have increased.

 

How does DevOps help?

DevOps integrates developers and operations teams to improve collaboration and productivity of projects.

 

According to the DevOps culture, a single group of Engineers (developers, system admins, QA, Testers turned into DevOps Engineers) has end-to-end responsibility of the application right from gathering the requirement to development, to testing, to infrastructure deployment, to application deployment and finally monitoring & gathering feedback from the end users, then again implementing the changes.

 

DevOps table

 

 

DevOps Tools & Lifecycle Phases

 

DevOps tools like as Puppet, Jenkins, GIT, Chef, Docker, Selenium, AWS, and others are necessary to achieve automation at different stages and to speed up and realize DevOps operations in addition to cultural acceptance. Now, carefully examine the DevOps diagram below using a variety of DevOps tools and attempt to interpret it.

 

DevOps chart-2

 

 These tools have been categorized into various stages of DevOps. Hence it is important to understand the DevOps Lifecycle stages first. 

DevOps Lifecycle Stages

The DevOps Lifecycle can be generally divided into the steps described below:

  • Continuous Development
  • Continuous Integration
  • Continuous Testing
  • Continuous Monitoring
  • Virtualization and Containerization

 

Stage-1: CONTINUOUS DEVELOPMENT

 

Tools: Git, SVN, Mercurial, CV

This is the phase that involves ‘planning‘ and ‘coding‘ of the software. You decide the project vision during the planning phase and the developers begin developing the code for the application.

 

 Stage- 2: CONTINUOUS INTEGRATION

 

Tools: Jenkins, TeamCity, Travis

The center of the DevOps life cycle is this phase, Developers are required to commit changes to the source code more frequently. This might happen every day or every week.

 

Stage- 3: CONTINUOUS TESTING

 

Tools: Jenkins, Selenium TestNG, JUnit

This is the stage where you test the developed software continuously for bugs using automation testing tools.

 

 

Stage- 4: CONTINUOUS DEPLOYMENT

 

Configuration Management Tools – Chef, Puppet, Ansible

Containerization Tools – Docker, Vagrant

In this step, the code is deployed to the servers. Making sure that the code is deployed appropriately on each server is also crucial. Continuous Deployment (CD) can be achieved with the help of the tools listed here.

 

 

Stage- 5: CONTINUOUS MONITORING

 

Tools: Splunk, Grafana, Nagios, New Relic

This is a critical stage of the DevOps lifecycle where continuously monitoring the performance of applications is done. Here you record vital information about the use of the software. Then process this information to check the proper functionality of the application. Resolution of system errors such as low memory, server not reachable, etc in this phase.

Version Control With GIT & Github

By offering data assurance for creating high-quality software, Git is a distributed version control technology that facilitates distributed non-linear workflows.

On their hard drive each programmer has a local repository, which is essentially a clone of the central repository. They are free to update and commit to their local repository. By using an operation "pull" they can update their local repositories with fresh information from the central server. And by using an operation "push" they can update the main repository with modifications from their local repository.

When it comes to manage the code that the contributors add to the shared repository, Git is essential. On the other hand this code is taken out in order to perform continuous integration, produce a "build" test it on the test server, and ultimately release it to production if all are working fine.

GitHub is a code hosting platform for version control cooperation. Git is a version control app that lets you do a variety of tasks to push data or retrieve data from the central server. A firm called GitHub enables you to set up a central repository on a cloud.

DevOps branches stategt

 

 

Top Git Commands

DevOps table-2

 

 

 

Please note that all further details can be found in the official Git Documentation 

 

 

Continuous Integration With Jenkins

Jenkins is a Java-based open-source automation tool with plugins designed for continuous integration. It is used to continuously build and test your software projects, which makes it simpler for developers to incorporate changes and for consumers to access new "builds".

 

 

DevOps jenkins

 

 

Jenkins is superior to other Continuous Integration systems because of the following facts:

Adoption: Jenkins is widely used, with over 1 million users worldwide and over 147,000 active installations.

Plugins: Jenkins can interface with the majority of development, testing, and deployment technologies thanks to its more than 1,000 connected plugins.

Jenkins created a new feature known as the Jenkins pipeline to implement continuous delivery.

 

Pipeline Concepts in Jenkins

A pipeline is a collection of jobs that brings the code from version control into the hands of the endusers by using automation tools.

 

 

DevOps Staging view

 

 

PIPELINE: This is a user-defined block that contains all the processes such as build, test, deploy, etc.

NODE: A node is a machine that executes an entire workflow.

AGENT: An agent is a directive that can run multiple builds with only one instance of Jenkins.

ANY: Runs the pipeline/ stage on any available agent.

NONE: This parameter is applied at the root of the pipeline and it indicates that there is no global agent for the entire pipeline and each stage must specify its own agent.

LABEL: Executes the pipeline/stage on the labeled agent.

DOCKER: This parameter uses Docker containers as an execution environment for the pipeline or a specific stage.

STAGES: This block contains all the work that needs to be carried out. The work is specified in the form of stages. There can be more than one stage within this directive. Each stage performs a specific task 

 

STEPS: A series of steps can be defined within a stage block. These steps are carried out in sequence to execute a stage.

 

 

 stages {       stage("SonarQube Analysis") {           when {               expression {                   return env.gitlabBranch == "${GIT_BRANCH_STAGE}"               }           }           steps {               script {                   git branch: "${GIT_BRANCH_STAGE}", credentialsId: "${GIT_CREDENTIAL}", url:  "${GIT_REPO_URL}", changelog: true                   withSonarQubeEnv('sonar-auth-token') {                       sh "/opt/sonar-scanner/sonar-scanner-4.6.2.2472/bin/sonar-scanner \                           -Dsonar.projectKey=${SONARQUBE_PROJECT_KEY} \                           -Dsonar.sources=. \                           -Dsonar.host.url=${SONAR_URL} \                           -Dsonar.login=${SONAR_TOKEN}"                   }               }           }       }      stage("Quality Gate") {           when {               expression {                   return env.gitlabBranch == "${GIT_BRANCH_STAGE}"               }           }           steps {               timeout(time: 5, unit: 'MINUTES') { // Reduced timeout to 5 minutes                   script {                       def qg = waitForQualityGate()                       if (qg.status != 'OK') {                           error "Pipeline aborted due to quality gate failure: ${qg.status}"                       }                   }               }           }       } 

Jenkins Installation in Linux (Debian/Ubuntu)

 

Jenkins required JAVA to run, so first install java using below commands

 

sudo apt update sudo apt install fontconfig openjdk-17-jre java -version openjdk version "17.0.8" 2023-07-18 OpenJDK Runtime Environment (build 17.0.8+7-Debian-1deb12u1) OpenJDK 64-Bit Server VM (build 17.0.8+7-Debian-1deb12u1, mixed mode, sharing)

Now, Install Jenkins using following commands

 

sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \     https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc]" \   https://pkg.jenkins.io/debian-stable binary/ | sudo tee \   /etc/apt/sources.list.d/jenkins.list > /dev/null sudo apt-get update sudo apt-get install jenkins

 

 

After Installation start jenkins

 

 

sudo systemctl enable jenkins sudo systemctl enable jenkins Check the status of jenkins sudo systemctl status jenkins

 

 

Please note that all further details can be found in the official Jenkins Official Documentation 

Containerization With Docker

Containerization is a type of virtualization that brings to the OS level. Docker is a platform that creates containers that encapsulate a program and all of its dependencies and creates a image file. This containerization ensures that the application can works on any environment. 

Each and every application has own set of dependencies and libraries and operates on a different container, as shown in the diagram. Developers may be sure that their app won't clash with one another by making sure that each app is independent of the others.

 

DevOps VM

 

Dockerfile, Docker Images & Docker Containers are three important terms that you need to understand while using Docker.

 

DevOps Docker

 

  • Dockerfile: A Dockerfile is a written document by devops that includes all the required commands to build an image using the cli.
  • Docker Image: A Dockerfile is a document drafted by devops containing necessary commands for creating an image using the cli.
  • Docker Container: It is a running instance of a Docker Image as it holds the entire package needed to run the application

 

Docker Installation

  • Setup Docker repository # Add Docker's official GPG key: sudo apt-get update sudo apt-get install ca-certificates curl
  • sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc  # Add the repository to Apt sources: echo \   "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \   $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \   sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update 

     

  • Install Docker packages sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin  
  • Please note that all further details can be found in the official Docker Installation Guide 

    DevOps Roadmap

    DevOps Path

     

    DevOps Certification

    Why are Certifications Important for DevOps Engineers?

    New frameworks and development methodologies are released daily in the software world. With this pace of development, certifications have become an integral part of any professional’s career, and in some cases, even more important than college and university degrees.

     

    With this in mind, a DevOps certification holds several benefits for professionals. Primarily, they can:

    • Offer an entry point into the field of DevOps for young students or those looking for a career change
    • Validate the skills of practicing DevOps Engineers by supplementing professional courses and degrees
    • Help you gain a competitive edge over other professionals in the job market by building trust and credibility with employers.
    • Help you remain up-to-date with the latest technologies and developments.
    • Boost career growth and allow you to obtain senior leadership roles and higher compensation.

    Regardless of your current position, adding a DevOps certification is an important part of your portfolio. They help you grow technically and professionally and make your profile stand out.

     

    AWS Test Engineer

    Embed testing and quality best practices for Software Development from design to release, throughout the product life cycle.

     

    DevOps AWS Cloud Practitioner

     

     

     

    AWS Cloud DevOps Engineer

     

    Design, deployment, and operations of large-scale global hybrid cloud computing environment, advocating for end-to-end automated CI/CD DevOps pipelines

     

    DevOps AWS

     

    AWS DevSecOps Engineer

    Accelerate enterprise cloud adoption while enabling rapid and stable delivery of capabilities using CI/CD principles, methodologies, and technologies.

     

    DevOps AWS Security

     

     

     Learn more about AWS Certification 

     

     

    Cloud Native Certified Kubernetes Administrator Certification

    The Certified Kubernetes Administrator (CKA) certification is an initiative of the Cloud-Native Computing Foundation (CNCF). CNCF established the program for Kubernetes administrators to certify their competence and ability.

    The exam for this certification lasts 2 hours and is conducted in a command-line environment. It covers topics such as:

    • Cluster Architecture, Installation, and Configuration.
    • Workloads and Scheduling.
    • Networking.
    • Storage.

     

    The CKA certification holds immense value for employers. This is because, for an organization to become a Kubernetes Certified Service Provider (KCSP), it must employ at least three CKAs.

     

     Learn more about CKA Certification  

     

     

    DevOps Future

    Here are some market surveys on DevOps demand.

    DevOps Skill Up

     

    DevOps Skill Up

     

    DevOps Market overview

     

     

     

    Ready to transform your business with our technology solutions? Contact Us today to Leverage Our DevOps Expertise.