0% found this document useful (0 votes)
16 views76 pages

Benefits of Continuous Integration in DevOps

Devops

Uploaded by

laboco1270
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views76 pages

Benefits of Continuous Integration in DevOps

Devops

Uploaded by

laboco1270
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

DevOps Architecture

Development and operations both play essential roles in order to deliver applications.
The deployment comprises analyzing the requirements, designing, developing,
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
ration 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 timetime-consuming
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.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 1|Page


1) Build
Without DevOps, the cost of the consumption of the resources was evaluated based on
the pre-defined
defined individual usage with fixed hardware allocation. And with DevOps, the
usage of cloud,
oud, 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 writin
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,
fold 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

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 2|Page


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 - Unit-2 Dr. Ch. Meher Babu, Ph.D 3|Page


DevOps Lifecycle
DevOps defines an agile relationship between operations and Development. It is a
process that is practiced by the development team and operational engineers together
from beginning to the final stage of the product.

Learning DevOps is not complete without understanding the DevOps lifecycle phases. The
DevOps lifecycle includes seven phases as given below:

1) Continuous Development
This phase involves the planning and coding of the software. The vision of the project is decided
during the planning phase. And the developers begin developing the code for the application.
There are no DevOps tools that are required for planning, but there are several tools for
maintaining the code.

2) Continuous Integration
This stage is the heart of the entire DevOps lifecycle. It is a software development practice in
which the developers require to commit changes to the source code more frequently. This may be
on a daily or weekly basis. Then every commit is built, and this allows early detection of
problems if they are present. Building code is not only involved compilation, but it also
includes unit testing, integration testing, code review review, and packaging.

The code supporting new functionality is continuously integrated with the existin
existing code.
Therefore, there is continuous development of software. The updated code needs to be

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 4|Page


integrated continuously and smoothly with the systems to reflect changes to the end
end-
users.

3) Continuous Testing
This phase, where the developed software is cont
continuously
inuously testing for bugs. For constant
testing, automation testing tools such as TestNG, JUnit, Selenium,, etc are used. These
tools allow QAs to test multiple code
code-bases
bases thoroughly in parallel to ensure that there is
no flaw in the functionality. In this phase, Docker Containers can be used for simulating
the test environment.

Selenium does the automation testing, and TestNG generates the reports. This entire
testing phase can automate with the help of a Continuous Integration tool
called Jenkins.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 5|Page


Automation testing saves a lot of time and effort for executing the tests instead of
doing this manually. Apart from that, report generation is a big plus. The task of
evaluating the test cases that failed in a test suite gets simpler. Also, we can schedule
the execution of the test cases at predefined times. After testing, the code is
continuously integrated with the existing code.

4) Continuous Monitoring
Monitoring is a phase that involves all the operational factors of the entire DevOps
process, where important information about the use of the software is recorded and
carefully processed to find out trends and identify problem areas. Usually, the
monitoring is integrated within the operational capabilities of the software application.

It may occur in the form of documentation files or maybe produce large-scale data
about the application parameters when it is in a continuous use position. The system
errors such as server not reachable, low memory, etc are resolved in this phase. It
maintains the security and availability of the service.

5) Continuous Feedback
The application development is consistently improved by analyzing the results from the
operations of the software. This is carried out by placing the critical phase of constant
feedback between the operations and the development of the next version of the
current software application.

The continuity is the essential factor in the DevOps as it removes the unnecessary steps
which are required to take a software application from development, using it to find out
its issues and then producing a better version. It kills the efficiency that may be possible
with the app and reduce the number of interested customers.

6) Continuous Deployment
In this phase, the code is deployed to the production servers. Also, it is essential to
ensure that the code is correctly used on all the servers.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 6|Page


The new code is deployed continuously, and configuration management tools play an
essential role in executing tasks frequently and quickly. Here are some popular tools
which are used in this phase, such as Chef, Puppet, Ansible, and SaltStack.
SaltStack

Containerization tools are also playing an essential role in the deployment


phase. Vagrant and Docker are popular tools that are used for this purpose. These
tools help to produce
roduce consistency across development, staging, testing, and production
environment. They also help in scaling up and scaling down instances softly.

Containerization tools help to maintain consistency across the environments where the
application is tested,, developed, and deployed. There is no chance of errors or failure in
the production environment as they package and replicate the same dependencies and
packages used in the testing, development, and staging environment. It makes the
application easy to run n on different computers.

7) Continuous Operations
All DevOps operations are based on the continuity with complete automation of the
release process and allow the organization to accelerate the overall time to market
continuingly.

It is clear from the discussion


ussion that continuity is the critical factor in the DevOps in
removing steps that often distract the development, take it longer to detect issues and
produce a better version of the product after several months. With DevOps, we can

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 7|Page


make any software product more efficient and increase the overall count of interested
customers in your product.

DevOps tech: Deployment automation


Deployment automation is what enables you to deploy your software to testing and
production environments with the push of a button. Automation is essential to reduce
the risk of production deployments. It's also essential for providing fast feedback on the
quality of your software by allowing teams to do comprehensive testing as soon as
possible after changes.

An automated deployment process has the following inputs:

• Packages created by the continuous integration (CI) process (these packages should
be deployable to any environment, including production).
• Scripts to configure the environment, deploy the packages, and perform a deployment
test (sometimes known as a smoke test).
• Environment-specific configuration information.

The scripts usually perform the following tasks:

1. Prepare the target environment, perhaps by installing and configuring any necessary
software, or by starting up a virtual host from a pre-prepared image in a cloud provider
such as Google Cloud.
2. Deploy the packages.
3. Perform any deployment-related tasks such as running database migration scripts.
4. Perform any required configuration.
5. Perform a deployment test to make sure that any necessary external services are
reachable, and that the system is functioning.

How to implement deployment automation

When you design your automated deployment process, we recommend that you follow
these best practices:

• Use the same deployment process for every environment, including production. This rule
helps ensure that you test the deployment process many times before you use it to deploy to
production.
• Allow anyone with the necessary credentials to deploy any version of the artifact to any
environment on demand in a fully automated fashion. If you have to create a ticket and wait
for someone to prepare an environment, you don't have a fully automated deployment process.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 8|Page


• Use the same packages for every environment. This rule means that you should keep
environment-specific configuration separate from packages. That way, you know that the
packages you are deploying to production are the same ones that you tested.
• Make it possible to recreate the state of any environment from information stored in
version control. This rule helps ensure that deployments are repeatable, and that in the event
of a disaster recovery scenario, you can restore the state of production in a deterministic way.

Ideally, you have a tool that you can use autonomously to make deployments, that
records which builds are currently in each environment, and that records the output of
the deployment process for audit purposes. Many CI tools have such features.

DevOps Orchestration
DevOps orchestration is the automation of numerous processes that run concurrently
in order to reduce production issues and time to market, while automation is the
capacity to do a job or a series of procedures to finish an individual task repeatedly.

Many people believe that DevOps orchestration is just merging several jobs into a
larger script, but it is much more than that. DevOps orchestration services include
such jobs into a process or workflow, which may involve many automated tasks and
stages, and resources to streamline the entire workflow or process.

Automation can be pretty complicated at scale, although it is usually focused on a


particular operation to fulfill a goal, such as a server deployment. When automation
has reached its limitations, that’s when orchestration comes into play.

Why Invest in DevOps Orchestration?


DevOps teams must navigate across departments, requiring a solution where their
tools can also be piloted smartly. This situation calls for DevOps orchestration
solutions, which have the ability to combine numerous automated elements from
different DevOps toolkits.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 9|Page


With DevOps orchestration, teams can utilize their current in-use automation tools
while being able to engage under an overarching umbrella designed to pull everything
into a single workflow.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 10 | P a g e


DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 11 | P a g e
1. Accelerate your automation process

DevOps orchestration ensures seamless and quick delivery of new builds into
production and minimizes the effort spent on repetitive tasks. As a consequence,
DevOps teams can focus on more critical projects and decision-making rather than
building pipelines.

2. Improve cross-team collaboration

Having a platform where all activities are consolidated and updated constantly boosts
effective communication between operation and development teams, with everyone in
sync throughout all steps.

3. Ensure higher release quality

DevOps orchestration lowers the chance of mistakes reaching the end-user by


including quality control activities such as approvals, scheduling, security testing, and
automatic status reporting.

4. Reduce costs for IT infrastructure and human resources

DevOps orchestration lowers infrastructure investment costs and the number of IT


employees required. In the long run, firms can expand their cloud service footprint
and be more flexible in allocating business costs.

5. Build transparency across the SDLC

It isn’t easy to establish clarity and openness throughout a project when tasks and
information are siloed. DevOps orchestration is used to coordinate all tasks, centralize
data related to all operations, and provide updates and progress to key stakeholders
throughout the development lifecycle.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 12 | P a g e


6. Boost the velocity of releases

DevOps orchestration entails considerable automation and the automated progression


of software through certain processes – such as testing – and on to the next stage of a
release pipeline. As DevOps orchestration removes the time spent waiting for another
employee to finish manual duties and send the program to the next step in the process,
software reaches the end-user faster, and wait time is diverted to the next project at
hand. With a higher level of automation, you can now develop more services and get
them to market more quickly, resulting in cost savings and revenue gains.

Real-life Applications of DevOps


