DevOps (UNIT - I)
DevOps (UNIT - I)
UNIT - I
Waterfall Model
The Waterfall model is a linear sequential approach to software
development, where the process flows downwards through the phases of
requirements gathering, design, implementation, testing, deployment, and
maintenance. Each phase of the development process is completed before
moving onto the next phase, with no overlapping of phases.
The Waterfall model is the earliest SDLC approach that was used for
software development.
1
● System Design − the requirement specifications from first phase are
studied in this phase and the system design is prepared. This system
design helps in specifying hardware and system requirements and helps
in defining the overall system architecture.
Advantages
Limitations
1. The Development time will increase
2. The Cost of development will increase
3. It won’t accept requirement changes in the middle
4. Client satisfaction is very low
5. Bug fixing is very costly because we can’t identify bugs in early stages of
life cycle
6. Not at all suitable if requirements keep on changing
7. Not suitable for large projects
2
Agile Model
The meaning of Agile is swift or versatile."Agile process model" refers to
a software development approach based on iterative development. Agile
methods break tasks into smaller iterations, or parts do not directly involve
long term planning.
Each iteration involves a team working through a full software development life
cycle including planning, requirements analysis, design, coding, and testing
before a working product is demonstrated to the client.
Iteration
1. Requirements gathering
2. Design the requirements
3. Construction/ iteration
4. Testing/ Quality assurance
5. Deployment
6. Feedback
2. Design the requirements: When you have identified the project, work with
stakeholders to define requirements. You can use the user flow diagram or the
3
high-level UML diagram to show the work of new features and show how it will
apply to your existing system.
4. Testing: In this phase, the Quality Assurance team examines the product's
performance and looks for the bug.
5. Deployment: In this phase, the team issues a product for the user's work
environment.
6. Feedback: After releasing the product, the last step is feedback. In this, the
team receives feedback about the product and works through the feedback.
4
Disadvantages(Cons) of Agile Model:
While the Agile methodology has numerous advantages, there are also some
disadvantages that should be considered:
Overall, while Agile has many benefits, it may not be suitable for every project
or organization. It's essential to weigh the pros and cons of Agile before
adopting it as a development methodology.
5
S. Purpose Agile model Waterfall model
n
o.
5. Team size It has a small team size. As In the waterfall model, the
smaller is the team, the fewer team may consist more
people work on it so that they members.
can move faster.
7. Test plan The test plan is reviewed after Test plan is reviewed after
each sprint. complete development.
8. Testing Testing team can take part in It is difficult for the testing
the requirements change phase team to initiate any change in
without problems. needs.
6
INTRODUCTION AND BENEFITS OF WORKING IN A DEVOPS
ENVIRONMENT
Similarities
Differences
What is DevOps
1. Development group
2. Operations /Non development/administrators groups
Again this classification is divided into small set of groups
Development group
The people who are involving in
planning
coding
Build
7
Testing
are considered as development team
To develop a project persons required in development are:
Design architect(DA)
Developers/coders
Build Engineer
Test Engineer/QA
Once the code has been developed by the developers, it must be
integrated and released as executable code.
Operations group
A project has been developed and is ready to be moved to the client
machine (assuming that the development team's work has been
completed), so configuration is required to move the software to the client
machine.
The people who are involving in
1. Release engineer
2. Deployment engineer
3. Operations
4. monitoring are considered as operations group
Ex: Release engineer
Deployment engineer
system admin
Database admin
Network admin etc
Operations Team responsibilities
Installation of server hardware and OS
Configuration of servers, networks, storage, etc…
Monitoring of servers
IT security
8
Backup and disaster recovery planning
The term DevOps was first introduced by Patrick Debois in 2009. The term
DevOps combines the words development and operations.
Code:
In this stage, programmers design and code the application. They use tools like
GIT to store application code.
Build:
Maven and Gradie are examples of build tools. In this stage, developers take
the code from various repositories and combine it to create the entire
application.
Test:
Application is tested using automation testing tools like selenium and Junit to
ensure software quality
Release:
9
When testing is complete new features are integrated automatically to the
already existing code bash
Deploy:
Application is packaged after release and deployed from development server to
production server.
Operate:
Once software is deployed operations Team activities such as configuring
servers and provisioning them with the required resources.
Monitor:
Monitoring allows IT organizations to identify specific issues of specific releases
and understand the impact on end users
This section explains how DevOps and other ways of working coexist and fit
together as a larger whole.
ITIL is a framework that formalizes different aspects of the software life cycle.
DevOps and CD emphasize delivering small changes to production often, while
ITIL may seem to hold the opposite view. However, ITIL can be useful for
managing complex changes in large monolithic legacy systems.
Large organizations often deal with monolithic legacy systems, which require
complex changes and are managed by processes such as ITIL. However, many
practices in ITIL can also be translated into corresponding DevOps practices.
Both ITIL and DevOps emphasize the use of configuration management
systems and databases.
Following are the various popular services of IT which are covered by the
Information Technology Infrastructure Library (ITIL):
o Cloud Services
o Data processing and storage
o IT Consulting
o Help desk support
o IoT
o Network security
11
Why ITIL?
Following are the various reasons which allows the IT and Business managers
to use this method:
12
CD pipeline varies depending on size, complexity, testing environments, and
production environments.
The developers
The following diagram shows the systems dealing with code, CI, and artifact
storage in the CD pipeline in greater detail:
The build server is simple and builds source code at regular intervals or
triggers. It listens to changes in the RCS and updates its local copy, then
builds the source and runs tests to ensure quality (Continuous Integration).
Jenkins is a widely used open source solution for build servers that is easy to
install and provides a simple, robust experience.
14
The Artifact repository:
After code is verified and compiled, it's useful to store the binary artifacts in a
separate repository accessible over HTTP. These repositories are file systems
with features for searching, indexing, and storing metadata. One common
choice for Java artifacts is Sonatype Nexus, which can also store OS-specific
artifacts like RPMs and JavaScript artifacts. Amazon S3 is another option for
storing artifacts, and some build systems like Atlassian Bamboo can use it.
Package managers can also act as artifact repositories, and there are open
source implementations like Ceph that provide S3-compatible object storage.
Package managers:
Linux servers use package managers to deploy software packages, with Red
Hat-like systems using RPM and Debian-like systems using .deb format.
Package managers such as yum/dnf for Red Hat and aptitude/dpkg for
Debian-like systems make it easy to install and upgrade packages with
automatic dependency installation. Manually logging into each server and
typing upgrade commands can be feasible but there are more advanced
deployment systems available.
Test Environments:
After the build server stores artefacts in the binary repository, they can be
installed in test environments. These environments should be similar to
production servers in terms of installation and configuration.
Staging/production:
The exact process depends on the product being deployed and the number of
production systems available. Sometimes, it is not possible to have several
production systems running in parallel, while other times there may be
hundreds of production systems in a pool. In the latter case, new releases can
be gradually rolled out to new users while logged-in users stay with the older
version. While not all organizations have the resources for production-quality
staging servers, it is a safe and effective way to handle upgrades when possible.
The following diagram from the larger CD diagram shows the final systems and
the roles involved:
Release management:
So far, we have assumed that the release process is mostly automatic. This is
the dream scenario for people working with DevOps.
This dream scenario is a challenge to achieve in the real world. One reason for
this is that it is usually hard to reach the level of test automation needed in
order to have complete confidence in automated deploys. Another reason is
simply that the cadence of business development doesn't always match the
cadence of technical development. Therefore, it is necessary to enable human
intervention in the release process.
16
How this is done in practice varies, but deployment systems usually have a
way to support how to describe which software versions to use in different
environments.
The integration test environments can then be set to use the latest versions
that have been deployed to the binary artifact repository. The staging and
production servers have particular versions that have been tested by the
quality assurance team.
How does the CD pipeline that we described in this chapter support Agile
processes such as Scrum and Kanban?
Scrum focuses on Sprint cycles, which can occur biweekly or monthly. Kanban
can be said to focus more on shorter cycles, which can occur daily.
The philosophical differences between Scrum and Kanban are a bit deeper,
although not mutually exclusive. Many organizations use both Kanban and
Scrum together.
The build server supports the generation of objective code quality metrics
that we need in order to make decisions. These decisions can either be
made automatically or be the basis for manual decisions.
The deployment pipeline can also be directed manually. This can be
handled with an issue management system, via configuration code
commits, or both.
17
The development team has been given the responsibility of developing a
change to the organization's system. The change revolves around adding
new roles to the authentication system. This seemingly simple task is
hard in reality because many different systems will be affected by the
change.
To make life easier, it is decided that the change will be broken down into
several smaller changes, which will be tested independently and mostly
automatically by automated regression tests.
The first change, the addition of a new role to the authentication system,
is developed locally on developer machines and given best-effort local
testing. To really know whether it works, the developer needs access to
systems not available in their local environment—in this case,
a Lightweight Directory Access Protocol (LDAP) server containing user
information and roles.
If test-driven development is used, a failing test is written before any
actual code is written. After the failing test is written, new code that
makes the test pass is written.
The developer checks the change to the organization's revision control
system, a Git repository.
The build server picks up the change and initiates the build process.
After unit testing, the change is deemed fit enough to be deployed to the
binary repository, which is a Nexus installation.
The configuration management system, Puppet, notices that there is a
new version of the authentication component available. The integration
test server is described as requiring the latest version to be installed, so
Puppet goes ahead and installs the new component.
The installation of the new component now triggers automated regression
tests. When these have been finished successfully, manual tests by the
quality assurance team commence.
The quality assurance team gives the change its seal of approval. The
change moves on to the staging server, where final acceptance testing
commences.
After the acceptance test phase is completed, the staging server is
swapped into production, and the production server becomes the new
staging server. This last step is managed by the organization's load-
balancing server.
The process is then repeated as necessary. As you can see, there is a lot going
on!
18
Identifying bottlenecks
As is apparent from the previous example, there is a lot going on for any
change that propagates through the pipeline from development to production.
It is important for this process to be efficient.
As with all Agile work, keep track of what you are doing, and try to identify
problem areas. It is important to continuously improve your processes, which
is often referred to as Kaizen, which is a Japanese term. You may discover new
technical improvements as times goes on, or simplifications of your processes—
"Everything should be made as simple as possible, but no simpler," a saying
which is often attributed to Albert Einstein.
When things are not working well, a deploy can take days and cause hassle.
Here are some possible causes:
Scrum:
1. Product Owner: The person responsible for defining and prioritizing the
product backlog, and ensuring that the team is working on the most
important things.
2. Scrum Master: The person responsible for facilitating the Scrum
process, removing obstacles that the team faces, and ensuring that the
team follows the Scrum framework.
3. Development Team: The group of people responsible for delivering a
potentially releasable product increment at the end of each Sprint.
19
2. Daily Scrum: Daily meetings where team members share progress,
discuss any obstacles, and plan their work for the next 24 hours.
3. Sprint Review: At the end of each Sprint, the team demonstrates the
work they have completed and receives feedback from stakeholders.
4. Sprint Retrospective: The team comes together to reflect on the Sprint,
discuss what went well, what could be improved, and make a plan for
implementing those improvements in the next Sprint.
The Scrum framework emphasizes iterative development, self-organizing
teams, and constant communication between team members. It is
designed to be flexible and adaptable to changing requirements and
priorities.
Kanban
2. Limit work in progress: Set a limit on the amount of work that can be
in progress at any given time to prevent overloading the system and
improve efficiency.
20