0% found this document useful (0 votes)
6 views55 pages

DevOps Module1

The document outlines the course 'Introduction to DevOps' (CSA1007) taught by Dr. Mohana S D at Presidency University Bengaluru, covering essential topics such as basic Linux commands, software development lifecycle (SDLC), and various development methodologies like Waterfall, Agile, and Lean. It also details the DevOps lifecycle, emphasizing the integration of development and operations to enhance collaboration and efficiency in software delivery. Key tools and practices in DevOps, including version control with Git and CI/CD processes, are also discussed.

Uploaded by

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

DevOps Module1

The document outlines the course 'Introduction to DevOps' (CSA1007) taught by Dr. Mohana S D at Presidency University Bengaluru, covering essential topics such as basic Linux commands, software development lifecycle (SDLC), and various development methodologies like Waterfall, Agile, and Lean. It also details the DevOps lifecycle, emphasizing the integration of development and operations to enhance collaboration and efficiency in software delivery. Key tools and practices in DevOps, including version control with Git and CI/CD processes, are also discussed.

Uploaded by

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

Course: Introduction to DevOps (CSA1007)

Dr.Mohana S D,
Assistant Professor,
(Course Instructor Incharge - CSA1007)
School of Information Science,
Presidency University Bengaluru.
Main Topic

Modules
1 Basic Linux Commands

2 Software Development Lifecycle


3 Waterfall Model and Agile Model
4 Lean Methodology
5 Waterfall Vs Agile Vs Lean
6 Devops and its tools and Version Control With Git
7 Introduction to Git Features of Git, Benefits, Workflow, Git vs
GitHub,
8 Installation of Git on Windows/Linux and Environment set up,
9 All Git Commands-Working with local and remote repositories,
Running first Git command,
10 Fundamentals of Repository structure and file status life cycle,
11 Working locally with staging, unstaging and commit

CSA2020 Introduction to DevOps 1 / 44


Basic Linux Commands

Basic Linux Commands

File and Directory Commands:


ls: List directory contents.
cd: Change directory.
pwd: Print working directory.
mkdir: Create a new directory.
rm: Remove files or directories.
cp: Copy files or directories.
mv: Move or rename files.
touch: Create an empty file.

CSA2020 Introduction to DevOps 2 / 44


Basic Linux Commands

File Viewing and Editing

File and Directory Commands:


cat: Display file contents.
nano / vim: Text editors for editing files.
less: View file contents one screen at a time.

Permissions:
chmod: Change file permissions.
chown: Change file ownership.

CSA2020 Introduction to DevOps 3 / 44


Software Development Lifecycle

Software Development Lifecycle (SDLC)

Phases of SDLC:
1 Requirement Analysis: Identify user needs.
2 Design: Create system and software architecture.
3 Implementation: Write and assemble code.
4 Testing: Validate functionality and fix bugs.
5 Deployment: Deliver the product to users.
6 Maintenance: Update and improve the system.

CSA2020 Introduction to DevOps 4 / 44


Software Development Lifecycle

SDLC

Software Development Life Cycle (SDLC) is a structured approach used for


designing, developing, testing, deploying, and maintaining software.

Figure: SDLC model

CSA2020 Introduction to DevOps 5 / 44


Software Development Lifecycle

SDLC

Six Software Development Life Cycle (SDLC).

Figure: SDLC model

CSA2020 Introduction to DevOps 6 / 44


Software Development Lifecycle

Roles of Software Development Lifecycle (SDLC)

Roles of SDLC:
1 Project Manager: Oversees the project, manages schedules, budgets,
and resources.
2 Business Analyst: Gathers and analyzes requirements from
stakeholders.
3 Software Architect: Designs the system’s overall structure and defines
technical standards.
4 Developers: Write and implement code based on design specifications
5 Testers (Quality Assurance): Ensure the software meets quality and
functional requirements.

CSA2020 Introduction to DevOps 7 / 44


Software Development Lifecycle

