Day 2 of 100 days : what is DevOps?

1. What is DevOps?

DevOps bridges the gap between development (Dev) and operations (Ops) teams so they can work together effectively. This teamwork, combined with automation, helps deliver software faster and with fewer issues.

  • Scenario: Imagine a team is developing a mobile app. In a non-DevOps setup, developers finish coding and pass it to operations, who may face issues during deployment because they weren’t involved earlier. With DevOps, both teams work together from the start. Automated testing catches bugs quickly, and deployment tools release updates seamlessly without delays.

2. DevOps Model

Delivery pipeline - build , Test , Release

Feedback loop - plan and monitor

3. What is DevSecOps?

DevSecOps adds security as a shared responsibility within DevOps. It ensures security checks happen throughout the software development process instead of at the end.

  • Scenario: Think of a banking app. With DevSecOps, security testing is embedded early on, so potential risks are identified before the app is deployed. This way, the app is safer from data breaches and vulnerabilities when it reaches customers.

4. History of DevOps

DevOps arose from the need for better collaboration between development and operations teams. Traditional methods separated these two areas, causing misunderstandings, delays, and errors when applications were deployed.

  • Scenario: In the early days of web services, if a new feature failed, the dev team would blame the ops team and vice versa. DevOps was introduced to break down this wall, helping both sides work in sync and improving software delivery times.

5. Benefits of DevOps

  1. Faster Delivery: Regular and automated deployments allow frequent updates.

    • Scenario: A social media app rolls out new features weekly without disrupting user experience. With DevOps, the team can test and deploy code efficiently, keeping users engaged.
  2. Improved Collaboration: Teams work together with shared goals and responsibilities.

    • Scenario: In a DevOps culture, a developer and an ops engineer can quickly resolve issues through shared tools and real-time feedback, reducing downtime.
  3. Better Quality: Automated testing catches bugs early.

    • Scenario: An e-commerce site tests all code updates automatically, minimizing errors. This keeps the website stable, even on high-traffic days.
  4. Reduced Complexity: Automating routine tasks reduces human error.

    • Scenario: For an online gaming platform, DevOps automates server updates, preventing manual errors that could affect gameplay.
  5. Quick Problem Resolution: Real-time monitoring detects issues faster.

    • Scenario: A video streaming service detects buffering issues and resolves them quickly, minimizing the impact on viewers

6. Key DevOps Principles

  1. Collaboration: Teams work closely, share tools, and improve together.

    • Scenario: Developers and ops at a news website use a shared dashboard to track site performance, instantly spotting and fixing issues.
  2. Automation: Routine tasks are automated to reduce errors.

    • Scenario: A music app automates its updates, ensuring new releases reach users without manual intervention.
  3. Continuous Improvement: Constantly enhancing processes and workflows.

    • Scenario: An online shopping platform uses feedback and analytics to improve load times and user experience regularly.
  4. Customer-Centric Action: Decisions prioritize user needs.

    • Scenario: A food delivery app adapts its updates based on customer feedback, improving order tracking and delivery notifications.
  5. End-Goal Focus: Every task aligns with the bigger picture.

    • Scenario: A project management tool prioritizes features that improve team productivity, keeping long-term customer satisfaction in mind.

7. DevOps Lifecycle Stages

  • Plan

    Imagine a company wants to build a new mobile app feature for booking appointments. In the Plan stage, the team sets up a roadmap, identifying the functionality needed and deadlines. They might use tools like Jira to assign tasks to developers, testers, and designers, ensuring each team member knows what to deliver and by when.

  • Code

    The developers start coding the feature, working on components like the user interface, appointment scheduling, and database integration. They use GitHub for version control, allowing multiple developers to work on different parts of the feature simultaneously. Each developer’s code is reviewed and merged, ensuring no conflicts or redundant work.

  • Build

    Once coding is complete, the code is packaged into a build. This would involve compiling the code into a form that can be run and tested, like a mobile app build. Here, Jenkins automates the process by packaging the code every time a change is made, saving the team from doing it manually. If there’s an error, Jenkins stops the build and alerts the team to fix it.

  • Test

    In the testing phase, the team ensures the new appointment feature works as expected. Automated tests check for bugs by running various scenarios, like booking an appointment at a particular time or canceling a booking. If a test fails, it’s flagged so the team can fix it before release. Selenium or JUnit might be used here for automating tests.

  • Release

    After testing, the feature is moved to a staging environment—this is like a real-world production environment but used just for final testing and validation. The team performs one last check here to ensure everything is ready. For instance, they might simulate a large number of users booking appointments to see if the system can handle high traffic.

  • Deploy

    With everything working as expected, the feature is deployed to the live production environment. This means users can now see and use the new appointment feature. Docker and Kubernetes are often used for deployment, ensuring the feature runs smoothly in the cloud without disrupting other parts of the application.

  • Operate

    Now that the feature is live, the operations team monitors its performance. For instance, they check server loads and user activity to ensure the feature is running smoothly. If they notice spikes in activity that slow down the app, they may add extra resources to handle the load, ensuring a good user experience.

  • Monitor

    Monitoring tools like Prometheus and Grafana provide insights into how users interact with the new feature. The team might track user feedback and performance data to identify any pain points, such as slow load times or bugs. If they find an issue, they immediately loop back to the Plan stage to implement necessary improvements.

8 . Exploring the DevOps Tools

  1. Git

    • Version Control System: Manages source code versions, tracks changes, and allows collaboration.
  2. Jenkins

    • CI/CD Automation: Automates builds, testing, and deployment, enabling continuous integration and delivery.
  3. Docker

    • Containerization Platform: Packages applications and dependencies in containers, ensuring consistency across environments.
  4. Kubernetes

    • Container Orchestration: Manages and scales containerized applications in clusters.
  5. Ansible

    • Configuration Management: Automates configuration, provisioning, and deployment processes.
  6. Terraform

    • Infrastructure as Code (IaC): Manages cloud infrastructure with code for consistency and repeatability.
  7. Selenium

    • Automated Testing: Enables automated browser-based tests for application quality assurance.
  8. AWS/GCP/Azure

    • Cloud Providers: Provides scalable, on-demand cloud services and infrastructure.

9. Conclusion

In summary, we explored DevOps and its evolution into DevSecOps, highlighting the importance of collaboration and security in the software development lifecycle. By bridging the gap between development and operations, teams can achieve faster delivery, improved collaboration, and enhanced security. The key principles—such as continuous improvement and customer-centric action—demonstrate how organizations can create high-quality products and ensure customer satisfaction. Through practical examples, we've learned that integrating these practices is essential for success in today's fast-paced digital landscape.