0% found this document useful (0 votes)
10 views11 pages

Devops Project

project
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views11 pages

Devops Project

project
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

2024

NIIT PROJECT
Documentation

COURSE: DEVOPS
BY: AKINMULERO PRIESTLY
PROJECT TOPIC: DOCUMENTATION ON DEV AND OPS

Note: THIS PROJECT WAS GIVING BY OUR SUPERVISOR MR TEGA


Table of Contents
1. Introduction to DevOps
 What is DevOps?
 Key Principles of DevOps
 Benefits of DevOps
2. Distinction Between Development (Dev) and Operations (Ops)
 Development (Dev)
 Operations (Ops)
 Interdependency Between Dev and Ops
3. Versioning
 What is Versioning?
 How to Implement Versioning
 Tools for Versioning
4. CI/CD with Docker
 What is CI/CD?
 Prerequisites for Setting Up CI/CD
 Detailed Steps to Implement CI/CD Pipeline with GitHub Actions
 Creating a Dockerfile
 Configuring GitHub Actions Workflow
 Adding Secrets to GitHub
 Comments on the Workflow

Introduction to DevOps
What is DevOps?
DevOps is a cultural and professional movement that emphasizes
collaboration, communication, and integration between software
development (Dev) and IT operations (Ops) teams. The goal is to improve
the efficiency, speed, and quality of software development and deployment.
Key Principles of DevOps
 Collaboration and Communication: Breaking down the silos between
development and operations teams, fostering a culture of shared
responsibility, and improving communication.
 Automation: Automating repetitive tasks such as code integration,
testing, deployment, and infrastructure management to reduce
human error and increase efficiency.
 Continuous Integration (CI): Developers frequently merge their code
changes into a shared repository, triggering automated builds and
tests to catch issues early.
 Continuous Delivery (CD): Ensuring that code changes are
automatically tested and staged for release, so the software can be
deployed to production at any time.
 Continuous Monitoring and Feedback: Continuously monitoring
applications and infrastructure to detect issues, gather feedback, and
improve future releases.

Benefits of DevOps
 Faster Time to Market: Accelerates the delivery of new features and
updates.
 Improved Collaboration: Enhances teamwork and communication
between development and operations.
 Higher Quality Software: Automated testing and continuous
integration help identify and fix bugs early.
 Better Customer Satisfaction: Faster releases and more reliable
software lead to improved customer experiences.
 Reduced Operational Costs: Automation reduces manual effort and
the risk of errors, leading to cost savings.

Distinction Between Development (Dev) and Operations


(Ops)
Development (Dev)
Focus and Responsibilities of Development

 Focus: Creating and improving software applications.


 Responsibilities:
 Writing Code: Implementing new features and functionalities
according to requirements.
 Testing: Writing unit tests, integration tests, and performing
manual testing to ensure code quality.
 Debugging: Identifying and fixing bugs and issues in the code.
 Code Review: Participating in code reviews to ensure adherence
to coding standards and best practices.
 Documentation: Creating and maintaining documentation for
code, APIs, and user guides.

Operations (Ops)
Focus and Responsibilities of Operations
 Focus: Managing and maintaining IT infrastructure and ensuring the
reliability of software applications in production.
 Responsibilities:
 Deployment: Deploying new releases and updates to production
environments.
 Configuration Management: Managing and maintaining
configuration settings for applications and infrastructure.
 Monitoring and Logging: Continuously monitoring system
performance, availability, and security.
 Incident Management: Responding to and resolving production
incidents and outages.
 Infrastructure Management: Provisioning and maintaining
servers, databases, networks, and other infrastructure
components.
Interdependency Between Dev and Ops
 Dev Needs Ops: Developers rely on operations to provide stable
environments for testing and production. Operations teams provide
the necessary infrastructure, deployment pipelines, and monitoring
tools.
 Ops Needs Dev: Operations teams depend on developers to build
applications that are easy to deploy, configure, and monitor.
Developers provide timely updates and fixes to resolve production
issues.

Versioning
What is Versioning?
Versioning is the practice of assigning unique version numbers to different
states of software. It helps in tracking changes, managing releases, and
ensuring compatibility between different versions. Version numbers
typically follow a specific format and convey meaningful information about
the changes in each release.
How to Implement Versioning
Semantic Versioning
Semantic versioning is a widely-used versioning scheme that follows the
MAJOR.MINOR.PATCH format:
 MAJOR: Incremented for significant changes that break backward