1. Application of DevOps in the Online Financial Trading
Company
The methodology in the process of testing, building, and development was
automated in the financial trading company. Using the DevOps, deployment
was being done within 45 seconds. These deployments used to take long
nights and weekends for the employees. The time of the overall process
reduced and the interest of clients increased.
2. Use of DevOps in Network cycling
Deployment, testing and rapid designing became ten times faster. It became
effortless for the telco service provider to add patches of security every day,
which used to be done only every three months. Through deployment and
design, the new version of network cycling was being rolled out.
3. Application in Car Manufacturing Industries
Using DevOps, employees helped car manufacturers to catch the error while
scaling the production, which was not possible before.
4. Benefits to Airlines Industries
With the benefit of DevOps, United Airlines saved $500,000 by changing to
continuous testing standards. It also increased its coverage of code by 85%.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 13 | P a g e


5. Application to GM Financial
Regression testing time was reduced by 93%, which in turn reduced the
funding period of load by five times.
6. Bug Reduction Benefit of DevOps
DevOps has reduced the bugs by up to 35% and in many cases of pre-
production bugs up to 40%. By using DevOps, Rabobank was able to provide
better quality applications for their clients within less time because it
massively reduced the time taken for regression testing.
7. Less Time for Integration
Key Bank used DevOps to reduce the time taken for the integration of
security and compliance into the process from 3 months to 1 week.
8. Decreased Computation Cost and Operation Time
By the use of DevOps, Computation time has been dramatically reduced. In
many cases, it has reduced the computing time from up to 60%. When the
time taken to complete a task is decreased, then the cost involved the process
also decreases.
9. Faster Development of Software
The DevOps helps in the faster delivery of apps because it ensures speedier
delivery.
10. Improvement in Team Collaboration
Transparency is required for better decision-making and works better
efficiency of resources. By using DevOps, teams can be more transparent in
their work of developing applications and software. There are many big tasks
of a project which are broken down into many small tasks that are allotted to
different teams or people in the organisation.
11. Reliable Environments for Operations
DevOps provide a better environment that is more stable for the team to work
together. The people in the group can rely on the environment for all kinds of
operations and tasks.
12. Early Defects Detection
In the environment of DevOps, the error and the defects can be known at a
very first stage. DevOps helps in the fast detection of defects.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 14 | P a g e


13. Faster Correction
With the help of DevOps, All the defects are detected very early. Because of
this, mistakes can be corrected very fast. There is a lot of time which gets
saved in this kind of DevOps environment because the work is very fast, so
the correction work is also completed very fast.
14. Continuous Operation of Monitoring, Testing,
Deployment, and Release
There is a massive demand for software professionals to keep on delivering
high-quality applications and software. DevOps Developer salary is ever
increasing in India. A software development team is expected to develop the
software application within a shorter time period which can be launched into
the market. The team of software is required to adopt a shorter release cycle.
All of the requirements of delivering high-quality software, developing
software applications in less time frame. Also, a minimum period to launch
the software applications and short release cycles can only be fulfilled by the
use of DevOps.
15. Increased Focus on Operations
When less time is taken for the tasks and operation with the help of DevOps,
It allows one person to focus more on the quality of activities and functions.
There is more time for one to give his quality work because now there is
DevOps minimize more time to focus as all the time for other services.
16. Automation Testing integration into DevOps
When the framework of automated testing is integrated into the DevOps, It
helps to save a lot of money and time, which then increases the available time
and quality of the work.

DevOps Pipeline
A DevOps pipeline is a set of automated processes and tools that allows developers and
operations professionals to collaborate on building and deploying code to a production
environment.
What is the DevOps pipeline?

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 15 | P a g e


A DevOps pipeline is a set of automated processes and tools that allows both
developers and operations professionals to work cohesively to build and deploy code to
a production environment. While a DevOps pipeline can differ by organization, it
typically includes build automation/continuous integration, automation testing,
validation, and reporting. It may also include one or more manual gates that require
human intervention before code is allowed to proceed.
Continuous is a differentiated characteristic of a DevOps pipeline. This includes
continuous integration, continuous delivery/deployment (CI/CD), continuous feedback,
and continuous operations. Instead of one-off tests or scheduled deployments, each
function occurs on an ongoing basis.
Considerations for building a DevOps pipeline

Since there isn’t one standard DevOps pipeline, an organization’s design and
implementation of a DevOps pipeline depends on its technology stack, a DevOps
engineer’s level of experience, budget, and more. A DevOps engineer should have a
wide-ranging knowledge of both development and operations, including coding,
infrastructure management, system administration, and DevOps toolchains.
Plus, each organization has a different technology stack that can impact the process. For
example, if your codebase is [Link], factors include whether you use a local proxy npm
registry, whether you download the source code and run `npm install` at every stage in
the pipeline, or do it once and generate an artifact that moves through the pipeline. Or,
if an application is container-based, you need to decide to use a local or remote
container registry, build the container once and move it through the pipeline, or rebuild
it at every stage.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 16 | P a g e


While every
ery pipeline is unique, most organizations use similar fundamental components.
Each step is evaluated for success before moving on to the next stage of the pipeline. In
the event of a failure, the pipeline is stopped, and feedback is provided to the
developer.
Components of a DevOps pipeline

1. Continuous integration/continuous delivery/deployment (CI/CD)

Continuous integration is the practice of making frequent commits to a common


source code repository. It’s continuously integrating code changes into existing code
base so that any conflicts between different developer’s code changes are quickly
identified and relatively easy to remediate. This practice is critically important to
increasing deployment efficiency.
We believe that trunk-based development is a requirement of continuous integration. If
you are not making frequent commits to a common branch in a shared source code
repository, you are nott doing continuous integration. If your build and test processes
are automated but your developers are working on isolated, longlong-living
living feature
branches that are infrequently integrated into a shared branch, you are also not doing
continuous integration.
Continuous delivery ensures that the “main” or “trunk” branch of an application's
source code is always in a releasable state. In other words, if management came to your
desk at 4:30 PM on a Friday and said, “We need the latest version released right now,”
that version could be deployed with the push of a button and without fear of failure.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 17 | P a g e


This means having a pre-production environment that is as close to identical to the
production environment as possible and ensuring that automated tests are executed, so
that every variable that might cause a failure is identified before code is merged into the
main or trunk branch.

Continuous deployment entails having a level of continuous testing and operations


that is so robust, new versions of software are validated and deployed into a production
environment without requiring any human intervention.
This is rare and in most cases unnecessary. It is typically only the unicorn businesses who
have hundreds or thousands of developers and have many releases each day that
require, or even want to have, this level of automation.

To simplify the difference between continuous delivery and continuous deployment,


think of delivery as the FedEx person handing you a box, and deployment as you
opening that box and using what’s inside. If a change to the product is required
between the time you receive the box and when you open it, the manufacturer is in
trouble!
2. Continuous feedback

The single biggest pain point of the old waterfall method of software development —
and consequently why agile methodologies were designed — was the lack of timely
feedback. When new features took months or years to go from idea to implementation,
it was almost guaranteed that the end result would be something other than what the
customer expected or wanted. Agile succeeded in ensuring that developers received
faster feedback from stakeholders. Now with DevOps, developers receive continuous
feedback not not only from stakeholders, but from systematic testing and monitoring of
their code in the pipeline.
Continuous testing is a critical component of every DevOps pipeline and one of the
primary enablers of continuous feedback. In a DevOps process, changes move
continuously from development to testing to deployment, which leads not only to faster
releases, but a higher quality product. This means having automated tests throughout
your pipeline, including unit tests that run on every build change, smoke tests,
functional tests, and end-to-end tests.
Continuous monitoring is another important component of continuous feedback. A
DevOps approach entails using continuous monitoring in the staging, testing, and even
development environments. It is sometimes useful to monitor pre-production

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 18 | P a g e


environments for anomalous behavior, but in general this is an approach used to
continuously assess the health and performance of applications in production.
Numerous tools and services exist to provide this functionality, and this may involve
anything from monitoring your on-premise or cloud infrastructure such as server
resources, networking, etc. or the performance of your application or its API interfaces.

3. Continuous operations

Continuous operations is a relatively new and less common term, and definitions vary.
One way to interpret it is as “continuous uptime”. For example in the case of a
blue/green deployment strategy in which you have two separate production
environments, one that is “blue” (publicly accessible) and one that is “green” (not
publicly accessible). In this situation, new code would be deployed to the green
environment, and when it was confirmed to be functional then a switch would be
flipped (usually on a load-balancer) and traffic would switch from the “blue” system to
the “green” system. The result is no downtime for the end-users.
Another way to think of Continuous operations is as continuous alerting. This is the
notion that engineering staff is on-call and notified if any performance anomalies in the
application or infrastructure occur. In most cases, continuous alerting goes hand in hand
with continuous monitoring.

A Comprehensive Guide to DevOps & It’s


Tools Ecosystem

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 19 | P a g e


In today’s business world, success extensively depends on three
primary factors. Stability, Scalability, and Adaptability. In order
to keep these three aligned with their business processes, enterprises
face eternal challenges. The concept of DevOps in enterprises is
considered as more of a difficulty than an opportunity for optimization
of business operations. Before going into the real topic, let’s check few
stats. As per a report of Cloud Expo, (Europe) — 67% of the SMEs &
47% enterprises have adopted DevOps in their product
engineering services. 31% of the SMEs have adopted DevOps
across the entire organization. Implementing such a radical
change in the workplace is a tough task. But in order to stay
competitive and agile in the business, you need to identify your starting
point. By understanding your vision, you can define a roadmap to
achieve your DevOps goals and business outcomes. You must address

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 20 | P a g e


DevOps implementation challenges related to either tools or processes
before it becomes the new work culture.

What is DevOps?

