UNIT 5 OOSE
Software Project Management- Software Configuration Management – Project
Scheduling- DevOps: Motivation-Cloud as a platform-Operations- Deployment Pipeline:
Overall Architecture Building and Testing-Deployment- Tools- Case Study
Software Project Management (SPM
Software Project Management (SPM) is the process of planning, organizing, and managing
a software project from start to finish. It helps ensure the project is completed on time, within
budget, and meets the required quality. It includes:
• Managing resources like people, tools, time, and money
• Planning tasks to meet project goals and deadlines
• Monitoring progress to check if everything is going as planned
• Controlling changes to handle risks, delays, or updates
In simple terms, SPM is like being the team leader of a software project who makes sure
everything runs smoothly and the final product is successful.
Key Activities in Software Project Management
a. Project Planning
Before starting, we need a clear plan. It includes:
• What tasks to do
• When to do them (schedule)
• Who will do them (team members)
• How much it will cost
This helps avoid surprises later.
b. Project Scheduling
This involves:
• Breaking the project into smaller tasks
• Estimating how long each task will take
• Putting tasks in the right order
Tools like Gantt charts and PERT charts are used to visualize the schedule.
c. Risk Management
Risks are things that might go wrong, like:
• Delay in delivery
• A team member leaving
• Bugs in software
Project managers identify risks early and prepare solutions.
d. Resource Management
Managing people, software tools, hardware, and budget.
e. Monitoring and Tracking
Throughout the project, the manager checks:
• Are tasks being completed on time?
• Is the cost within budget?
• Are there any new issues?
Project Life Cycle
Project Life Cycle is the step-by-step process followed to complete a software project. It
helps manage the work in an organized way from beginning to end. The five main stages are:
• Initiation: This is the starting point where we identify the problem and decide if the
project is needed.
Example: A school wants software to manage student records.
• Planning: In this stage, we decide what the software should do, how much time it
will take, what tools we need, and how much it will cost.
Example: The team plans to complete the school management software in 2 months
using Java and a small team of 3 developers.
• Execution: Here, the actual development happens. The team starts designing, coding,
and testing the software.
Example: Developers write code to create features like student login, attendance, and
report generation.
• Monitoring: The project manager checks if the project is going according to the plan.
If there are delays or issues, they are fixed.
Example: The manager notices testing is slow and adds one more tester to speed it up.
• Closure: Once everything is complete, the software is delivered to the school. A final
report is prepared, and feedback is collected.
Example: The software is installed at the school, and the team notes what went well
and what can be improved for future projects.
Project Metrics and Estimation Techniques:
Project Metrics and Estimation Techniques help in measuring and predicting the progress,
cost, and effort needed for a software project. These are useful to plan and track the project
effectively. Common metrics and techniques include:
• Lines of Code (LOC): Measures the size of the software by counting the number of
lines in the code.
• Function Points: Measures software size based on its functionality, not code length.
• Cost and Effort Estimations: Predicts how much money and work the project will
need.
• COCOMO Model (Constructive Cost Model): A popular method used to estimate
the time, effort, and cost based on the project size.
These techniques help project managers make better decisions and avoid delays or
overspending.
Project Management Tools
Several tools help in managing projects:
• MS Project – for scheduling
• JIRA – for tracking tasks
• Trello/Asana – for team coordination
These tools help keep everyone on the same page.
========================================================================
Software Configuration Management (SCM)
Software Configuration Management (SCM) is the process of managing and controlling
changes in software during its development. It helps teams keep track of all the versions of
the software, who changed what, and when. This ensures the software stays organized,
correct, and consistent.
Example: If one developer fixes a bug and another adds a feature, SCM keeps track of both
changes.
Main Activities in SCM:
1. Version Control
Version control is the process of tracking and managing changes to software files over time. It
allows teams to collaborate without overwriting each other’s work and helps in restoring
previous versions if something goes wrong.
• Tools Used: Git (most popular), SVN, Mercurial
• Centralized vs. Distributed:
o Centralized Version Control (e.g., SVN): One central server stores the project
files.
o Distributed Version Control (e.g., Git): Every developer has a full copy of the
repository.
• Real-World Use:
Developers create commits (snapshots) as they code. These commits are saved in a
history. If a new feature breaks something, the team can go back to a previous commit
where everything worked.
• Example: A developer adds a user authentication feature and commits the code.
Later, another update causes login to fail. Using Git, the team restores the last
working version and quickly fixes the issue.
2. Configuration Identification
Configuration identification is the process of clearly labeling all project components—such
as code files, libraries, documentation, and tools—so they can be uniquely recognized and
tracked throughout the project lifecycle.
• Elements Identified:
o Source code files
o Design documents
o Test data and results
o Executable files
• Naming Convention:
Standard naming (e.g., invoice_module_v1.3.java) avoids confusion and helps all
team members understand what each file is for.
• Example: In a billing software project, files are named as bill_generate_v1.java,
payment_module_final.java, and receipt_design_march.java, so the team can easily
identify each component and its version.
3. Configuration Control
Configuration control is the method used to handle change requests. All changes must be
reviewed, approved, and tested before being included in the main project to ensure stability
and quality.
• Change Request (CR):
When a developer wants to modify a file or add a feature, they must submit a CR
explaining the reason, impact, and details.
• Change Control Board (CCB):
A group (often including managers, leads, and testers) reviews the CR and decides
whether to approve or reject it.
• Controlled Process:
Prevents random or unauthorized changes that might break the software or create
confusion.
• Example: A tester suggests improving the error messages in the payment page. The
CR is submitted, reviewed by the CCB, implemented by a developer, and tested again
before merging into the main project.
4. Status Accounting
Status accounting involves maintaining a detailed and updated record of all configuration
items, changes, versions, and updates. It provides a complete picture of the current state of
the software project.
• Records Include:
o Who made the change
o What was changed
o When it was changed
o Why it was changed
o Version history
• Purpose:
Helps in audits, debugging, responsibility tracking, and transparency.
• Example: The project manager needs to check when the shopping cart module was
last updated. The status accounting system shows that “Priya updated
cart_module.java on April 25 to fix a quantity bug.”
5. Configuration Audits
A configuration audit is a formal check done to ensure the software system contains all
necessary components and that they are correct, up-to-date, and properly documented.
• Types of Audits:
o Functional Audit: Checks whether all planned features have been
implemented and work as intended.
o Physical Audit: Confirms that all required files, documents, and tools are
present and in the correct location.
• Performed By:
Usually done before major releases by QA or configuration managers.
• Example: Before releasing an online bookstore app, a configuration audit confirms
that all modules (login, browse books, payment, order history) are working and that
corresponding code files and user manuals are properly stored in the release folder.
Branching and Merging:
• Branching means creating a separate version of the code to work on new features or
fixes.
• Merging means combining your changes back into the main code after testing.
o Example: You create a branch to add a dark mode feature, and after it works,
you merge it into the main app.
Baselines:
A baseline is a "locked" version of the software that is complete and reviewed. It’s like a
checkpoint.
• Example: After finishing the login and signup modules, the team sets a baseline
before starting the next feature.
SCM Tools:
These tools help manage SCM processes:
• Git, SVN – for version control
• Maven, Ant – for building software
• JIRA, Bugzilla – for tracking issues and changes
========================================================================
project scheduling
In Object-Oriented Software Engineering (OOSE), project scheduling refers to the process
of planning and organizing the tasks that need to be completed in a software development
project. The goal is to ensure that the project is finished on time and within budget, while also
meeting the required quality standards. Here's a simplified explanation:
Steps in project scheduling:
1. Breaking Down the Project into Tasks
To manage the project effectively, we break it into smaller, manageable tasks. Each task
represents a specific part of the project.
Example:
For the Student Management System (SMS), the tasks might include:
• Task 1: Gather project requirements from the client.
• Task 2: Design the database schema.
• Task 3: Create the user interface (UI) for the student dashboard.
• Task 4: Implement the login system.
• Task 5: Develop the student record management feature.
• Task 6: Develop the grade management system.
• Task 7: Conduct testing of the system.
2. Estimating Time for Each Task
Now that we have tasks, we estimate how long each one will take. Estimation is often based
on experience from similar projects or historical data.
Example:
• Task 1 (Requirements Gathering): 2 days
• Task 2 (Database Design): 3 days
• Task 3 (UI Design): 5 days
• Task 4 (Login Implementation): 4 days
• Task 5 (Student Record Management): 6 days
• Task 6 (Grade Management): 5 days
• Task 7 (Testing): 5 days
So, the total time to complete all tasks would be the sum of the individual task durations
(considering dependencies later).
3. Setting Dependencies Between Tasks
Some tasks can’t begin until others are finished. This step is about identifying which tasks
depend on others.
Example:
• Task 4 (Login Implementation) depends on Task 3 (UI Design) because the login
UI needs to be ready before the functionality can be implemented.
• Task 5 (Student Record Management) depends on Task 2 (Database Design)
because you need the database structure to store the records.
• Task 6 (Grade Management) also depends on Task 2 (Database Design) for storing
grades.
• Task 7 (Testing) depends on the completion of all tasks.
4. Creating a Timeline
Once we have task durations and dependencies, we can create a timeline. This is typically
done using a Gantt chart, which shows when each task starts and ends.
Example:
Task Duration Dependencies Start Date End Date
Requirements Gathering 2 days None May 15 May 16
Database Design 3 days None May 17 May 19
UI Design 5 days None May 17 May 21
Login Implementation 4 days UI Design May 22 May 25
Student Record Management 6 days Database Design May 20 May 25
Grade Management 5 days Database Design May 20 May 24
Testing 5 days All previous tasks May 26 May 30
In the timeline, you can see the overlap between UI Design and Student Record
Management, and how Testing is the final step, dependent on the completion of all tasks.
5. Allocating Resources
Resources are the people, tools, and equipment required for each task. Allocating resources
means assigning specific individuals or tools to each task.
Example:
• Developer A: Works on UI Design (Task 3) and Login Implementation (Task 4).
• Developer B: Works on Database Design (Task 2) and Student Record Management
(Task 5).
• Developer C: Works on Grade Management (Task 6).
• Tester: Works on Testing (Task 7).
The project manager ensures that all team members have what they need to complete their
tasks (e.g., development environments, access to necessary tools).
6. Tracking Progress
Once the project begins, it's important to track progress to ensure that tasks are being
completed on time. This helps identify issues early.
Example:
• Suppose Task 4 (Login Implementation) is running behind schedule because the UI
design took longer than expected. The project manager can allocate more resources to
Task 4 or adjust other tasks to make up for the delay.
• If Task 5 (Student Record Management) is ahead of schedule, resources can be
reallocated to other tasks like Task 6 (Grade Management) to ensure that the project
stays on track.
7. Risk Management
Project scheduling also includes identifying risks that could delay the project and preparing
contingency plans.
Example:
• Risk: The Database Design (Task 2) might take longer than expected due to technical
issues with the database system.
• Contingency Plan: The project manager could add buffer time to the schedule or
assign an additional developer to help with database design if needed.
Other risks could include team member availability or changes in project requirements, and
the project manager must plan for those as well.
8. Final Review and Adjustment
After tracking the project’s progress and managing risks, the schedule is reviewed, and
adjustments are made if necessary. This step ensures that the project stays on track for
completion.
Example:
• If Task 5 (Student Record Management) was completed ahead of schedule, Task 6
(Grade Management) might be started earlier to utilize the extra time.
• If a delay occurs in Task 4 (Login Implementation), the project manager may decide
to adjust the overall timeline or extend the testing period.
==================================================================
DevOps: Motivation
DevOps is a set of practices and tools designed to improve the collaboration between
software development teams (Dev) and IT operations teams (Ops). It focuses on automating
and streamlining the processes of software development, deployment, and maintenance.
Motivation Behind DevOps:
The motivation for DevOps comes from the challenges that organizations face in software
development and IT operations. Traditionally, developers and operations teams work
separately, leading to several issues:
1. Slow Software Delivery:
Traditional Approach: In traditional development models, software development and
deployment occur in separate cycles, which often results in long delays from the time a
feature is developed to when it becomes available to users.
Example:
• Before DevOps: Imagine a company developing a new feature for their mobile app.
The feature is ready but needs to go through a series of manual tests, configurations,
and approvals by the operations team. This process can take weeks before the feature
is live.
• With DevOps: The development team writes the code, which automatically passes
through continuous integration (CI) and continuous deployment (CD) pipelines. As
soon as the code passes the automated tests, it’s deployed to production within
minutes, allowing users to access the new feature quickly.
2. Quality Issues:
Traditional Approach: Since development and operations teams are often disconnected,
issues might only be discovered after deployment. This can be costly and time-consuming to
fix, especially if it requires a rollback or urgent patch.
Example:
• Before DevOps: A bug is discovered in the payment system of an online store only
after users report it. Developers and operations teams work separately, leading to
delays in investigating the root cause and rolling out a fix.
• With DevOps: Continuous testing and monitoring tools are integrated into the
development process. As soon as a bug is introduced, automated tests detect it, and
the developer is notified right away. This allows the bug to be fixed quickly before it
reaches production, ensuring higher quality.
3. Inefficiencies:
Traditional Approach: When developers complete their work, it’s passed to operations for
deployment. This handoff between teams can cause delays and inefficiencies due to
miscommunications or mismatched environments.
Example:
• Before DevOps: A developer writes code for a new feature that works perfectly on
their local machine. However, when it’s handed off to the operations team for
deployment, the feature fails due to differences in the development and production
environments (e.g., configuration mismatches).
• With DevOps: The development and operations teams use the same tools, such as
containerization (Docker), to ensure that the development environment mirrors the
production environment. This reduces the chances of mismatched configurations and
ensures that what works in development works in production.
4. Lack of Feedback:
Traditional Approach: Developers often don’t know how their code performs in a live
environment, making it hard to improve and optimize. Without immediate feedback,
developers might not realize when an issue arises in production.
Example:
• Before DevOps: A developer creates a new feature for a website. After deployment,
the feature works, but performance issues are noticed days later. The developer
doesn’t get direct feedback on how users are interacting with the feature.
• With DevOps: Continuous monitoring tools are implemented to track the feature's
performance in real-time. If any performance issues or errors occur, the developer is
immediately notified and can address the issue quickly by pushing out a fix,
improving the feature and user experience continuously.
Key Benefits of DevOps:
• Faster Delivery of Software: DevOps reduces the time between writing code and
deploying it to users.
• Improved Collaboration: Developers and operations teams work together, leading to
better communication and fewer misunderstandings.
• Better Quality and Stability: Continuous testing, monitoring, and feedback lead to
higher-quality software and more stable systems.
• Efficiency: Automation of repetitive tasks like testing and deployment reduces
manual work and errors.
==================================================================
DevOps: Cloud as a platform
What is Cloud Computing?
Cloud computing is a service that allows individuals or businesses to store, manage, and
process data over the internet, instead of using local servers or personal computers. In simpler
terms, it's like renting a powerful computer or server from a service provider (like AWS,
Google Cloud, or Microsoft Azure) rather than owning and maintaining it yourself.
How Does Cloud Support DevOps?
In a DevOps environment, the cloud provides a flexible, scalable, and cost-effective platform
that allows both developers and operations teams to work together efficiently. Here’s how:
1. Scalability:
In DevOps, you need to quickly scale up or scale down your infrastructure depending on your
project’s needs. The cloud allows you to do this easily.
Example:
• If a website built with DevOps experiences a sudden increase in traffic, such as during
a product launch, the cloud platform can automatically allocate more resources (like
extra servers) to handle the traffic spike. Once the traffic decreases, it can scale back
down to save costs.
2. Automated Infrastructure Management:
Cloud platforms provide tools that allow you to automate infrastructure setup and
management. This aligns with the DevOps principle of Infrastructure as Code (IaC), which
means writing code to manage the setup of servers, networks, and other infrastructure instead
of doing it manually.
Example:
• With DevOps, instead of manually configuring servers to run applications, you can
write a script (using tools like AWS CloudFormation or Terraform) that automatically
sets up the infrastructure when needed. This can include installing the necessary
software, configuring security, and setting up networks—all automatically with
minimal human intervention.
3. Collaboration and Access:
Cloud platforms provide a centralized space where development and operations teams can
access shared resources, tools, and environments. This encourages real-time collaboration and
ensures that everyone is working with the same up-to-date tools.
Example:
• Developers can write code and store it in the cloud (e.g., GitHub, GitLab), while
operations teams can deploy the code to cloud-based servers. Both teams can access
the same environment, ensuring they are always in sync and can quickly address any
issues.
4. Continuous Integration and Continuous Deployment (CI/CD):
The cloud is perfect for implementing CI/CD pipelines. These pipelines allow code to be
automatically tested, built, and deployed whenever changes are made, enabling faster and
more frequent releases.
Example:
• Whenever a developer makes changes to the code, a CI/CD tool (like Jenkins or
CircleCI) automatically runs tests, builds the application, and deploys it to a cloud
server. This process ensures that updates happen smoothly and rapidly without much
manual intervention.
5. Cost Efficiency:
With the cloud, you only pay for the resources you use. This means that during quiet periods,
you can scale down your resources and save money, while scaling up during high-demand
periods.
Example:
• If you're running a small application with minimal traffic, you can keep your cloud
resources minimal and pay less. However, during a big sale event or product launch,
you can scale up quickly to handle the additional load without having to buy and
manage extra physical servers.
6. High Availability and Reliability:
Cloud providers offer services with built-in redundancy. This means your applications can
remain online and functional even if there are failures in parts of the infrastructure.
Example:
• If one server in a data center goes down, the cloud platform can automatically redirect
traffic to another server, minimizing downtime and ensuring the application remains
available to users.
7. Security:
Cloud platforms offer various tools to manage the security of your applications and data.
DevOps teams can set up automated security checks, access control, and encryption, ensuring
that the application is secure both during development and after deployment.
Example:
• A DevOps team can use cloud security tools to automatically monitor for potential
security threats, such as unauthorized access attempts. These tools can alert the team
if anything unusual is detected, allowing them to take action quickly to prevent
potential breaches.
Cloud Platforms Commonly Used in DevOps:
• Amazon Web Services (AWS): A comprehensive cloud platform that offers various
services for compute power, storage, databases, machine learning, and more.
• Google Cloud Platform (GCP): Known for its speed and performance, Google
Cloud offers many tools for developers and DevOps teams to collaborate and scale.
• Microsoft Azure: A cloud platform that integrates well with Microsoft’s tools and
services, providing solutions for both development and operations teams.
• IBM Cloud, Oracle Cloud, and others: Other cloud platforms that also support
DevOps practices, offering a range of tools and services to automate, scale, and
deploy applications.
Operations in DevOps
In traditional software development, operations typically handled tasks like managing
servers, deploying software, and ensuring everything ran smoothly after deployment. In the
DevOps approach, operations are more integrated with development, creating a collaborative
environment where both teams (development and operations) work together throughout the
entire lifecycle of an application—from planning to production.
The key goals of operations in DevOps are:
o Infrastructure as Code (IaC)
o Monitoring and Logging
o Configuration Management
o Security (DevSecOps)
o Continuous Integration / Continuous Deployment (CI/CD)
1. Infrastructure as Code (IaC)
Infrastructure as Code is the process of managing and provisioning IT resources (like servers,
storage, and networks) through machine-readable files or scripts instead of setting them up
manually. This approach brings automation, repeatability, and version control to
infrastructure management, just like coding does for software development.
Example:
A DevOps engineer uses a Terraform script to automatically set up a web server, database,
and load balancer on AWS with just one command.
2. Monitoring and Logging
Monitoring involves tracking the performance, availability, and health of applications and
systems, while logging records key events and behaviors. Together, they help teams detect
and fix issues, understand system behavior, and improve performance and reliability over
time.
Example:
A team uses Grafana to visualize CPU and memory usage on a dashboard and collects logs
through the ELK Stack to diagnose why a server crashed during peak hours.
3. Configuration Management
Configuration Management is the practice of systematically handling software and system
settings across all environments to ensure they are consistent and properly maintained. This
often includes automating the process of applying configuration changes to large numbers of
servers.
Example:
Ansible is used to install a specific version of MySQL and apply security settings uniformly
across 50 different servers in a data center.
4. Security (DevSecOps)
Security in DevOps means embedding security measures into every stage of the development
and deployment process. This includes practices like secure coding, vulnerability scanning,
access control, and automated compliance checks to reduce risks early in the software
lifecycle.
Example:
A development pipeline runs an automatic security scan using Snyk every time new code is
pushed, identifying vulnerabilities before the app is deployed.
5. Continuous Integration / Continuous Deployment (CI/CD)
CI/CD is a set of practices that allow developers to frequently merge their code changes
(Continuous Integration) and automatically deliver those changes to production (Continuous
Deployment). This reduces the time between writing code and delivering it to users, while
maintaining high quality through automated testing.
Example:
A developer pushes code to GitHub, triggering a Jenkins pipeline that builds the code, runs
unit tests, and automatically deploys the updated app to a staging server.
6. Release Management
Release Management involves the process of planning, scheduling, and controlling the
deployment of software applications, updates, and patches across various environments
(development, staging, production). It ensures that releases are delivered in a controlled and
efficient manner with minimal risk to the business.
Example:
A release manager coordinates the rollout of a new application feature, ensuring that all
development, testing, and deployment phases are met without downtime and issues.
7. Backup and Disaster Recovery
Backup and Disaster Recovery (DR) is the practice of protecting data and applications from
loss or damage, ensuring that operations can continue after an unexpected event, such as
hardware failure, cyberattacks, or natural disasters. This includes regular backups and well-
defined strategies for restoring services quickly.
Example:
A company sets up automated nightly backups of all critical data to cloud storage and
regularly tests its DR plan by simulating server failure and restoring from backups.
8. Performance Tuning and Optimization
Performance Tuning and Optimization involves improving the efficiency and speed of
applications and systems by identifying bottlenecks, optimizing code, fine-tuning system
resources, and ensuring optimal resource utilization. This process is ongoing and includes
adjusting configurations and processes to achieve the best performance.
Example:
A web application undergoes performance tuning where database queries are optimized,
caching is implemented, and the application is adjusted to handle a higher number of
concurrent users.
DevOps pipeline overall architecture
A DevOps pipeline is an automated process that helps deliver software quickly and reliably.
It includes steps like writing code, testing it, building it, deploying it, and monitoring it.
Tools like Git, Jenkins, Docker, and Prometheus work together to handle each stage.
This ensures faster updates, fewer bugs, and smooth experiences for users.
1. Plan
• Description: This initial phase focuses on planning the development process,
understanding requirements, and outlining the project scope. It includes collaboration
between teams to set goals and strategies for the product.
• Key Practice: Continuous Integration (CI) – Developers collaborate on the
integration process and plan changes based on the requirements.
2. Code
• Description: The coding phase involves developers writing and committing code to a
shared repository. Code quality, version control, and proper documentation are key
considerations.
• Key Practice: Continuous Delivery (CD) – The code is continuously committed to
the repository, and changes are automatically tested and merged into the shared code
base.
3. Build
• Description: In this phase, the code is compiled and built into executable software.
This stage includes tasks like packaging the code into deployable units or creating
Docker images.
• Key Practice: Continuous Deployment – The code is deployed automatically in a
controlled environment (e.g., staging).
4. Test
• Description: The software undergoes various levels of testing, such as unit tests,
integration tests, and system tests, to ensure its quality and functionality.
• Key Practice: Continuous Testing – Automated tests are executed to identify issues
early in the process, ensuring that the code is both functional and free of bugs.
5. Release
• Description: The software is released to a staging environment or pre-production
area, where it is further tested in realistic conditions before being deployed into the
production environment.
• Key Practice: Continuous Testing – After the release, final tests are conducted to
confirm the software is ready for deployment.
6. Deploy
• Description: The final code is deployed into the production environment. This stage
ensures that the product is ready for use by the end users.
• Key Practice: Continuous Deployment – The product is automatically pushed into
production without manual intervention, reducing deployment time.
7. Operate
• Description: Once deployed, the application is actively monitored to ensure it
operates as expected. This involves managing infrastructure, handling failures, and
ensuring continuous availability.
• Key Practice: Continuous Operations – Ongoing support and operation of the
deployed application, including incident management and updates.
8. Monitor
• Description: Monitoring focuses on tracking the system's performance, detecting
issues, and gathering metrics on application usage. This is a continuous process aimed
at ensuring smooth functioning.
• Key Practice: Continuous Operations – Monitoring tools capture data on
performance, and feedback from this phase is fed back into the planning and
development cycle for future improvements.
Key Benefits of the DevOps Pipeline:
• Automation: Repetitive tasks (like testing, deployment, and monitoring) are
automated to reduce human errors and save time.
• Faster Delivery: Through continuous integration and continuous delivery, teams can
release new features and updates faster.
• Quality Assurance: Continuous testing ensures the software is robust and free of
defects before reaching production.
• Collaboration: DevOps fosters a culture of collaboration between development,
operations, and QA teams.
• Scalability: With tools like Kubernetes and cloud platforms, scaling applications
becomes seamless, allowing for a more efficient use of resources.
• Feedback Loops: Continuous monitoring provides feedback to developers and
operations teams so they can quickly iterate and improve the software.
==================================================================
Building Stage – "Turning Code into Something That Can Run"
What is “Building”?
In software development, building means taking the raw source code (what developers write)
and transforming it into a working software application. This involves:
• Compiling the code (if needed)
• Resolving dependencies
• Packaging the final product (an executable file, a Docker image, etc.)
What happens in detail?
a) Code Compilation:
• Some programming languages like Java, C++, etc., require compilation.
• The compiler reads the human-written code and converts it into machine code,
which a computer can execute.
• Example: Java code is turned into .class files or .jar packages.
b) Resolving Dependencies:
• Most software uses external libraries or tools (called dependencies).
• For example, if you're building a web app, you might use a library for sending emails
or handling payments.
• The build process automatically finds, downloads, and connects these dependencies.
c) Packaging the Application:
• After compiling and linking everything together, the build system packages the
application into a single unit.
• This might be:
o A .jar or .war file (for Java apps)
o A .zip or .exe (for Windows apps)
o A Docker image (for containerized apps)
• This packaged file is called a build artifact — the final result that gets tested and
eventually deployed.
Tools Commonly Used:
• Maven, Gradle (Java)
• npm, Webpack (JavaScript)
• Make, CMake (C/C++)
• Docker (for containers)
• Jenkins, GitLab CI (to automate building)
Testing Stage – "Making Sure It Works Correctly"
What is “Testing”?
Once the software is built, we need to check if it works properly — just like testing a car
after assembly to ensure the brakes, engine, and lights work.
In DevOps, testing is automated, meaning it's done by scripts and testing tools without
needing a human to manually click through the application.
Types of Automated Tests (in Detail):
a) Unit Testing:
• Tests individual pieces of code — like one function, method, or class.
• Purpose: To ensure that each small part works on its own.
• Example: If you write a function to calculate discounts, a unit test checks if it gives
the correct result.
b) Integration Testing:
• Tests how multiple components work together.
• Purpose: To make sure that when different modules connect (e.g., login system +
database), they still work correctly.
• Example: Check if user registration sends the data to the database correctly.
c) Acceptance Testing (or End-to-End Testing):
• Simulates a real user's actions from start to finish.
• Purpose: To validate if the software meets business requirements.
• Example: A test might simulate a user logging in, browsing products, adding one to a
cart, and checking out.
When do these tests happen?
• Unit tests usually run right after the build.
• Integration tests happen after unit tests pass.
• Acceptance tests are often run before deployment to staging or production.
What if a test fails?
• The pipeline stops automatically.
• Developers are notified to fix the issue.
• This helps catch errors early before the software reaches users.
Tools Commonly Used:
• JUnit, TestNG (Java)
• PyTest, unittest (Python)
• Selenium, Cypress (browser testing)
• Postman (API testing)
• SonarQube (code quality analysis)
How Building & Testing Work Together in the Pipeline
1. Developer commits code → triggers the pipeline
2. Build stage runs:
o Compiles code
o Resolves dependencies
o Creates an executable
3. Test stage runs:
o Runs unit, integration, and acceptance tests
o Checks if the build is safe and working
4. If everything passes, the pipeline moves to the next stage (release or deployment)
5. If anything fails, the build is stopped and feedback is sent to the team
==================================================================
Deployment
Deployment is the process of making a software application available for use in a
production environment. This means transferring your code (which may have been tested in
local or staging environments) to servers or platforms where real users can access and
interact with it.
Think of it like this:
• Development environment = your workshop
• Testing/staging environment = quality inspection zone
• Production environment = the store shelf where customers use it
Deployment is a critical phase in the Software Development Life Cycle (SDLC), and with
DevOps, it is often automated, quick, and repeatable.
What Happens in the Deployment Stage?
1. Move to Production Environment
• Your application moves from a controlled environment (like a developer’s machine or
staging server) to a real-world environment.
• Production environment could be:
o A cloud platform (like AWS, Azure, Google Cloud)
o A dedicated or shared server
o A containerized infrastructure (like Kubernetes clusters)
o Mobile app stores (for Android or iOS apps)
Goal: Real users should be able to access the application without disruption.
2. Automatic Deployment Tools
Modern DevOps pipelines use CI/CD tools (Continuous Integration/Continuous
Deployment) to automate deployment. Some popular tools:
• Jenkins
• GitLab CI/CD
• GitHub Actions
• Spinnaker
• CircleCI
• ArgoCD (for Kubernetes)
These tools perform tasks like:
• Fetching the latest build or code from repositories
• Running automated tests
• Packaging the application (e.g., into containers)
• Deploying it to production servers
• Restarting services, applying configurations, etc.
Why Automation?
• Reduces human error
• Speeds up the process
• Enables faster delivery to users
• Ensures repeatability and reliability
3. Types of Deployment Strategies
Different strategies help balance risk, downtime, and user experience:
a) Rolling Deployment
• Updates servers one at a time.
• The system remains partially online throughout.
• If anything fails, the update can be paused or rolled back.
Example:
Out of 10 servers, update 2 at a time → monitor → continue.
b) Blue-Green Deployment
• Two identical environments: Blue (current) and Green (new).
• New version is deployed to Green → tested → then traffic is switched from Blue to
Green.
• Allows zero-downtime and easy rollback (just switch back).
Best for: Systems needing high reliability and fast rollback.
c) Canary Deployment
• New version is released to a small set of users first (like 5%).
• If no issues occur, the deployment is expanded to 100%.
• Limits the blast radius of bugs or issues.
Best for: Gradual exposure and feedback gathering.
4. Configuration and Setup
Deployment is not just about copying code. Other essential tasks include:
• Database migrations: Changing the structure of databases (adding tables, altering
columns, etc.)
• Environment variables: Setting API keys, passwords, and settings without
hardcoding them
• Server setup: Installing necessary packages, services, or tools
• Security configurations:
o Installing or renewing SSL certificates
o Setting up firewall rules, authentication, etc.
• Scaling configurations: Auto-scaling, load balancing, container orchestration setup
5. Post-Deployment Checks
After deployment, it's crucial to verify that everything is working:
Health Checks
• Is the server up?
• Are all endpoints responding?
• Is the app functional?
Monitoring & Logging
Tools help observe performance, detect errors, and track metrics:
• Prometheus + Grafana: For performance metrics and visual dashboards
• New Relic / Datadog / AppDynamics: For application performance monitoring
• ELK Stack (Elasticsearch, Logstash, Kibana): For log analysis
• Sentry: For real-time error tracking
Alerting
If any metric (e.g., CPU usage, error rate) crosses a threshold, alerts are sent to DevOps
teams via:
• Email
• Slack
• PagerDuty, etc.
==================================================================
Tools
What is a DevOps Pipeline
A DevOps pipeline is like an automated assembly line for software. It helps developers
write code, test it, fix bugs, deploy it, and monitor it — all with the help of tools working
together like a team.
Now, let’s meet the main tools in this pipeline and what they do:
1. Version Control Tools (Code Manager)
These tools help teams track code changes over time and work together without messing
things up.
• Git – The most popular system to track code changes.
• GitHub / GitLab / Bitbucket – Online platforms to store code, manage versions, and
collaborate with others.
Example: If you're working on CryptoX with a team, GitHub helps everyone contribute code
without overwriting each other’s work.
2. Continuous Integration (CI) Tools (Code Checker)
These tools automatically check your code when you make changes.
• Jenkins
• GitHub Actions
• GitLab CI
• CircleCI
They:
• Fetch the latest code
• Run automated tests
• Alert you if something is broken
Example: You change the frontend layout of CryptoX. GitHub Actions can test whether the
new code still works without breaking the dashboard.
3. Testing Tools (Bug Catchers)
These tools help you automatically test the app to make sure it behaves as expected.
• JUnit, Selenium, Cypress
• SonarQube – For checking code quality and bugs
Example: You add a “Buy Crypto” button in CryptoX — testing tools ensure it works and
doesn’t crash the page.
4. Build Tools (Packagers)
These tools bundle your code and files into one neat package that can be shipped.
• Maven
• Gradle
• Webpack (for frontend apps)
Example: Webpack can combine your HTML, CSS, and JavaScript in CryptoX into a final
build version ready for deployment.
5. Deployment Tools (App Launcher)
These tools move your app to the real world (servers or cloud) where users can access it.
• Docker – Packages apps into containers (mini-systems)
• Kubernetes – Manages many containers
• Ansible, Terraform – Set up and configure servers automatically
• Spinnaker, ArgoCD – Help with complex deployments
Example: Docker can wrap your entire CryptoX platform into a container so it runs the same
on any server.
6. Monitoring Tools (Health Checkers)
These tools watch your app after deployment to make sure everything is okay.
• Prometheus + Grafana – Monitor performance (CPU, memory, traffic)
• New Relic, Datadog – Track errors, uptime, and user experience
• ELK Stack – Helps search and analyze logs (Elasticsearch, Logstash, Kibana)
Example: Grafana can alert you if your CryptoX app suddenly slows down or crashes when
too many users log in.
7. Security Tools (Guards)
These tools protect your code and servers from attacks.
• Snyk – Checks for security issues in code
• Vault (by HashiCorp) – Manages secrets like API keys and passwords
• Aqua Security – Secures containers
Example: Vault stores your CryptoX API keys safely so no one steals them.
Putting It All Together
Think of your DevOps pipeline like this:
Stage Tool Example What it Does
Code Git, GitHub Store and manage code
Test JUnit, Selenium, SonarQube Check for bugs and errors
Build Maven, Webpack Create packages for deployment
Deploy Docker, Kubernetes Launch your app to real servers
Monitor Grafana, New Relic Watch and report app performance
Secure Vault, Snyk Keep your code and secrets safe
==================================================================