compatibility.
 MINOR: Incremented for new features and functionality that are
backward-compatible.
 PATCH: Incremented for backward-compatible bug fixes.
Example:
 1.0.0: Initial release.
 1.1.0: Added a new feature.
 1.1.1: Fixed a bug.
Tools for Versioning
 Git: A distributed version control system that tracks changes to files
and coordinates work on those files among multiple people. Git uses
commits to represent different versions of the code.
 GitHub/GitLab: Platforms that host Git repositories and provide
additional features for collaboration, issue tracking, and CI/CD
integration.
Best Practices for Versioning
 Consistent Naming: Follow a consistent versioning scheme such as
semantic versioning.
 Changelog: Maintain a changelog that documents changes, new
features, and bug fixes in each version.
 Tags and Releases: Use Git tags to mark specific commits as releases.
Platforms like GitHub and GitLab allow you to create formal releases
with additional metadata and release notes.

CI/CD with Docker


What is CI/CD?
CI/CD stands for Continuous Integration and Continuous Delivery (or
Deployment). It is a method to automate and streamline the process of
integrating, testing, and deploying code changes. The goal is to enable faster
and more reliable delivery of software.
Prerequisites for Setting Up CI/CD
 Docker: Installed on your local machine or build server to create and
manage containers.
 CI/CD Tool: Such as Jenkins, GitLab CI, or GitHub Actions to automate
the CI/CD pipeline.
 Source Code Repository: Hosting your code on a platform like GitHub
or GitLab.
Detailed Steps to Implement CI/CD Pipeline with GitHub Actions
Creating a Dockerfile
A Dockerfile is a script that contains instructions to assemble a Docker
image. Here is an example Dockerfile for a Python application:
Configuring GitHub Actions Workflow
Create a .github/workflows/main.yml file in your repository to define the
CI/CD pipeline.
Adding Secrets to GitHub
To securely store your DockerHub credentials, add them to your GitHub
repository secrets:
1. Go to your repository on GitHub.
2. Click on Settings.
3. Select Secrets from the sidebar.
4. Click on New repository secret.
5. Add secrets for DOCKERHUB_USERNAME and
DOCKERHUB_PASSWORD.
Comments on the Workflow
 Checkout Code: This step uses the actions/checkout@v2 action to
fetch the latest code from the repository.
 Set up Docker Buildx: This step sets up Docker Buildx, a CLI plugin for
extended build capabilities with Docker.
 Cache Docker Layers: Caching Docker layers can significantly speed up
the build process by reusing layers from previous builds.
 Build Docker Image: This step runs the docker build command to
create a Docker image from the Dockerfile.
 Log in to DockerHub: This step logs into DockerHub using the stored
credentials, which are securely managed as secrets in GitHub.
 Push Docker Image: This step pushes the built Docker image to
DockerHub, making it available for deployment.
 Deploy to Kubernetes: This step uses

Conclusion
DevOps is a transformative approach that fosters a culture of collaboration
between development and operations teams, emphasizing automation,
continuous integration, continuous delivery, and continuous monitoring. By
bridging the gap between development and operations, organizations can
achieve faster delivery of high-quality software, enhanced system reliability,
and improved customer satisfaction.
Understanding the distinctions between development and operations is
crucial for implementing effective DevOps practices. Developers focus on
creating new features and maintaining code quality, while operations teams
manage the infrastructure and ensure the stability and performance of
applications in production. Their interdependency highlights the need for
effective communication and collaboration to achieve shared goals.
Versioning is an essential practice in software development that helps in
tracking changes, managing releases, and ensuring compatibility between
different versions. Implementing semantic versioning and using tools like Git
and GitHub can streamline this process.
CI/CD with Docker provides a robust framework for automating the software
delivery pipeline. By integrating tools like GitHub Actions, developers can
automate the build, test, and deployment processes, ensuring that
applications are always in a deployable state. This automation not only
speeds up the delivery process but also enhances the reliability and
consistency of deployments.
In summary, DevOps, versioning, and CI/CD with Docker are key
components of modern software development and operations. They enable
teams to deliver better software faster, respond to changes more efficiently,
and maintain high standards of quality and reliability. Adopting these
practices can significantly benefit organizations by improving their agility,
scalability, and overall performance.

You might also like