Roles of Software Development Lifecycle (SDLC)

Roles of SDLC:
1 UI/UX Designers: Design user interfaces for a seamless user
experience
2 DevOps Engineers: Automate deployment, monitoring, and scaling
processes.
3 Database Administrator (DBA): Manage database design,
implementation, and optimization.
4 System Administrators: Maintain infrastructure and ensure system
availability.
5 Support Engineers: Handle post-deployment issues and user feedback.

CSA2020 Introduction to DevOps 8 / 44


Waterfall Model

Waterfall Model

Definition: Sequential design process, where each phase depends on


the deliverables of the previous phase.
1 It was first introduced by Winston W. Royce in 1970.
2 It is a linear and sequential approach
3 It is depended on documentation-driven
4 high emphasis on quality control and testing
5 It involves a careful planning process

CSA2020 Introduction to DevOps 9 / 44


Waterfall Model

Waterfall Model

Figure: SDLC model

CSA2020 Introduction to DevOps 10 / 44


Waterfall Model

Waterfall Model

Requirement Analysis Phase


1 Purpose: To document and analyze project requirements.
2 Server Requirements: Document Servers: Host requirements
documents and specifications.
3 Examples: SharePoint, Confluence, or a dedicated file server.
4 Collaboration Servers: Enable discussions between stakeholders.
5 Examples: Microsoft Teams, Slack.

CSA2020 Introduction to DevOps 11 / 44


Waterfall Model

Waterfall Model

System Design Phase


1 Purpose: Design the architecture and components of the system.
2 Server Requirements: Modeling/Design Servers: Host design tools for
UML diagrams, flowcharts, etc.
3 Examples: Enterprise Architect (Sparx), Lucidchart.
4 Version Control Servers: Store design artifacts.
5 Examples: GitHub, GitLab, Bitbucket.

CSA2020 Introduction to DevOps 12 / 44


Waterfall Model

Waterfall Model

Implementation Phase
1 Purpose: Development of the software based on the design.
2 Server Requirements: Application Servers: Host and run the
application code during development.
3 Examples: Tomcat, Nginx, Apache.
4 Version Control Servers: Manage source code repositories.
5 Examples: GitHub, GitLab, Bitbucket.
6 Build Servers: Compile and build the application.
7 Examples: Jenkins, TeamCity.
8 Development Environment Servers: Provide environments for coding
and testing.
9 Examples: Docker containers, Vagrant VMs.

CSA2020 Introduction to DevOps 13 / 44


Waterfall Model

Waterfall Model

Testing Phase
1 Purpose: Test the application for bugs, performance, and quality.
2 Server Requirements: Testing Servers: Run automated and manual
tests.
3 Examples: Selenium Grid, JUnit, TestNG.
4 Staging Servers: Mimic the production environment for testing.
5 Examples: AWS EC2 instances, Azure VM.
6 Bug Tracking Servers: Track and manage issues.
7 Examples: Jira, Bugzilla.
8 Performance Testing Servers: Test scalability and response times.
9 Examples: Apache JMeter, LoadRunner.

CSA2020 Introduction to DevOps 14 / 44


Waterfall Model

Waterfall Model

Deployment Phase
1 Purpose: Deploy the application to production.
2 Server Requirements: Production Servers: Host the final application.
3 Examples: AWS EC2, Azure, on-premises servers.
4 Database Servers: Manage application data.
5 Examples: MySQL, PostgreSQL, MongoDB.
6 Load Balancing Servers: Distribute traffic to ensure high availability.
7 Examples: HAProxy, Nginx, AWS Elastic Load Balancer.
8 Backup Servers: Backup deployed applications and databases.
9 Examples: Veeam, AWS S3.

CSA2020 Introduction to DevOps 15 / 44


Waterfall Model

Waterfall Model

