Devops Tools
Devops Tools
DEVOPS Tools
Confidential Copyright ©
2
Devops ?
Confidential Copyright ©
3
Devops ?
What is Agile ?
●Software development methodology.
●Centered round the idea of iterative and incremental development
Devops ?
What is DevOps
Devops ?
What is DevOps
Devops
DevOps is a combination of certain culture strategies, dedicated
practices and tools that help companies accelerate the process
of creating applications and services.
Confidential Copyright ©
7
Linux
Confidential Copyright ©
8
Linux
A Linux operating system, often simply called "Linux," is a Unix-like
operating system. It is software that acts as an interface between the user
and computer hardware. Linux is known for its stability, security, and
flexibility, and it is widely used worldwide, both on servers and desktops.
Confidential Copyright ©
9
Linux
Confidential Copyright ©
10
Linux
● /bin: This folder contains essential binary files necessary for system
boot. It includes basic commands required for system recovery in case
of a problem.
● /boot: The "boot" folder contains files necessary for the system boot
process, such as the Linux kernel and bootloader configuration files
(like GRUB).
● /etc: The "etc" folder contains most of the system configuration files. It
includes subfolders for system configurations, startup scripts, network
files, log files, and more.
Confidential Copyright ©
11
Linux
● /home: The "home" folder contains users' personal directories. Each
user has their own subdirectory in "/home" where they can store
personal files.
● /lib and /lib64: These folders contain shared libraries (shared code files)
required by system programs and third-party applications.
● /media: The "media" folder is used to temporarily mount removable
storage devices, such as USB drives or CDs/DVDs.
Confidential Copyright ©
12
Linux
● /root: The "root" folder is the home directory of the superuser (root).
● /srv: The "srv" folder is intended to store service-specific data for the system, often used by
servers.
● /tmp: The "tmp" folder is used for temporary file storage by applications and users. Files
may be automatically deleted after a certain period.
● /usr: This folder contains the majority of system programs and files, including binaries,
libraries, headers, and documentation.
● /var: The "var" folder contains system variable data, such as system logs, database files,
and temporary files.
Confidential Copyright ©
13
Linux
● ls: Lists files and directories in the current directory. For example, ls -l displays a
detailed list.
● cd: Changes the current directory. For example, cd /folder moves to the specified folder.
● pwd: Displays the full path of the current directory.
● mkdir: Creates a new directory. For example, mkdir my_folder creates a directory named
"my_folder."
● touch: Creates a new empty file or updates the modification date of an existing file. For
example, touch my_file.txt creates an empty file named "my_file.txt."
Confidential Copyright ©
14
Linux
● rm: Deletes files or directories. For example, rm file.txt deletes the file "file.txt." Use with
caution, as this action can be irreversible.
● cp: Copies files and directories. For example, cp file.txt folder/ copies "file.txt" into the
specified folder.
● mv: Moves or renames files and directories. For example, mv file.txt new_name.txt
renames the file.
● cat: Displays the contents of a file. For example, cat my_file.txt shows the file's content.
● more or less: Allows you to scroll through a file's content page by page.
● grep: Searches for patterns in text. For example, grep pattern file.txt searches for the
pattern in the file.
● head and tail: Display the first or last lines of a file, respectively.
Confidential Copyright ©
15
Linux
● chmod: Modifies file and directory permissions. For example, chmod +x script.sh grants
execution permission to the script.
● chown: Changes the owner of a file or directory. For example, chown user:group file.txt
changes the file's owner and group.
● ps: Displays a list of running processes.
● kill: Sends a signal to a process to terminate it. For example, kill -9 PID forcefully stops the
process with the specified PID.
● df: Displays disk space usage.
● du: Shows disk space usage of a directory.
● tar: Archives or extracts files and directories.
● ssh: Connects to a remote computer using the SSH protocol.
● wget or curl: Downloads files from the Internet via the command line.
Confidential Copyright ©
16
Linux
—> Ubuntu (sys administration): https://pastebin.com/raw/DWPRAn98
——>
Confidential Copyright ©
17
Confidential Copyright ©
18
Docker Engine
Components
Confidential Copyright ©
19
Image Registries
Confidential Copyright ©
20
Building Container
Images
● Create a Dockerfile that describes the application, its dependencies, and how to run
it.
● WORKDIR, EXPOSE, ENTRYPOINT result in tags. Others in Layers.
Confidential Copyright ©
21
Available commands
Confidential Copyright ©
22
Examples docker
Confidential Copyright ©
23
Commands docker
Confidential Copyright ©
24
Commands docker
● Run an image with assigning container name, pseudo-TTY and latest version of
image:
docker run --name alpine1 -it alpine:latest
● Run an image in background (daemon):
docker run -d nginx:latest
● Execute a command on the container :
docker exec -t alpine1 cat /etc/os-release
● Interact with container (shell)
docker exec -it alpine1 sh
Confidential Copyright ©
25
Commands docker
● Stop a container :
docker stop alpine1
● Remove one or more stopped container :
docker rm alpine1
● Remove all stopped containers :
docker container prune
● Remove unused images
docker image prune
● Send the default KILL signal to the container
docker kill 067f4b9e2eda
Confidential Copyright ©
26
Commands docker
● provide better isolation and interoperability between containerized applications
● provide automatic DNS resolution between containers. Containers can be attached and detached from
user-defined networks on the fly.
-> Commands :
nginx:latest
Commands docker
Volumes created and managed by Docker.
– Store your container’s data on a remote host or a cloud provider, rather than
locally.
– Back up, restore, or migrate data from one Docker host to another.
● Commands :
– docker volume ls
Dockerfile
● Docker can build images automatically by reading the instructions from a Dockerfile.
● A Dockerfile is a text document that contains all the commands a user could call on
the command line to assemble an image.
● Docker can build images automatically by reading the instructions from a Dockerfile.
Confidential Copyright ©
29
– RUN <command> (shell form, the command is run in a shell, which by default is
/bin/sh -c on Linux or cmd /S /C on Windows)
Confidential Copyright ©
30
Dockerfile exp
FROM ubuntu
# Setup a password
# Autostart firefox (might not be the best way, but it does the trick)
EXPOSE 5900
Confidential Copyright ©