DevOps is a combination of practices, which automates the processes


between software development and operations teams, in order to build,
test, and deploy applications faster. The concept of DevOps is endowed
with developing a culture of collaboration between teams that operated
in relative silos within the organization. The benefits of DevOps
accommodate faster software releases, optimized processes, enhanced
trust, and ability to resolve critical issues quickly and better serve your
customers.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 21 | P a g e


Now let’s see what DevOps is not;

• DevOps is not a tool or software

• DevOps is not a separate team

• DevOps is not just blending Development & Operations teams

But, DevOps is a never-ending process of continual improvement.

Why You Need DevOps?

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 22 | P a g e


With higher collaboration, security, stability and productivity, DevOps
could be just what your business needs to surpass your competition
when it comes to performance and customer service. All the above
benefits of DevOps are measurable and can be used as a primary
selling tool for your company. We all want to have a business which is
quick, innovative and reliable. Companies need DevOps because it
enables them to launch products in the market quickly. Companies
using DevOps, deploy more frequently, have shorter lead time, lesser
failure rate, and faster recovery rates. DevOps guarantee problems are
fixed at every stage, instead of struggling at the end of a project. As
teams spend less time dealing with fixing bugs and dealing with
unplanned works, DevOps teams can spend more time on innovation
and value addition. This means more products put on the market with
utmost quality and security. DevOps is a management culture that will
enhance your organizational IT service delivery agility on the basis of:

How DevOps Really Works?

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 23 | P a g e


In a DevOps model: development & operations teams are not siloed.
These two teams are joined into a single unit where people work across
the entire project lifecycle, starting from development to test &
deployment to operations. DevOps based on developing a spectrum of
skills not limited to a single role.

In few other DevOps models, multiple other teams like (QA, security,
support) also integrate with development and operations teams during
the software development lifecycle. All these teams work together
using practices in order to automate processes which historically has
been manual. DevOps team use technology stack and tools which assist
them to operate and develop applications quickly. These tools also help
each individual to accomplish his/her task without seeking any help
from others. This increases productivity, velocity and reduces a lot of
time & cost.

How To Achieve DevOps?


DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 24 | P a g e
As we already discussed, DevOps is a continuous process. It is
an Agile alliance between development & operations. DevOps
process practiced by various teams like development, operations, QA
right from the starting of the product design to production support. To
understand DevOps, you need to understand the following first.

Continuous Development

In DevOps, during this stage, software development takes place


without any pause. The entire development process is subdivided into
smaller development cycles. Each individual performs his task
simultaneously, so ultimately the entire product takes lesser time to be
developed and deployment can happen at the earliest. Continuous
development includes coding then creating different forms of the code
using SVN, Git and then protecting the code into a folder to process it
to the QA team for testing.

Continuous Testing

The QA team then use various tools like Selenium, JUnit etc. to fix the
bugs while testing the developed software. They ensure there are no
further bugs or flaws in the features and functionalities in the
developed software. Testing several sections of the code takes place
continuously and when all the components are tested, it is integrated
with the primary codes.

Continuous Integration
DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 25 | P a g e
Continuous integration is a software development practice where
developers regularly merge their code changes into a central
repository, after which automated builds and tests are run. During this
stage of the DevOps lifecycle, any code offering a new functionality is
being integrated with the prevailing code. Since continuous
development & testing take place, updating the new code and
integration must be allied. The updated code must ensure zero mess as
once the new code is added, you can’t have errors at the runtime.
Continuous testing plays an important role in ensuring the new code
doesn’t break the developed software. Various tools are being used for
continuous integration. Jenkins is one of the widely used tools. Jenkins
triggers any change made in the code automatically.

Continuous Deployment

At the stage, the software is deployed to the production. All the


developed codes are deployed to the servers ensuring 100% accuracy
and reliability. As the development process takes place continuously,
various automation tools like SaltStack, Puppet, and Chef, etc. are
being used for continuous deployment. This process of continuous
deployment must ensure it should not affect the runtime of the code
even any change in the code occurs. During this process, the system
admin should keep on scaling up the servers in order to manage the
higher rate of traffic or users.

Containers and Microservices

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 26 | P a g e


Container usage for development pipeline of a software product built
using microservices architecture are rapidly becoming the norm for
enterprise organizations. Developers use them in many tasks, from app
delivery to the migration of legacy systems to cloud servers. Container
and microservices enable agility, speed and resource efficiency for
many tasks that developers work on daily. The report says 64 percent
of technology professionals expect the mainstream use of containers
this year and 89 percent are either already using or interested in using
microservices.

But what exactly are they?

• Containers are lightweight, scalable and isolated VMs in which you


run your applications. They speed up workload processes and
application delivery because they can be spun up quickly. They also
provide a solution for application-portability challenges because
they are not tied to software on physical machines. You can link
containers together, set security policies, limit resource utilization
and more.

• Microservices are single-function applications comprise small, self-


contained units working together through APIs that are not
dependent on a specific language. A microservices architecture is
faster and more agile than a traditional application architecture.
Innovative businesses are using microservices approach because it
enables the introduction of new applications that are independently
deployable without disrupting the rest of the business. This
modular approach can make it easier for companies to spread their
workloads across multiple development teams spanning different

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 27 | P a g e


departments or businesses, offering a greater degree of flexibility
and helping to speed up the project lifecycle. The three defining
characteristics of microservices to keep in mind are stateless,
distributed, and independent.

Considering that each service is lightweight compared to the monolith


architecture, it does not make sense to run each microservice on a
separate computer. So microservices run with the next evolution of the
virtualization technology , the Docker containers — the operating
system, not the physical hardware, is virtualized. Each component has
its own allocated storage, memory or CPU resources, which makes
hardware utilization simple to provision and track.

A simple microservice model

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 28 | P a g e


Java gives us Write Once Run Anywhere (WORA) because of the
common abstraction provided by Java Virtual Machine. Docker nicely
complements WORA by defining a way to package applications, and
include all the configuration in an easy to describe format. This can be
called as Package Once Deploy Anywhere, or PODA.

Thus, Docker containers solve the problem of running software when it


has been moved from one computing environment by essentially
isolating it from its environment and further reduce the cost of
managing them:

• Developers have direct access to the non-production environments


for service deployment giving them greater flexibility and velocity.

• Deploying a new service instance takes minutes rather than days in


VMs

• Utilizing the user and role management from Docker Swarm helps
to keep access to the service more transparent.

• Higher services density decreases the overall spend on all


environments.

• Docker image is built from the base OS every time it needs to run,
the patches for OS and libraries appear automatically and quickly,
thus increasing security.

On the other hand, running a service in isolation from other services


greatly improves the overall system stability. And with a caching layer
and a queuing system be able to process tasks asynchronously and
DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 29 | P a g e
quickly share data between the services. Multiple instances of each
microservice spanning multiple servers to make it highly available in a
production environment comes with below challenges:

• Service discovery

• Load balancing

• Secrets/configuration/storage management

• Scheduling

• Health checks

• Auto-[scaling/restart/healing] of containers and nodes

• Zero-downtime deploys

This is where container orchestration platforms become extremely


useful and powerful, because they offer a solution for most of those
challenges.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 30 | P a g e


Container Orchestration with Kubernetes CI/CD

Container Orchestration refers to the automated arrangement,


coordination, and management of these software containers. Today,
the main players are Kubernetes, AWS ECS and Docker Swarm, in
order of popularity.

Serverless Architecture

Serverless is a development approach that replaces long-running


virtual machines with compute power that comes into existence on
demand and disappears immediately after use. Serverless architectures
help to reduce the development time and get the products to the
market faster. Developers can focus on their core product instead of
worrying about managing and operating servers or runtimes, either in

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 31 | P a g e


the cloud or on-premises. However, serverless may not be an ideal
solution for applications where speed is paramount. For large-scale
and complex long-running applications requiring a high level of
control over the environment, containers and microservices approach
is the best fit.

AWS Lambda, Azure Functions, Google Cloud Functions and


OpenWhisk are some of the main providers. Also toolkit
like Serverless allows developers to jump from one provider to another
more easily.

Infrastructure as Code

Infrastructure as code is a practice in which infrastructure is


provisioned and managed using code and software development
techniques, such as version control and continuous integration.
Engineers can interface with infrastructure using code based tools and
treat infrastructure in a manner similar to how they treat application
code. This helps with delivering secure and stable application hosting
platforms and easy to automate for seamless delivery.

Configuration Management

Using code to automate operating system and host configuration,


operational tasks, and more, it frees the IT team from manually
configuring them.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 32 | P a g e


Policy as Code

As infrastructure and its configuration codified, organizations can


monitor and enforce compliance dynamically. Infrastructure that is
described by code can thus be tracked, validated, and reconfigured in
an automated way. This makes it easier for organizations to govern
changes over resources and ensure that security measures are properly
enforced in a distributed manner (e.g. information security or
compliance with PCI, etc.).

Monitoring and Logging

Organizations monitor metrics and logs to see how application and


infrastructure performance impacts the experience of their product’s
end user. By capturing, categorizing, and then analyzing data and logs
generated by applications and infrastructure, organizations understand
how changes or updates impact users, shedding insights into the root
causes of problems or unexpected changes. Creating alerts or
performing real-time analysis of this data also helps organizations
more proactively monitor their services.

Communication and Collaboration

Increased communication and collaboration in an organization is one


of the key cultural aspects of DevOps. Tools like Atlassian JIRA suites
helps speed up communication across developers, operations, and even

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 33 | P a g e