Maintenance Phase
1 Purpose: Ensure the system runs smoothly and is updated as needed.
2 Server Requirements: Monitoring Servers: Track system health and
performance.
3 Examples: Nagios, Prometheus, Grafana.
4 Logging Servers: Collect and store logs for debugging and auditing.
5 Examples: ELK Stack (Elasticsearch, Logstash, Kibana).
6 Patch Management Servers: Host and deploy updates and patches.
7 Examples: WSUS (Windows Server Update Services), Ansible.
8 Help Desk Servers: Manage support tickets and user feedback.
9 Examples: Zendesk, ServiceNow.

CSA2020 Introduction to DevOps 16 / 44


Agile Model

Agile Model

Definition: Iterative and incremental development focusing on


collaboration and customer feedback.
1 Individuals and interactions over processes and tools.
2 Working software over comprehensive documentation.
3 Customer collaboration over contract negotiation.
4 Responding to change over following a plan.

Frameworks: Scrum, Kanban, Extreme Programming (XP).


Advantages: Flexible, faster delivery, high customer satisfaction.
Disadvantages: Requires active stakeholder involvement, less
predictable.

CSA2020 Introduction to DevOps 17 / 44


Agile Model

Agile SDLC Models: Crystal Agile methodology, Dynamic Systems


Development Method (DSDM), Feature-driven development (FDD),
Scrum, Extreme Programming (XP), Lean Development, Unified Process.

CSA2020
Figure: Agile model
Introduction to DevOps 18 / 44
Lean Methodology

Lean Methodology

Definition: Focuses on minimizing waste while delivering value.


1 Eliminate waste.
2 Build quality in.
3 Create knowledge.
4 Deliver fast.
5 Respect people.
6 Optimize the whole.

CSA2020 Introduction to DevOps 19 / 44


DevOps and Its Tools

DevOps Model

Definition: The DevOps lifecycle is a continuous process that


integrates development (Dev) and operations (Ops) to improve
collaboration, efficiency, and the speed of delivering software. When
applied to server-based environments, the DevOps lifecycle ensures
that servers are efficiently managed, updated, and maintained
throughout the software development and deployment process.
Below is an explanation of the DevOps lifecycle with respect to
server-based environments.
1 plan, code, build, test, release, deploy, operate, monitor, feeedback
and iterate.

CSA2020 Introduction to DevOps 20 / 44


DevOps and Its Tools

Agile SDLC Models: plan, code, build, test, release, deploy, operate,
monitor, feeedback and iterate.

Figure: DevOps model

CSA2020 Introduction to DevOps 21 / 44


DevOps and Its Tools

DevOps: Plan

Definition: Define the goals, requirements, and infrastructure


needed for the application.
1 Plan server infrastructure (e.g., physical servers, virtual machines, or
cloud servers).
2 Decide on server configurations, scalability, and redundancy.
3 Use Infrastructure as Code (IaC) tools like Terraform or AWS
CloudFormation to define server infrastructure.
4 Plan for monitoring, logging, and security measures for servers.

CSA2020 Introduction to DevOps 22 / 44


DevOps and Its Tools

DevOps: Code

Definition: Develop the application code and infrastructure code.


1 Write scripts or IaC templates to automate server provisioning and
configuration.
2 Use tools like Ansible, Puppet, or Chef to manage server
configurations.
3 Ensure server configurations are version-controlled using tools like Git.

CSA2020 Introduction to DevOps 23 / 44


DevOps and Its Tools

DevOps: Build

Definition: Compile and package the application code and


dependencies.
1 Use CI/CD tools like Jenkins, GitLab CI, or CircleCI to automate
builds.
2 Build server images or containers (e.g., Docker images) for consistent
deployment environments.
3 Ensure server environments are reproducible and consistent across
development, testing, and production.

CSA2020 Introduction to DevOps 24 / 44


DevOps and Its Tools

DevOps: Test

Definition: Compile and package the application code and


dependencies.
1 Test server configurations and infrastructure changes in a staging
environment.
2 Use automated testing tools to validate server performance,
scalability, and security.
3 Perform load testing and stress testing on servers to ensure they can
handle expected traffic.

