DevOps is a term that refers to a set of practices and tools that are used to automate the processes between software development and IT operations. It is designed to bridge the gap between these two teams by improving communication, collaboration, and automation. DevOps enables organizations to quickly deliver reliable software in a more efficient manner. DevOps also enables teams to better track and measure the performance of their software and to quickly respond to customer feedback.
Network Fundamentals –
OSI Model –
The model is called the OSI (Open Systems Interconnection) Reference Model because it deals
with connecting open systems—that is, systems that are open for communication with other
systems.
It consists of 7 layers, each layer performing a specific function:
TCP & UDP
TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are two common transport layer protocols used in networking. The following table summarizes the key differences between the two:
In general, TCP is used when data reliability is a requirement, while UDP is used when speed and low overhead are more important.
IP Addressing –
IP addressing and subnetting are related concepts in computer networking.
IP addressing refers to the process of assigning a unique IP address to each device connected to a network. The IP address is used to identify and locate devices on the network and route traffic between them. There are two main versions of IP addressing in use today: IPv4 and IPv6.
Subnetting –
The process of dividing a large network into smaller sub-networks, called subnets. The main purpose is to partition a large network into smaller, more manageable segments, and improve network security, performance, and organization.
Protocols & Ports
It plays a crucial role in communication between different components and systems.
Protocols are sets of rules and standards that dictate how devices communicate with each other over a network. Some common protocols used in DevOps are:
HTTP/HTTPS - used for communication between web servers and clients.
SSH - used for secure remote login and communication between servers.
FTP/SFTP - used for transferring files between servers.
Telnet - used for remote communication and management of network devices.
Ports are numerical addresses used by protocols to identify specific applications or services running on a device. Each device can have multiple applications or services running on it, and each application or service is assigned a unique port number.
For example, the HTTP protocol uses port 80 for unencrypted communication and port 443 for encrypted communication (HTTPS).
Network Topology –
It refers to the physical or logical arrangement of devices on a network. It defines how devices are connected and how data flows between them. There are several common network topologies, including :
Switching –
It is a technology to route and forward data between devices on a network. A switch acts as a central connection point for devices on a network, allowing them to communicate with each other and exchange data.
Routing
The process of selecting a path for data to travel over a network, and it is performed by routers using routing information stored in routing tables. Routing is essential for the efficient and reliable transportation of data over computer networks, and it plays a critical role in modern network design and implementation.
Firewall
A firewall is a security device that monitors and controls incoming and outgoing network traffic based on predetermined security rules. It acts as a barrier between a trusted internal network and an untrusted external network, such as the internet.
Firewalls can be hardware-based, software-based, or a combination of both.
Storage Fundamentals –
Block Storage – File Storage – Local Storage – Object Storage
SAN (Storage Area Network) & NAS (Network-Attached Storage) –
Also Read: Importance of AWS in DevOps
FAQs
What are the seven layers of the OSI Model?
The seven layers of the OSI Model are Application, Presentation, Session, Transport, Network, Data Link, and Physical.
How does the OSI Model help ensure data transmission between systems?
The OSI Model provides a standardized framework for data transmission between systems, allowing different devices and networks to communicate and exchange data efficiently. Each layer of the model provides specific functions and protocols that help ensure data is transmitted accurately, reliably, and efficiently between systems.
What are the benefits of using UDP for real-time applications?
UDP is often used for real-time applications, such as online gaming, video conferencing, and IP telephony, due to its fast and efficient delivery of data. It does not provide the reliability and error checking of TCP, but it is ideal for real-time applications where quick delivery of data is more important than ensuring that every packet is delivered. UDP also has a smaller overhead than TCP, which makes it faster and more efficient for these types of applications.
What are the two types of IP addresses?
The two types of IP addresses are IPv4 and IPv6. IPv4 is a 32-bit address that provides approximately 4 billion unique addresses, while IPv6 is a 128-bit address that provides approximately 340 trillion unique addresses.
What is a subnet mask?
A set of numbers is used to divide a network into smaller subnetworks, or subnets. It determines which portion of an IP address represents the network address and which portion represents the host address.
What is a private IP address?
A non-public address that is used within a private network, such as a home or office network. Private IP addresses are not routed on the internet and are not globally unique.
What is a public IP address?
A globally unique address is assigned to a device that is connected to the internet. Public IP addresses are routed on the internet and are used to identify devices and allow communication with other devices on the internet.
How do subnetting affect the number of available host addresses?
Subnetting reduces the number of available host addresses by taking away some of the address space for the subnet address. The exact reduction depends on the size of the subnet and the size of the address space.
Can subnets be further divided into smaller subnets?
Yes, further can be divided into smaller subnets. This is called nested subnetting and allows for even more fine-grained control over network organization and security.
What is the difference between a well-known port and a registered port?
A well-known port is a port number reserved for commonly used services, such as HTTP (port 80) and HTTPS (port 443). A registered port is a port number assigned to a specific service or application but is not commonly used.
What are the main types of firewalls?
The main types of firewalls are stateful firewalls, packet filtering firewalls, and application-layer firewalls.
What is the difference between a software firewall and a hardware firewall?
A software firewall is a firewall that is installed as a software application on a computer, while a hardware firewall is a separate device that sits between a network and the internet. A hardware firewall is generally more secure than a software firewall.
What are the advantages of object storage compared to other storage types?
Object storage has several advantages, including unlimited scalability, low cost, and built-in data management and retrieval features.
What are the main uses of local storage?
Local storage is commonly used for storing operating system files, applications, and user data, as well as temporary storage for data being processed.
How does NAS differ from object storage in terms of data access and management?
NAS provides file-level access to data, while object storage provides object-level access to data. NAS is easier to manage as it provides a file system, while object storage requires more specialized management tools.
Linux
Linux is an open-source, free operating system based on UNIX. It is designed to be secure, reliable, and efficient, and can be used on a variety of devices including mainframes, personal computers, laptops, and embedded systems. Linux is popular for its scalability and ability to be used in a variety of applications, from basic desktop computing to complex server-side applications. Additionally, Linux is flexible and allows users to customize their Linux experience with different distributions such as Ubuntu, Debian, and RedHat.
Must know Linux basic commands
ls (list files and directories)
cd (change working directory)
pwd (display current working directory)
mkdir (create a new directory)
touch (create a new file)
cp (copy files and directories)
mv (move or rename files)
rm (remove files and directories)
echo (print text to the terminal)
cat (concatenate and display files)
Operation of Running Systems
Boot process: The boot process starts with BIOS, followed by the bootloader (e.g. GRUB), which loads the Linux kernel into memory and starts it.
Process Management: Linux uses the concept of processes to manage running applications, each with its own memory space and system resources.
Scheduling: The Linux kernel uses a scheduling algorithm to determine which process should be executed next, based on priority and other factors.
Memory Management: Linux uses virtual memory, which allows processes to use more memory than is physically available, swapping it to disk if necessary.
File Systems: Linux supports a variety of file systems, including ext4, XFS, NTFS, and more, allowing data to be stored and organized on disk.
Device Management: Linux uses a device file system (e.g. /dev) to represent hardware devices as files, allowing applications to interact with them.
Networking: Linux has a robust networking stack, supporting multiple protocols (e.g. TCP/IP, UDP), virtual networks (e.g. VPN), and more.
Security: Linux provides multiple security features, including user and group permissions, firewalls, encryption, and more.
Linux managing users and groups.
User management:
adduser/useradd: create a new user account
passwd: set or change the password of a user account
usermod: modify an existing user account
deluser/userdel: delete a user account
Group management:
addgroup/groupadd: create a new group
groupmod: modify an existing group
delgroup/groupdel: delete a group
gpasswd: set or change the password of a group
usermod: add or remove a user from a group.
Note : Each user and group has a unique numerical ID (UID and GID, respectively) and linux uses these IDs to control access to files and system resources.
Linux Networking
Linux has advanced networking capabilities, including:
Network interfaces: management of physical (e.g. Ethernet) and virtual (e.g. VPN) network interfaces
IP addresses: assigning IP addresses to network interfaces, either statically or dynamically (via DHCP)
Routing: routing tables for forwarding packets between network interfaces and to other networks
Firewall: configuring the built-in firewall (iptables or nftables) to allow/deny incoming and outgoing network traffic
DNS: specifying nameservers for resolving hostnames to IP addresses
VPN: setting up virtual private network (VPN) connections
Commands for network configuration in Linux include:
ifconfig: view and configure network interfaces
ip: advanced network configuration and routing
route: view and manipulate the routing table
iptables/nftables: configure the firewall
resolv.conf: configure nameservers for DNS resolution
OpenVPN: set up VPN connections
The specific steps for configuring networking on Linux depend on the distribution and desired configuration.
Linux, storage management
Disk usage monitoring: monitoring disk space usage and taking action when thresholds are exceeded
File backup: copying files to another location for safekeeping
File compression: compressing large files to save disk space
Log rotation: moving log files to an archive location when they become too large, and optionally compressing them
Commands commonly used in storage management shell scripts include:
df: check disk usage
du: check the size of directories and files
cp: copy files
tar: create and extract archive files
gzip/gunzip: compress and decompress files
find: search for files matching certain criteria
GIT
Git is a distributed version control system used in software development and DevOps practices. It allows developers to track changes to their codebase, collaborate on code with others, and maintain different versions of their codebase (branches).
With Git, developers can:
Create a local repository to store their code and track changes
Stage and commit changes to their codebase
Create branches for new features or bug fixes
Merge changes from multiple branches into a single branch
Push their code to a remote repository (e.g. on GitHub, GitLab, Bitbucket) for sharing and collaboration
Git has become the standard version control system for software development and is widely used in DevOps practices, such as Continuous Integration/Continuous Deployment (CI/CD). It enables teams to work on code in parallel, track changes, and collaborate effectively. Git's distributed architecture also ensures that the codebase is safe and can be recovered even if the main repository is lost.
Installing Git:
On Linux, Git can be installed using the package manager of the distribution (e.g. apt-get, yum, dnf)
On macOS, Git can be installed using Homebrew or the official Git installer ( https://git-scm.com/download/mac )
On Windows, Git can be installed using the official Git installer ( https://gitforwindows.org/ )
Git Workflow:
Create a local repository: ‘ git init ’
Add files to the repository: ‘ git add <file> ’
Commit changes to the repository: ‘git commit -m "<message>" ’
Connect the local repository to a remote repository (e.g. GitHub): ‘ git remote add origin <repository-url> ’
Push changes to the remote repository: ‘ git push origin <branch> ‘
Pull changes from the remote repository: ‘ git pull origin <branch> ‘
Create a new branch: ‘ git checkout -b <branch-name> ‘
Switch between branches: ‘ git checkout <branch-name> ‘
Merge changes from one branch into another: ‘ git merge <branch-name> ’
The Basics of Using Git:
The ‘git status’ command shows the current status of the repository
The ‘git diff’ command shows the differences between the current code and the last committed version
The ‘git log’ command shows the history of commits in the repository
The ‘git stash’ command allows temporary saving of changes that are not ready to be committed
The ‘git revert’ command undoes changes to the code by creating a new commit
The ‘git clone’ command creates a local copy of a remote repository.
Creating a Local Repository (Empty):
To create an empty Git repository, navigate to the desired directory in the terminal and run the following command:
This will create a new .git directory in the current directory, which will serve as the Git repository for the codebase in the directory.
To confirm that the repository has been created, you can run the following command:
The output should show that there are no changes to be committed and that the repository is empty.
What is Linux?
Linux is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds.
What are the advantages of Linux?
The advantages of Linux include its stability, security, flexibility, portability, low cost, and its open-source nature. It is also highly customizable and can be used for a wide variety of tasks, from web servers to mobile devices.
What is the Linux kernel?
The Linux kernel is the core of Linux operating systems. It is the bridge between applications and the actual data processing done at the hardware level. It manages system resources, such as memory, processes, and hardware devices, and provides services that allow the various parts of the operating system to interact with each other.
What is the Linux command line?
The Linux command line is a text-based interface used to interact with the system. It is composed of a series of commands that can be used to perform various tasks, such as managing files, running programs, and configuring the system.
What is the Linux file system?
The Linux file system is a hierarchical structure of directories and files that are used to store and organize data on the system. Files and directories can be created, moved, copied, and deleted using commands in the Linux command line.
What is the difference between Linux and Windows?
The main difference between Linux and Windows is the operating system kernel. Linux is based on the Linux kernel, while Windows is based on the Windows NT kernel. Additionally, Linux is open source, while Windows is proprietary software.
What is the Linux boot process?
The Linux boot process is the process of starting up the system. It consists of a series of steps, such as loading the kernel, initializing the hardware, and starting the user interface.
What are Linux distributions?
Linux distributions are collections of software and other resources that are packaged together to form a complete Linux operating system. Popular distributions include Ubuntu, Red Hat, Debian, and openSUSE.
What is the difference between Linux and Unix?
The main difference between Linux and Unix is the kernel. Linux is based on the Linux kernel, while Unix is based on the Unix kernel. Additionally, Linux is free and open source, while Unix is proprietary software.
What is the difference between Linux and Mac OS?
The main difference between Linux and Mac OS is the operating system kernel. Linux is based on the Linux kernel, while Mac OS is based on the Darwin kernel. Additionally, Linux is open source and free, while Mac OS is proprietary software.
Σχόλια