You are on page 1of 10

DEVOPS

Assignment 1

Q. What are the popular open source / free devOps tools used in Industry? Using diagram describe
how they work together

Ans. The most popular devOps tools are as follows :

 Git : Version Control System tool


 Jenkins : Continuous Integration tool
 Selenium : Continuous Testing tool
 Puppet, Chef, Ansible : Configuration Management and Deployment tools
 Nagios : Continuous Monitoring tool
 Docker : Containerization tool
Given below is a generic logical flow where everything gets automated for seamless delivery.
However, this flow may vary from organization to organization as per the requirement.
1.Developers develop the code and this source code is managed by Version Control System
tools like Git etc.
2.Developers send this code to the Git repository and any changes made in the code is
committed to this Repository.
3.Jenkins pulls this code from the repository using the Git plugin and build it using tools like
Ant or Maven.
4.Configuration management tools like puppet deploys & provisions testing environment
and then Jenkins releases this code on the test environment on which testing is done using
tools like selenium.
5.Once the code is tested, Jenkins send it for deployment on the production server (even
production server is provisioned & maintained by tools like puppet).
6.After deployment It is continuously monitored by tools like Nagios.
7.Docker containers provides testing environment to test the build features.
Assignment 2
1. Name a few Git commands and explain their usage:

2. How to resolve a conflict in Git?


The following steps will resolve conflict in Git-
 Identify the files that have caused the conflict.
 Make the necessary changes in the files so that conflict does not arise again.
 Add these files by the command git add.
 Finally to commit the changed file using the command git commit

3. In Git how do you revert a commit that has already been pushed and made public?
There can be two approaches to tackle this question and make sure that you include both because
any of the below options can be used depending on the situation:
Remove or fix the bad file in a new commit and then push it to the remote repository. This
is the most obvious way to fix an error. Once you have made necessary changes to the file,
then commit it to the remote repository using the command: git commit -m “commit
message”

Also, you can create a new commit that undoes all changes that were made in the bad
commit. To do this use the command

git revert <name of bad commit>


4. What is the difference between git pull and git fetch?

Git pull command pulls new changes or commits from a particular branch from your central
repository and updates your target branch in your local repository.

Git fetch is also used for the same purpose but it works in a slightly different way. When you
perform a git fetch, it pulls all new commits from the desired branch and stores it in a new branch in
your local repository. If you want to reflect these changes in your target branch, git fetch must be
followed with a git merge. Your target branch will only be updated after merging the target branch
and fetched branch. Just to make it easy for you, remember the equation below:

Git pull = git fetch + git merge 

Assignment 3

Q. Creating your first Pipeline using Jenkins pipeline

1. JenkinsFile
2.Jenkins Dashboard showing the various Pipelines created

3.Scanning the desired repository to reflect any changes made in pull and branch requests
Assignment 4

Docker Networking – Explore How Containers Communicate

With Each Other


Assignment 5

1. What is configuration management in terms of infrastructure and mention a few popular tools
used?

Configuration management consists of practices and the various tools involved to automate the
delivery and infrastructure operations. It is all about keeping the server ready (Example Installing
system packages, network configuration settings) for application deployment once the application is
developed.

So the Ops or the system admin needs to ensure parity in different environments (Dev, QA, PROD,
etc…) by provisioning the systems.

Tools Used in this space to automate the tasks of configuration management described above
are Chef / Puppet / Ansible

2. What is CMDB, explain in detail

The Configuration Management Database (CMDB) comes from the Information Technology


Infrastructure Library (ITIL) service management framework. The CMDB is a repository of various
infrastructure devices, applications, databases, and services. Not just an inventory, it also bears
relationships between the various elements within the CMDB, as illustrated in Figure 3.

Figure 3: CMDB Illustration


In the figure above, services, applications, databases, and servers are represented by the different
colored boxes. In the illustration, Service 1 depends on Application A, as seen by the arrow
relationship. Application A leverages on Database 1. Both the Application A and Database 1 reside
on Server A.
In a real CMDB, however, the arrows mean something different from the relationships as described.
For example, an application generally makes use of a database — this is the relationship between
the two entities. An application residing on a server leads to a dependent on relationship. The
relationship around data flow between applications (indicated between Application B and
Application C) is one of data dependency.
CMDB for Change Management
The CMDB is particularly useful when you are trying to make a change to any of the applications,
databases or servers.
Let’s say you want to make a change to Application B. To make the change, you must first do an
impact assessment. CMDB helps in performing impact assessments. In the illustration, suppose
changes are done to Application B. The impact assessment will read that any changes done to
Application B will impact Application C, as the data is flowing through it.
Today, software development seldom happens in isolation. The software to be developed is either an
improvement over existing code or is getting plugged into an enterprise network of applications.
Therefore, it is critical that the impacts are assessed to the tee and CMDB is a significant help in
this area.
CMDB for Provisioning Environments
Another application of CMDB in DevOps is in environment provisioning. Today we can spin up
environments on the go with tools like Ansible in our scripts. When you key in the exact
configuration of the production server, the environment provisioning tools create a prod-like server
in a snap of a finger.
But how is it that you are going to obtain the complete configuration of a server? The most
straightforward way is to refer to a CMDB.
Let’s say Server C is a production server that needs to be replicated. In the CMDB, the server C
entry will provide the complete configuration of the server, which is an immense help in scripting
provisioning scripts such as Playbooks (compatible with Ansible.)
CMDB for Incident Management
The CMDB also has other benefits such as supporting the incident management teams during
incident resolutions. The CMDB readily provides the architecture of applications and infrastructure,
which is used to troubleshoot and identify the cause of the issue.

You might also like