CSA2020 Introduction to DevOps 25 / 44


DevOps and Its Tools

DevOps: Release

Definition: Prepare the application and infrastructure for


deployment..
1 Use deployment pipelines to automate server provisioning and
application deployment.
2 Ensure servers are properly configured and updated before
deployment.
3 Use blue-green deployment or canary deployment strategies to
minimize downtime and risk..

CSA2020 Introduction to DevOps 26 / 44


DevOps and Its Tools

DevOps: Deploy

Definition: Prepare the application and infrastructure for


deployment.
1 Use orchestration tools like Kubernetes, Docker Swarm, or AWS ECS
to manage containerized applications on servers.
2 Automate server scaling and load balancing to handle traffic spikes.
3 Ensure servers are monitored during deployment to detect and resolve
issues quickly.

CSA2020 Introduction to DevOps 27 / 44


DevOps and Its Tools

DevOps: Operate

Definition: Manage and monitor the application and infrastructure


in production.
1 Use monitoring tools like Prometheus, Grafana, or Nagios to track
server performance and health.
2 Implement logging and alerting systems (e.g., ELK Stack, Splunk) to
identify and resolve server issues.
3 Ensure servers are patched and updated regularly to maintain security
and performance.

CSA2020 Introduction to DevOps 28 / 44


DevOps and Its Tools

DevOps: Monitor

Definition: Continuously monitor the application and infrastructure


for performance, security, and reliability.
1 Monitor server metrics (CPU, memory, disk usage, etc.) and
application performance.
2 Use Application Performance Monitoring (APM) tools like New Relic
or Datadog.
3 Analyze logs and metrics to identify trends and potential issues.

CSA2020 Introduction to DevOps 29 / 44


DevOps and Its Tools

DevOps: Feedback and Iterate

Definition: Gather feedback and improve the application and


infrastructure
1 Collect feedback from monitoring and logging systems to optimize
server performance.
2 Use feedback to improve server configurations, scaling policies, and
deployment processes.
3 Continuously iterate on the infrastructure to meet changing
requirements and improve efficiency.

CSA2020 Introduction to DevOps 30 / 44


DevOps and Its Tools

DevOps and Its Tools

Definition: A server is a powerful computer or software program


that provides resources, data, services, or programs to other devices
(known as clients) over a network. Servers can be physical
machines or virtual instances running specific software designed to
perform tasks and handle requests.

CSA2020 Introduction to DevOps 31 / 44


DevOps and Its Tools

DevOps Functions of Servers


1 Resource Sharing: Centralizes resources like files, printers, and
databases for users.
2 Data Storage and Management: Stores and retrieves data for
applications or websites.
3 Hosting Applications: Runs web servers, email servers, or database
systems for applications.
4 Authentication: Manages user authentication, access control, and
permissions.
5 Backup and Recovery: Maintains backups of data and ensures
business continuity.
6 Processing Power: Handles complex computations or processing tasks
for clients.
7 Security: Provides encryption, firewalls, and monitoring for data and
communication.
8 Scalability: Supports multiple users or applications simultaneously.
CSA2020 Introduction to DevOps 32 / 44
DevOps and Its Tools

DevOps and Its Tools

Definition: Combines development and operations to enhance


collaboration and automation.
1 CI/CD: Jenkins, GitHub Actions.
2 Configuration Management: Ansible, Chef, Puppet.
3 Containerization: Docker, Kubernetes.
4 Monitoring: Nagios, Prometheus, Grafana.

CSA2020 Introduction to DevOps 33 / 44


DevOps and Its Tools

Key Principles of the DevOps Framework and Server


Requirements:

1 Continuous Integration (CI) and Continuous Deployment (CD):