other teams like marketing or sales, allowing all parts of the
organization to align more closely on goals and projects.

DevOps Stages and Toolchains

Traditional software development processes were following 4 stages —


plan, develop, test, & deploy. But, there are actually more than 4 stages
which are not been highlighted. When it comes to DevOps, there are
more stages considering the tools, which enables a seamless
automation flow from planning to production. Automation is without
any doubt a significant part of the flow and enables the process to be
highly efficient, repeatable, and robust. Automation is actually an
enabler for continuous everything, in each step of the DevOps process.
When it comes to Toolchains, various companies use various tools.
Now let’s discuss the 7 stages of DevOps.

1. Plan

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 34 | P a g e


This stage is composed of two phases: Define and Plan. This stage
refers to the business value and application requirements. Considering
agile process, you should use tools that allow your development team
to plan in iterations. You can learn from the users at an early stage and
can optimize the product. Always consider tools that offer sprint
planning features. During this stage, it is necessary that everyone can
share and discuss anything: ideas, strategies, goals, requirements,
roadmaps, and documentation. This phase includes:

• Production metrics, objects and feedback

• Requirements

• Business metrics

• Update release metrics

• Release plan, timing and business case

• Security policy and requirement

A number of IT personnel will be involved in these practices:


developers, architects, security officers, continual release management
etc.

Tools: JIRA

JIRA by Atlassian is an Agile-friendly planning tool. JIRA supports


sprint planning with out-of-the-box or customizable Kanban and

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 35 | P a g e


Scrum workflows. JIRA software integrates with complex enterprise
platforms and is well-suited for planning DevOps workflows that
require continuous feedback loops, collaboration with multiple project
teams, and open communication.

Other tools used: Rally, Trac, Redmine, XMind, Adobe XD,


Zeplin, [Link], Slack

2. Create

The second phase of DevOps is create. This is comprised of building,


coding, and configuring the development process. Tools used in this
category often overlap with other categories. As DevOps is breaking
silos down, this impact the activities and solutions. Activities which
comes under this stage are;

• Design of the software and configuration

• Coding including code quality and performance

• Software build and build performance

• Release candidate

Tools used: Gradle, Apache Maven, Grunt, WebPack, Github,


Bitbucket, Docker, BuildMaster, Slack

3. Test

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 36 | P a g e


Testing is one of those functionalities which had shift left due to
DevOps. The quality aspect of the software depends on the efficiency of
testing. As continuous integration has numerous goals for the testing
phase, testing should be always automated to assure a seamless flow,
sharp and detailed results, and fair affirmation of the application. Early
stage testing, initial validation and frequent testing ensure quality
built-in to the application can be verified and issues to be tackled early.
Testing is directly associated with ensuring the quality of the software
release; activities designed to ensure code quality is maintained and
the highest quality is deployed to the production. The main activities in
this are:

• Acceptance testing

• Regression testing

• Security and vulnerability analysis

• Performance

• Configuration testing

Tools used: JIRA issue tracking, Bugzilla, Selenium, Mocha,


Jasmine, JUnit, NUnit, JMeter, pytest, BlazeMeter, Load
Impact

4. Packaging

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 37 | P a g e


Packaging phase starts once the release is ready for deployment. This
stage is often referred to as Preproduction/preprod. The packaging
stage comprises tools for package repositories and other storage
mechanisms for the binaries created in the development stage.
Repositories, also known as artifact or asset repositories — include all
assets needed and connected with binaries to facilitate the deployment,
such as scripts, configuration files, and additional infrastructural files.
Packaging consists of following activities;

• Approval/preapprovals

• Package configuration

• Triggered releases

• Release staging and holding

Tools used: Dockers, [Link], Ansible, SaltStack, Puppet,


Chef

5. Release

Release includes schedule, orchestration, provisioning and deploying


software into production and targeted environment. Part of this
process is application release automation tools that help up the
packaging and deploying the application from development to
production, using automation. The specific Release activities include:

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 38 | P a g e


• Release coordination

• Deploying and promoting applications

• Fallbacks and recovery

• Scheduled/timed releases

Tools: Jenkins, Kubernetes CI/CD

Jenkins is an open source automation server that offers a plugin


architecture to support continuous integration and delivery. It
integrates with a variety of software tools in the CI/CD toolchain and
distributes work across multiple platforms. In DevOps, Jenkins is been
used for packaging, release, and configuration.

Kubernetes is an open-source platform for automating deployments,


scaling, and operations of application containers across clusters of
hosts, providing container-centric infrastructure.

Other tools used: Dockers, Docker Hub, Docker Swarm, Travis


CI, [Link], Ansible, SaltStack, Puppet, Chef

6. Configure

Configure comes under the operation side of DevOps. Once the


software is deployed, you need additional IT infrastructure and
configuration. Configuration tools aim to allow the creation of better

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 39 | P a g e


applications with flexibility, less downtime, and enhancing an overall
cost effectiveness for the business. This approach is intended to reduce
as many things creating complexity as possible by removing manual
configurations. Automation and collaboration are the epicenters in
DevOps and this is the reason why configuration is also widely
automated across development flows. Specific configuration activities
include;

• Infrastructure storage, database and network provisioning and


configuring

• Application provision and configuration

Tools used: Dockers, Jenkins, Kubernetes CI/CD, [Link],


Ansible, SaltStack, Puppet, Chef

7. Monitor

Monitoring is an essential section in a DevOps process. It allows IT


team to identify specific issues of specific releases and to know the
impact on end-users. There is also an important aspect of making sure
organization gets (only) valid data about the process, results in each
step, and the outcome.

Monitor related activities are:

• Performance of IT infrastructure

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 40 | P a g e


• End-user response and experience

• Production metrics and statistics

Tools: New Relic

New Relic is SaaS web and mobile application performance monitoring


tool that gives analytics from the customer experience perspective. It
monitors availability, alerting, and notifications in real time for
applications running in the cloud, on-premise, or hybrid
environments.

Other tools used: Firebase Analytics, crashlytics, ELK stack —


Data/BI analytics, Sumologic, Nagios, JIRA, Telegram, Slack

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 41 | P a g e


Conclusion

The software industry is adapting DevOps at a rapid pace. Enterprises


are eager to take the benefits of quicker application development,
testing, and deploying at a high rate of innovation and with a more
steady operating environment. DevOps is making teams more flexible
DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 42 | P a g e
and productive. BangBit’s open-source DevOps experts can help you
accelerate application development process and offer you a greater
development cycle visibility. Contact us today to scale your business
and choose the right set of tools in order to embrace DevOps in your
organization.

CI and CD stand for continuous integration and continuous delivery/continuous


deployment. In very simple terms, CI is a modern software development practice in
which incremental code changes are made frequently and reliably. Automated build-
and-test steps triggered by CI ensure that code changes being merged into the
repository are reliable. The code is then delivered quickly and seamlessly as a part of
the CD process. In the software world, the CI/CD pipeline refers to the automation
that enables incremental code changes from developers’ desktops to be delivered
quickly and reliably to production.

Why is CI/CD important?


CI/CD allows organizations to ship software quickly and efficiently. CI/CD facilitates
an effective process for getting products to market faster than ever before,
continuously delivering code into production, and ensuring an ongoing flow of new
features and bug fixes via the most efficient delivery method.

What is the difference between CI and


CD?
Continuous integration (CI) is practice that involves developers making small changes
and checks to their code. Due to the scale of requirements and the number of steps
involved, this process is automated to ensure that teams can build, test, and package
their applications in a reliable and repeatable way. CI helps streamline code changes,
thereby increasing time for developers to make changes and contribute to improved
software.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 43 | P a g e


Continuous delivery (CD) is the automated delivery of completed code to
environments like testing and development. CD provides an automated and consistent
way for code to be delivered to these environments.
Continuous deployment is the next step of continuous delivery. Every change that
passes the automated tests is automatically placed in production, resulting in many
production deployments.
Continuous deployment should be the goal of most companies that are not constrained
by regulatory or other requirements.
In short, CI is a set of practices performed as developers are writing code, and CD is a
set of practices performed after the code is completed.

How does CI/CD relate to DevOps?


DevOps is a set of practices and tools designed to increase an organization’s ability to
deliver applications and services faster than traditional software development
processes. The increased speed of DevOps helps an organization serve its customers
more successfully and be more competitive in the market. In a DevOps environment,
successful organizations “bake security in” to all phases of the development life cycle,
a practice called DevSecOps.
The key practice of DevSecOps is integrating security into all DevOps workflows. By
conducting security activities early and consistently throughout the software
development life cycle (SDLC), organizations can ensure that they catch
vulnerabilities as early as possible, and are better able to make informed decisions
about risk and mitigation. In more traditional security practices, security is not
addressed until the production stage, which is no longer compatible with the faster and
more agile DevOps approach. Today, security tools must fit seamlessly into the
developer workflow and the CI/CD pipeline in order to keep pace with DevOps and
not slow development velocity.
The CI/CD pipeline is part of the broader DevOps/DevSecOps framework. In order to
successfully implement and run a CI/CD pipeline, organizations need tools to prevent
points of friction that slow down integration and delivery. Teams require an integrated
toolchain of technologies to facilitate collaborative and unimpeded development
efforts.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 44 | P a g e


What AppSec tools are required for CI/CD
pipelines?
One of the largest challenges faced by development teams using a CI/CD pipeline is
adequately addressing security. It is critical that teams build in security without
slowing down their integration and delivery cycles. Moving security testing to earlier
in the life cycle is one of the most important steps to achieving this goal. This is
especially true for DevSecOps organizations that rely on automated security testing to
keep up with the speed of delivery.
Implementing the right tools at the right time reduces overall DevSecOps friction,
increases release velocity, and improves quality and efficiency.

