DEVOPS_NOTES
DEVOPS_NOTES
IC1:Preparation of environment
Development Operations(DevOps)
DevOps is a set of practices that integrates software development (Dev) and IT operations
(Ops) to improve the efficiency, speed, and quality of delivering software. It emphasizes
collaboration between developers and operations teams throughout the software development
lifecycle, from design to development and production support.
Server
In DevOps, a server refers to a computing system that provides various services essential for
software development, deployment, and operations. Servers are critical components of the
infrastructure that supports DevOps processes, from code development to application delivery.
Linux
Linux is a widely used open-source operating system that plays a crucial role in managing and
automating infrastructure, running applications, and facilitating development and deployment
processes. Its flexibility, reliability, and compatibility with DevOps tools make it a go-to platform for
many DevOps environments.
DevSecOps
DevSecOps is an extension of DevOps that integrates security practices into the DevOps workflow. It
stands for Development, Security, and Operations and emphasizes the importance of including security
at every stage of the software development lifecycle (SDLC), rather than treating it as an afterthought or
a separate process.
Container
In DevOps, a container is a lightweight, standalone, and executable software package that includes
everything needed to run an application such as the code, runtime, libraries, and system tools ensuring
that the application runs consistently across different computing environments. Containers enable
developers to package and isolate applications from the underlying infrastructure, making them highly
portable and efficient for deployment.
Node
In DevOps, a node typically refers to an individual machine or server that is part of a larger
infrastructure or network used for deploying, managing, and running applications and services. A
node can be a physical machine, a virtual machine (VM), or a container instance, depending on the
infrastructure setup. Nodes play a key role in various areas of DevOps, such as container
orchestration, distributed computing, and cluster management.
Infrastructure as Code (IaC) is a key practice in DevOps where infrastructure (servers, networks,
databases, etc.) is managed and provisioned using code and automation, rather than through manual
processes. This approach allows developers and operations teams to define, deploy, and manage
infrastructure in a repeatable, scalable, and automated manner.
IaaS
Infrastructure as a Service (IaaS) in DevOps refers to a cloud computing model that provides
virtualized computing resources over the internet. With IaaS, organizations can rent
infrastructure components such as servers, storage, and networking on demand, rather than
purchasing and maintaining physical hardware. This allows for scalability, flexibility, and cost
savings, which are essential for DevOps practices like Continuous Integration (CI), Continuous
Delivery (CD), and automated deployment pipelines.
CI/CD
Continuous Integration (CI) is the practice of frequently integrating code changes from
multiple developers into a shared repository, where each change is automatically tested. The goal
is to identify bugs or issues early, ensuring that the application is always in a deployable state.
Continuous Delivery (CD) is the next step after Continuous Integration. It ensures that the
integrated and tested code is always in a deployable state and can be released to production at
any time. The key difference between Continuous Delivery and Continuous Deployment
(discussed below) is that with Continuous Delivery, the deployment to production is triggered
manually.
A Linux distribution is an operating system based on the Linux kernel, which includes a
collection of software, utilities, and package management systems. Each distribution has a
unique focus, such as server performance, user-friendliness, security, or cloud integration,
making them suitable for different tasks in a DevOps workflow.
1 .Ubuntu:
2. Fedora:
3. Debian:
4. Linux Mint:
Commercial, enterprise-focused.
Offers long-term support and stability.
Uses YUM/DNF package manager.
6. CentOS:
2. Puppy Linux:
11. Manjaro:
Steps:
Here’s a step-by-step guide to installing Ubuntu on VMware (Windows as the host system):
Visit the official Ubuntu website to download the latest Ubuntu Desktop version.
Download the 64-bit Ubuntu ISO file.
Open VMware Workstation Player from the Start Menu after installation.
Specify the disk size for your virtual machine (e.g., 20GB).
Choose either Store virtual disk as a single file or Split virtual disk into multiple files (the latter
is better if you plan to move the VM to different locations).
Click Next.
Before clicking Finish, you can customize your VM’s hardware (such as RAM and CPU cores).
Click Customize Hardware and adjust:
o Memory: Set at least 2GB RAM (4GB is recommended for better performance).
o Processors: You can assign 2 CPU cores for better performance.
o Network Adapter: Leave as NAT unless you need specific network settings.
Click Close, then Finish.
In the main VMware window, select your new Ubuntu VM and click Play virtual machine to
start it.
The Ubuntu installer will boot from the ISO file.
Choose your preferred language (e.g., English) and click Install Ubuntu.
Select the option for installing updates during installation and optionally check Install third-
party software for graphics, Wi-Fi, and additional media formats.
Click Continue.
6. Partitioning:
For virtual machines, choose Erase disk and install Ubuntu (this does not affect your actual hard
drive but only allocates virtual disk space).
Click Install Now and then Continue.
Select your time zone from the map or drop-down list and click Continue.
Set your name, computer name, username, and password for the Ubuntu system.
Click Continue.
9. Install Ubuntu:
The installer will now install Ubuntu. This process may take some time depending on your
system’s performance.
2. Login to Ubuntu:
After rebooting, you’ll see the Ubuntu login screen. Enter the username and password you
created earlier.
You are now logged in to your Ubuntu system running on VMware!
cd /path/to/extracted/folder
sudo ./vmware-install.pl
Memory Information
Hardware Information
Network Information
25. ifconfig – Display network interface information (use ip for newer versions).
o Example: ifconfig
26. ip a – Display IP addresses and network interfaces.
o Example: ip a
27. netstat – Display network connections, routing tables, and interface statistics.
o Example: netstat -tuln
28. ss – Display socket statistics (modern replacement for netstat).
o Example: ss -tuln
29. ping – Check network connectivity.
o Example: ping google.com
30. traceroute – Trace the route packets take to a network host.
o Example: traceroute google.com
31. hostname -I – Display the system’s IP address.
o Example: hostname -I
uniq Remove duplicate lines from a sorted file sort file.txt | uniq
diff Compare two files and show differences diff file1.txt file2.txt
join Join lines from two files based on a Cat join file1.txt
common field file2.txt
Command Description Examples
Example: pwd
pwd
Print the current working directory.
ls Example: ls or ls -l
List directory contents.
Example: cp -r
source_directory
cp
Copy files or directories. destination_directory
Command Description Examples
df Example: df -h
Report file system disk space usage.
Text processing commands in Linux, used to manipulate, filter, search, and format text:
Managing Processes
Example: schedtool -R -p 1234 (Sets process with PID 1234 to real-time priority)
Most modern Linux distributions use systemd as the default system and service manager. These
commands allow you to control services, boot targets, and other system operations.
Systemd uses targets to manage different system states (formerly known as runlevels in
SysVinit systems).