Apoorva 3rd sem IT Report
Apoorva 3rd sem IT Report
Report
Of
Industrial Training
On
“DEVOPS WITH CLOUD COMPUTING”
i
CERTIFICATE
This is to certify that the industrial training entitled “DevOps and Cloud Computing”
is bonafide work carried out by Apoorva Agarwal a student of BTech.in Computer
Science & Engineering at Jaipur Engineering College and Research Centre, during
the year 2021-22 in partial fulfillment of the requirements for the award of the Degree
of Bachelor of Technology in Computer Science & Engineering under my guidance.
Designation : Trainer
Place : Jaipur
PSO1: Ability to interpret and analyze network-specific network purity issues, and
automation in the environment
PSO2: Ability to design and develop mobile and web-based applications under
realistic constraints.
3CS7-30 CO-1 3 3 2 2 2 1 1 2 2 3 3 3
It has been a great honour and privilege to undergo training at UPFLAIRS. I am very
grateful to Mr. Aakash Sir for giving his valuable time and constructive guidance in
preparing the report for training. It would not have been possible to complete this report
in a short period of time without their kind encouragement and valuable guidance.
I wish to express our deep sense of gratitude to our Industrial Training Guide Ms.
SNEHA GARG, Jaipur Engineering College and Research Centre, Jaipur for guiding
us from the inception till the completion of the industrial training. We sincerely
acknowledge him for giving his valuable guidance, and support for the literature survey,
critical reviews, and comments for our industrial training.
I would like, first of all, express our thanks to Mr. Arpit Agrawal Director of JECRC,
for providing us with such a great infrastructure and environment for our overall
development.
I express sincere thanks to Dr. V. K. Chandna, Principal of JECRC, for his kind
cooperation and extendible support towards the completion of our industrial training.
Words are inadequate in offering our thanks to Dr. Sanjay Gaur, HOD of the CSE
department, for consistent encouragement and support for shaping our industrial
training in the presentable form.
Also our warm thanks to Jaipur Engineering College and Research Centre, who
provided us with this opportunity to carry out this prestigious industrial training and
enhance our learning in various technical fields.
viii
ABSTRACT
5. Training Days: 20
7. Project: Create a Jenkins container using Docker file and that image also have
docker support itself.
8. Project Description:
DevOps is a collaboration of development and operations devised to stress on
communication and integration between them. The main use of DevOps is to help an
organization grow and excel. With its, help an organization can produce software
products and services. Companies are focusing on the automation of processes this way
timely delivery and quality results are achieved. Getting the workforce trained with the
latest technologies and getting optimum work for them have become the need of the
hour. Problems can be more easily solved by this software development method.
Documented processes could be devised by it and processes could be made user-
friendly. DevOps benefits IS development and operations performance. It also has
positive effects on web service development and quality assurance performance.
Companies are focusing on the automation of processes this way timely delivery and
quality results are achieved. Getting the workforce trained with the latest technologies
ix
and getting optimum work for them have become the need of the hour. Problems can
be more easily solved by this software development method.
9. Keywords: Linux Cloud, GIT, AWS, Shell, command Prompt, IP, Instance,
Hypervisor, Container, Plugins, Console, SSH, AMI, Localhost.
x
LIST OF FIGURES
Figure 1 Introduction-------------------------------------------------------------------------13
Figure 2 DevOps-------------------------------------------------------------------------------13
Figure 3 Linux Installation------------------------------------------------------------------14
Figure 4 GIT Workflow ---------------------------------------------------------------------29
Figure 5-12 Project----------------------------------------------------------------------------36
LIST OF TABLES
Certificate---------------------------------------------------------------------------------------- ii
Vision and Mission-----------------------------------------------------------------------------iii
Program Outcomes (POs)--------------------------------------------------------------------iv
Program Education Objectives (PEOs) ----------------------------------------------------v
Program Specific Outcomes (PSOs)-------------------------------------------------------vii
Course Outcomes (Cos)----------------------------------------------------------------------vii
Mapping: Cos and Pos------------------------------------------------------------------------vii
Acknowledgement----------------------------------------------------------------------------viii
Abstract------------------------------------------------------------------------------------------ix
List of Figures-----------------------------------------------------------------------------------xi
List of Tables-----------------------------------------------------------------------------------xii
INTRODUCTION------------------------------------------------------------------------------1
1) LINUX-----------------------------------------------------------------------------------2
1.1)1. Architecture of Linux System----------------------------------------------2
1.2) Basic Commands-----------------------------------------------------------------4
1.3) Visual Editor----------------------------------------------------------------------6
1.4) User Management----------------------------------------------------------------7
1.5) Permissions------------------------------------------------------------------------8
2) CLOUD COMPUTING-------------------------------------------------------------11
2.1) Introduction----------------------------------------------------------------------11
2.2) Virtualization--------------------------------------------------------------------12
2.3) AWS EC2 Instance-------------------------------------------------------------12
2.4) Hypervisor-----------------------------------------------------------------------13
2.5) Installing Apache2--------------------------------------------------------------13
3) DOCKER------------------------------------------------------------------------------14
3.1) Introduction----------------------------------------------------------------------14
3.2) Installation-----------------------------------------------------------------------14
3.3) Docker Commands--------------------------------------------------------------15
4) GIT--------------------------------------------------------------------------------------17
4.1) Introduction----------------------------------------------------------------------17
4.2) GIT Workflow-------------------------------------------------------------------17
5) JENKINS------------------------------------------------------------------------------18
5.1) Introduction----------------------------------------------------------------------18
5.2) Installations----------------------------------------------------------------------19
5.3) Freestyle Job Creation---------------------------------------------------------19
6) KUBERNETES-----------------------------------------------------------------------20
6.1) Introduction----------------------------------------------------------------------20
6.2) Architecture----------------------------------------------------------------------21
6.3) Basic Commands----------------------------------------------------------------22
7) PROJECT-----------------------------------------------------------------------------23
9) REFERENCES-----------------------------------------------------------------------29
INTRODUCTION
DevOps is the combination of cultural philosophies, practices, and tools that increase
an organization’s ability to deliver applications and services at high velocity: evolving
and improving products faster than organizations using traditional software
development and infrastructure management processes. This speed enables
organizations to better serve their customers and compete more effectively in the
market.
Figure 1
It aims to shorten the systems development life cycle and provide continuous
delivery with high software quality
Figure 2
Cloud computing is the on-demand delivery of IT resources through the internet with
pay-to-use charges. Instead of buying and maintaining computer products and services,
you can pay to use a cloud computing service. It saves you the time, effort, and cost of
doing it all by yourself. Cloud computing services can be broken down into three
models that stack on top of one another.
1
1) LINUX
iii) Architecture
The Linux operating system's architecture mainly contains some of the
components such as the Kernel, System Library, Hardware layer,
System, and Shell.
Figure 3
2
b) Kernel - The kernel is one of the core sections of an operating system. It is
responsible for each of the major actions of the Linux OS. This operating
system contains distinct types of modules and cooperates with underlying
hardware directly. The kernel facilitates the required abstraction for hiding
details of low-level hardware or application programs in the system.
c) Shell –Is an interface between the kernel and the user. It can afford the
services of kernel. It can take commands through the user and runs the
functions of the kernel. There are a few types of these shells which are
categorized as follows:
▪ KSH Shell (Korn)
▪ C Shell
▪ TCSH Shell
▪ Games: Several games are developed for Windows but unfortunately not for
Linux. Because the platform Windows is used widely. So, the developers of the
games are more interested in windows.
▪ Software Alternative: Let's take Photoshop example which is a famous tool for
graphic editing. Photoshop exists for Windows; however, it is not available for
Linux.
▪ Hardware Drives: Most of the users of Linux face an issue while using Linux.
Various companies of hardware prefer to build drivers for Mac or Windows.
▪ Learning Curves: Linux isn't a very user-friendly operating system. Hence, it
might be confusing for many beginners.
3
vi) Linux Operating System Applications
▪ Yamaha Motive Keyboard
▪ Volvo In-Car Navigation System
▪ Lenovo Idea Pad
▪ Sony Reader
▪ Sony Bravia Television
a) pwd command:
Use the pwd command to find the path of your current working
directory. Simply entering pwd will return the full current path – a path
of all the directories that starts with a forward slash (/).
For example, /home/username.
b) cd command:
To navigate through the Linux files and directories, use
the cd command.
Here are some shortcuts to help you navigate:
▪ cd .. moves one directory up.
▪ cd- moves to your previous directory.
c) ls command:
The ls command lists files and directories within a system
▪ ls -a shows hidden files in addition to the visible ones.
▪ ls -lh shows the file sizes in an easily readable format.
d) mkdir command:
Use the mkdir command to create one or multiple directories at once
and set permissions for each of them.
4
mkdir directoryName
e) touch command:
The touch command allows you to create an empty file at a current
working location without changing the path.
touch FileName
To create a blank file with desired location one needs to enter the path
for the same.
touch /home/username/Documents/FileName
f) cat command:
Concatenate, or cat is one of the most frequently used Linux commands
that creates a file with text. To run the cat command, type cat followed
by the file name.
cat > FileName cat >>FileName cat FileName
TABLE 1
g) echo command:
The echo command is a built-in utility that displays a line of text or
string using the standard output.
echo [option] [string]
echo hello prints hello as output
echo $PATH prints the current working path
h) alias command :
the alias allows you to create a shortcut with the same functionality as
a command, file name, or text.
5
alias Alternative Name =” Command Name”
i) rm/rmdir command:
The rm command is used to delete files within a directory.
rm filename
To permanently delete an empty directory, use the rmdir command.
rmdir directory name
j) history command:
With history, the system will list up to 500 previously executed
commands, allowing you to reuse them without re-entering.
k) ping command:
The ping command is one of the most used basic Linux commands for
checking whether a network or a server is reachable.
Vim is an advanced and highly configurable text editor built to enable efficient
text editing. Vim text editor is developed by Bram Moolenaar. To open a file in
vim editor just write the file name after the vim command in the terminal as
follows
vim FileName
i) Modes
• Command Mode where the characters are interpreted as commands.
• Insert Mode(i) where everything is inserted into file as text.
6
iii) Saving and Exiting
A user is an entity, in a Linux operating system, that can manipulate files and
perform several other operations. Each user is assigned an ID that is unique for
each user in the operating system.
A user account is used to provide security boundaries between different people
and programs that can run commands. Each user is assigned an ID that is unique
for each user in the operating system.
7
Using the passwd command to assign a password to a user. After using
this command, we have to enter the new password for the user and then
the password gets updated to the new password.
passwd username
v) usermod command
vi) This command can change the user ID of a user. Or the group ID of a
user can be used to change the user's login name. The old login name of
the user is changed to the new login name provided.
1.5) PERMISSIONS
The first character will almost always be either a ‘- ‘, which means it’s a file, or
a ‘d’, which means it’s a directory.
The next nine characters (rw-r–r–) show the security.
The next column shows the owner of the file.
The next column shows the group owner of the file.
8
The next column shows the size of the file in bytes.
The next column shows the date and time the file was last modified. And, of
course, the final column gives the filename.
The second way to modify permissions with the chmod command is to use
a number to specify each set of permissions for the file.
r-------- 4
w--------2
x-------- 1
permission 750 → Indicates permission given as
• 7 for user (4+2+1) → r,w and x
9
• 5 for group (4+1) → r and x
• 0 for user → no permission
chmod octal_permission filename
Two commands are available to change the owner and the group of files −
• chown − The chown command stands for "change owner" and is used
to change the owner of a file.
chown username: file
• chgrp − The chgrp command stands for "change group" and is used to
change the group of a file.
10
2) CLOUD COMPUTING
2.1) INTRODUCTION
11
2.1) VIRTUALIZATION
12
2.3) HYPERVISOR
TYPES OF HYPERVISORS
a) Type A(Native):
A type 1 hypervisor acts like a lightweight operating system and runs
directly on the host’s hardware.
Eg. VMware ESX, Microsoft Hyper-V, Oracle VM
b) Type B(Host):
Like other computer programs, a type 2 hypervisor runs as a software layer
on an operating system.
Eg. VMware Workstation, Oracle Virtual Box, Microsoft Virtual PC
13
3) DOCKER
3.1) INTRODUCTION
14
i) Pull command:
The 'docker pull' is a Docker command to download a Docker image or a
repository locally on the host from a public or private registry.
docker pull <imageName>
v) Docker ps Command:
This command is used to see the running containers.
x) Exec Command
To get access to the running container and go inside it.
16
4) GIT
4.1) INTRODUCTION
Figure 4
17
5) JENKINS
5.1) INTRODUCTION
ADVANTAGES:
• It is an open-source tool with great community support.
• It is easy to install.
• It has 1000+ plugins to ease your work. If a plugin does not
exist, you can code it and share it with the community.
• It is free of cost.
TABLE 2
18
5.2) JENKINS INSTALLATIONS
i. apt update
ii. apt install docker.io -y
iii. systemctl start docker
iv. systemctl enable docker
v. systemctl status docker
vi. docker version
vii. docker pull jenkins/jenkins
viii. Run jenkins container with docker command ability:
docker run -itd -v v1:/var/jenkins_home -v
/run/docker.sock:/run/docker.sock-v
/usr/bin/docker:/bin/docker -p 8080:8080 -p 50000:50000
jenkins/jenkins
ix. To check whether a container is running or not:
docker ps
x. Give all permission for running docker sock
chmod 777 /run/docker.sock
i) Login to Jenkins
ii) Create New Item
iii) Enter Item details
iv) Enter Project details
v) Enter repository URL
vi) Tweak the settings
vii) Save the project
19
6) KUBERNETES
6.1) INTRODUCTION
i) WHAT IS KUBERNETES?
• A highly collaborative open-source project originally
conceived by Google.
• Google has 10+ years of experience with containerized apps.
• Red Hat has been a member since the start.
• Red Hat is the second largest contributor member with many
ideas coming from years.
• Sometimes called ‘Kube’
• Start, stop, update, and manage a cluster of machines running
containers in a consistent and maintainable way.
ii) ADVANTAGES
• Container orchestration savings
• Increased DevOps efficiency for micro services architecture
• Deploying workloads in multi-cloud environments
• More portability with less chance of vendor lock-in
• Automation of deployment and scalability.
b) Etcd:
Consistent and highly-available key value store used as Kubernetes' backing
store for all cluster data. If your Kubernetes cluster uses etcd as its backing
store, make sure you have a backup plan for those data.
c) Kube-scheduler
Control plane component that watches for newly created Pods with no
assigned node, and selects a node for them to run on.
d) kube-controller-manager
Control plane component that runs controller processes.
Logically, each controller is a separate process, but to reduce complexity,
they are all compiled into a single binary and run in a single process.
e) cloud-controller-manager
A Kubernetes control plane component that embeds cloud-specific control
logic. The cloud controller manager lets you link your cluster to your cloud
provider's API, and separates out the components that interact with that
cloud platform from components that only interact with your cluster. The
cloud controller manager only runs controllers that are specific to your cloud
provider. If you are running Kubernetes on your own premises, or in a
learning environment inside your own PC, the cluster does not have a cloud
controller manager.
21
a) Kubelet
An agent that runs on each node in the cluster. It makes sure
that containers are running in a Pod.
b) Kube-proxy
Kube-proxy is a network that runs on each node in the cluster,
implementing part of Kubernetes.
c) Container Runtime
The container runtime is the software that is responsible for running
containers.
d) Addons
Addons use Kubernetes resources (Daemon Set, Deployment, etc.) to
implement cluster features. Because these are providing cluster-level
features, namespace resources for addons belong within the kube-
system namespace.
22
7) PROJECT
Problem Statement:
Create a Jenkins container using Docker file and that image also have docker support
itself.
Description:
In the real world there are separate environment for image building and container
deploy so you have to manage the same.In overall terms you have to create one docker
image that will offer below given things whenever you create container from this image.
1.You have to make use of docker file or any relevant method to create this image.
2. The image must have docker file support of Jenkins, SSH, HTTPD and docker also
3.That means whenever you create a container from it all above services must be
available automatically.
4. Once the test is done you have to push this image to docker hub on your personal
account
TECH and AMP: proto:
1.AWS ec2 instance
2.Docker and AMPContainers
3. Docker file
4. Docker Hub
23
SCREENSHOTS OF PROJECT
Figure 5
GIT Repository
Figure 6
24
Figure 7
Figure 8
Docker File
Figure 9
25
GIT Clone
Figure 10
Figure 11
26
Image pull
Figure 12
Now run docker command.
27
8) FUTURE SCOPE AND CONCLUSION
In today’s world, everything happens over the internet. Most companies are changing
to be like IT company that provides some particular services.
For every company, its software is the critical element that brings in sales and business.
Hence automation of software deployment and infrastructure provisioning is key to all
modern businesses. It plays a crucial role in improving efficiency and bringing out the
best software. DevOps methodologies thus play a significant role in all modern
companies today.
Automation of the software is becoming important to companies, there are many
advantages attached to it, for example, the reduction in errors. In manual functioning,
there are lot many scopes for errors that are human-induced and those errors become a
setback to the process where the time, cost, or resources are over utilized. But
automation reduces the scope of an error where it saves time, effort, and cost, and utilize
the resources well and in the end, it enhances the productivity of the team.
The sole aim of DevOps is to accelerate the process of app production. Moreover, the
DevOps lifecycle is all about continuity and consistency. It drives the entire production
process through continuous integration, development, feedback, monitoring, testing,
delivery, and deployment.
In order to make the journey to the cloud smooth, efficient, and effective, technology
companies should embrace DevOps principles and practices. These principles are
embedded in the AWS platform. Indeed, they form the cornerstone of numerous AWS
services, especially those in the deployment and monitoring offerings.
28
9) REFERENCES
• https://www.nginx.com/resources/glossary/load-balancing/
• https://www.vmware.com/topics/glossary/content/hypervisor.html#:~:text=A
%20hypervisor%2C%20also%20known%20as,such%20as%20memory%20an
d%20processing.
• https://www.javatpoint.com/what-is-data-center-in-cloud-computing
• https://www.edureka.co/blog/what-is-aws/
• https://www.vmware.com/in/solutions/virtualization.html#:~:text=Virtualizati
on%20relies%20on%20software%20to,of%20scale%20and%20greater%20eff
iciency.
• https://azure.microsoft.com/en-in/resources/cloud-computing-dictionary/what-
is-cloud-computing/#uses
• https://www.digitalocean.com/community/tutorials/apache-web-server-
dockerfile
• https://docs.docker.com/engine/reference/builder/#:~:text=A%20Dockerfile%
20is%20a%20text,command%2Dline%20instructions%20in%20succession.
• https://www.digitalocean.com/community/tutorials/how-to-install-and-use-
docker-on-ubuntu-18-04
• https://www.suse.com/c/rancher_blog/an-introduction-to-
containers/#:~:text=Containers%20are%20an%20operating%20system,many
%20different%20types%20of%20infrastructure.
• https://www.geeksforgeeks.org/introduction-to-docker/?id=discuss
• https://www.geeksforgeeks.org/introduction-to-sshsecure-shell-keys/
• https://maker.pro/linux/tutorial/basic-linux-commands-for-beginners
29