Unit I Introduction To Devops Notes

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

20ITV73 DevOps

UNIT I INTRODUCTION TO DEVOPS

Devops Essentials - Introduction to AWS, GCP, Azure - Version control systems: Git and Github.

Contents
1. Devops Essentials ------------------------------------------------------------------------------------------------------------------------------1
2. Introduction to AWS, GCP, Azure ----------------------------------------------------------------------------------------------------------5
2.1 Introduction to AWS ------------------------------------------------------------------------------------------------------------------------5
2.2 Introduction to Google Cloud Platform (GCP) ----------------------------------------------------------------------------------------8
2.3 Introduction to Microsoft Azure ------------------------------------------------------------------------------------------------------- 11
3. Version control systems: Git and Github.---------------------------------------------------------------------------------------------- 15
2 Marks: ---------------------------------------------------------------------------------------------------------------------------------------------- 17
DevOps Essentials --------------------------------------------------------------------------------------------------------------------------- 17
Introduction to AWS ------------------------------------------------------------------------------------------------------------------------ 17
Introduction to GCP ------------------------------------------------------------------------------------------------------------------------- 18
Introduction to Azure ----------------------------------------------------------------------------------------------------------------------- 18
Version Control Systems: Git ------------------------------------------------------------------------------------------------------------- 18
Version Control Systems: GitHub -------------------------------------------------------------------------------------------------------- 18
AWS --------------------------------------------------------------------------------------------------------------------------------------------- 19
GCP ---------------------------------------------------------------------------------------------------------------------------------------------- 19
Azure-------------------------------------------------------------------------------------------------------------------------------------------- 19
Version Control Systems: Git and GitHub --------------------------------------------------------------------------------------------- 20

1. Devops Essentials
DevOps is a comprehensive approach to software development and IT operations aimed at improving collaboration,
efficiency, and quality throughout the software lifecycle. Here’s a detailed exploration of DevOps essentials:

1. DevOps Overview

DevOps is a cultural and technical movement that emphasizes collaboration between development (Dev) and operations
(Ops) teams to automate and streamline the software development lifecycle. The goal is to shorten development cycles,
increase deployment frequency, and deliver more reliable software.

2. Key Principles of DevOps

2.1 Collaboration and Communication

1
- Breaking Down Silos: Traditional software development often involves separate teams for development, operations,
and quality assurance, which can lead to communication breakdowns and inefficiencies. DevOps encourages cross-
functional teams where developers, operations engineers, and other stakeholders work together throughout the lifecycle.

- Shared Goals and Metrics: Teams share common goals and performance metrics, which help align their efforts and
improve overall project outcomes.

2.2 Automation

- Continuous Integration (CI): Involves automatically integrating code changes into a shared repository multiple times
a day. Each integration is verified by an automated build and test process to detect issues early. Tools commonly used
for CI include Jenkins, GitLab CI, and CircleCI.

- Continuous Delivery (CD): Extends CI by automating the deployment process so that code changes can be pushed to
production quickly and safely. This involves automated testing, staging environments, and deployment pipelines. Tools
like Spinnaker, Azure DevOps, and GitHub Actions facilitate CD.

- Infrastructure as Code (IaC): Managing and provisioning infrastructure through code rather than manual processes.
IaC tools allow teams to describe infrastructure using configuration files that can be versioned and reused. Popular IaC
tools include Terraform, AWS CloudFormation, and Ansible.

2.3 Continuous Monitoring and Feedback

- Monitoring: Involves tracking system performance, application health, and user experiences. This helps detect issues
early and understand how changes impact the system. Tools such as Prometheus, Grafana, New Relic, and Datadog are
commonly used for monitoring.

- Logging: Collecting and analyzing logs from various sources to diagnose and troubleshoot issues. Centralized logging
solutions like the ELK Stack (Elasticsearch, Logstash, Kibana) and Splunk are often employed.

- Feedback Loops: Continuous feedback from monitoring and logging helps teams quickly address issues, refine
processes, and make informed decisions.

2.4 Security

- DevSecOps: Integrating security practices into the DevOps pipeline. This involves automating security checks,
conducting vulnerability assessments, and ensuring compliance with security policies throughout the development
lifecycle. Tools like Snyk, SonarQube, and Aqua Security help in achieving this.

