You are on page 1of 29

Introduction to DevOps

• C431-8.1: Students will be able to understand


the needs of Continuous integration,
continuous delivery, continuous deployment
and continuous monitoring.
Why DevOps in Demand

Source: Glassdoor
Important DevOps Skills
• Knowledge On Various DevOps Tools And Technologies
• Linux Fundamentals And Scripting
• Continuous Integration And Continuous Delivery
• Infrastructure As Code
• DevOps Key Concepts
• Soft Skills
Knowledge On Various DevOps Tools And
Technologies
• Devops is being implemented in multiple stages.
• Every stage is implemented using some set of tools
1.Source Code Management
 Developers create and modify the software codes on regular basis.
 Source code management is used to store the code, merge new code to the old one, control
the code versions, etc.
 It also helps to collaborate source code between team members.
 Some of useful tools are: Git, Github, Gitlab
2. Configuration Management
• Configuration management is used to keep track of software versions and configurations.
• The configuration management tools establish a remote connection with the target server
and push the configuration changes.
• Examples: Puppet, Chef, and Ansible

3. Continuous Integration
• It is the process of automating the code integrations from different developers into a single
piece of software. Example: Jenkins and Bamboo

4. Continuous Testing
• It is process of reducing feedback waiting time after code is developed and tested.
• The code is tested in the development environment itself using automation testing tools
• Examples: Selenium, Katalon
5. Continuous Monitoring
• It is used to monitor application performance, downtimes, error logs, etc.
• Examples: Splunk, Nagios

6. Containerization
• Containerization is the process of virtualizing an operating system so that different containers
running different applications can share the operating system and system resources.
• Examples: Kubernetes and Docker
Continuous Integration And Continuous Delivery
• CI/CD is the the practice of continuously integrating all the code from
different developers to the central repository.
• Then, Continuously testing them, and deploying the successful code to
production.

Infrastructure As Code
• Infrastructure as code (IaC) is the process of managing and provisioning
computer data centers through machine-readable definition files, rather
than physical hardware configuration or interactive configuration tools
• It is the process of automating the infrastructure needed by the
developers through an automated script.
• The automated scripts are used to provision and deliver the required
platform to the developers.
Linux Fundamentals And Scripting

• Devops based projects prefer hosting their applications on Linux.


• Skills in handling a Linux operating system are very crucial for a DevOps
Engineer.
• Most configuration management tools like Puppet, Chef, and Ansible have
their master nodes running on Linux.
Key concepts of DevOps
• DevOps is neither a technology nor a tool. It’s a methodology that doesn’t
have a strict framework
• It is a blend of tools, technology and culture
• In DevOps methodology’s main target is to bring the Development and
Operations teams together to reduce the gap between them so that work
is performed faster
• DevOps methodology based organizations are able to deliver quality
software much faster
What is DevOps?

• DevOps is a culture which promotes collaboration between Development


and Operations Team to deploy code to production faster in an automated
& repeatable way.
• The word 'DevOps' is a combination of two words 'development' and
'operations.‘
• DevOps helps to increases an organization's speed to deliver applications
and services. It allows organizations to serve their customers better and
compete more strongly in the market.
• DevOps can be defined as an alignment of development and IT operations
with better communication and collaboration.
Soft skills

• Soft skills play a great role in the IT industry with the adoption of DevOps
methodology
• Agile way of working using DevOps methodologies so that teams work in
high velocity and produce deliverable faster to meet client expectations
Why is DevOps is Needed?

• Before DevOps, the development and operation team worked in complete


isolation.
• Testing and Deployment were isolated activities done after design-build.
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.
• Manual code deployment leads to human errors in production
• Coding & operation teams have their separate timelines and are not in
synch causing further delays.
Why is DevOps used?
• DevOps allows Agile Development Teams to implement Continuous
Integration and Continuous Delivery. This helps them to launch products
faster into the market.
• Other Important reasons are:
1. Predictability: DevOps offers significantly lower failure rate of new
release.
2. Reproducibility: Version everything so that earlier version can be
restored anytime.
3. Maintainability: Effortless process of recovery in the event of a new
release crashing or disabling the current system.
4. Time to market: DevOps reduces the time to market up to 50% through
streamlined software delivery. This is particularly the case for digital and
mobile applications.
5. Greater Quality: DevOps helps the team to provide improved quality of
application development as it incorporates infrastructure issues
6. Reduced Risk: DevOps incorporates security aspects in the software
delivery lifecycle. It helps in reduction of defects across the lifecycle.
7. Resiliency: The Operational state of the software system is more stable,
secure, and changes are auditable.
8. Cost Efficiency: DevOps offers cost efficiency in the software
development process which is always an aspiration of IT companies'
management.
9. Breaks larger code base into small pieces: DevOps is based on the agile
methodology. Therefore, it allows breaking larger code bases into
smaller and manageable chunks.
Challenges in Software Development with Traditional Approach

From Developers point of view there are mainly two challenges:


1. After Development, the code deployment time was huge.
2. Pressure of work on old, pending and new code was high because
development and deployment time was high.