What are the benefits of CI/CD?


• Automated testing enables continuous delivery, which ensures software quality
and security and increases the profitability of code in production.
• CI/CD pipelines enable a much shorter time to market for new product features,
creating happier customers and lowering strain on development.
• The great increase in overall speed of delivery enabled by CI/CD pipelines
improves an organization’s competitive edge.
• Automation frees team members to focus on what they do best, yielding the
best end products.
• Organizations with a successful CI/CD pipeline can attract great talent. By
moving away from traditional waterfall methods, engineers and developers are
no longer bogged down with repetitive activities that are often highly
dependent on the completion of other tasks.

DevOps organizations monitor their CI/CD pipeline across three groups of metrics:

• Automation performance
• Speed
• Quality

With continuous delivery of high-quality software releases, organizations are able to


respond to changing market needs faster than their competition and maintain
improved end-user experiences. How can you achieve this goal?

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 45 | P a g e


Let’s discuss some of the critical aspects of a healthy CI/CD pipeline and highlight the
key metrics that must be monitored and improved to optimize CI/CD performance.

(This article is part of our DevOps Guide. Use the right-hand menu to go deeper into
individual practices and concepts.)

CI/CD brief recap


But first, what is CI/CD and why is it important?

Continuous Integration (CI) refers to the process of merging software builds on a


continuous basis. The development teams divide the largelarge-scale
scale project into small
coding tasks and deliver the code updates iteratively, on an ongoing basis. The builds
are pushed to a centralized repos
repository
itory where further automation, QA, and analysis
takes place.
Continuous Delivery (CD) takes the continuously integrated software builds and
extends the process with automated release. All approved code changes and software
builds are automatically release
releasedd to production where the test results are further
evaluated and the software is available for deployment in the real world.
Deployment often requires DevOps teams to follow a manual governance process.
However, an automation solution may also be used to ccontinuously
ontinuously approve software
builds at the end of the software development (SDLC) pipeline, making it a
Continuous Deployment process.
(Read more about CI/CD or set up your own CI/CD pipeline.)

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 46 | P a g e


Metrics for optimizing the DevOps CI/CD pipeline
Now, let’s turn to actual metrics that can help you determine how mature your
DevOps pipeline is. We’ll look at three areas.

Agile CI/CD Pipeline

In regard to delivering high quality software, infusing performance and security into
the code from the ground up, developers should be able to write code that is QA-
ready.

DevOps organizations should introduce test procedures early during the SDLC
lifecycle—a practice known as shifting left—and developers should respond with
quality improvements well before the build reaches production environments.
DevOps organizations can measure and optimize the performance of their CI/CD
pipeline by using the following key metrics:

• Test pass rate. The ratio between passed test cases with the total number of test
cases.
• Number of bugs. The number of issues that cause performance issues at a later
stage.
• Defect escape rate. The number of issues identified in the production stage
compared to the number of issues identified in pre-production.
• Number of code branches. Number of feature components introduced into the
development project.

Automation of CI/CD & QA

Automation is the heart of DevOps and a critical component of a healthy CI/CD


pipeline. However, DevOps is not solely about automation. In fact, DevOps thrives on
automation adopted strategically—to replace repetitive and predictable tasks by
automation solutions and scripts.
Considering the lack of skilled workforce and the scale of development tasks in a
CI/CD pipeline, DevOps organizations should maximize the scope of their automation
capabilities while also closely evaluating automation performance. They can do so by
monitoring the following automation metrics:

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 47 | P a g e


• Deployment frequency. Measure the throughput of your DevOps pipeline. How
frequently can your organization deploy by automating the QA and CI/CD
processes?
• Deployment size. Does automation help improve your code deployment
capacity?
• Deployment success. Do frequent deployments cause downtime and outages, or
other performance and security issues?

Infrastructure Dependability

DevOps organizations are expected to improve performance without disrupting the


business. Considering the increased dependence on automation technologies and a
cultural change focused on rapid and continuous delivery cycles, DevOps
organizations need consistency of performance across the SDLC pipeline.
Dependability of infrastructure underlying high performance CI/CD pipeline
responsible for hundreds (at times, thousands) of delivery cycles on a daily basis is
therefore critical to the success of DevOps. How do you measure the dependability of
your IT infrastructure?

Here are a few metrics to get you started:

• MTTF, MTTR, MTTD: Mean Time to Failure/Repair/Diagnose. These


metrics quantify the risk associated with potential failures and the time it takes to
recover to optimal performance. Learn more about reliability calculations and
metrics for infrastructure or service performance.
• Time to value. Another key metric is the speed of Continuous Delivery cycle
release performance. It refers to the time taken before a complete written software
build is released into production. The delaying duration may be caused by a
number of factors, including infrastructure resources and automation capabilities
available to test and process the build, as well as the governance process
necessary for final release.
• Infrastructure utilization. Evaluate the performance of every service node,
server, hardware, and virtualized IT components. This information not only
describes the computational performance available for CI/CD teams but also
creates vast volumes of data that can be studied for security and performance
issues facing the network infrastructure.

With these metrics reliably in place, you’ll be ready to understand how close to
optimal you really are.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 48 | P a g e


DevOps Maturity Model
DevOps has transformed the IT industry by changing how teams operate and collaborate in the
process chain and workflow. By now, most organizations will have achieved some level of DevOps
implementation in their software journey.
While there are a few in the process of understanding DevOps impact, a few are yet to realize the full
DevOps potential.
But the most common misconception around DevOps adoption continues to remain, i.e.,
‘understanding it as a journey or a destination’.
This is what the ‘DevOps Maturity Model’ precisely speaks about!
Understanding DevOps Maturity
By definition, DevOps Maturity is described as a model that determines an organization’s standing
in principles of DevOps journey along with deciding what more to be accomplished to achieve the
desired results.
Understanding DevOps adoption ‘as a continuous journey, not a destination’ stands crucial to
achieving DevOps maturity.
The majority of DevOps monitoring solutions are compatible with on-premise, cloud, and
containerized infrastructure, which ensures a smooth DevOps transformation process.
The DevOps maturity model determines growth through continuous learning from both teams and
organizational perspectives. More the capabilities and skills, more will be the ability to handle issues
of scale and complexities.
As the experts recommend, organizational DevOps maturity can be gauged by their abilities in
the following four areas:
1) Culture and Strategy
DevOps has to be understood as a culture-driven approach that brings together different teams,
driving them towards a common objective. Transition to DevOps operating model means a
transformation in the organization’s operating culture backed by a set of policies and process
frameworks. So, that needs proper planning and perfect strategy.
2) Automation
Automation is key to continuous delivery and continuous deployment tools in the DevOps process.
By automating repetitive tasks, the automation process eases development, testing and production in
a DevOps cycle, thus saving time and enhancing resource efficiency.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 49 | P a g e


3) Structure and Process
Modern-day IT functioning is process-oriented and involves processes across all stages of the
Software Development Life Cycle (SDLC). This has advanced in a DevOps environment, where
every stage is a set of procedures in line with corporate policies and business objectives.
4) Collaboration and Sharing
This is the most critical aspect of principles of DevOps culture. Collaboration and sharing are key
to DevOps and teams (on the same location or a different location) will need to align tools and
resources towards achieving common goals and objectives.
According to Forbes research, organizations commonly find themselves in one of the following
stages as part of their DevOps operational model journey:
• Unconscious incompetence: Organizations fail to understand DevOps challenges and its
advantages
• Conscious incompetence: Organizations still see siloed processes even after 12-18 months of
DevOps journey with some automation
• Conscious competence: After four years of DevOps implementation journey and successful
automation, organizations focus on collaboration across teams and streamline sharing mechanism
• Unconscious competence: Here, organizations are all set with structured frameworks, in-depth
collaboration, the concrete process for effective sharing

What Makes a DevOps Maturity Model?

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 50 | P a g e


A perfect DevOps maturity model determines DevOps maturity in three ways:
• Assessment of the current state of capabilities
• Identifying areas of improvement
• Outlining steps to achieve desired DevOps goals
In line with these three steps, the DevOps maturity block verifies maturity in building, deploying and
testing stages across application, data and infrastructure levels:
1) DevOps Maturity for Application – Determines DevOps maturity by the ease in code movement
from Development to Production phase. Achieving this requires having builds, tests, code coverage,
security scans and monitoring as automated components of the deployment pipeline.
2) DevOps Maturity by Data – Determines DevOps maturity by ability to clear path to automate
changes to data and validate functionality regularly, through DataOps.
3) DevOps Maturity by Infrastructure – Determines DevOps maturity by ability to ease
infrastructure using capabilities around automation, streamlining and enabling self-service to
provision environments, among other tasks.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 51 | P a g e


Summarized, DevOps Maturity model involves five transformation stages:

1) Stage-1: Initial
Traditional environment with Dev and Ops separated is handled.
2) Stage-2: Managed
The beginning of change mindset focused on agility in Dev and initial automation in Ops, with
emphasis on collaboration.
3) Stage-3: Defined
Organization-wide transformation begins with defined processes and established automation.
4) Stage-4: Measured
A better understanding of process and automation, followed by continuous improvement.
5) Stage-5: Optimized
Achievements are visible, team gaps disappear, and employees gain recognition.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 52 | P a g e