3. DevOps Practices

3.1 Version Control

- Git: A distributed version control system that tracks changes to source code and facilitates collaboration among
developers. Key features include branches, commits, and merges.

- Branching Strategies: Common strategies include Git Flow, GitHub Flow, and trunk-based development, each
offering different approaches to managing code changes and releases.

3.2 Configuration Management

- Configuration Management Tools: Automate the deployment and management of configuration files and system
settings. Tools like Puppet, Chef, and Ansible are used to ensure that systems are configured consistently and correctly.

2
3.3 Containerization and Orchestration

- Containers: Package applications and their dependencies into isolated environments. Docker is a widely used
containerization platform.

- Container Orchestration: Manages the deployment, scaling, and operation of containerized applications. Kubernetes
is the most popular orchestration tool, providing features for automated deployment, scaling, and management of
containerized applications.

3.4 Continuous Testing

- Automated Testing: Incorporates automated tests into the CI/CD pipeline to ensure code quality. Types of tests
include unit tests, integration tests, and end-to-end tests.

- Testing Tools: Tools like Selenium, JUnit, and TestNG help automate the testing process and integrate with CI/CD
pipelines.

4. DevOps Tools and Technologies

4.1 CI/CD Tools

- Jenkins: An open-source automation server used for building, testing, and deploying applications.

- GitLab CI: A continuous integration and delivery tool integrated with GitLab repositories.

- CircleCI: A cloud-based CI/CD service that automates the software development process.

4.2 IaC Tools

- Terraform: An open-source tool for building, changing, and versioning infrastructure using a high-level configuration
language.

- AWS CloudFormation: A service that provides a common language for describing and provisioning all infrastructure
resources in a cloud environment.

- Ansible: An open-source automation tool for configuration management, application deployment, and task
automation.

4.3 Monitoring and Logging Tools

- Prometheus: An open-source monitoring system with a multidimensional data model and a flexible query language.

- Grafana: An open-source analytics and monitoring platform that integrates with various data sources like Prometheus
and Elasticsearch.

- ELK Stack: Elasticsearch, Logstash, and Kibana, a set of tools for searching, analyzing, and visualizing log data.

4.4 Containerization and Orchestration Tools

- Docker: A platform for developing, shipping, and running applications in containers.

- Kubernetes: An open-source container orchestration platform for automating application deployment, scaling, and
management.

3
5. Implementation Challenges

- Cultural Shift: Transitioning to a DevOps culture requires changes in mindset and organizational practices, which can
be challenging.

- Tool Integration: Ensuring seamless integration of various tools and technologies in the DevOps pipeline.

- Security Concerns: Incorporating security practices into the DevOps pipeline requires continuous monitoring and
updating of security policies.

6. Best Practices

- Start Small: Begin with a few key practices and tools, then expand as you gain experience.

- Automate Everything: Aim to automate repetitive tasks and processes to reduce errors and increase efficiency.

- Foster a DevOps Culture: Encourage collaboration, communication, and shared goals across teams.

- Continuously Improve: Use feedback and monitoring data to continually refine and improve processes.

By understanding and implementing these DevOps essentials, organizations can enhance their software development
processes, improve collaboration, and deliver higher-quality software more efficiently.

4
2. Introduction to AWS, GCP, Azure
2.1 Introduction to AWS
Amazon Web Services (AWS) is a comprehensive and widely adopted cloud platform offered by Amazon. It provides a
broad range of cloud services, including computing power, storage options, and networking capabilities. AWS enables
businesses and developers to deploy and manage applications and services without the need to own or manage physical
hardware.
1. Key Concepts

1.1 Cloud Computing

Cloud Computing refers to delivering computing services over the internet ("the cloud") including storage, databases,
servers, networking, software, and more. AWS allows users to rent these resources on-demand, scaling up or down as
needed.

1.2 AWS Services

AWS offers a wide variety of services categorized into different domains:

- Compute: Services that provide scalable computing capacity.


- Storage: Services for storing and managing data.
- Databases: Managed database services for various types of data.
- Networking: Tools for managing and optimizing network infrastructure.
- Analytics: Services for processing and analyzing data.
- Machine Learning: Tools and services for building and deploying machine learning models.
- Security and Identity: Services to secure and manage access to resources.
- Developer Tools: Tools to support the software development lifecycle.

