Day 0: Introduction to DevOps
What is DevOps?
You will find out there is no standard definition of DevOps, Different people use different definitions as per their understanding Few of them are:
- It's a cultural practice in an organization by the development team and operations team to use each other's tool, to smooth out the process of software delivery. - source
- DevOps is a methodology in the software development and IT industry. Used as a set of practices and tools, DevOps integrates and automates the work of software development (Dev) and IT operations (Ops) as a means for improving and shortening the systems development life cycle. - source
DevOps Principles - The CAMS Model
Culture: [People > Process > Tools] DevOps draws its primary inspiration from the Agile methodology. In project management, Agile prioritizes people over processes and tools. Even with an exceptional team of developers, the absence of effective coordination can result in significant time and resource wastage. This lean approach encourages talking to each other. When people understand each other's goals, interests, and responsibilities, culture gets better.
Automation: [Not just tools] It is not just about using tools. It's a way to see how much of your system can be automated that can help to reduce workload which again focuses on People over Process over Tools.
Measurement: [Measure to improve] If you want to make something better, you need ways to measure it. It helps in determining if progress is being made in the intended direction provided you are using the right metrics. So, it's about using the right metrics and tracking the overall progress in an intended way.
Sharing : [Share the goal] To achieve a common goal, all teams and stakeholders need to understand what that goal is. When people contribute to the decision-making process, they feel a shared responsibility and ownership over the outcome. Collaboration is more likely when individuals believe their ideas are valued. To accomplish this, it's crucial to establish and measure key performance indicators (KPIs) with the entire cross-functional team.
- Systems Thinking: [Maximize Flow] It is about improving the flow of work and value throughout the entire value stream, which runs from the beginning (left) to the end (right).
Amplify Feedback: [Feedback loops] These feedback loops help maximize the flow of information and improvements from the end result (right side) back to the initial stages (left side) of the value stream.
Experiment & Learn: [Continuous experimentation and learning] It is about creating a culture of trust where continuous experimentation and learning can thrive. This leverages the first two ways to be successful.
Define objectives and requirements.
Create a roadmap and prioritize tasks.
Allocate resources and set timelines.
Develop and write the application code.
Use version control systems for code management.
Encourage collaboration among developers.
Compile code into executable artifacts.
Run automated build and unit tests.
Generate deployable packages.
Conduct comprehensive testing (functional, integration, and more).
Automate testing processes.
Detect and report issues early.
Manage and schedule releases.
Automate release pipelines.
Roll back changes if necessary.
Automate deployment to various environments.
Use Infrastructure as Code (IaC) for consistent provisioning.
Monitor deployments for success.
Monitor applications and infrastructure in real time.
Manage logs and performance metrics.
Implement continuous monitoring and alerting.
Collect and analyze data from production.
Monitor system performance and user experience.
Use feedback to inform further improvements.
DevOps Jargons - Easy Way
Provisioning: The server is ready with OS, software and networking.
Deployment: adding or upgrading software on the server.
Orchestration: coordinated operations on multiple systems.
Configuration management: Managing server configuration via files such as RAM, space, dependency software etc.
Imperative (procedural): commands to produce the desired state.
Declarative (procedural): The desired state is defined and tools will achieve it.
Idempotent: repeat execution and the same result.
Blue Green deployment: Identical deployment, used as a switch.
Continuous Integration (CI): Build and unit test at every check-in.
Continuous Deployment (CD): After unit testing, deploy changes to production in small batches
Continuous Delivery: Deploy on production live environment at every check-in.