While these 5 stages make a complete DevOps maturity model, it’s imperative for enterprises to keep
checking their maturity at every step, and eventually identify focus areas and ways to evolve in the
overall journey.

What to Measure in a DevOps Maturity Model?

There are a set of parameters to be measured at every stage of the DevOps Maturity Model to
confirm an organization’s level of DevOps maturity. These measures ideally define the direction the
organization is advancing in its DevOps implementation journey. They are:
• Number of completed projects and the release frequency should ideally high resulting in ROI
• Percentage of successful deployments should maintain an edge over unsuccessful ones
• Mean Time To Recovery (MTTR) from an unexpected incident/failure from the time of occurrence,
should be nil or as low as possible
• Lead time, from development of code to deployment in production, should be satisfactory
• Deployment frequency to determine the frequency of new code deployments
The stage-wise process and the above parameters define an organization’s DevOps maturity success.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 53 | P a g e


DevOps Maturity Linked to Security

DevOps maturity is directly linked to DevOps security. As organizations progress in DevOps


journey, the competitive edge becomes a pressing demand calling for faster release cycles and digital
innovation demands a strong pitch.
Development, operations, and security are the three words that make up the DevOps security
concept. The objective is to eliminate any barriers that might exist between IT operations and
software development.
This is where the challenge of security starts becoming more serious and which is why DevOps
culture calls for reconsidering security practices.
Eventually, organizations will have to make security an integral part of their DevOps process and
take it closer to all application development stages.
DevOps experts work with security personnel for early security integration at the maturity level
across all parts of the Software Development Lifecycle.
This can happen through effective DevSecOps implementation. solutions like Containerization can
also help to some extent in addressing issues continuously by limiting the vulnerable resources.
Moreover, Security and DevOps teams can collaborate in applying security policies and frameworks
to all the DevOps tools and resources.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 54 | P a g e


Business Benefits of DevOps Maturity
Giving a complete picture of an organization’s DevOps team standing, the DevOps maturity model
presents a wide range of business benefits:
• Faster adaptability to change
• Ability to tap opportunities
• Identifying areas of fulfillment
• Improved scalability
• Operational efficiency
• Increased delivery speeds
• Enhanced quality
More such benefits of DevOps are part of the Maturity model that gives you the ability to witness the
full DevOps potential.
DevOps Best Practices
Making the switch to DevOps offers numerous advantages. Despite having innovative approaches to
improve the processes, DevOps challenges won’t be entirely new. The following are some of the
DevOps best practices
1) Collaborating teams
2) Continuous Integration (CI)
3) Continuous Development (CD)
4) Continuous Testing
5) Customer Satisfaction
6) Effective Leadership
7) Effective Tools
In Conclusion
Businesses must keep in mind that DevOps is a long-term commitment and not an overnight
procedure as they progress in their DevOps transformation journey. DevOps Maturity increases your
overall organizational workflow, enhances release frequency and minimizes time-to-market, thus
giving you a competitive edge! Want to witness the full DevOps potential through DevOps Maturity
Model? ‘Explore Veritis, the Stevie Awards winner for the DevOps Consulting services

DevOps adoption in projects

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 55 | P a g e


Adopting DevOps offers a cultural change in the workforce by enabling engineers to cross the
barrier between the development teams and operations teams. Instead of having two disjointed
groups, DevOps brings together the operational and developmental paradigms under the same
Agile experience. DevOps introduces many benefits to organizations both regarding efficiency
and error reduction; it infuses cohesion amongst the departments that otherwise remain
disjunctive of each other. This, in turn, helps production acceleration and better quality
reassurance.

Further reasons why you should consider adopting a DevOps culture:

Progressive Collaboration
For years, developers have faced the dilemma of repeating work and manufacturing pitfalls in a
setup where development and operation did not go hand-in-hand. DevOps promises to bridge the
gap between the two where both employ bottom-up and top-down feedback from each other.
With DevOps, when development seeks operational help or when operations require immediate
development, both remain ready for each other at any given time.

In such a scenario, the software development culture brings in to focus combined development
instead of individual goals; this fosters healthy experiments, improved research, and innovation
in the organization. The development environment becomes more progressive as all the team
members work in cohesion towards a common goal.

Processing Acceleration
With conjoined operational and developmental paradigms, the communication lag between the
two is reduced to null — these integrated teams help in rapid development and deployment of
applications; this has multiple implications in the current market setup where rapidity is vital for
maintaining supply and adaptation, and to improve efficiency.

Organizations continuously strive for a better edge over their competing rivals, and if such
acceleration is not achieved, the organization will have to succumb to competing forces—
innovation will be slower, and the product market will decay. DevOps, in such a scenario, makes
use of real-time performance data to comprehend and predict code configuration, in addition to
how they impact the applications. As a result, the product rectifications are faster and more
prompt causing overall development processes to become quicker.

Shorter Recovery Time


DevOps deployment functions on a more focused and exclusive approach which makes issues
more accessible to spot; this helps error rectification faster and easier to implement. In a situation
of failure, the development team need not recheck the entire source code for detecting that error.
The most the team will need to check is the latest code changes to resolve an issue.

Therefore, the resolution to problems is inherently quicker, as troubleshooting happens to take


place at the current development level only, within a single team. Thus, the overall time for
recovery and rectification is drastically reduced.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 56 | P a g e


Lower Failure Rate
In DevOps, the abridged departments yield shorter development cycles which result in rapid
production. The entire process becomes modular wherein issues related to configuration,
application code, and infrastructure become more apparent and pre-accessible — this lowers the
error count drastically since no significant error will be made reiteratively.

A decrease in error count also positively affects the success rates of development. The team
members become increasingly engaged in the lifecycle of particular application development
where every member is aware of the shortcomings of the current code. Therefore, very few fixes
will be required to attain a fully functional code for the desired output.

Higher Job Satisfaction


DevOps fosters equality by bringing different officials at the same level of interaction. The
power mechanism is decoded and attains linearity of importance in this communicative
environment. The environment exhibits more of a performance-based cohesion than a power-
based hierarchy. The obstacles are faced cumulatively by all instead of shifting the load to a
single pair of shoulders; this helps in reducing the stress and workload of the developers and
motivating them to think more openly about the possibilities of eradicating those obstacles. The
process also boosts confidence in individual employees and fosters greater job satisfaction.

Fast and error-free outputs are naturally desired in today’s digital organizations as demands are
becoming higher day by day. DevOps serves as a handy tool for achieving that feat; it enables
the workforce to work in cohesion where chances for failure are minimal, and production is
rapid. As a result, the processing becomes efficient and workspace more promising. If
implemented wisely, DevOps can influence the workflow by increasing its speed, security,
stability, and dependability.

DevOps vs. agile


What are the differences and similarities between agile and DevOps?
When the agile methodology gained widespread adoption in the early 2000s, it
transformed the way we develop software and other products. Yet, within a few
years of becoming an industry standard, a critical oversight arose: the processes and
requirements of the operations team who deployed and managed software products
were left out of the revolution.

This led to DevOps, an approach that aligned development and operations teams.
So did DevOps replace agile? Or do they complement each other? It turns out there
are both differences and similarities between the two. Agile and DevOps can be
both exclusive and inclusive, with both existing within an organization.
What is agile?

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 57 | P a g e


Agile is an iterative approach to project management and software development that
focuses on collaboration, customer feedback, and rapid releases. It arose in the early
2000s from the software development industry, helping development teams react and
adapt to changing market conditions and customer demands.
In an agile approach, some planning and design is done upfront, but the development
proceeds in small batches and involves close collaboration with stakeholders. Changes
are incorporated continuously and a usable version of a product is often released
quicker compared to products developed through the waterfall methodology. This
provides many benefits, with arguably the most important being that if software doesn’t
meet the needs or expectations of the customer, it can be remediated in real-time.
Agile is a collection of methodologies, not a single approach to development. It is an
aggregation of scrum, eXtreme Programming (XP), and other systems of practice that
developers used in years prior, and resulted from those practitioners coming together to
unify these approaches into a single set of principles. The result of this unification effort
was the Agile Manifesto, which consists of 12 principles, based on four core values.
The Agile Manifesto’s four core values

Individuals and interactions


over processes and tools

Working software
over comprehensive documentation

Customer collaboration
over contract negotiation

Responding to change
over following a plan
Enter DevOps

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 58 | P a g e


DevOps is an approach to software development that enables teams to build, test, and
release software faster and more reliably by incorporating agile principles and practices,
such as increased automation and improved collaboration between development and
operations teams. Development, testing, and deployment occur in both agile and
DevOps. Yet traditional agile stops short of operations, which is an integral part of
DevOps.

The goal of DevOps is to help bring together developers who write application software
and operations who run the software in production. Also, to build and maintain the
infrastructure where it runs. DevOps replaces the old approach of development teams
writing applications then throwing them over the wall to an operations team who
deploys and manages the software with minimal visibility into how it was developed. In
a DevOps environment, developers and operations teams work side by side throughout
the entire process of developing, deploying, and managing applications.

Two common frameworks for understanding DevOps are “Three Ways” and “CALMS”, an
acronym for Culture, Automation, Lean, Measurement, and Sharing. Culture refers to the
cultural shift where development and operations work more cohesively. Automation
increases velocity and ensures higher quality. The lean principles of continuous
improvement and embracing failure are the foundation of an experimental mindset.
Measure refers to the practice of measuring results to improve processes. Sharing
emphasizes the importance of DevOps as a group effort and adopting best practices.
The DevOps Three Ways

Systems thinking
Understanding that software applications are complex systems

Amplifying feedback loops