2. Core AWS Services

2.1 Compute Services

- Amazon EC2 (Elastic Compute Cloud): Provides scalable virtual servers (instances) for running applications. Users
can choose instance types based on their needs (e.g., compute-optimized, memory-optimized).

- AWS Lambda: A server less compute service that runs code in response to events without provisioning or managing
servers. You only pay for the compute time consumed.

- Amazon ECS (Elastic Container Service) and Amazon EKS (Elastic Kubernetes Service): Manage and
orchestrate containerized applications using Docker and Kubernetes, respectively.

2.2 Storage Services

- Amazon S3 (Simple Storage Service): Object storage service that offers scalability, high availability, and security for
storing data like backups, media files, and big data.

5
- Amazon EBS (Elastic Block Store): Provides block-level storage volumes for use with EC2 instances. Suitable for
databases and other applications requiring low-latency access to data.

- Amazon Glacier: Low-cost storage service for data archiving and long-term backup.

2.3 Database Services

- Amazon RDS (Relational Database Service): Managed relational database service supporting various engines like
MySQL, PostgreSQL, Oracle, and SQL Server.

- Amazon DynamoDB: Managed NoSQL database service designed for high-performance and scalability.

- Amazon Aurora: A MySQL and PostgreSQL-compatible relational database with high performance and availability.

2.4 Networking Services

- Amazon VPC (Virtual Private Cloud): Allows users to create a logically isolated network within AWS to launch
and manage resources securely.

- AWS Direct Connect: Provides a dedicated network connection from your premises to AWS, improving bandwidth
and reducing latency.

- Amazon Route 53: Scalable DNS and domain name registration service.

2.5 Analytics Services

- Amazon Redshift: A fully managed data warehouse service designed for fast query performance on large datasets.

- Amazon EMR (Elastic MapReduce): Provides scalable processing of big data using Apache Hadoop and other open-
source tools.

- Amazon Kinesis: Real-time data streaming service for processing and analyzing large amounts of streaming data.

2.6 Machine Learning Services

- Amazon SageMaker: An integrated development environment for building, training, and deploying machine learning
models.

- AWS Rekognition: Provides image and video analysis capabilities using deep learning models.

- AWS Lex: Service for building conversational interfaces using voice and text.

2.7 Security and Identity

- AWS IAM (Identity and Access Management): Manages user access and permissions for AWS services and
resources.

- AWS KMS (Key Management Service): Provides managed encryption keys for securing data.

6
- AWS Shield: A managed Distributed Denial of Service (DDoS) protection service.

2.8 Developer Tools

- AWS CodePipeline: A continuous integration and continuous delivery (CI/CD) service for automating release
processes.

- AWS CodeBuild: A fully managed build service for compiling source code, running tests, and producing software
packages.

- AWS CloudFormation: An Infrastructure as Code (IaC) service that allows users to define and provision AWS
infrastructure using templates.

3. AWS Pricing and Cost Management

- Pay-as-You-Go: AWS charges users based on their usage of services, with no upfront costs or long-term contracts.
You pay only for what you use.
- Free Tier: AWS offers a free tier with limited usage of certain services for new customers to explore and experiment
with the platform.
- Cost Management Tools: Services like AWS Cost Explorer and AWS Budgets help monitor and manage cloud
spending.

4. AWS Global Infrastructure

- Regions: Geographic areas with multiple data centers to provide high availability and fault tolerance.
- Availability Zones (AZs): Independent data centers within a region, designed to be isolated from failures in other
AZs.
- Edge Locations: Data centers located around the world to deliver content with low latency, part of AWS's content
delivery network (CDN), Amazon CloudFront.

5. Getting Started with AWS

- AWS Management Console: A web-based interface for managing AWS services and resources.
- AWS CLI (Command Line Interface): Allows users to interact with AWS services using command-line commands.
- AWS SDKs (Software Development Kits): Libraries and tools for integrating AWS services with applications in
various programming languages.

6. AWS Ecosystem and Community

- AWS Marketplace: An online store that offers software solutions and services that are certified to run on AWS.
- AWS Partners: A network of technology and consulting partners that provide services, tools, and solutions on AWS.
- AWS Training and Certification: Programs to help individuals and organizations build cloud skills and validate
expertise with AWS.

