CI/CD in DevOps

Jul 17, 2024

Day 18: CI/CD in DevOps

Introduction

  • Presenter: Abhishek
  • Topic: CI/CD (Continuous Integration/Continuous Delivery)
  • Course: 45-day DevOps course

CI/CD Overview

  • CI/CD Definition: Process involving continuous integration and delivery of applications.
    • Continuous Integration: Integrating tools and processes before delivering the application.
    • Continuous Delivery: Deploying the application to a platform for customer access.

Traditional vs. Modern CI/CD Setup

  • Legacy CI/CD: Older systems not scalable.
  • Modern Applications (e.g., Kubernetes, Amazon, Flipkart): Use scalable CI/CD techniques.

CI/CD Steps

  1. Unit Testing: Testing individual components of the application (e.g., addition functionality in a calculator app).
  2. Static Code Analysis: Ensuring code quality, syntax, and absence of unnecessary variables (e.g., memory allocation issues).
  3. Code Quality/Vulnerability Testing: Checking for security vulnerabilities and overall code quality before deployment.
  4. Automation Testing (End-to-End): Ensuring new code changes don't affect other functionality or features; involves comprehensive testing.
  5. Reporting: Generating reports on unit test coverage, code quality, and other metrics.
  6. Deployment: Deploying the application to a platform where customers can access it.

Example Workflow

  • Developer Workflow: Developer commits code to a VCS (e.g., GitHub).
  • CI/CD Pipeline: Automated steps include building, testing, code analysis, and deployment.
  • Tools: Maven for building, JUnit for testing, SonarQube for code quality, Jenkins for orchestration.

Jenkins as an Orchestrator

  • Jenkins pipelines automate all CI/CD steps by integrating various tools.
    • Stage Promotion: Moving code through Dev, Staging, and Production environments.
    • Scalability Issues: Traditional setups require many compute resources; not viable for modern scaling needs.

Modern Alternatives

  • GitHub Actions: Automated CI/CD workflows; highly scalable and efficient.
    • Example: Kubernetes project uses GitHub Actions for CI/CD without extensive compute waste.
  • Other Tools: GitLab CI/CD, Travis CI, CircleCI—alternatives to Jenkins, often more scalable.

Conclusion

  • CI/CD Importance: Essential for efficient, reliable application delivery.
  • Future Sessions: Practical examples using Jenkins and GitHub Actions; exploring alternatives like GitLab CI/CD.
  • Engagement: Feedback and questions welcome; join the next session for practical scenarios.

Key Takeaways

  • Understanding CI/CD basics and steps involved.
  • Traditional vs. modern CI/CD setups: Jenkins vs. GitHub Actions.
  • Importance of automation in CI/CD for efficient delivery.

Upcoming Sessions

  • Practical implementation with Jenkins and GitHub Actions.
  • Comparison of various CI/CD tools.
  • Explore syntactical and functional differences between tools.

Note: For any doubts or feedback, comments and timestamps are encouraged for better clarification.