Introduction to DevOps...!

Introduction to DevOps...!

·

4 min read

What is DevOps?

  • Is it Docker and K8s?

  • Is it Terraform?

  • Is it CI CD Pipeline?

  • Is it Development and Operations?

Chris Pratt What GIF

In the real world, we don't have any definition for DevOps.

DevOps is a cultural practice used by an organization by the development team and the operations team to use each other's tools to smooth the delivery of the software.

Code - Dev team who writes the code

Test - QA team to test the application

Deploy - Analysis of Sending the code to the server, checks for the stability of the server, OS updates, Security updates, load balancers, what happens when more loads, how does it crash, and why does it crash?

All the members should understand the roles and responsibilities of other team members.

Process of learning DevOps:

  1. Core Values

  2. Core Ideas

  3. Methods

  4. Practices

  5. Tools

Why DevOps?

  1. Deploy faster - 50%

  2. Less failure

  3. Better recovery time in case a code is deployed wrongly. Roll a recovery can be done faster

  4. All the members (Dev, QA, DB admins, Network admins) should be in sync - Lean Management (No need for separate management for each domain)

What is DevOps CAMS?

It is a philosophy.

Culture - Dev, QA, and Operation teams should talk to each other about with which tools, and processes they are comfortable.

People are valued over Process. The process is valued over Tools.

Automation - Implement automation if that can be replicated. Always analyze how much can be automated and whether the process should be automated. Eg. To automate or write code or instructions to automate any process. To automate the OS update process or to spin up the server whenever needed.

Measurement - Monitoring the infrastructure & the usage like billing, and increasing the server when needed. etc. Eg: Cloud Watch

Having more servers is good to handle more traffic but If a developer is pushing code that requires only 2 servers. Load Balancer will be confused as to which server the request should be sent and this affects the load time of the application. Hence it should be monitored for scaling of the servers based on the requirement

Sharing - The team should share the responsibility and share ownership of why the application crashes or the application is down. The team should be ready to take the feedback.

Note: DevOps helps in shipping the software along with the infrastructure

How DevOps is implemented?

  1. Flow Thinking

    After coding is done by the development team, the branch name is updated to the Operation team by the developer. This creates a single flow of communication

  2. Amplify Feedback

    Dual communication between the development team and the operation team and understanding why deployment couldn't happen at a particular time etc.

  3. Experiment and Learn

    Experiment with new tools and learn about the pros and cons of the tools by experimenting with the application.

DevOps LifeCycle

Jargons in DevOps...

  • Provisioning - The server is ready with OS, Software and networking. We have rented a server from AWS/Azure/GCP and it is equipped with all the requirements and is configured

  • Deployment - Adding the software code which was written in the local machine to the server. So that users from all over the world can access the end application

  • Orchestration - Managing the servers based on the requirements. Eg: If we have developed an application, which has one server with few loads. After a few months if the load is increased we need to increase the number of servers. So both these servers should have updates like OS, Security etc and should be in sync.

  • Configuration Management - Configuring the server through files such as Ram, Space, dependency, Software

  • Imperative (Procedural) - Write a command or code to create the required state or server configuration. Focus on How is it achieved?

  • Declarative (Procedural) - defining the states or the requirement and tools that will be used to achieve it. It is result oriented. Eg: Terraform

  • Idempotent - Repeating the same execution but the execution should provide the same result whenever executed. Eg: When User-A logs in using his/her credentials application should display the details of User-A.

    Eg-2: If a server is existing and when we run the command, the file should check if the server exists and then it should create a new server if needed. Else the server should not be created

  • Blue Green Deployment: When Server-A is experiencing traffic and Server-B is used to update with the new feature parallely. When Server-B is stable, all the traffic from Server-A will be switched to Server-B

    • Continuous Integration: Build and unit tests should be performed before moving the code to maintain integrity with the existing code

    • Continuous Delivery: Deploy on production live environment at every check-in or Push the code

    • Continuous Deployment: After unit testing is performed, deploy the changes to production in small batches