Devops Unit 3 Notes
Devops Unit 3 Notes
maintenance costs
three systems are replaced by one
DevOps is automation and Continuous Delivery
DevOps processes must be fast
DevOps engineers work on making enterprise processes faster, more efficient, and more
reliable.
Purpose of Devops
The purpose of DevOps is to improve and streamline the software development and IT
operations processes by fostering collaboration, automation, and a culture of continuous
improvement. DevOps seeks to bridge the gap between development (Dev) and operations (Ops)
teams to deliver software faster, more reliably, and with higher quality. Here are some key
purposes and goals of DevOps:
1. Accelerate Software Delivery: DevOps aims to shorten the software development
lifecycle and reduce the time it takes to deliver new features, updates, and fixes to end-
users. This agility is crucial in today's fast-paced business environment.
2. Enhance Collaboration: DevOps encourages cross-functional collaboration between
development, operations, and other stakeholders. By breaking down silos and promoting
teamwork, organizations can address issues more effectively and improve
communication.
3. Automate Repetitive Tasks: Automation is a central element of DevOps. By automating
manual and repetitive tasks, such as code builds, testing, deployment, and infrastructure
provisioning, teams can reduce errors, increase efficiency, and free up time for more
valuable work.
4. Improve Quality and Reliability: DevOps practices focus on continuous integration,
continuous testing, and continuous delivery (CI/CD), which lead to higher-quality
software. Automated testing and deployment pipelines help catch bugs and issues early,
reducing the likelihood of production failures.
5. Enhance Resilience and Recovery: DevOps emphasizes robustness and resilience in
systems. By designing systems to be resilient to failures and disasters, organizations can
minimize downtime and quickly recover from incidents.
6. Reduce Risk: DevOps practices help identify and mitigate risks early in the development
process. This proactive approach reduces the chances of major problems occurring in
production.
7. Enable Scalability: DevOps principles can help organizations scale their applications
and infrastructure efficiently to meet changing demand. This is especially important in
cloud-native and containerized environments.
8. Cost Optimization: By automating resource provisioning and optimizing infrastructure
usage, DevOps can help organizations reduce infrastructure costs while maintaining or
improving performance.
9. Enhance Security: DevOps integrates security practices into the software development
process (DevSecOps). This ensures that security is considered from the beginning and
continuously throughout the development lifecycle.
10. Increase Feedback and Learning: DevOps encourages the collection of feedback from
users and systems to drive improvements. This feedback loop helps organizations learn
from their experiences and make data-driven decisions.
11. Cultural Transformation: DevOps is not just about tools and processes; it also involves
cultural change. It promotes a culture of accountability, collaboration, transparency, and a
willingness to learn from failures.
12. Competitive Advantage: Organizations that successfully implement DevOps practices
often gain a competitive advantage by delivering innovative and high-quality software
more rapidly than their competitors.
In summary, the purpose of DevOps is to create a more efficient, collaborative, and agile
software development and operations environment. It aims to align teams, streamline processes,
automate repetitive tasks, and deliver better software more quickly, all while fostering a culture
of continuous learning and improvement.
What is DevOps?
• DevOps is, by definition, a field that spans several disciplines. It is a field that is very
practical and hands-on, but at the same time, you must understand both the technical
background and the nontechnical cultural aspects.
• DevOps is a set of practices, tools, and a cultural philosophy that automate and
integrate the processes between software development and IT teams. It emphasizes
team empowerment, cross-team communication and collaboration, and technology
automation.
The term DevOps is a combination of two words namely Development and Operations.
DevOps is a practice that allows a single team to manage the entire application
development life cycle, that is, development, testing, deployment, and operations.
The aim of DevOps is to shorten the system’s development life cycle while delivering
features, fixes, and updates frequently in close alignment with business objectives.
DevOps is a software development approach through which superior quality software can
be developed quickly and with more reliability. It consists of various stages such as
continuous development, continuous integration, continuous testing, continuous
deployment, and continuous monitoring.
DevOps Architecture
Explore curriculum Development and operations both play essential roles in order to deliver
applications. The deployment comprises analyzing the requirements, designing, developing,
and testing of the software components or frameworks.
The operation consists of the administrative processes, services, and support for the
software. When both the development and operations are combined with collaborating, then the
DevOps architecture is the solution to fix the gap between deployment and operation terms;
therefore, delivery can be faster.
DevOps architecture is used for the applications hosted on the cloud platform and large
distributed applications. Agile Development is used in the DevOps architecture so that
integration and delivery can be contiguous. When the development and operations team works
separately from each other, then it is time-consuming to design, test, and deploy. And if the
terms are not in sync with each other, then it may cause a delay in the delivery. So DevOps
enables the teams to change their shortcomings and increases productivity.
Below are the various components that are used in the DevOps architecture:
1) Build
Without DevOps, the cost of the consumption of the resources was evaluated based on the pre-
defined individual usage with fixed hardware allocation. And with DevOps, the usage of cloud,
sharing of resources comes into the picture, and the build is dependent upon the user's need,
which is a mechanism to control the usage of resources or capacity.
2) Code
Many good practices such as Git enables the code to be used, which ensures writing the code for
business, helps to track changes, getting notified about the reason behind the difference in the
actual and the expected output, and if necessary reverting to the original code developed. The
code can be appropriately arranged in files, folders, etc. And they can be reused.
3) Test
The application will be ready for production after testing. In the case of manual testing, it
consumes more time in testing and moving the code to the output. The testing can be automated,
which decreases the time for testing so that the time to deploy the code to production can be
reduced as automating the running of the scripts will remove many manual steps.
4) Plan
DevOps use Agile methodology to plan the development. With the operations and development
team in sync, it helps in organizing the work to plan accordingly to increase productivity.
5) Monitor
Continuous monitoring is used to identify any risk of failure. Also, it helps in tracking the system
accurately so that the health of the application can be checked. The monitoring becomes more
comfortable with services where the log data may get monitored through many third-party tools
such as Splunk.
6) Deploy
Many systems can support the scheduler for automated deployment. The cloud management
platform enables users to capture accurate insights and view the optimization scenario, analytics
on trends by the deployment of dashboards.
7) Operate
DevOps changes the way traditional approach of developing and testing separately. The teams
operate in a collaborative way where both the teams actively participate throughout the service
lifecycle. The operation team interacts with developers, and they come up with a monitoring plan
which serves the IT and business requirements.
8) Release
Deployment to an environment can be done by automation. But when the deployment is made to
the production environment, it is done by manual triggering. Many processes involved in release
management commonly used to do the deployment in the production environment manually to
lessen the impact on the customers.
DevOps Lifecycle
Let’s briefly overview how the DevOps lifecycle works at every stage.
1. Plan: In this stage, teams identify the business requirement and collect end-user feedback.
They create a project roadmap to maximize the business value and deliver the desired
product during this stage.
2. Code: The code development takes place at this stage. The development teams use some
tools and plugins like Git to streamline the development process, which helps them avoid
security flaws and lousy coding practices.
3. Build: In this stage, once developers finish their task, they commit the code to the shared
code repository using build tools like Maven and Gradle.
4. Test: Once the build is ready, it is deployed to the test environment first to perform several
types of testing like user acceptance test, security test, integration testing, performance
testing, etc., using tools like JUnit, Selenium, etc., to ensure software quality.
5. Release: The build is ready to deploy on the production environment at this phase. Once
the build passes all tests, the operations team schedules the releases or deploys multiple
releases to production, depending on the organizational needs.
6. Deploy: In this stage, Infrastructure-as-Code helps build the production environment and
then releases the build with the help of different tools.
7. Operate: The release is live now to use by customers. The operations team at this stage
takes care of server configuring and provisioning using tools like Chef.
8. Monitor: In this stage, the DevOps pipeline is monitored based on data collected from
customer behavior, application performance, etc. Monitoring the entire environment helps
teams find the bottlenecks impacting the development and operations teams’ productivity.
DevOps lifecycle phases: the 7Cs of DevOps lifecycle
1. Continuous Development
In Continuous Development code is written in small, continuous bits rather than all at once,
Continuous Development is important in DevOps because this improves efficiency every time
a piece of code is created, it is tested, built, and deployed into production. Continuous
Development raises the standard of the code and streamlines the process of repairing flaws,
vulnerabilities, and defects. It facilitates developers’ ability to concentrate on creating high -
quality code.
2. Continuous Integration
Continuous Integration can be explained mainly in 4 stages in DevOps. They are as follows:
1. Getting the SourceCode from SCM
2. Building the code
3. Code quality review
4. Storing the build artifacts
The stages mentioned above are the flow of Continuous Integration and we can use any of the
tools that suit our requirement in each stage and of the most popular tools are GitHub for
source code management(SCM) when the developer develops the code on his local machine
he pushes it to the remote repository which is GitHub from here who is having the access can
Pull, clone and can make required changes to the code. From there by using Maven we can
build them into the required package (war, jar, ear) and can test the Junit
cases.SonarQube performs code quality reviews where it will measure the quality of source
code and generates a report in the form of HTML or PDF format. Nexus for storing the build
artifacts will help us to store the artifacts that are build by using Maven and this whole
process is achieved by using a Continuous Integration tool Jenkins.
3.Continuous Testing
Any firm can deploy continuous testing with the use of the agile and DevOps methodologies.
Depending on our needs, we can perform continuous testing using automation testing tools
such as Testsigma, Selenium, LambdaTest, etc. With these tools, we can test our code and
prevent problems and code smells, as well as test more quickly and intelligently. With the aid
of a continuous integration platform like Jenkins, the entire process can be automated, which
is another added benefit.
7. Continuous Feedback
Once the application is released into the market the end users will use the application and they
will give us feedback about the performance of the application and any glitches affecting the
user experience after getting multiple feedback from the end users’ the DevOps team will
analyze the feedbacks given by end users and they will reach out to the developer team tries to
rectify the mistakes they are performed in that piece of code by this we can reduce the errors
or bugs that which we are currently developing and can produce much more effective results
for the end users also we reduce any unnecessary steps to deploy the application. Continuous
Feedback can increase the performance of the application and reduce bugs in the code making
it smooth for end users to use the application.
8. Continuous Operations
Speed
Move at high velocity so you can innovate for customers faster, adapt to changing markets
better, and grow more efficient at driving business results. The DevOps model enables your
developers and operations teams to achieve these results. For
example, microservices and continuous delivery let teams take ownership of services and then
release updates to them quicker.
Rapid Delivery
Increase the frequency and pace of releases so you can innovate and improve your product faster.
The quicker you can release new features and fix bugs, the faster you can respond to your
customers’ needs and build competitive advantage. Continuous integration and continuous
delivery are practices that automate the software release process, from build to deploy.
Reliability
Ensure the quality of application updates and infrastructure changes so you can reliably deliver at
a more rapid pace while maintaining a positive experience for end users. Use practices
like continuous integration and continuous delivery to test that each change is functional and
safe. Monitoring and logging practices help you stay informed of performance in real-time.
Scale
Operate and manage your infrastructure and development processes at scale. Automation and
consistency help you manage complex or changing systems efficiently and with reduced risk. For
example, infrastructure as code helps you manage your development, testing, and production
environments in a repeatable and more efficient manner.
Improved Collaboration
Build more effective teams under a DevOps cultural model, which emphasizes values such as
ownership and accountability. Developers and operations teams collaborate closely, share many
responsibilities, and combine their workflows. This reduces inefficiencies and saves time (e.g.
reduced handover periods between developers and operations, writing code that takes into
account the environment in which it is run).
Security
Move quickly while retaining control and preserving compliance. You can adopt a DevOps
model without sacrificing security by using automated compliance policies, fine-grained
controls, and configuration management techniques. For example, using infrastructure as code
and policy as code, you can define and then track compliance at scale.
Version Control System(VCS)
1. Centralized VCS
Centralized version control system (CVCS) uses a central server to store all files and enables
team collaboration. It works on a single repository to which users can directly access a central
server.
Every programmer can extract or update their workstations with the data present in the
repository or can make changes to the data or commit in the repository. Every operation is
performed directly on the repository.
Even though it seems pretty convenient to maintain a single repository, it has some major
drawbacks. Some of them are:
2. Distributed VCS
These systems do not necessarily rely on a central server to store all the versions of a project file.
In Distributed VCS, every contributor has a local copy or “clone” of the main repository i.e.
everyone maintains a local repository of their own which contains all the files and metadata
present in the main repository.
They can update their local repositories with new data from the central server by an operation
called “pull” and affect changes to the main repository by an operation called “push” from their
local repository.
The act of cloning an entire repository into your workstation to get a local repository gives you
the following advantages:
All operations (except push & pull) are very fast because the tool only needs to access the
hard drive, not a remote server. Hence, you do not always need an internet connection.
Committing new change-sets can be done locally without manipulating the data on the
main repository. Once you have a group of change-sets ready, you can push them all at
once.
Since every contributor has a full copy of the project repository, they can share changes
with one another if they want to get some feedback before affecting changes in the main
repository.
If the central server gets crashed at any point of time, the lost data can be easily recovered
from any one of the contributor’s local repositories.
Tools Used: Kubernetes and Docker Swarm are the container orchestration tools used for the
high availability of the application and to make the deployment faster.
DevOps Principles
The main principles of DevOps are Continuous delivery, automation, and fast reaction to the
feedback.
1. End to End Responsibility: DevOps team need to provide performance support until
they become the end of life. It enhances the responsibility and the quality of the products
engineered.
2. Continuous Improvement: DevOps culture focuses on continuous improvement to
minimize waste. It continuously speeds up the growth of products or services offered.
3. Automate Everything: Automation is an essential principle of the DevOps process. This
is for software development and also for the entire infrastructure landscape.
4. Custom Centric Action: DevOps team must take customer-centric for that they should
continuously invest in products and services.
5. Monitor and test everything: The DevOps team needs to have robust monitoring and
testing procedures.
6. Work as one team: In the DevOps culture role of the designers, developers, and testers
are already defined. All they needed to do is work as one team with complete
collaboration.
These principles are achieved through several DevOps practices, which include frequent
deployments, QA automation, continuous delivery, validating ideas as early as possible, and in-
team collaboration.
DevOps Tools
Here are some most popular DevOps tools with brief explanation shown in the below
image, such as:
1) Puppet
Puppet is the most widely used DevOps tool. It allows the delivery and release of the technology
changes quickly and frequently. It has features of versioning, automated testing, and continuous
delivery. It enables to manage entire infrastructure as code without expanding the size of the
team.
Features
2) Ansible
Ansible is easy to deploy because it does not use any agents or custom security infrastructure
on the client-side, and by pushing modules to the clients. These modules are executed locally on
the client-side, and the output is pushed back to the Ansible server.
Features
3) Docker
Docker is a high-end DevOps tool that allows building, ship, and run distributed
applications on multiple systems. It also helps to assemble the apps quickly from the
components, and it is typically suitable for container management.
Features
4) Nagios
Nagios is one of the more useful tools for DevOps. It can determine the errors and rectify
them with the help of network, infrastructure, server, and log monitoring systems.
Features
5) CHEF
A chef is a useful tool for achieving scale, speed, and consistency. The chef is a cloud-
based system and open source technology. This technology uses Ruby encoding to develop
essential building blocks such as recipes and cookbooks. The chef is used in infrastructure
automation and helps in reducing manual and repetitive tasks for infrastructure management.
Chef has got its convention for different building blocks, which are required to manage and
automate infrastructure.
Features
6) Jenkins
Jenkins is a DevOps tool for monitoring the execution of repeated tasks. Jenkins is a software
that allows continuous integration. Jenkins will be installed on a server where the central build
will take place. It helps to integrate project changes more efficiently by finding the issues
quickly.
Features
7) Git
Git is an open-source distributed version control system that is freely available for everyone. It is
designed to handle minor to major projects with speed and efficiency. It is developed to co-
ordinate the work among programmers. The version control allows you to track and work
together with your team members at the same workspace. It is used as a critical distributed
version-control for the DevOps tool.
Features
8) SALTSTACK
Stackify is a lightweight DevOps tool. It shows real-time error queries, logs, and more
directly into the workstation. SALTSTACK is an ideal solution for intelligent orchestration for
the software-defined data center.
Features
Splunk is a tool to make machine data usable, accessible, and valuable to everyone. It
delivers operational intelligence to DevOps teams. It helps companies to be more secure,
productive, and competitive.
Features
10) Selenium
Selenium is a portable software testing framework for web applications. It provides an easy
interface for developing automated tests.
Features
DevOps Engineers
DevOps engineer understands the software development lifecycle and various automation
tools for developing digital pipelines.
DevOps have hard as well as soft skills to communicate and collaborate with
development, testing, and operations teams.
DevOps engineers need to code occasionally from scratch, and they must have the basics
of software development languages.
The DevOps engineer will work with development team staff to tackle the coding and
scripting needed to connect elements of code, like libraries or software development kits.
DevOps engineers work full time. They are responsible for the production and continuing
maintenance of a software application platform.
Below are some roles, responsibilities, and skills which are expected from DevOps engineers,
such as:
Purpose DevOps purpose is to manage end to end The agile purpose is to manage
engineering processes. complex projects.
Team skillset The DevOps divides and spreads the skill The Agile development emphasizes
set between development and the operation training all team members to have a
team. wide variety of similar and equal
skills.
Duration The ideal goal is to deliver the code to Agile development is managed in
production daily or every few hours. units of sprints. So this time is much
less than a month for each sprint.
Target areas End to End business solution and fast Software development.
delivery.
Feedback Feedback comes from the internal team. In Agile, feedback is coming from
the customer.
Shift left It supports both variations left and right. It supports only shift left.
principle
Tools Puppet, Chef, AWS, Ansible, and team Bugzilla, Kanboard, JIRA are
City OpenStack are popular DevOps tools. some popular Agile tools.
Automation Automation is the primary goal of DevOps. Agile does not emphasize on the
It works on the principle of maximizing automation.
efficiency when deploying software.
Communication DevOps communication involves specs and Scrum is the most common method
design documents. It is essential for the of implementing Agile software
operational team to fully understand the development. Scrum meeting is
software release and its network carried out daily.
implications for the enough running the
deployment process.
Documentation In the DevOps, the process documentation The agile method gives priority to
is foremost because it will send the the working system over complete
software to an operational team for documentation. It is ideal when you
deployment. Automation minimizes the are flexible and responsive.
impact of insufficient documentation. However, it can harm when you are
However, in the development of trying to turn things over to another
sophisticated software, it's difficult to team for deployment.
transfer all the knowledge required.