AWS provides a wide range of cloud services that cater to various computing needs, from simple storage solutions to
complex machine learning applications. Understanding these services and how to leverage them can significantly
enhance your ability to deploy and manage scalable, cost-effective solutions in the cloud.

7
2.2 Introduction to Google Cloud Platform (GCP)

Google Cloud Platform (GCP) is a suite of cloud computing services provided by Google. It offers a range of
infrastructure, platform, and software services that allow users to build, deploy, and manage applications and data in the
cloud.

1. Key Concepts

1.1 Cloud Computing

Cloud Computing involves providing on-demand computing resources over the internet. GCP offers various cloud
services, enabling users to scale resources up or down as needed, without managing physical hardware.

1.2 GCP Services

GCP’s services span multiple domains, including:

- Compute: Virtual machines, containers, and server less computing.


- Storage: Object storage, block storage, and file storage.
- Databases: Relational and NoSQL databases.
- Networking: Virtual private networks, content delivery networks, and load balancing.
- Analytics: Tools for big data processing and real-time analytics.
- Machine Learning: Services for building and deploying machine learning models.
- Developer Tools: Tools for developing, testing, and deploying applications.
- Security and Identity: Services for managing access and securing data.

2. Core GCP Services

2.1 Compute Services

- Google Compute Engine: Provides scalable virtual machines (VMs) running on Google’s infrastructure. Users can
choose from various VM types based on their needs.

- Google Kubernetes Engine (GKE): Managed Kubernetes service for deploying, managing, and scaling containerized
applications using Kubernetes.

- Google Cloud Functions: A server less execution environment that allows you to run code in response to events
without provisioning or managing servers.

- Google App Engine: A fully managed platform for building and deploying applications without managing the
underlying infrastructure.

2.2 Storage Services

- Google Cloud Storage: Scalable object storage service for storing and retrieving any amount of data. It offers
different storage classes to optimize cost and performance.

8
- Google Persistent Disk: Block storage service for Google Compute Engine VMs, providing high-performance storage
options.

- Google Filestore: Managed file storage service for applications that require a file system interface and shared file
storage.

2.3 Database Services

- Google Cloud SQL: Managed relational database service supporting MySQL, PostgreSQL, and SQL Server.

- Google Cloud Spanner: A globally distributed, horizontally scalable, and strongly consistent database service for
mission-critical applications.

- Google Firestore: A NoSQL document database designed for real-time applications and mobile development.

- Google Bigtable: A scalable NoSQL database service for large analytical and operational workloads.

2.4 Networking Services

- Google Virtual Private Cloud (VPC): Allows you to create isolated networks within GCP and connect your
resources securely.

- Google Cloud Load Balancing: Provides global load balancing and auto-scaling to distribute incoming traffic across
multiple instances.

- Google Cloud CDN: Delivers content with low latency using Google’s global network.

- Google Cloud Interconnect: Provides dedicated network connections from your on-premises infrastructure to GCP
for high-bandwidth and low-latency connections.

2.5 Analytics Services

- Google BigQuery: A fully managed, server less data warehouse that enables super-fast SQL queries on large datasets
using Google’s infrastructure.

- Google Dataflow: A fully managed service for stream and batch data processing based on Apache Beam.

- Google Pub/Sub: A messaging service for building event-driven systems and real-time analytics applications.

2.6 Machine Learning Services

- Google AI Platform: A suite of tools and services for building, training, and deploying machine learning models.

- Google AutoML: Tools that allow users to create custom machine learning models tailored to their specific needs
without extensive machine learning expertise.

- Google Cloud Vision API: Provides image analysis capabilities, including object detection, label detection, and
optical character recognition.

9
2.7 Security and Identity

- Google Cloud Identity and Access Management (IAM): Manages permissions and access controls for GCP
resources.

- Google Cloud Key Management: Manages encryption keys for securing data.

- Google Cloud Security Command Center: Provides visibility and control over your security and data protection
posture.

2.8 Developer Tools

- Google Cloud Build: A fully managed CI/CD service that automates the build, test, and deploy processes.

- Google Cloud Source Repositories: A source code management service that integrates with other GCP services for
version control.

