Unit 1
Unit 1
DevOps has become one of the most valuable business disciplines for enterprises or
organizations. With the help of DevOps, the quality, and speed of the application
delivery have improved to a great extent.
DevOps is all about the integration of the operations and development process.
Organizations that have adopted DevOps noticed a 22% improvement in software
quality and a 17% improvement in application deployment frequency and achieve a
22% hike in customer satisfaction. 19% of revenue hikes as a result of the successful
DevOps implementation.
Before going further, we need to understand why we need DevOps over the other
methods.
The operation consists of the administrative processes, services, and support for the
software. When both the development and operations are combined with
collaborating, then the DevOps architecture is the solution to fix the gap between
deployment and operation terms; therefore, delivery can be faster.
DevOps architecture is used for the applications hosted on the cloud platform and
large distributed applications. Agile Development is used in the DevOps
architecture so that integration and delivery can be contiguous. When the
development and operations team works separately from each other, then it is
time-consuming to design, test, and deploy. And if the terms are not in sync with
each other, then it may cause a delay in the delivery. So DevOps enables the teams to
change their shortcomings and increases productivity.
Below are the various components that are used in the DevOps architecture:
1) Build
Without DevOps, the cost of the consumption of the resources was evaluated based
on the pre-defined individual usage with fixed hardware allocation. And with
DevOps, the usage of the cloud, and sharing of resources come 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 enable the code to be used, which ensures writing
the code for business, helps to track changes, getting notified about the reason
behind the difference in the actual and the expected output, and if necessary
reverting to the original code developed. The code can be appropriately arranged in
files, folders, etc. And they can be reused.
3) Test
The application will be ready for production after testing. In the case of Manual
testing, it consumes more time in testing and moving the code to the output. The
testing can be automated, which decreases the time for testing so that the time to
deploy the code to production can be reduced as automating the running of the
scripts will remove many manual steps.
4) Plan
DevOps use Agile methodology to plan the development. With the operations and
development team in sync, it helps in organizing the work to plan accordingly to
increase productivity.
5) Monitor
Continuous monitoring is used to identify any risk of failure. Also, it helps in
tracking the system accurately so that the health of the application can be checked.
The monitoring becomes more comfortable with services where the log data may get
monitored through many third-party tools such as Splunk.
6) Deploy
Many systems can support the scheduler for automated deployment. The cloud
management platform enables users to capture accurate insights and view the
optimization scenario, and analytics on trends through 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 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 are commonly used to do the
deployment in the production environment manually to lessen the impact on the
customers.
1.4 DevOps Architecture Features:
1) Automation
Automation can reduce time consumption, especially during the testing and
deployment phase. The productivity increases, and releases are made quicker by
automation. This will lead to catching bugs quickly so that it can be fixed easily. For
contiguous delivery, each code is defined through automated tests, cloud-based
services, and builds. This promotes production using automated deploys.
2) Collaboration
The Development and Operations team collaborates as a DevOps team, which
improves the cultural model as the teams become more productive with their
productivity, which strengthens accountability and ownership. The teams share their
responsibilities and work closely in sync, which in turn makes the deployment to
production faster.
3) Integration
Applications need to be integrated with other components in the environment. The
integration phase is where the existing code is combined with new functionality and
then tested. Continuous integration and testing enable continuous development. The
frequency of the releases and micro-services leads to significant operational
challenges. To overcome such problems, continuous integration and delivery are
implemented to deliver in a quicker, safer, and more reliable manner.
4) Configuration management
It ensures the application interacts with only those resources that are concerned with
the environment in which it runs. The configuration files are not created where the
external configuration of the application is separated from the source code. The
configuration file can be written during deployment, or it can be loaded at the run
time, depending on the environment in which it is running.
Here are some advantages and disadvantages that DevOps can have for business,
such as:
Advantages
Disadvantages
The agile software development process frequently takes the feedback of workable
product. The workable product is delivered within 1 to 4 weeks of iteration.
Roles in Agile
There are two different roles in a Agile methodology. These are the Scrum Master
and Product Owner.
1. Scrum Master
The Scrum Master is a team leader and facility provider who helps the team
member to follow agile practices, so that the team member meets their commitments
and customers requirements. The scrum master plays the following responsibilities:
● They enable the close co-operation between all the roles and functions.
● They remove all the blocks which occur.
● They safeguard the team from any disturbances.
● They work with the organization to track the progress and processes of the
company.
● They ensure that Agile Inspect & Adapt processes are leveraged correctly
which includes
○ Planned meetings
○ Daily stand-ups
○ Demo
○ Review
○ Retrospective meetings, and
○ Facilitate team meetings and decision-making process.
2. Product Owner
The Product Owner is one who runs the product from a business perspective. The
Product Owner plays the following responsibilities:
DevOps workflow allows the ability to separate and arrange the jobs which are top
requested by the users. Also, it gives the ability to mirror their ideal process in the
configuration jobs.
The main principles of DevOps are Continuous delivery, automation, and fast
reaction to feedback.
● Work as one team: In the DevOps culture role of the designers, developers,
and testers are already defined. All they needed to do is work as one team
with complete collaboration.
When the codebase moves within different teams during the phases of the software
development lifecycle, it is a time-consuming process as all the environments
utilized in the process are configured differently. Therefore, it’s quite difficult for the
software to perform consistently across multiple platforms wiring in various
environments.
As a result, every team member wastes their time trying to resolve issues without
realizing that the problem is not with the code but with the environment. Hence, one
of the greatest killers of agility and smooth transition is an inconsistent environment.
Solution
When we talk about the development process, manual intervention is not advisable
for the testing and deployment phases. It significantly affects efficiency, consumes
time, and reduces accuracy. Human errors and non-repeatable procedures are the
results of manual intervention. If we perform manual testing, it’s not possible to
implement CI/CD pipelines in an agile way. Furthermore, manual testing increases
the chance of product defects, resulting in unplanned efforts.
Solution
You can solve DevOps challenges related to manual testing and deployment by
automating the framework and deployment processes and, thus, improving the
entire process and strategy. Every DevOps-aspiring organization should think about
including automatic testing procedures in the deployment process. As a result, they
will be able to reduce deployment failures.
In the era of DevOps, where software is provided in shorter increments with a high
degree of reliability and quality, having a mature process is even more crucial for a
team. But some organizations are not able to move further with the agility of
DevOps. In fact, most of these organizations are either immature in the process or
wrongly assume that they already know everything.
Solution
Organizations should follow the path to implement cutting-edge DevOps tools and
technologies. In addition, they also should help their teams learn the newly-adapted
technologies and imbibe them with proper training.
Teams should continuously seek feedback on a regular basis, and they should strive
to improve it. Investing all of your time and money into all-in-one solutions can
make it easier for teams to deploy DevOps, allowing them to deliver features faster
and with fewer failures.
Many organizations have been using traditional change management practices for
years and are comfortable with them. The majority of their process was developed at
a time when change management meant employing and deploying extra resources.
Now, coming back to the recent scenario, applications now consist of many small
components or microservices that can be easily modified and deployed. Now,
suddenly, the process gets in the way.
Solution
Organizations should become more agile and try to shift their paradigm from the
traditional approach. For example, instead of authority, embrace autonomy for rapid
decision-making or make sure to release changes from the very beginning of the
development life cycle.
Additionally, you can always prepare for failures and minimize the negative impact
of change as part of the overall DevOps adoption challenges. Soaking all your code
changes in an independent environment and deploying them in stages is a good
practice in this regard.
In DevOps integration, all the required processes, such as development, testing, and
deployment, must be in a continuous and iterative loop. Well, it’s not easy to tie all
the team members in one place as they are from different departments. This will
affect productivity when one department has to transfer work to another with an
entirely different set of tools and technologies.
Solution
The automation process will surely reduce all those time-consuming, repetitive tasks
such as analytical, data entry, and product research. This way, an organization can
enhance its outreach and efficiency.
For the higher quality development process and product deployment, tight access
controls and secrets management are essential factors. Secrets may consist of API
tokens, account-sensitive information and credentials, SSH Keys, etc. So, many
entities like employees, services, and containers use these.
Henceforth, these passwords and keys are poorly managed and become easy targets
for hackers. Furthermore, DevOps teams often allow unrestricted access to
privileged accounts such as admin, root and others to guarantee a smooth and
speedy workflow.
Solution
In order to avoid such DevOps challenges, the passwords, keys, and other critical
account information must be carefully controlled. DevOps teams have resorted to
inadequate secrets management, such as storing passwords in containers with the
adoption of automated deployment.
With the rapid growth of automated deployments, teams often choose the path that
may lead to leaving their passwords and keys exposed.
Hence, you should remove sensitive information like credentials, services, accounts,
files, etc., for successful DevOps secrets management. In addition, while not using it,
passwords from the code should be removed and stored in a centralized container.
To implement this data storing method, you can use different products like Azure
key vault, AWS secrets manager, CyberArk, Thycotic Secret Server, and many more.
Outdated development practices come next in our list of DevOps challenges and
solutions. In most organizations, teams dedicatedly perform specific operations like
testing the applications. These teams are not active or involved with other
departments.
So, the only way of having a collaboration between them is a never-ending cycle of
code sent out for testing and then returned. The QA team finds bugs and issues
during this process and sends them back to developers. Then, the team of developers
works to resolve and redeploy the code.
Since it’s an endless process, the teams come to the same table to agree on what bugs
they can tolerate and promote to production. They add more technical debt into the
system with every release, reducing its quality and stability and increasing
unplanned work.
Solution
It's preferable to prevent bugs from progressing through the development process.
This is accomplished by developing automated test harnesses and automatically
failing the build if any of the tests fail. This procedure has been developed with
Continuous Integration (CI) in mind. So, testing should be done as part of the
development process.
There will be an endless debate between priorities and resources if every team
doesn’t follow the same goal. If this trend continues, every DevOps process will be
an unresolved mystery for the rest of the time.
Solution
DevOps tools are applications that support the software development process. Often,
they’re also referred to as DevOps technologies. Their primary focus is to enhance
collaboration through project management and automation. There are several
different types of DevOps tools, a few of which are outlined below:
● Version control tools. Version control software (VCS) is also known as source
control or source code management (SCM). These tools track and manage any
changes made to a software’s code.
● DevOps automation tools. DevOps automation tools remove the burden of
repetitive tasks from the workflow. Some focus on specific processes like
testing or deployment, while others may be end-to-end tools. The term
end-to-end refers to the entire development process, from conceptualization
to deployment and continued monitoring.
● Performance monitoring tools. These DevOps tools monitor the performance
of applications and help manage the infrastructure as a whole. They typically
have robust reporting capabilities and artificial intelligence (AI) for defect
detection.
● Container management tools. In the context of software development, a
container is an application or software that is packaged into a portable
environment. They contain an application’s libraries, frameworks, and any
associated dependencies. Containerization makes it possible to run
applications in various environments independently from the environment’s
operating system (OS). Container management tools enable developers to
package, monitor, and change these distributed applications.
● Configuration management tools. Configuration management is the process
of monitoring and maintaining system functionality. In DevOps,
configuration management helps ensure that all applications and services
perform consistently with expectations.
1. DevOps tools for continuous development (CD)
In the DevOps life cycle, continuous development encompasses the planning and
coding of the software. Two of the most popular DevOps tools for this phase of
development are Jira and Git:
● Jira: Although no specific DevOps tools are required for planning, many
DevOps organizations use Agile project management software like Jira. Agile
project management focuses on continuous releases and incorporating
customer feedback in each iteration. The Jira DevOps template can be an
efficient tool for managing projects, creating workflows, and tracking bugs.
● Git: Git is an open-source version control system, meaning anyone can use it
for free. As mentioned above, version control tools manage the source code of
an application or software. Git is an excellent DevOps tool because it supports
nonlinear workflows and collaboration among programmers. You can bridge
the gap between development and operations with GitHub, a web-based
hosting platform for Git code repositories. It enables further collaboration
through features like support ticket management.
2. DevOps tools for continuous integration (CI) and continuous delivery (CD)
In the DevOps life cycle, continuous testing means that the developed software is
consistently checked for bugs and defects. DevOps automation tools are especially
useful for continuous testing. They allow quality assurance (QA) teams to enhance
the scope of testing through features like automated test execution and parallel
testing across multiple codebases. Selenium and Bamboo are two of the most
relevant continuous testing solutions:
● Selenium: Selenium is another open-source development tool. It’s an
automated testing framework for writing test scripts in commonly used
programming languages such as Java, Python, and C#. It is primarily used to
automate web applications, but you can also use it to automate web-based
administration tasks. Selenium’s versatility provides automation support
across several browsers and operating systems (OS).
● Bamboo: Bamboo is a server-based DevOps tool. It allows users to create
complex build plans and trigger them to start automatically. Bamboo is well
known for its tight integration with Jira and parallel testing capabilities.
Continuous deployment in the DevOps life cycle refers to the phase wherein code is
deployed to the production servers. Since this occurs on an ongoing basis, DevOps
tools that can support fast and frequent deployments are essential. Both container
management tools and configuration management tools can be beneficial for
continuous deployment:
● Docker (container management): A development team can use the Docker
application to package, manage, and execute distributed applications. A few
of Docker’s key functionalities include a standardized packaging format, tight
integration with GitHub, and Docker Hub. Docker Hub encourages
collaboration among DevOps team members by providing a platform for easy
image publishing and access management.
● Ansible (configuration management): Ansible is an open-source automation
platform used primarily for configuration management and infrastructure
orchestration. Its minimalistic nature makes it easy for developers, IT
professionals, and administrators to use. Ansible enables the creation of
machine groups and control of how they will run in production
environments.
Version control systems are a category of software tools that helps in recording
changes made to files by keeping a track of mAs we know that a software product is
developed in collaboration by a group of developers they might be located at
different locations and each one of them contributes to some specific kind of
functionality/features. So in order to contribute to the product, they made
modifications to the source code(either by adding or removing). A version control
system is a kind of software that helps the developer team to efficiently
communicate and manage(track) all the changes that have been made to the source
code along with the information like who made and what changes have been made.
A separate branch is created for every contributor who made the changes and the
changes aren’t merged into the original source code unless all are analyzed as soon
as the changes are green signaled they merged into the main source code. It not only
keeps source code organized but also improves productivity by making the
development process smooth with modifications done in the code.
This command configures the user. The Git config command is the first and
necessary command used on the Git command line. This command sets the
author name and email address to be used with your commits. Git config is
also used in other scenarios.
Syntax
$ git config --global user.name "ImDwivedi1"
Syntax
Syntax
This command is used to add one or more files to staging (Index) area.
Syntax
Git commit -m
This command changes the head. It records or snapshots the file permanently
in the version history with a message.
Syntax
Git commit -a
This command commits any files added in the repository with git add and
also commits any files you've changed since then.
Syntax
$ git commit -a
The status command is used to display the state of the working directory and
the staging area. It allows you to see which changes have been staged, which
haven't, and which files aren?t being tracked by Git. It does not show you any
information about the committed project history. For this, you need to use the
git log. It also lists the files that you've changed and those you still need to
add or commit.
Syntax
$ git status
This command sends the changes made on the master branch, to your remote
repository.
Syntax
Syntax
This is used to receive data from GitHub. It fetches and merges changes on
the remote server to your working directory.
Syntax
Syntax
$ git branch
This command is used to merge the specified branch history into the current branch.
Syntax
$ git log
By default, if no argument passed, Git log shows the most recent commits first. We
can limit the number of log entries displayed by passing a number as an option, such
as -3 to show only the last three entries.
$ git log -3
This is used to connect your local repository to the remote server. This command
allows you to create, view, and delete connections to other repositories. These
connections are more like bookmarks rather than direct links to other repositories.
This command doesn't provide real-time access to repositories.