DevOps Tutorial
DevOps Tutorial
DevOps Notes
Date: 31/01/2019
● Testing and Deployment were is isolated activities done after design-built hence
they consumed more time than actual build cycles.
● Without using DevOps, team members are spending a large amount of their time
in testing, deploying, and designing instead of building the project.
● Coding and operation teams have their separate timelines and are in synch
causing further delays.
2
We assume the application is scheduled to go live in 2 weeks and coding is 80% done.
We assume the application is a fresh launch and the process of buying servers to ship
the code has just begun.
Old Process DevOps
After placing an order for new servers, the After placing an order for new servers
Development team works on testing, the Operation Development and Operations team work
team works on extensive paperworks as required together on the paperwork to set-up the new
in enterprises to deploy the infrastructure. servers. This results in better visibility of
infrastructure requirement.
Projection about failover, redundancy, data center Projection about failover, redundancy,
locations, and storage requirements are skewed as disaster recovery, data center locations, and
no inputs are available from developers who have storage requirements are pretty accurate due
deep knowledge of the application. to the inputs from the developers.
Operation team has no clue on the progress of the In DevOps the operation team completely
development team. Operation team develop a aware of the progress the developers are
monitoring plan as per their understanding. making. Operations team interact with
developers and jointly develop a monitoring
plan that caters to the IT and business needs.
They also use advance Application
Performance Monitoring (APM) Tools.
Before go-live the load testing crashes the Before go-live the load testing makes the
application. The release is delayed. application a bit slow. The development team
quickly fixes the bottlenecks. The application
is released on time.
3
○ Predictability: D
evOps offers significantly lower failure rate of new
release.
○ Reproducibility: version everything so that earlier version can be restored
any time.
○ Maintainability: Effortless process of recovery in the event of a new
release crashing or disabling the current system.
○ Time to Market: D
evOps reduces the time to market up to 50% through
streamlined software delivery. This is particularly the case for digital and
mobile application.
○ Grater Quality: D
evOps helps the team to provide improved quality of
application development as it incorporates infrastructure issues.
○ Reduced Risk: DevOps incorporates security aspects in the software
delivery lifecycle. It helps in reduction of defects across the lifecycle.
○ Resiliency: The operational state of the software system is more stable,
secure and changes are auditable.
○ Cost Efficiency: D
evOps offers cost efficiency in the software
development process which is always an aspiration of IT companies
management.
○ Breaks large code base into small pieces: DevOps is based on the agile
programming method. therefore , it allows breaking large code bases into
smaller and manageable chunks.
4
DevOps Lifecycle
● DevOps is deep integration between Development and Operations
5
○ In this phase, the deployment process takes place continuously,. It is
performed in such a manner that only changes made any time in the code
should not affect the functioning of high traffic website.
● Monitoring:
○ In this phase, Operation team will take care of the inappropriate system
behavior or bugs which are found in production.
● DevOps workflow:
○ Workflow provide a visual overview of the sequence in which input is
provided. It also tells about actions are performed and output is generated
for an operations process
Agile DevOps
6
DevOps Principles:
● Here, are Six Principles which are essential when adopting DevOps.
● Customer Centric Action:
○ DevOps team must take customer-centric action for that they should
constantly invest in products and services.
● End-to-End Responsibility:
○ The DevOps team need to provide performance support until they become
end-of life. This enhances the level of responsibility and the quality of the
products engineered.
● Continuous Improvement:
○ DevOps culture focuses on continuous improvement to minimize waste. It
continuously speeds up the improvement of product or services offered.
● Automate Everything:
7
○ Automation is vital principle of DevOps process. This is not only for the
software development but also for the entire infrastructure landscape.
● Work as one Team:
○ In the DevOps culture role of the designer, developer and tester are already
defined. All they needed to do is work as one team with complete
collaboration.
● Monitor and Test everything:
○ It is very important for DevOps team to have a robust monitoring and
testing procedures.
8
○ Improve quality and reduce development cost with collaboration.
○ Analyse, design and evaluate automation scripts and systems.
○ Ensuring critical resolution of system issues by using the best cloud
security solutions services.
○ DevOps Engineer should have the soft skill of problem-solver and quick
learner.
9
● Monitoring:
○ Nagios: It is also important to make people are notified when
infrastructure and related services go down. Nagios is one such tool for
this purpose which helps DevOps teams to find and correct problems.
Introduction of git
Before understanding git understand Version Control System.
What is Git?
● Git is a distributed version controls tool that supports distributed non-linear
workflows by providing data assurance for developing quality software.
Features of Git
● Distributed:
○ Allows distributed development of code.
10
○ Every developer has a local copy of the entire development history and
changes are copied from one repository to another.
● Compatible:
○ Compatible with existing systems and protocols.
○ SVN repositories can be directly accessed using Git-SVN
● Non-Linear
○ Supports non-linear development of software.
○ Includes various techniques to navigate and visualize non-linear
development history.
● Branching
○ It takes only a few seconds to create and merge branches.
○ Master branch always contains production quality code.
● Lightweight:
○ Uses lossless compression technique to compress data on the client's
side.
● Speed:
○ Fetching data from local repository is 100 times faster than remote
repository.
○ Git is one order of magnitude faster than other VCS tools.
● Open Source:
○ You can modify its source code according to your needs.
● Reliable:
○ On events of system crash, the lost data can be easily recovered from any
of the local repositories of the collaborators.
● Secure
○ Uses SHA1 to name and identify objects.
○ Every file and commit is checksummed and is retrieved by its checksum at
time of check out.
● Economical
○ Released under GPL License. It is for free.
○ All heavy lifting is done on client-side, hence a lot of money can be saved
on costly servers.
11
What is a Repository?
● A directory or storage space where your project can live. It can be local to a
folder on your computer, or it can be a storage space on github or another online
host. You can keep code files, text files, image files, your name as a repository.
12
13
● Continuous Integration
● Problems before Continuous Integration
○ Developers have to wait till the complete software is developed for the
test results.
○ If the test fails then locating and fixing bugs is very difficult. Developers
have to check the entire source code of the software.
○ Software delivery process was slow.
○ Continuous feedback pertaining to things like coding or architectural
issues, build failures, test status etc.
● Continuous Integration
○ Since after every commit to the source code an auto build is triggered and
then it is automatically deployed on the test server.
○ If the test results shows that there is a bug in the code then the develops
only have to check the last commit made to the source code.
○ This also increases the frequency of new software releases.
○ The concerned teams are always provided with the relevant feedback.
14
The entire source code was built and then Every commit made in the source code is
tested. built and tested.
Developer have to wait for test results. Developers know the test result of every
commit made in the source code on the
run.
15
16
What is Jenkins
● Jenkins is an open source automation tool written in java with plugins built for
continuous integration purpose. Plugins allows integration of various DevOps
stages.
Docker
● Docker is the world's leading software container platform.
● We can use docker in
○ Design
○ Development
○ Deployment
○ Testing / Release
● Docker is present in the entire workflow, but its main use is in deployment.
17
● It works in Deployment
● Docker makes the process of application deployment very easy and efficient and
resolves a lot of issues related to deploying applications