- Google Cloud Monitoring: Provides monitoring, logging, and diagnostics capabilities for applications and
infrastructure.

3. GCP Pricing and Cost Management

- Pay-as-You-Go: GCP offers a pay-as-you-go pricing model where you pay only for the services you use. This
includes pricing based on usage metrics like storage volume, compute hours, and network bandwidth.

- Free Tier: GCP provides a free tier with limited usage of certain services for new users to explore and experiment
with the platform.

- Cost Management Tools: Services like Google Cloud Pricing Calculator, Budgets, and Reports help you estimate and
manage your cloud spending.

4. GCP Global Infrastructure

- Regions: Geographic areas with multiple data centers to ensure high availability and fault tolerance.

- Zones: Within each region, there are multiple zones (data centers) designed to be isolated from failures in other zones.

- Edge Locations: Data centers located globally to deliver content with low latency, part of Google’s content delivery
network.

5. Getting Started with GCP

- Google Cloud Console: A web-based interface for managing GCP services and resources.

- Gcloud CLI: Command-line interface for interacting with GCP services.

- Google Cloud SDK: A set of tools and libraries for managing GCP resources and integrating with various
development environments.

10
6. GCP Ecosystem and Community

- Google Cloud Marketplace: An online store offering pre-configured solutions and software that run on GCP.

- Google Cloud Partners: A network of technology and consulting partners offering services, tools, and solutions on
GCP.

- Google Cloud Training and Certification: Programs designed to help individuals and organizations build cloud
skills and validate expertise with GCP.

Google Cloud Platform provides a comprehensive set of tools and services for building, deploying, and managing
applications and infrastructure in the cloud. Understanding these services and how to use them effectively can greatly
enhance your ability to leverage cloud technology for your needs.

2.3 Introduction to Microsoft Azure

Microsoft Azure is a cloud computing platform and service created by Microsoft that offers a broad set of cloud
services, including those for computing, analytics, storage, and networking. Users can select and configure these
services to meet their specific needs.

1. Key Concepts

1.1 Cloud Computing

Cloud Computing involves delivering computing services over the internet, including servers, storage, databases,
networking, software, and more. Azure allows users to deploy, manage, and scale applications and services in the cloud,
providing flexibility and scalability without the need to own or manage physical hardware.

1.2 Azure Services

Azure provides a wide array of services categorized into several domains:

- Compute: Virtual machines, containers, and server less computing.


- Storage: Solutions for storing and managing data.
- Databases: Managed database services for various types of data.
- Networking: Services for networking, load balancing, and connectivity.
- Analytics: Tools for processing and analyzing data.
- Machine Learning: Services for building and deploying machine learning models.
- Developer Tools: Tools to support the development and deployment of applications.
- Security and Identity: Services to secure and manage access to resources.

2. Core Azure Services

2.1 Compute Services

- Azure Virtual Machines: Provides scalable virtual servers for running applications and workloads. Users can choose
from a variety of VM sizes and types based on their needs.

11
- Azure Kubernetes Service (AKS): A managed Kubernetes service that simplifies deploying, managing, and scaling
containerized applications using Kubernetes.

- Azure Functions: A server less compute service that allows you to run event-driven code without managing servers.
You pay only for the resources used during the execution of the function.

- Azure App Service: A fully managed platform for building, deploying, and scaling web apps and APIs. Supports
various programming languages and frameworks.

2.2 Storage Services

- Azure Blob Storage: Object storage service for storing unstructured data such as documents, images, and backups. It
offers different access tiers (Hot, Cool, Archive) to optimize costs.

- Azure Disk Storage: Provides block-level storage for Azure Virtual Machines, offering high-performance storage
options.

- Azure Files: Managed file shares in the cloud that is accessible via the SMB protocol, useful for applications that
require shared storage.

2.3 Database Services

- Azure SQL Database: A managed relational database service based on SQL Server, offering high availability,
scalability, and built-in intelligence.

- Azure Cosmos DB: A globally distributed, multi-model NoSQL database service designed for high-performance and
scalability. Supports document, key-value, graph, and column-family data models.

- Azure Database for MySQL and Azure Database for PostgreSQL: Managed database services for MySQL and
PostgreSQL databases, respectively.

2.4 Networking Services

- Azure Virtual Network (VNet): Allows you to create isolated networks within Azure, securely connecting Azure
resources and on-premises environments.

