Day '0' DevOps Ebook - v1.0
Day '0' DevOps Ebook - v1.0
DEVOPS GUIDE
https://www.techopsexamples.com/
Table of Contents
Introduction 4
Target Audience 4
Resources 4
Linux Fundamentals 5
Networking Concepts 23
Database Concepts 37
Security Concepts 43
Storage Concepts 52
Understanding Cache 61
Introduction
Target Audience
This guide is for:
Beginners who want to understand the needed
fundamentals before getting into DevOps tools.
Resources
To discover real-world use cases, tech updates, and
learning resources, check out:
Linux Fundamentals
Key Concepts:
Basic Linux commands (ls, cp, mv, rm, etc.)
File system hierarchy (/, /home, /etc, /var, etc.)
Permissions and ownership (chmod, chown etc.)
Processes and signals (ps, top, kill etc.)
Package management (apt, yum)
Networking commands (ifconfig, ping, netstat, curl,
wget etc.)
Disk management (df, du, fdisk, mount, umount etc.)
User and group management (adduser, deluser,
usermod, groupadd)
Command
Description Typically used when
/Concept
Creates an empty
file or updates the Creating files or
touch
timestamp of an modifying timestamps.
existing file.
Changes file or
chmod directory permissions chmod 755 file.txt
(r, w, x).
Changes group
chgrp group
chgrp ownership of a file or
file.txt
directory.
Sets default
umask permissions for new umask 022
files or directories.
Displays a snapshot of
ps ps aux
running processes.
Provides real-time
top system process top
monitoring.
Sends a signal to
kill terminate a process by kill 1234
its process ID (PID).
Terminates all
killall processes with a killall apache2
specific name.
An interactive process
htop viewer with more htop
features than top.
Networking commands
Sends packets to a
ping google.com
remote host to test
ping (tests connection
connectivity and
to Google)
latency.
Displays network
netstat -an (shows
connections, routing
netstat active
tables, and listening
connections)
ports.
Networking commands
curl
Transfers data from or
https://api.exampl
curl to a server, often used
e.com (gets API
to test APIs.
response)
wget
Downloads files from
https://example.co
wget the web, commonly
m/file.zip
used in scripts.
(downloads a file)
nslookup
Queries DNS to find the
example.com
nslookup IP address of a domain
(finds IP of
or vice versa.
domain)
traceroute
Traces the route
example.com
traceroute packets take to a
(shows the hops
network host.
to the destination)
Disk management
Manipulates disk
fdisk partitions on a storage fdisk /dev/sda
device.
sudo usermod -
Modifies an existing aG sudo john
usermod
user account. (adds "john" to
the sudo group)
Displays group
groups groups john
memberships of a user.
Networking Concepts
Key Concepts:
IP addressing and subnetting (IPv4, IPv6)
DNS and DHCP
Load Balancers
Network protocols (HTTP, HTTPS, FTP, SSH, etc.)
IP Addressing:
An IP (Internet Protocol) address is a unique identifier for
devices on a network. It allows computers, servers, and
other devices to communicate over a network.
Subnetting
Subnetting divides a large network into smaller, more
manageable sub-networks (subnets). It improves
efficiency, enhances security, and helps with IP
address management.
CIDR Notation
Classless Inter-Domain Routing (CIDR) is a method
for assigning IP addresses and specifying subnet
masks more flexibly.
IPv6 Subnetting
IPv6 also uses subnetting, but due to its vast address
space, subnets are much larger. CIDR notation works
similarly, but with IPv6, the most common subnet size
is /64.
DNS Process:
1. The DNS client requests the IP address of a
hostname (e.g., Server1).
2. The DNS server replies with the corresponding IP
address.
credit: CCNA
DHCP Process:
1. The client sends a DHCP Discover message to find
DHCP servers.
2. Servers respond with DHCP Offer messages.
3. The client accepts the first offer and sends a DHCP
Request.
4. The server confirms with a DHCP Acknowledgment
(including lease info).
credit: CCNA
Load Balancers
A load balancer distributes network or application traffic
across multiple servers to enhance the capacity,
performance, and reliability of applications. It improves
scalability, security, and user experience by managing
traffic efficiently.
Load Balancers
Load balancers use various algorithms to determine how
traffic is distributed:
Round Robin: Distributes requests equally across all
servers in sequence.
Weighted Round-Robin: Assigns more requests to
servers with higher capacity, distributing based on
server strength.
Least Connections: Directs traffic to the server with
the fewest active connections.
Least Response Time: Sends requests to the server
that has the fastest response time.
Load Balancers
Network protocols
Network protocols
Network protocols
Network protocols
The private key stays with the user (client), while the
public key is placed on the server. During connection, the
server verifies the private key, allowing secure access.
Database Concepts
Key Concepts:
ACID Properties
Scalability
Data Modeling
SQL vs. NoSQL
Database Concepts
ACID Properties:
ACID stands for Atomicity, Consistency, Isolation, and
Durability.
Database Concepts
Database Concepts
Database Concepts
SQL vs NoSQL
Flexible, semi-
Structured tables structured or
Data Model
(rows and columns) unstructured data
(e.g., JSON)
Dynamic schema,
Fixed schema,
Data Model allows flexible data
strict relationships
formats
Supports BASE
(Basically Available,
Supports ACID
Transactions Soft-state, Eventual
properties
consistency)
transactions
MySQL,
MongoDB,
Examples PostgreSQL,
Cassandra, Redis
Oracle
Database Concepts
Choose SQL:
When your data has a well-defined structure (rows
and columns).
When transactions need ACID compliance, ensuring
data reliability.
For applications that involve complex queries, like
relational data analysis (e.g., banking, ERP systems).
Choose NoSQL:
When dealing with large volumes of unstructured or
semi-structured data.
When you need high scalability and availability across
distributed systems.
For use cases where flexible schemas or rapid
development cycles are needed (e.g., social media
platforms, IoT applications).
Security Concepts
Key Concepts:
Encryption
Authentication
Authorization
OWASP Top 10
Security Concepts
Encryption
Security Concepts
Security Concepts
Authentication is the process of verifying the identity of a
user or system before granting access. It ensures only
authorized users can access sensitive data or systems,
preventing unauthorized breaches.
1. SSH Keys
SSH keys use public-private key pairs to authenticate a
client with a server. The client uses the private key, and
the server verifies it using the public key stored on the
server. This method provides secure, passwordless login
for remote access.
Security Concepts
2. OAuth Tokens
OAuth is an authorization protocol where a client requests
an access token from an authorization server using its
client ID and client secret.
Security Concepts
3. SSL Certificates
SSL certificates are used to establish a secure connection
between a client and a server. The client receives the
server's SSL certificate and verifies its validity, authority,
and domain. Once validated, the client and server
exchange encrypted keys for secure communication.
Security Concepts
4. Credentials
Traditional username-password authentication. The client
submits credentials (username and password) over an
encrypted HTTPS connection, and the server verifies the
credentials by looking them up in the user database. If
matched, access is granted.
Security Concepts
Authorization is the process of determining what actions
or resources an authenticated user is permitted to access.
It is essential for security as it ensures users can only
perform actions or view data they are allowed to,
protecting sensitive information and preventing misuse.
Confirms the
Controls what the
Purpose user is who they
user is allowed to do
claim to be
Credentials
Permissions and
Involves (passwords,
roles
keys, tokens)
Security Concepts
OWASP (Open Web Application Security Project) is a
global non-profit organization focused on improving web
application security. It provides free, accessible resources
like documentation, tools, and the well-known OWASP
Top 10 list, which highlights the most critical security risks
in web applications.
Storage Concepts
Key Concepts:
Block Storage
Object Storage
File Storage
SSD vs. HDD
Storage Concepts
Block Storage divides data into fixed-size blocks. Each
block operates independently and can be stored across
different environments. This storage type is typically used
for databases, virtual machines, and high-performance
applications.
Storage Concepts
SSD vs HDD
Key Concepts:
RTO (Recovery Time Objective)
RPO (Recovery Point Objective)
Backup and Restore
Pilot Light
Warm Standby
Multi-site
Understanding Cache
Key Concepts:
How Cache works?
Cache Hit Vs Cache Miss
In-memory Caches (Redis, Memcached)
Understanding Cache
WHow Cache works?
Understanding Cache
In-memory caches store data in the system's RAM,
offering rapid access to frequently used data, which
significantly boosts performance. They're essential for
applications requiring low-latency data retrieval.
Understanding Cache
Redis is an in-memory data structure store that not only
offers caching but also supports advanced data
manipulation operations. Redis is known for its flexibility
and persistence options, making it a powerful choice for
more complex use cases. Here’s what makes Redis stand
out:
Advanced Data Structures: Redis supports a variety
of data types like strings, lists, sets, and hashes,
allowing more complex operations beyond simple key-
value caching.
Persistence Options: Unlike Memcached, Redis
offers persistence through snapshotting and AOF
(Append Only File), ensuring data survives restarts.
Replication and Clustering: Redis supports master-
slave replication and automatic failover through
clustering, making it a good fit for high availability.
Pub/Sub and Scripting: Redis also supports pub/sub
messaging and Lua scripting, making it highly
versatile for use cases like real-time analytics,
leaderboards, or distributed locking.
Understanding Cache
How Redis Typically Used ?
https://www.linkedin.com/in/govardhana-
miriyala-kannaiah/