Improve bidirectional communication between teammates

Cultural change
Culture of continuous experimentation and learning

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 59 | P a g e


When do agile and DevOps work together?

DevOps can be thought of as an evolution of agile practices, or as a missing piece of


agile. It’s an effort to take the innovations of the agile approach and apply them to
operations processes. At the same time, it’s a missing piece of agile, because certain
principles of agile are only realized in their most complete form when DevOps practices
are employed. For example, there are multiple references to continuous delivery of
software in agile documents, but because delivery pipelines encompass operations
concerns, continuous delivery is usually regarded as a DevOps practice. Amplifying
feedback loops requires improved communication across and between teams. Agile,
specifically scrum, helps facilitate this communication through its various ceremonies
such as daily standups, planning meetings, and retrospectives.
What are the similarities/differences between agile and DevOps?

• Agile emphasizes collaboration between developers and product management — DevOps


includes the operations team

• Agile centers the flow of software from ideation to code completion — DevOps extends the
focus to delivery and maintenance

• Agile emphasizes iterative development and small batches — DevOps focuses more on test and
delivery automation

• Agile adds structure to planned work for developers — DevOps incorporates unplanned work
common to operations teams

The Agile Manifesto explicitly prioritizes individuals and interactions, working software,
customer collaboration, and responding to change. These are clearly the same priorities
of DevOps but extended beyond the development process and into the management of
systems and running applications.

In addition, the Twelve Principles of Agile Software includes references to DevOps


principles. For example, the emphasis on continuous integration and delivery, working in

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 60 | P a g e


small batches with frequent releases, and using automation are all referenced in the
Twelve Principles of Agile Software.
In conclusion... agile AND DevOps

Ultimately the goals of agile and DevOps are the same: to improve the speed and
quality of software development, and it makes very little sense to talk about one without
the other. Many teams have found agile methodologies help them tremendously, while
others have struggled to realize the benefits promised by an agile approach. This might
be for any number of reasons, including teams not fully understanding or correctly
implementing agile practices. It may also be that incorporating a DevOps approach will
help fill the gaps for organizations that struggle with agile and help them have the
success they were hoping for.

The ToolStack for DevOps Engineers


##1 Introduction First, let’s do a quick introduction to DevOps (Development/Operations). I'm
going to briefly explain the most important concepts, and you can check the reference section for
reading and listening materials that I recommend.

DevOps is characterized by Dev and Ops teams working together to improve the performance of
IT organizations and/or departments. I prefer to extend that concept a bit further: DevOps is a
culture, a new way to work in IT. It not only involves Dev and Ops, it should also involve every
area in IT and beyond: IT security, networking, operations management and more.

You can see the core ideas that surround DevOps in the graph above.

Among the concepts shown in the image, the two most important are communication and
collaboration. I'm going to describe a lot of software tools in this article, but none of them are
going to be useful if you haven’t yet dominated those two.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 61 | P a g e


IT failures are usually caused by software that doesn't work properly, bad configurations, broken
implementations, etc, but you will almost always find that a lack of collaboration and
communication is at the root of the problem.

Many issues can cause projects to be unsuccessful: Projects that start without the right people
participating from the beginning, projects that move forward without the key people participating
in the status reports meetings, scapegoating and more. DevOps implies extensive changes within
organizations, and it's very difficult to implement unless there is consensus among all the
different players.

In the following section I'm going to describe a few tools that can help create this new culture.
Keep in mind where to start before using them.

##2 Continuous improvement

Before starting to talk about tools, let's talk about what we are trying to build. One of the goals
of DevOps is Continuous Improvement, which is usually composed of the following:

• Continuous Integration: Every time a developer pushes a change to the software repository, we
need to take the software, (along with) its external dependencies and check if everything can be
assembled or compiled without problems.
• Continuous Testing: If assembly (or compilation) finishes successfully, the next step is testing.
Developers should provide tests to verify that software works as expected. This includes unit test
and functional tests.
• Continuous Delivery: If software is verified to work properly, the next step is to deliver it to the
corresponding environment. In the code repository we usually have one branch per environment:
Development, QA, staging and production. Developers should work and push code to one of these
branches and we should update the corresponding environment.
• Continuous Deployment: If all the steps described above are working smoothly, that means that
we are ready to deploy code at any time during production.

This workflow is described in the following graph:

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 62 | P a g e


The characteristics of this environment aallow for the following benefits:

• Efficiency:: Less manual work, information is easy to find, less dependency on tribal knowledge.
We can replicate, scale and rebuild faster.
• Consistency:: Tasks required to deliver code and infrastructure are in one place - the
he repository.
Continuous integration are the official builds. Same deployment and same infrastructure
everywhere.
• Safety:: Errors introduced by manual procedures are reduced, changes are controlled.
• Visibility:: One of the keys of communication. We deploy tthe
he known version, we know what’s
going to be deployed and audit is easy.

Now lets create that scenario.

##3 Setup the repository for the application

Software developers need a repository to save their work. Version control systems are the perfect
tool to doo this, and one of the most popular is Git. Our first task is to create the repository
in Github and initialize it with the first lines of code. If you don’t have an account on Github,
create one and then create the repository. Let’s create a public one, ssince
ince we don’t need a private
one for our example. We are going to create a simple Python rest API using Flask, so let’s
initialize the repository for this purpose:

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 63 | P a g e


Now we have the repository ready, so let’s use our first tool: Git.. As DevOps Engineers, we
w are
going to code our infrastructure, which means we are going to manage code. Coding without
version control is definitely a bad idea. In the next steps we are going to initialize the repository
so that it will be ready for developers to begin working.

The repository is ready to clone. You can get the URL from the main page, in the section “SSH
clone URL”. (Don’t forget to setup your public SSH key in your account profile beforehand).
git clone git@[Link]:flugel
git@[Link]:flugel-it/[Link]

##4 Local development environment

It’s a good time to introduce our second tool: Vagrant.. It’s a management tool used to create
local development environments. We are going to use it for developers, so they can set up their
desktop to begin working on the proj
project
ect as quickly as possible. Vagrant works in Linux, Mac and
Windows. It uses Virtualbox (by default, but there are other options) to create virtual machines to
run and test the application locally before pushing the code to the repository. The installation of
Vagrant and Virtualbox is required. It’s very convenient because both offer ready
ready-to-install

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 64 | P a g e


packages on their official site for the most popular operating systems. The latest version is
recommended.

When you have them installed, the next step is to create the Vagrantfile in the root of the
repository:
VAGRANTFILE_API_VERSION = "2"

[Link](VAGRANTFILE_API_VERSION) do |config|
[Link] = "airpair-devops-toolstack"
[Link] = "chef/ubuntu-14.04"

[Link] "virtualbox" do |v|


[Link] ["modifyvm", :id, "--memory", 512]
[Link] ["modifyvm", :id, "--cpus", 4]
end

[Link] "forwarded_port", guest: 5000, host: 5000

end

As you can see, the configuration is very simple. The first two config files define the virtual
machine hostname and the second the base template. This template is going to be downloaded
from [Link], where you have a long list of base images ready to use. In this case, we
are going to use Ubuntu 14.04 server. Save the file and run:
vagrant up

After a few minutes, you should be able to run:


vagrant ssh.

If you see this:


vagrant@airpair-devops-toolstack:~$

It means that you successfully set up Vagrant and you are in the virtual machine. Let’s have a
look at what you see there. Go to the /vagrant directory and take a look at the list of files. You’ll
see some familiar files there. That directory is a shared folder between the VirtualBox instance

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 65 | P a g e


and the host machine. It’s the repository of your application. This allows you to code in your
desktop and run the app in the VM to test it.

##5 Write the application

Ok, we are not developers. But we need an application in order to continue working. So, let’s
write some code. We are going to build a simple API to print the factorial of a number given in
the URL. For example, [Link] should return 3628800.

We are going to code our application in Python using Flask, with a module to create the
a RESTful API and a module that calculates the factorial. Here is the code:
from flask import Flask
from [Link] import restful

import factorial007

app = Flask(__name__)
api = [Link](app)

class Factorial([Link]):
def factorial(self, number):
return [Link](number)

def get(self, number):


return [Link](number)

api.add_resource(Factorial, '/factorial/<int:number>')

if __name__ == '__main__':
[Link](debug=True)

Using our favorite text editor in our desktop we should have this code ready in the repository as
[Link]. Before we add and commit it, we need to try to run it. Let’s go to
the Vagrant instance (using vagrant ssh) to test it out.
vagrant ssh

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 66 | P a g e


cd /vagrant
python [Link]

This last command should fail, because we don’t have the requirements installed. So,
as Python developers, it’s a good habit to write the modules that we need in a file called
[Link] in the root of the repo. Just write this to that file:
flask-restful
factorial

and run:
sudo apt-get install python-pip
sudo pip install -r [Link]

We should be ready to run the app at this point:


python [Link]

To test the app we could run: curl [Link] from the Vagrant instance or
from our host machine. If you see 3628800, everything is functioning properly.

The app is running but we wouldn’t like each developer to install the dependencies manually
every time he creates the instance. So let’s introduce another tool: the provisioner or
configuration management.

##6 Configuration management

There are four big players in this area for the DevOps
toolbox: Chef, Puppet, SaltStack and Ansible. For this guide, let’s use one of the most popular
these days: Chef.

All of these tools share a similar concept. You create recipes, manifest, states, etc., to define how
you are going to provision your instances on Vagrant or on the cloud. This includes packages to
install, Python modules, services running at startup, users and more.