DevOps emphasizes automating the integration, testing, and
deployment processes. Servers that support CI/CD tools are essential
to streamline this flow.
2 CI/CD Servers: Automate building, testing, and deploying code to
various environments, ensuring faster and more reliable releases.
Examples: Jenkins, GitLab CI, CircleCI.
3 Container Servers: Facilitate the creation, testing, and deployment of
containerized applications for consistent and scalable
deployments.Examples: Docker, Kubernetes.

CSA2020 Introduction to DevOps 34 / 44


DevOps and Its Tools

Key Principles of the DevOps Framework and Server


Requirements:

1 Automation and Infrastructure as Code (IaC): DevOps relies on


automating repetitive tasks and managing infrastructure through
code. Servers that enable IaC help teams to deploy and manage
environments programmatically.
2 Configuration Management Servers: Automate server configuration
and management across multiple environments.Examples: Ansible,
Puppet, Chef.
3 Provisioning Servers: Automatically provision infrastructure resources
on cloud platforms. Examples: Terraform, AWS CloudFormation.

CSA2020 Introduction to DevOps 35 / 44


DevOps and Its Tools

Key Principles of the DevOps Framework and Server


Requirements:

1 Monitoring and Logging: In DevOps, continuous monitoring and


logging are vital for identifying issues early and improving system
performance. Servers that support monitoring and log aggregation are
essential to ensure system health.
2 Monitoring Servers: Continuously track system performance, uptime,
and resource utilization. Examples: Prometheus, Nagios, Zabbix.
3 Logging Servers: Aggregate and analyze logs from various systems
and applications to identify errors and improve performance.
Examples: ELK Stack (Elasticsearch, Logstash, Kibana), Splunk.

CSA2020 Introduction to DevOps 36 / 44


DevOps and Its Tools

Key Principles of the DevOps Framework and Server


Requirements:

1 Collaboration and Communication: DevOps encourages enhanced


communication and collaboration between development, operations,
and other stakeholders. Servers that support real-time collaboration
and chat are critical.
2 Collaboration Servers: Facilitate real-time communication, issue
tracking, and team coordination. Examples: Slack, Jira, Confluence.
3 Version Control Servers: Store and manage code changes, facilitating
collaboration between development teams.Examples: GitHub, GitLab,
Bitbucket.

CSA2020 Introduction to DevOps 37 / 44


DevOps and Its Tools

Key Principles of the DevOps Framework and Server


Requirements:

1 Security and Compliance (DevSecOps):DevSecOps integrates security


into the DevOps process, ensuring that security vulnerabilities are
addressed early in the development lifecycle. Servers supporting
security tools are vital for this practice.
2 Security Monitoring Servers: Continuously monitor security threats
and vulnerabilities within the system. Examples: Nessus, OpenVAS.
3 Identity and Access Management Servers: Manage user authentication
and authorization, ensuring that only authorized personnel have
access to critical systems. Examples: LDAP, Active Directory.

CSA2020 Introduction to DevOps 38 / 44


DevOps and Its Tools

Key Principles of the DevOps Framework and Server


Requirements:

1 Continuous Testing: Continuous testing is a DevOps principle that


ensures that automated tests are run as part of the CI/CD pipeline to
catch issues early.
2 Test Automation Servers: Run automated tests during the CI/CD
pipeline to validate code changes.Examples: Selenium, TestNG, JUnit.
3 Test Reporting Servers: Generate detailed reports on test results,
helping teams to identify and address issues. Examples: Jenkins,
Allure Test Report.

CSA2020 Introduction to DevOps 39 / 44


DevOps and Its Tools

Key Principles of the DevOps Framework and Server


Requirements:

1 Scalability and Reliability:DevOps aims to ensure systems are scalable,


reliable, and available at all times. Servers that support auto-scaling
and load balancing help achieve this goal.
2 Load Balancing Servers: Distribute network or application traffic to
multiple servers to ensure high availability and reliability. Examples:
HAProxy, Nginx, AWS Elastic Load Balancing.
3 Auto-Scaling Servers: Automatically scale application resources based
on demand to maintain performance. Examples: AWS EC2 Auto
Scaling, Kubernetes Horizontal Pod Autoscaler.