- Azure Load Balancer: Distributes incoming network traffic across multiple VMs to ensure high availability and
reliability.

- Azure Application Gateway: Provides application-level load balancing with features like SSL termination, URL-
based routing, and Web Application Firewall (WAF).

- Azure CDN (Content Delivery Network): Delivers content with low latency by caching data at strategically placed
edge locations around the world.

2.5 Analytics Services

12
- Azure Synapse Analytics: An integrated analytics service that combines big data and data warehousing, allowing you
to query and analyze large volumes of data.

- Azure Data Factory: A data integration service that allows you to create, schedule, and orchestrate data pipelines for
data movement and transformation.

- Azure Stream Analytics: A real-time analytics service for processing and analyzing streaming data from various
sources.

2.6 Machine Learning Services

- Azure Machine Learning: A comprehensive suite of tools and services for building, training, and deploying machine
learning models. Includes automated machine learning and support for popular frameworks.

- Azure Cognitive Services: Pre-built APIs for adding intelligent features to applications, such as vision, speech,
language understanding, and decision-making capabilities.

2.7 Security and Identity

- Azure Active Directory (Azure AD): A cloud-based identity and access management service that provides single
sign-on (SSO), multi-factor authentication, and directory services.

- Azure Key Vault: A service for securely managing keys, secrets, and certificates used by cloud applications and
services.

- Azure Security Center: Provides unified security management and advanced threat protection for your Azure
resources and on-premises environments.

2.8 Developer Tools

- Azure DevOps: A suite of development tools that supports the entire application lifecycle, including source control,
CI/CD pipelines, and project management.

- Azure Resource Manager (ARM): Allows you to define and manage your Azure infrastructure using templates,
enabling Infrastructure as Code (IaC) for deploying resources.

- Azure Monitor: Provides monitoring, logging, and diagnostics for applications and infrastructure, helping you
maintain visibility and performance.

3. Azure Pricing and Cost Management

- Pay-as-You-Go: Azure uses a pay-as-you-go pricing model, where you only pay for the resources you consume. This
includes computing, storage, and network usage.

- Free Tier: Azure offers a free tier with limited usage of certain services for new users to explore and experiment with
the platform.

13
- Cost Management Tools: Services like Azure Cost Management and Azure Pricing Calculator help you estimate,
monitor, and manage cloud spending.

4. Azure Global Infrastructure

- Regions: Geographic areas containing multiple data centers to provide high availability and disaster recovery
capabilities.

- Availability Zones: Separate data centers within a region designed to be isolated from failures in other zones,
enhancing fault tolerance.

- Edge Locations: Data centers located globally to provide low-latency content delivery through Azure’s CDN.

5. Getting Started with Azure

- Azure Portal: A web-based interface for managing Azure services and resources.

- Azure CLI: Command-line tool for interacting with Azure resources and automating tasks.

- Azure SDKs: Libraries and tools for integrating Azure services with applications in various programming languages.

6. Azure Ecosystem and Community

- Azure Marketplace: An online store that offers certified software and solutions that run on Azure.

- Azure Partners: A network of technology and consulting partners offering services and solutions on Azure.

- Azure Training and Certification: Programs designed to help individuals and organizations build skills and validate
expertise with Azure.

Microsoft Azure provides a comprehensive range of cloud services to support various computing needs, from basic
infrastructure to advanced machine learning applications. Understanding Azure’s offerings and how to utilize them can
greatly enhance your ability to deploy and manage cloud-based solutions effectively.

14
3. Version control systems: Git and Github.

Version Control Systems

Version Control Systems (VCS) are tools that help manage changes to source code over time. They keep track of
modifications, allowing multiple developers to work on the same codebase simultaneously without overwriting each
other’s work. There are two main types of version control systems:

- Centralized Version Control Systems (CVCS): Store code in a central server. Examples include Subversion
(SVN) and Perforce.
- Distributed Version Control Systems (DVCS): Allow each developer to have a complete local copy of the
repository. Examples include Git and Mercurial.

Git

Git is a distributed version control system developed by Linus Torvalds in 2005. It’s designed to handle everything
from small to very large projects with speed and efficiency.

Key Concepts in Git