In our example, the first thing that we need to do is install the Python modules. So let’s initialize
the Chef settings. There is a file/directory layout that is recommended. We are not going to
explain in detail here but you can have a look at the repository

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 67 | P a g e


in Github: [Link] (there is a README file in
the Chef directory with details). The next steps will assume the layout already exists. So, let’s
install Chef and write our first recipe.
vagrant ssh
sudo -i
cd /vagrant/chef
make install-chef-client

If the previous operation runs without problems, then the next step is to create the cookbook and
the recipe to install all the dependencies to run the application:
knife cookbook create factorialapp -o site-cookbooks/

Edit the file site-cookbooks/factorialapp/recipes/[Link] and add the following:


app_path = "/opt/airpair-devops-toolstack"
if not ::[Link]?(app_path)
app_path = "/vagrant"
end

package "python-pip"

execute "install-python-module" do
command "pip install -e #{app_path}/[Link]"
end

and run:
chef-client -z -r 'recipe[factorialapp]' -c .chef/[Link]

You’ll see some output describing that chef-client is trying to install python-pip and
the Python modules.

Now we are ready to put all of the pieces together to have a fully automated procedure. To do
this, we need to add these lines before the last end in the Vagrantfile.
[Link] "shell", inline: "cd /vagrant/chef; make install-chef-client"
[Link] "chef_solo" do |chef|
chef.cookbooks_path = ["chef/site-cookbooks", "chef/cookbooks"]
chef.add_recipe "factorialapp"

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 68 | P a g e


end

and to finish run:


vagrant destroy
vagrant up

You should be able to run the application manually by executing “python /vagrant/factorial-
[Link]” inside the Vagrant instance. We could set up a startup script to load the app
automatically, but sometimes developers prefer to manage this manually. We’ll see how to do
this in the next section for a cloud instance.

##7 Some recommendations before moving forward

Before starting to work on the cloud to deploy the application, here are a few recommendations.
It’s good practice to make all the changes in the application code and in the infrastructure code in
the local copy of the repository (in your desktop). You should develop and test both things
locally first before pushing to the repository and pulling in the development instance. Remember
that every commit should be an atomic change. That is, it should change the code from one
working state to another working state. There could be some exceptions, but try to follow this
advice.

Version control tools help you to organize your work, but it’s up to you to use the tools properly.

##8 Deploy on the cloud

At this point, we have the application running, the basic provisioning working, so we are almost
ready to deploy the application in the cloud. Launch an instance in your favorite cloud provider
and ssh to it and execute the following commands as root. I use Digital Ocean, but the same
procedure should work with other providers. Remember that our application is being tested
on Ubuntu 14.04.
cd /opt
apt-get install -y git make screen lsb-release
git clone [Link]
cd airpair-devops-toolstack/chef
make install-chef-client

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 69 | P a g e


chef-client -z -r 'recipe[factorialapp]' -c .chef/[Link]
python /opt/airpair-devops-toolstack/[Link]

Now, the application should be ready to run. But, there is an issue. If we reboot, it’s not going to
run automatically. Let’s update the recipe to install the init script for Ubuntu.

Add the following lines at the end of the recipe:


if app_path != "/vagrant"
cookbook_file "/etc/init/[Link]" do
source "[Link]"
end
service "factorial-api" do
provider Chef::Provider::Service::Upstart
action [ :enable, :start ]
end
end

and create the [Link] file in site-cookbooks/factorialapp/files/default/:


start on runlevel [2345]
stop on runlevel [!2345]

respawn

exec python /opt/airpair-devops-toolstack/[Link]

Apply the recipes in the instance running in the cloud:


chef-client -z -r 'recipe[factorialapp]' -c .chef/[Link]

Check if the process is running, reboot and check again. If the process is still there, we have
deployed the application on the cloud.

##9 Continuous integration, testing and delivery

One of keys of DevOps culture is continuous improvement. We should be able to improve the
application and the infrastructure in small increments periodically. This can’t be done if we don’t
provide a framework to achieve this safely and in a way that everybody involved in the project

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 70 | P a g e


feels comfortable with. Continuous integration and testing helps the communication within the
team. Every change we apply and push to the repository triggers a process that gathers all the
parts required to run the application and test it. The result of this process is a report with the last
status of the tests and the delivery of the new changes to the development environment. Every
update will be visible in a server or a group of servers shared to the team to see the last state of
the application live.

We have several tools that help this process. Some of them are hosted and some of them can be
installed on premises. One of the most popular CI tools is Jenkins. So, we are going to take a
look at how to install and configure it. Because we are using infrastructure as code, let’s
use Chef to do this too.

Chef recipes as you saw are grouped in cookbooks. You could write your own cookbook or you
can use the community ones, usually found in [Link] To
install Jenkins we don’t need to write any cookbook, there is a good one in the supermarket. Go
to our repository, to the chef directory, and add this line to the Cheffile.
cookbook 'jenkins'
cookbook 'postfix' # to send email with Jenkins reports

Commit this to the repo, pull it to the instance running on the cloud and execute:
librarian-chef install --path cookbooks
chef-client -z -r 'recipe[jenkins::master],recipe[postfix]' -c .chef/[Link]

Then go with your browser to the IP address of the instance, port 8080. You should see
“Welcome to Jenkins!”. Before creating any job, we need to install the Git plugin. Go to Manage
Jenkins -> Manage Plugins -> available and install Git plugin. You can use the filter to locate it.
There are several Git related plugins, please confirm that you are installing the right one. Check
it and click on “Download now and install after restart”. After restart, go to the dashboard and
click on “Create new jobs”, we are going to configure our first CI job.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 71 | P a g e


And here are the sections that you have to modify on the next page. Fill the fields but don’t touch
any button, the interface can be a bit confusing.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 72 | P a g e


Andd now click on Save. You’ll see a new menu with a “Build now” button. Click on it. Of
course, it will fail because we have to update a few things. First, Jenkins run as jenkins user. In
our code, “make test” doesn’t exist. You can check that Jenkins failed executing in the Build
History -> Console Output.

We are going to do an ugly fix, it’s your homework to do this better.


chown jenkins:jenkins /opt/airpair
/opt/airpair-devops-toolstack/ -R

Click on “Back to the project” and try to build again. It will fail again. This time because we
don’t have the Makefile with the test target. So, let’s update the repository to execute the test.

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 73 | P a g e


In [Link] add:
if __name__ == '__main__':
if [Link][1] == "test":
factorial = Factorial()
assert([Link](10) == 3628800)
[Link](0)

And create the Makefile with this content:


test:
python [Link] test

Commit and push. And wait a couple of seconds, Jenkins should detect the change. Pull the
updates and run the test.

##10 Final words

This article was a walkthrough of the basic tools for the DevOps engineer. There are a lot more
to cover: metrics and monitoring tools, more advanced ways to deploy Chef, more automation
and orchestration tools, better ways to use Jenkins, etc. I expect this to be useful to start to work
in DevOps, or as I like to say as an Infrastructure Developer.

I have more than 10 years working in the sysadmin role, mostly as a consultant. Over the last few
years our role has begun to change. The dynamic nature of new businesses, the flexibility of the
cloud and the idea that “the big doesn’t eat the small, the fast eat the slow” requires a continuous
change in the way we work.

##11 Other tools

Here is a list of other tools that you can try.

Automation and orchestration:

• Puppet
• SaltStack
• Ansible

Continuous Integration:

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 74 | P a g e


• Buildbot
• Travis CI (hosted)
• Circle CI (hosted)

Misc:

• Foreman
• Docker
• Capistrano
• Fabric
• Elasticsearch
• Logstash
• Kibana
• Graphite
• Logster

DevOps: The Three Stage Conversation –


People, Process and Products
The Three Stage Conversation – People, Process, Products

DevOps is the correlation of people, process, and products to enable continuous


delivery of value to end users. The outcomes are tightly connected to allow for frequent
releases and at the same time to keep the same level of quality.

People:

Initially, stakeholders would need to be identified, ensuring that everybody delivering


value to the business are working tightly together on the common goal of adding value
to the customer. The latest study by Gartner, which involved 367 leading companies,
from which 113 companies were using DevOps. From this study we can deduce that the
biggest concern is ‘People’, with process and products being deemed less critical. From
this, we can assume that having highly motivated people with good collaboration is
necessary.

Process:

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 75 | P a g e


Next – DevOps is about improving process because even if you have highly motivated
people that are working well together, you may still have several business processes
which may get in the way and this could really block innovation. For instance, having to
seek approval from long chain advisory boards before implementing changes or being
restricted to doing things in a certain way can impede innovation. The process of
designing, building and testing software should be well presented to each individual
team member, making them aware of all parts of the development process. The
implementation of DevOps can be hard work, as it completely changes the company’s
structure as a whole.

This is part of the bigger picture of DevOps. Enabling efficient flow of collaboration and
making sure that business structure and processes do not get in the way but instead
have processes and practices that help improve the value and delivery to your
customers.

Products:

You can’t buy DevOps, as DevOps is not a software, tool, process, company or person,
it’s a methodology used especially by IT professionals. There are, however, products,
tools and services that can help enable different DevOps practices and different teams
which can be used to make things easier. From a very high level, these tools include
Microsoft Azure, which is offering a lot of different products and services, such
as Microsoft Azure Stack and Microsoft Azure. Besides Microsoft Azure there are also
other products related to DevOps practices, such as Team Foundation Server (TFS).

DevOps - Unit-2 Dr. Ch. Meher Babu, Ph.D 76 | P a g e

You might also like