CSA2020 Introduction to DevOps 40 / 44


Version Control with Git

Version Control with Git

Definition: A distributed version control system to track changes in


files and collaborate on projects.
1 Distributed architecture.
2 Branching and merging.
3 Staging area.

Benefits: Collaboration, history tracking, code integrity.

CSA2020 Introduction to DevOps 41 / 44


Git Basics

Introduction to Git

What is Git?
Distributed Version Control System.
Tracks changes in files.
Benefits of Git:
Collaboration.
History tracking.
Branching and merging.

CSA2020 Introduction to DevOps 42 / 44


Git Workflow and Commands

Git Workflow

Working Directory: Files being edited.


Staging Area: Marked for commit.
Repository: Permanent storage.
Basic Commands:
git init - Initialize repository.
git add <file> - Stage changes.
git commit -m "message" - Commit changes.

CSA2020 Introduction to DevOps 43 / 44


Git vs GitHub

Git vs GitHub

Git:
Version control tool.
Works locally.
GitHub:
Hosting service for Git repositories.
Enables team collaboration.

CSA2020 Introduction to DevOps 44 / 44


Installation of Git

Installation of Git

On Windows:
1 Download the installer from git-scm.com.
2 Run the installer and follow the setup wizard.
3 Configure username and email:

git config –global user.name ”Your Name”


git config –global user.email ”[email protected]

CSA2020 Introduction to DevOps 45 / 44


Installation of Git

Installation of Git

On Linux:
1 Install via package manager:
2 sudo apt-get install git

Configure username and email (same as above).


git config –global user.name ”Your Name”
git config –global user.email ”[email protected]

CSA2020 Introduction to DevOps 46 / 44


Git- Create new repository on the command line (git bash command
line)

Installation of Git on windows

1 Working Directory: Local files being edited.


2 Staging Area: Changes marked for the next commit.
3 Repository: Permanent storage for committed changes.

CSA2020 Introduction to DevOps 47 / 44


Git- Create new repository on the command line (git bash command
line)

1 Working Directory: git init


2 git add file name exmaple: git add HelloWorld.java
3 git commit -m ”first commit”
4 git branch -M main
5 git remote add origin https://github.com/mohanSD7/xtz.git
6 git push -u origin main

CSA2020 Introduction to DevOps 48 / 44


Git- Create new repository on the command line (git bash command
line)

All Git Commands

Working Locally:
1 Initialize Repo: git init
2 Check Status: git status
3 Stage Files: git add file
4 Unstage Files: git restore –staged ¡file¿
5 Commit Changes: git commit -m ”message”

CSA2020 Introduction to DevOps 49 / 44


Git- Create new repository on the command line (git bash command
line)

All Git Commands

Working with Remote Repositories


1 Clone Repo: git clone url
2 Fetch Changes: git fetch
3 Pull Changes: git pull
4 Push Changes: git push

CSA2020 Introduction to DevOps 50 / 44


Git- Create new repository on the command line (git bash command
line)

All Git Commands

Working Locally:
1 Initialize Repo: git init
2 Check Status: git status
3 Stage Files: git add file
4 Unstage Files: git restore –staged ¡file¿
5 Commit Changes: git commit -m ”message”

CSA2020 Introduction to DevOps 51 / 44


Git- Create new repository on the command line (git bash command
line)

All Git Commands

Working with Remote Repositories:


1 Clone Repo: git clone url
2 Fetch Changes: git fetch
3 Pull Changes: git pull
4 Push Changes: git push

CSA2020 Introduction to DevOps 52 / 44


Repository Structure and File Lifecycle

Repository Structure and File Lifecycle

File Lifecycle:
1 Untracked: Newly added files.
2 Tracked: Files under version control.
3 Modified: Edited files.
4 Staged: Changes marked for commit.
5 Committed: Saved to the repository.

CSA2020 Introduction to DevOps 53 / 44

You might also like