There are four major challenges from the operations point of view:
3. It was difficult to maintain 100% uptime of the production environment.
4. Infrastructure Automation tools were not very effective.
5. Number of severs to be monitored keeps on increasing with time and
hence the complexity.
6. It was very difficult to provide feedback and diagnose issue in the
product.
Proposed Solutions
From Developers point of view:
1. A system which enables code deployment without any delay or wait
time.
2. A system where work happens on the current code itself i.e.
development sprints are short and well planned.

From Operations point of view:


3. System should have at-least 99% uptime.
4. Tools & systems are there in place for easy administration.
5. Effective monitoring and feedbacks system should be there.
6. Better Collaboration between Development & Operations and is
common requirement for Developers and Operations team.
DevOps: A Software Development
Approach
• Continuous Development:
This is the stage in the DevOps life cycle where the Software is developed
continuously. Unlike the Waterfall model, the software deliverables are broken
down into multiple sprints of short development cycles, developed and then
delivered in a very short time. This stage involves the Coding and Building phases
and makes use of tools such as Git and SVN for maintaining the different versions
of the code, and tools like Ant, Maven, Gradle for building/ packaging the code
into an executable file that can be forwarded to the QAs for testing.

• Continuous Testing:
This is the stage where the developed software is continuously tested for bugs. For
Continuous testing, automation testing tools like Selenium, TestNG, JUnit, etc are
used. These tools allow the QAs to test multiple code-bases thoroughly in parallel
to ensure that there are no flaws in the functionality. In this phase, use of Docker
containers for simulating ‘test environment’ on the fly, is also a preferred choice.
Once the code is tested, it is continuously integrated with the existing code.
• Continuous Integration:
This is the stage where the code supporting new functionality is integrated with the existing
code. Since there is continuous development of software, the updated code needs to be
integrated continuously as well as smoothly with the systems to reflect changes to the end
users. The changed code, should also ensure that there are no errors in the runtime
environment, allowing us to test the changes and check how it reacts with other changes.
Jenkins is a very popular tool used for Continuous Integration. Using Jenkins, one can pull the
latest code revision from GIT repository and produce a build which can finally be deployed to
test or production server. It can be set to trigger a new build automatically as soon as there is
a change in the GIT repository or can be triggered manually on click of a button.

• Continuous Deployment:
It is the stage where the code is deployed to the production environment. Here we ensure
that the code is correctly deployed on all the servers. If there is any addition of functionality
or a new feature is introduced then one should be ready to welcome greater website traffic.
So it is also the responsibility of the SysAdmin to scale up the servers to host more users.
Since the new code is deployed on a continuous basis, configuration management tools play
an important role for executing tasks quickly and frequently. Puppet, Chef, Salt
Stack and Ansible are some popular tools that are used in this stage.
Containerization tools also play an important role in the deployment stage.
Docker and Vagrant are the popular tools which help produce consistency across
Development, Test, Staging and Production environments.

• Continuous Monitoring:
This is a very crucial stage in the DevOps life cycle which is aimed at improving the quality of
the software by monitoring its performance. This practice involves the participation of the
Operations team who will monitor the user activity for bugs / any improper behavior of the
system. This can also be achieved by making use of dedicated monitoring tools which will
continuously monitor the application performance and highlight issues.
Some popular tools used are Splunk, ELK Stack, Nagios, NewRelic and Sensu. These tools
help you monitor the application and the servers closely to check the health of the system
proactively. They can also improve productivity and increase the reliability of the systems,
reducing IT support costs. Any major issues found could be reported to the development
team so that it can be fixed in the continuous development phase.
Delivery Pipeline
• CI stands for Continuous Integration and CD stands for Continuous
Delivery/Continuous Deployment. Figure shows the delivery pipeline which
represents how software move along the various stages in this lifecycle before it is
delivered to the customer or before it is live in production.
• Let's take a scenario of a CI/CD Pipeline. Imagine you're going to build a web
application which is going to be deployed on live web servers. You will have a set of
developers responsible for writing the code, who will further go on and build the
web application.
• Now, when this code is committed into a version control system (such as git, svn)
by the team of developers. Next, it go through the build phase, which is the first
phase of the pipeline, where developers put in their code and then again the code
goes to the version control system with a proper version tag.
• Suppose we have Java code and it needs to be compiled before execution. Through the
version control phase, it again goes to the build phase, where it is compiled. You get all the
features of that code from various branches of the repository, which merge them and finally
use a compiler to compile it. This whole process is called the build phase.
• Once the build phase is over, then you move on to the testing phase. In this phase, we have
various kinds of testing. One of them is the unit test (where you test the chunk/unit of
software or for its sanity test).
• When the test is completed, you move on to the deploy phase, where you deploy it into a
staging or a test server. Here, you can view the code or you can view the app in a simulator.
Once the code is deployed successfully, you can run another sanity test. If everything is
accepted, then it can be deployed to production.
• Meanwhile, in every step, if there is an error, you can shoot an email back to the
development team so that they can fix it. Then they will push it into the version control
system and it goes back into the pipeline.
• Once again, if there is any error reported during testing, the feedback goes to the dev team
again, where they fix it and the process reiterates if required. This lifecycle continues until we
get code/a product which can be deployed to the production server where we measure and

validate the code .


• Idea behind DevOps is to automate the entire process, from the time the development team
gives writes the code and commits it and it goes all the way till production. Automate the
pipeline in order to make the entire software development lifecycle in DevOps/automated
mode.
Tool Support for creating Delivery Pipeline

You might also like