- Repository (Repo): A storage space where your project’s files and their history are kept. Repositories can be local
(on your machine) or remote (on a server).

- Commit: A snapshot of the changes made to files in the repository. Each commit has a unique ID and contains
metadata like the author and timestamp.

- Branch: A parallel version of the repository. Branches allow you to work on different features or fixes without
affecting the main codebase. Common branches include `main` (or `master`) for production and `feature` branches
for new features.

- Merge: The process of combining changes from different branches. This can be done automatically by Git or
manually if there are conflicts.

- Pull Request (PR): A request to merge changes from one branch into another, often reviewed by team members
before integration.

- Clone: Creating a local copy of a remote repository.

- Push: Uploading local changes to a remote repository.

- Pull: Fetching and merging changes from a remote repository into your local repository.

Basic Git Commands

- `git init`: Initialize a new Git repository.


- `git clone <repository_url>`: Clone an existing repository.
- `git add <file>`: Stage a file for commit.

15
- `git commit -m "message"`: Commit staged changes with a message.
- `git status`: Show the status of changes.
- `git branch`: List or create branches.
- `git checkout <branch>`: Switch to a different branch.
- `git merge <branch>`: Merge changes from another branch.
- `git pull`: Fetch and integrate changes from a remote repository.
- `git push`: Upload local changes to a remote repository.

GitHub

GitHub is a web-based platform that provides hosting for Git repositories. It is built on top of Git and adds several
collaborative features that make it easier for teams to work together on code.

Key Features of GitHub

- Repositories: GitHub hosts Git repositories in the cloud, making it easy to share and collaborate on code.

- Issues: A tracking system for managing bugs, enhancements, tasks, and feature requests.

- Pull Requests: Allows developers to propose changes to a repository, which can be reviewed and discussed before
being merged.

- Actions: Automate workflows for continuous integration and deployment (CI/CD) using GitHub Actions.

- Projects: Provides project management features such as boards, lists, and cards to help manage tasks and progress.

- Wikis: Create and maintain documentation for your project directly on GitHub.

- GitHub Pages: Host static websites directly from a GitHub repository.

- Collaboration Tools: Features like code reviews, comments, and mentions to facilitate team collaboration.

Basic GitHub Actions

- Creating a Repository: On GitHub, you can create a new repository to host your code. You can initialize it with a
README, .gitignore, or license file.

- Forking a Repository: Create a personal copy of a repository to make changes without affecting the original
project.

- Cloning a Repository: Use `git clone <repository_url>` to copy a GitHub repository to your local machine.

- Creating a Pull Request: After making changes in a branch, you can submit a pull request to propose merging
those changes into the main branch.

- Collaborating on Issues: Use GitHub Issues to track bugs, enhancements, and tasks. You can assign issues, add
labels, and comment on them.

16
Integrating Git and GitHub

1. Setup a Git Repository: Initialize a local Git repository using `git init`.
2. Add a Remote Repository: Link your local repository to a remote GitHub repository with `git remote add origin
<repository_url>`.
3. Push Changes: Upload your local commits to GitHub with `git push origin <branch>`.
4. Pull Updates: Fetch and integrate changes from GitHub with `git pull`.

Best Practices

- Commit Often: Regularly commit changes with meaningful messages to maintain a clear project history.
- Use Branches: Create branches for features or fixes to isolate changes and avoid conflicts.
- Write Clear Commit Messages: Descriptive commit messages make it easier to understand changes.
- Review Pull Requests: Ensure that changes are reviewed by team members to maintain code quality and
consistency.
- Automate Testing: Use CI/CD tools to automatically test and deploy code changes.

Git and GitHub are powerful tools for version control and collaborative development. Mastering Git’s commands
and understanding GitHub’s features will significantly enhance your ability to manage code changes, collaborate
with others, and maintain high-quality software.

2 Marks:
DevOps Essentials

1. Question: What is the primary goal of DevOps?

Answer: The primary goal of DevOps is to improve collaboration between development and
operations teams, automate the software delivery process, and increase the speed and quality of
software releases through continuous integration and continuous delivery (CI/CD) practices.

2. Question: Name two key practices commonly associated with DevOps.

Answer: Two key practices associated with DevOps are Continuous Integration (CI) and Continuous
Delivery (CD). CI involves frequently integrating code changes into a shared repository, while CD
focuses on automating the deployment of code to production.

Introduction to AWS

3. Question: What does AWS stand for?

Answer: AWS stands for Amazon Web Services, a cloud computing platform provided by Amazon
that offers a wide range of services, including computing power, storage, and databases.

4. Question: What is Amazon EC2 in AWS?

17
Answer: Amazon EC2 (Elastic Compute Cloud) is a scalable virtual server service provided by AWS
that allows users to run applications on virtual machines in the cloud. It provides resizable compute
capacity and allows users to deploy and manage instances easily.

Introduction to GCP

5. Question: What does GCP stand for?

Answer: GCP stands for Google Cloud Platform, a suite of cloud computing services provided by
Google that includes computing, storage, and database solutions, among other services.

6. Question: What is Google Compute Engine in GCP?

Answer: Google Compute Engine is a service within GCP that provides virtual machines (VMs) to
run applications on Google’s infrastructure. It allows users to create and manage VMs, scale compute
resources, and deploy applications.

Introduction to Azure

7. Question: What does Azure refer to?

Answer: Azure refers to Microsoft Azure, a cloud computing platform and service offered by
Microsoft. It provides a wide range of cloud services, including virtual machines, databases, and
analytics.

8. Question: What is Azure Virtual Machines?

Answer: Azure Virtual Machines (VMs) is a service within Microsoft Azure that allows users to
create and manage virtual servers on the cloud. It provides on-demand scalable computing resources to
run applications and workloads.

Version Control Systems: Git

9. Question: What is Git primarily used for?

Answer: Git is primarily used for version control, allowing developers to track changes in source code
over time, collaborate with other developers, and manage different versions of their codebase
efficiently.

10. Question: How do you create a new repository in Git?

Answer: To create a new repository in Git, use the command git init in your project directory. This
initializes a new Git repository and sets up the necessary .git directory for tracking changes.

Version Control Systems: GitHub

11. Question: What is GitHub?

18
Answer: GitHub is a web-based platform that provides Git repository hosting, version control, and
collaborative features. It allows developers to manage their Git repositories online, collaborate on
projects, and track issues and changes.

12. Question: How do you clone a GitHub repository to your local machine?

Answer: To clone a GitHub repository, use the command git clone <repository-url>, where
<repository-url> is the URL of the GitHub repository you want to clone. This command copies the
repository to your local machine.

AWS

13. Question: What is AWS Lambda used for?

Answer: AWS Lambda is a serverless computing service that allows you to run code in response to
events without provisioning or managing servers. It executes code only when triggered by specific
events and scales automatically.

14. Question: What is Amazon S3?

Answer: Amazon S3 (Simple Storage Service) is a scalable object storage service provided by AWS.
It is used for storing and retrieving any amount of data at any time, providing high availability and
durability.

GCP

15. Question: What is Google Cloud Storage?

Answer: Google Cloud Storage is a scalable and secure object storage service provided by GCP. It
allows users to store and access large amounts of unstructured data, such as files and backups.

16. Question: What is Google BigQuery?

Answer: Google BigQuery is a fully managed, serverless data warehouse service provided by GCP. It
allows for real-time data analysis and querying of large datasets using SQL.

Azure

17. Question: What is Azure Blob Storage?

Answer: Azure Blob Storage is a service within Microsoft Azure for storing large amounts of
unstructured data, such as documents, images, and backups. It provides scalable and durable storage
with access via HTTP/HTTPS.

18. Question: What is Azure DevOps?

Answer: Azure DevOps is a set of development tools and services provided by Microsoft Azure that
supports the entire software development lifecycle, including planning, development, testing, and
deployment. It integrates with various version control systems and CI/CD pipelines.

19
Version Control Systems: Git and GitHub

19. Question: What is a pull request on GitHub?

Answer: A pull request on GitHub is a request to merge changes from one branch into another within
a repository. It allows collaborators to review, discuss, and approve changes before they are merged
into the main codebase.

20. Question: How do you resolve a merge conflict in Git?

Answer: To resolve a merge conflict in Git, first, identify the conflicting files by running git status.
Open the conflicting files and manually edit the code to resolve the differences between branches.
After editing, add the resolved files using git add and then commit the changes with git commit.

20

You might also like