diff --git a/2026/day-01/learning-plan.md b/2026/day-01/learning-plan.md new file mode 100644 index 0000000000..151d157d46 --- /dev/null +++ b/2026/day-01/learning-plan.md @@ -0,0 +1,26 @@ +# My 90 Days DevOps Learning Plan + +## Current Level + +I am a student learning DevOps and cloud technologies. + +## Why I Started DevOps + +I want to build strong practical skills and become a DevOps engineer. +I also want to make my parents proud. + +## My Goals + +- Improve Linux and Docker skills +- Learn CI/CD and Kubernetes +- Build real DevOps projects used at industry level + +## Skills I Want to Build + +- Linux troubleshooting +- CI/CD pipelines +- Cloud and Kubernetes basics + +## Daily Consistency Plan + +I will practice daily for 2–3 hours and stay consistent during this 90 Days Challenge. diff --git a/2026/day-02/linux-achitecture-notes.md b/2026/day-02/linux-achitecture-notes.md new file mode 100644 index 0000000000..d2c0ac224a --- /dev/null +++ b/2026/day-02/linux-achitecture-notes.md @@ -0,0 +1,40 @@ +# My 90 Days DevOps Challenge + +# Linux Architecture + +linux has kernal and user space + +- kernal manage hardware +- user space is where user run application +- systemd use for cheacks logs and manage background services + +# Process + +process isa runnig program + +process States: + +- running +- slepping +- zombie + +# systemd + +- start services +- stop service +- restart service + +Example - systemctl status mysql + +# Today Important cmd + +- ls :- list file and director +- cd :- change directory go to another folder +- pwd :- present workig directory #to see where we now +- cat :- to show the content in the file +- ls -a :- list all files in the current directory +- sudo apt update : use for update system +- head -n 2 : shows the last 2 lines +- tail -n -2 : shows the last 2 lines + +## Linux Architecture and sytemd are important for DevOps Troubleshooting. diff --git a/2026/day-03/linux-commands-cheatsheet.md b/2026/day-03/linux-commands-cheatsheet.md new file mode 100644 index 0000000000..71bc257ea3 --- /dev/null +++ b/2026/day-03/linux-commands-cheatsheet.md @@ -0,0 +1,43 @@ +# My 90 Days of Devops challenge + +# Process Management + +ps - show running process + +top - moniter running live process + +pgrep bash - find process id by name + +nohup - run the process after logout + + + +## File system + +pwd - present working directory + +ls - list file or directory + +mv - move or remname file or directory + +cp - copies file and directory one place to another + +rm - delete file or directory permanently + +cat - disply content in the file on terminal + +df -h shows disk space uses in "human-redable" format (GB/MB) + + + +## Networking Troublshooting + +ping - cheack internet/network connectivity + +ip addr - shows IP address and network interfaces + +curl - fetch website data + +ifconfig - shows network interface information + + diff --git a/2026/day-04/linux-practice.md b/2026/day-04/linux-practice.md new file mode 100644 index 0000000000..273a54912a --- /dev/null +++ b/2026/day-04/linux-practice.md @@ -0,0 +1,71 @@ +# My 90 Days of Devops Challenge + +## Process Cheacks + +- ps aux - shows all running process + +- pgrep ssh - show ssh process PID + +- top - real-time monitoring + + + +## Service Cheacks + +- systemctl list-unit - shows running services + +- system status ssh - cheacks ssh service stause + +- sudo start ssh - start ssh service + + + +## Log Checks + +- journalctl -u ssh - shows ssh service logs + +- tail -n 50 /var/log/syslog - system-wide logs + + + +## Mini Trobleshooting steps + +- cheacked running process using ps and pgrep + +- cheack service status to use of systemctl status ssh + +- cheacked service logs using journalctl -u ssh + +- viewed system logs using syslog + +- cheack last 50 active logs useing tail -n 50 command + + +## Learning Summary + +- Today I learned how to cheack processess, services , and logs in linux. I alos understand how troublshooting works using system commands. + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/2026/day-05/linux-troubleshooting-runbook.md b/2026/day-05/linux-troubleshooting-runbook.md new file mode 100644 index 0000000000..aa3a591648 --- /dev/null +++ b/2026/day-05/linux-troubleshooting-runbook.md @@ -0,0 +1,66 @@ +## My 90 Days Devops challenge + +# Linux Troubleshooting Runbook (Day 05) + +## Target Service: SSH (sshd) + +--- + +## CPU & Memory +top +→ check CPU usage + +free -h +→ check RAM usage + +--- + +## Disk +df -h +→ check disk space + +du -sh /var/log +→ check log folder size + +--- + +## Network +ss -tulpn +→ check open ports + services + +curl -I http://13.232.73.184 +→ check website status (200 = OK) + +--- + +## Logs + +journalctl -u ssh -n 50 +→ SSH service logs + +tail -n 50 /var/log/auth.log +→ login + sudo + SSH logs + +--- + +## Quick Meaning + +journalctl → service logs +tail → file logs +ss → ports +df → disk +free → memory +curl → website check + +--- + +## If issue happens + +restart service: +sudo systemctl restart ssh + +check live logs: +journalctl -u ssh -f + +check failed logins: +grep "Failed" /var/log/auth.log diff --git a/2026/day-06/file-io-practice.md b/2026/day-06/file-io-practice.md new file mode 100644 index 0000000000..67a2eb0f97 --- /dev/null +++ b/2026/day-06/file-io-practice.md @@ -0,0 +1,102 @@ +## My 90 days challenge + +# Day 06 – Linux File I/O Practice + +## Objective + +Learn basic file read and write operations in Linux using simple commands. + +--- + +## Commands Practiced + +### 1. Create file + +```bash +touch notes.txt +``` + +Creates an empty file named `notes.txt`. + +--- + +### 2. Write first line (overwrite) + +```bash +echo "Line 1" > notes.txt +``` + +* `>` = write and replace old content + +--- + +### 3. Add second line (append) + +```bash +echo "Line 2" >> notes.txt +``` + +* `>>` = add without deleting old content + +--- + +### 4. Add third line using tee + +```bash +echo "Line 3" | tee -a notes.txt +``` + +* `tee -a` = add text + show output on screen + +--- + +### 5. Read full file + +```bash +cat notes.txt +``` + +Shows entire file content. + +--- + +### 6. Show first 2 lines + +```bash +head -n 2 notes.txt +``` + +--- + +### 7. Show last 2 lines + +```bash +tail -n 2 notes.txt +``` + +--- + +## Key Learnings + +* `>` overwrites file content +* `>>` appends new data +* `cat` reads full file +* `head` shows top lines +* `tail` shows bottom lines +* `tee` writes + displays output + +--- + +## Why This Matters + +File handling is very important in DevOps: + +* logs +* configs +* scripts + +Fast file handling = faster debugging 🚀 + +--- + +## End of Day 06 diff --git a/2026/day-07/day-07-linux-fs-and-scenarious.md b/2026/day-07/day-07-linux-fs-and-scenarious.md new file mode 100644 index 0000000000..20ff7b65c5 --- /dev/null +++ b/2026/day-07/day-07-linux-fs-and-scenarious.md @@ -0,0 +1,108 @@ +# My 90 days of challenge + +#/ root + +- its the starting point of everything its containe user directory or whole system information +# shows in this +- home +- etc +- var + +# i would use this to show all directory of system + + + + + + +## /home + +- it contain the user directory + +## shown in this folder +- chaitanya user +- ubuntu user + +## i would use this to see how many user are exist + + + + +## /root +- it contain home all information of system it is admin of linux + +# shows in this folder +- users home directory + +# i would use this like admin + + + +#/etc + +- etc contains the system config file and system setting + +# shows in this folder +- passwd +- hostname + +# i would use this for knnow the config like /etc/passwd t check user information + + +#/var/log + +- it contains log of services file + +#shows in this folder +- auth.log +- kern.log + +# i would use this you i want to find logs of service this use devops engineer in real-liffe + + +# /tmp +- this store temprery files + +#shows in folder +- jenkins +-ubuntu + +# i would use this for store temprery file + + +# /bin +- its contain linux basic cmd like cp,ls.cd + +# shows in folder +- usr +-bin + +# i would use this to use basic cmd or seen this cmd basix of linux + + + +# /usr/bin + +- contain user tool git docker + +## i would this in deployment or production + + +# /opt + +- optional and third party application package store + +## i would this to store third party application package + + + +#du -sh /var/log/* 2>/dev/null |sort-h | tail -5 +- find the largest log file in the /var/log + +# cat /etc/hostname +- show the confing file hostname meens server name + +# ls -la ~ +- cheack home directory + +# Todays i am learning the which directory whats usees and which time we will use this in real-time diff --git a/2026/day-08/Screenshot (347).png b/2026/day-08/Screenshot (347).png new file mode 100644 index 0000000000..ad285e9ffa Binary files /dev/null and b/2026/day-08/Screenshot (347).png differ diff --git a/2026/day-08/day-08-cloud-deployment.md b/2026/day-08/day-08-cloud-deployment.md new file mode 100644 index 0000000000..5c82df5cf8 --- /dev/null +++ b/2026/day-08/day-08-cloud-deployment.md @@ -0,0 +1,34 @@ +## My 90 Days Devops challenge + +## Command used + +- ssh -i key.pem ubuntu@<13.232.73.184> +- sudo apt-get update +- sudo apt install docker.io -y +- sudo apt install nginx -y +- systemctl status docker.io +- tail -n 50 /var/log/nginx/access.log +- cp /var/log/nginx/access.log ~/nginx-logs.txt + +## Challenge i faced +- i was confused in how to nginx logs work. +- i lerned http status code 200 means sucessfully acess and 400 means file not found + +# what i learned +- i know how to connect ec2 instance using ssh +- how to install docker & nginx +- how to cheacks status of service +- how to start service +- how view and save nginx acess logs + +# verification +- sucessfully connected to the server throught ssh +- Acessed the nginx welcome page from browser using the public ip address +- show nginx logs and save logs in the local in nginx-logs.txt + +# why this matters in Devops + +- this help me to understand server management, web server devloyment security group configuration how how add port in security grop +this is real devops troublshooting these are essential skills of devops engineer + + diff --git a/2026/day-08/instance.png b/2026/day-08/instance.png new file mode 100644 index 0000000000..89c5c2df60 Binary files /dev/null and b/2026/day-08/instance.png differ diff --git a/2026/day-08/nginx_png.png b/2026/day-08/nginx_png.png new file mode 100644 index 0000000000..ad285e9ffa Binary files /dev/null and b/2026/day-08/nginx_png.png differ diff --git a/2026/day-08/ssh _connection.png b/2026/day-08/ssh _connection.png new file mode 100644 index 0000000000..3af3a36d51 Binary files /dev/null and b/2026/day-08/ssh _connection.png differ diff --git a/2026/day-09/day-09-user-managment.md b/2026/day-09/day-09-user-managment.md new file mode 100644 index 0000000000..3032a4e4d3 --- /dev/null +++ b/2026/day-09/day-09-user-managment.md @@ -0,0 +1,35 @@ +## My 90 days of Challenge + +## Day 09 challenge + +## User & Group Created + +- Users: tokoyo, berlin, professor, nairobi +- Group: developers, admins, project-team + +# Group Assignments +- developer: tokoyo,berlin +- admins: professor +- project-team: nairobi, + +## Directoris Created +- team-workspace: sudo chmod 774 /opt/team-workspace + +## Command Used + +- useradd -m : created user and directory of user +- groupadd : create group +- group -aG : add user to in this group +- chgrp: change group owner for directory +- ls -ld : cheack directory permission +- chmod: add or give permission + +## what i learned +- i learned how to create user and groups and how to assign user to group. +- change owner of groups and give file permission throw the chmod +- make folder in opt and give acess to the user which is the group + +## i know today how to manage linux users groups and how to change +owner and give he permission. and how to troublshooting how to fix problem +this is actually i know toady with hands on how to manage linux file system +in real-time . diff --git a/2026/day-10/.github/workflows/stale.yml b/2026/day-10/.github/workflows/stale.yml new file mode 100644 index 0000000000..aecdf963b3 --- /dev/null +++ b/2026/day-10/.github/workflows/stale.yml @@ -0,0 +1,27 @@ +# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time. +# +# You can adjust the behavior by modifying this file. +# For more information, see: +# https://github.com/actions/stale +name: Mark stale issues and pull requests + +on: + schedule: + - cron: '20 7 * * *' + +jobs: + stale: + + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + + steps: + - uses: actions/stale@v5 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'Stale issue message' + stale-pr-message: 'Stale pull request message' + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity' diff --git a/2026/day-10/.gitignore b/2026/day-10/.gitignore new file mode 100644 index 0000000000..269d0f1e86 --- /dev/null +++ b/2026/day-10/.gitignore @@ -0,0 +1,42 @@ +# OS +.DS_Store +Thumbs.db + +# Logs +*.log +*.pid + +# Environment +.env +.env.* + +# Python +__pycache__/ +*.pyc +.venv/ + +# Node +node_modules/ + +# Build +build/ +dist/ + +# Terraform +.terraform/ +*.tfstate +*.tfstate.* +crash.log + +# Kubernetes +.kube/ + +# IDE +.vscode/ +.idea/ + +# Caches +.cache/ +.pytest_cache/ +coverage/ +CLAUDE.md diff --git a/2026/day-10/README.md b/2026/day-10/README.md index f1c66a14c3..b3e2cc9025 100644 --- a/2026/day-10/README.md +++ b/2026/day-10/README.md @@ -1,3 +1,70 @@ +<<<<<<< HEAD +# 🚀 90DaysOfDevOps +### Learn • Build • Practice • Become Job-Ready + +Welcome to **90DaysOfDevOps**, a structured and hands-on DevOps challenge by **TrainWithShubham**. + +This repository is designed to help you **build real DevOps skills step by step in 90 days** — not by watching endless videos, but by **doing daily tasks**, building projects, and thinking like a **production-ready DevOps engineer**. + +This is not a theory-heavy course. +This is a **discipline + execution challenge**. + +--- + +## 🎯 What is #90DaysOfDevOps? + +**#90DaysOfDevOps** is a **day-wise DevOps learning challenge** where: + +- Every day has **one clear task** +- Every task has a **real-world DevOps outcome** +- Every learner builds a **public GitHub proof of work** +- Every concept is reinforced through **hands-on practice** +- Learning is aligned with **live classes and recordings** + +By the end of 90 days, you will have: +- Strong DevOps fundamentals +- Multiple mini-projects +- One end-to-end DevOps capstone project +- A GitHub profile that clearly shows consistency +- Confidence to handle DevOps interviews and production systems + +--- + +## 🧠 Who Is This For? + +This challenge is ideal for: + +- Students and freshers entering DevOps or Cloud +- Working professionals switching to DevOps / SRE / Cloud roles +- Developers who want to understand infrastructure and CI/CD +- Anyone who believes **consistency beats talent** + +No prior DevOps experience is required. +**Commitment is mandatory.** + +--- + +## 🗂 Repository Structure + +``` +90DaysOfDevOps/ +│ +├── README.md +├── CONTRIBUTING.md +├── LICENSE +├── .gitignore +│ +├── scripts/ +│ └── helper-scripts.sh +│ +├── day-01/ +│ └── README.md +├── day-02/ +│ └── README.md +├── ... +├── day-90/ +│ └── README.md +======= # Day 10 – File Permissions & File Operations Challenge ## Task @@ -91,10 +158,56 @@ Create `day-10-file-permissions.md`: ## What I Learned [3 key points] +>>>>>>> a8a98a1 (Completed Day 10 learning plane) ``` --- +<<<<<<< HEAD +## 📅 How the Challenge Works + +- **One day = one task** +- Tasks are aligned with **live classes** +- Live class days focus on **core concepts** +- Weekdays focus on **practice and reinforcement** +- Daily commits are encouraged + +Even **30–60 minutes per day** is enough if done honestly. + +--- + +## 🛠 What You Will Learn + +- Linux fundamentals and troubleshooting +- Shell scripting and automation +- Networking basics for DevOps +- Git and GitHub workflows +- Docker and containerization +- AWS core and advanced services +- CI/CD using Jenkins, GitHub Actions, GitLab +- DevSecOps fundamentals +- Kubernetes, Helm, ArgoCD +- Terraform and Ansible +- Observability with Grafana, Prometheus, OpenTelemetry +- End-to-end DevOps project + +--- + +## 📦 How to Participate + +1. Fork this repository +2. Clone your fork +3. Navigate to the current `day-XX` folder +4. Complete the task +5. Commit and push your work + +--- + +## 🌍 Learn in Public + +Share your progress on LinkedIn: + +======= ## Submission 1. Navigate to `2026/day-10/` folder 2. Add `day-10-file-permissions.md` with screenshots @@ -107,11 +220,26 @@ Create `day-10-file-permissions.md`: Share on LinkedIn about mastering file permissions. Use hashtags: +>>>>>>> a8a98a1 (Completed Day 10 learning plane) ``` #90DaysOfDevOps #DevOpsKaJosh #TrainWithShubham ``` +<<<<<<< HEAD +--- + +## ❤️ Final Note + +DevOps is not about tools. +It is about **ownership, reliability, and consistency**. + +One day at a time. +One commit at a time. + +Happy Learning +======= Happy Learning +>>>>>>> a8a98a1 (Completed Day 10 learning plane) **TrainWithShubham** diff --git a/2026/day-10/day-10-file-permissions.md b/2026/day-10/day-10-file-permissions.md new file mode 100644 index 0000000000..576889c297 --- /dev/null +++ b/2026/day-10/day-10-file-permissions.md @@ -0,0 +1,36 @@ +## My Devops Challenge Day-10 + +# Day 10 Challenge + +## Files Created + +- devops.txt +- notes.txt +- script.sh + +## Permission changes + +## Before +- notes.txt : -rw-rw-r-- +- devops.txt : -rw-rw-r-- +- script.txt : -rw-rw-r-- + +# After change +- notes.txt : -rw-r----- +- devops.txt : -r--r--r-- +- script.sh : -rwxrwxr-- + +## Command Used + +- ls -l : see file permissions +- chmod: modify file permissions +- cat : display file output +- touch : make file +- head - display top 5 lines +- tail - display bottom 5 lines + +## What I Learned +- i have learned how to see permission of the file and how to give permission to the files. +- how to dispaly content on screen, permission management . +- how i wll manage devops work with linux file permission and etc. +- i am learned core concept of linux which is very important for a Devops Engineer diff --git a/2026/day-11/day-11-file-ownership.md b/2026/day-11/day-11-file-ownership.md new file mode 100644 index 0000000000..4d592f2a55 --- /dev/null +++ b/2026/day-11/day-11-file-ownership.md @@ -0,0 +1,78 @@ +## My 90 Days of Challenge + +## day 11 challenge + +## Files & Directories Created + +Files: + +* devops-file.txt +* team-notes.txt +* project-config.yaml +* heist-project/vault/gold.txt +* heist-project/plans/strategy.conf +* bank-heist/access-codes.txt +* bank-heist/blueprints.pdf +* bank-heist/escape-plan.txt + +Directories: + +* app-logs/ +* heist-project/ +* bank-heist/ + +--- + +## Ownership Changes + +### Task 2 + +* devops-file.txt → ubuntu → tokyo → berlin + +### Task 3 + +* team-notes.txt → group changed to heist-team + +### Task 4 + +* project-config.yaml → professor:heist-team +* app-logs/ → berlin:heist-team + +### Task 5 + +Recursive ownership: + +* heist-project/ → professor:planners + +### Task 6 + +* access-codes.txt → tokyo:vault-team +* blueprints.pdf → berlin:tech-team +* escape-plan.txt → nairobi:vault-team + +--- + +## Commands Used + +```bash +ls -l +sudo chown username filename +sudo chgrp groupname filename +sudo chown owner:group filename +sudo chown -R owner:group directory +mkdir -p +touch +ls -lR +``` + +## Screenshots + +(Add screenshots here) + +--- + +## What I Learned + +1. Owner and group are different concepts in Linux. +2. chown changes ownership and chgrp changes group ownership. +3. Recursive ownership (-R) helps manage complete project directories quickly. diff --git a/2026/day-12/day-12-revision.md b/2026/day-12/day-12-revision.md new file mode 100644 index 0000000000..1c38a6aba0 --- /dev/null +++ b/2026/day-12/day-12-revision.md @@ -0,0 +1,162 @@ +# Day 12 – Revision (Days 01–11) + +## Mindset & Learning Plan +- My goal is to become a DevOps Engineer. +- Days 01–11 helped me understand Linux basics, processes, services, files, permissions, users and groups. +- My plan is still correct. +- Improvement needed: + - Practice commands daily. + - Stop only watching tutorials and focus more on hands-on practice. + - Improve troubleshooting thinking. + +--- + +## Processes & Services Review + +Commands practiced: + +1. ps +- Used to check running processes. +- Observed currently running system and user processes. + +2. systemctl status ssh +- Used to check service health. +- Checked whether SSH service is active or failed. + +3. journalctl -u ssh +- Used to see service logs and troubleshoot issues. + +Observation: +- A service can be checked by status first and logs help when errors happen. + +--- + +## File Skills Practice + +Commands practiced: + +1. mkdir test-folder +- Created a new directory. + +2. echo "DevOps Practice" >> file.txt +- Added data into a file without deleting old content. + +3. chmod 760 file.txt +- Changed file permissions. + +4. chown ubuntu:ubuntu file.txt +- Changed file ownership. + +5. ls -l +- Verified permission and ownership. + +--- + +## User / Group Practice + +Scenario: +- Created a test user. +- Checked user information. + +Commands: + +id testuser + +ls -l file.txt + +Observation: +- id shows user and group details. +- ls -l shows owner and permissions. + +--- + +## My Top 5 Commands + +1. ls -l +Why: +- Quickly check files, permissions and ownership. + +2. systemctl status +Why: +- Check if service is running. + +3. journalctl +Why: +- Find errors from logs. + +4. chmod +Why: +- Manage file access. + +5. ps +Why: +- Check running processes. + +--- + +## Self Check Answers + +Q1. Which 3 commands save me the most time? + +Answer: +- ls -l because it gives file details. +- systemctl status because it quickly checks service health. +- journalctl because it helps find problems. + +--- + +Q2. How do you check if a service is healthy? + +Commands: + +systemctl status service_name + +journalctl -u service_name + +--- + +Q3. How do you safely change ownership and permissions? + +Example: + +sudo chown user:group file.txt + +sudo chmod 640 file.txt + +First check current permission using: + +ls -l + +--- + +Q4. What will I improve in next 3 days? + +- Improve shell scripting logic. +- Practice Linux troubleshooting. +- Understand commands instead of memorizing. + +--- + +## Key Takeaways + +- Linux commands become easier by practicing. +- Permissions and services are important DevOps foundations. +- Troubleshooting requires checking status, logs and permissions. + +## commands revise + +ps + +systemctl status ssh + +journalctl -u ssh + +mkdir revision-test + +echo "hello devops" >> test.txt + +ls -l test.txt + +chmod 640 test.txt + +ls -l test.txt diff --git a/2026/day-13/day-13-lvm.md b/2026/day-13/day-13-lvm.md new file mode 100644 index 0000000000..d75f5ff942 --- /dev/null +++ b/2026/day-13/day-13-lvm.md @@ -0,0 +1,28 @@ +# Day 13 – Linux Volume Management (LVM) + +## 🚀 Task Objective +Learn LVM to manage storage flexibly – create, extend, and mount volumes. + +--- + +## 🧠 What I learned + +- How to create a virtual disk using loop device +- Physical Volume (PV) creation +- Volume Group (VG) creation +- Logical Volume (LV) creation +- Formatting and mounting storage +- Extending storage using LVM +- Filesystem resizing using resize2fs + +--- + +## ⚙️ Commands Used + +### 1. Create Virtual Disk +```bash +sudo su + +dd if=/dev/zero of=/tmp/disk1.img bs=1M count=1024 +losetup -fP /tmp/disk1.img +losetup -a diff --git a/2026/day-14/networking.md b/2026/day-14/networking.md new file mode 100644 index 0000000000..80e2b4bac3 --- /dev/null +++ b/2026/day-14/networking.md @@ -0,0 +1,25 @@ +# Day 14 - Networking Fundamentals & Hands-on Checks + +Today I practiced basic networking troubleshooting commands used by DevOps engineers. + +## Commands practiced: + +- hostname -I → Checked my machine IP address +- ping → Checked connectivity and latency +- traceroute → Checked network path and hops between my server and target +- ss -tulpn → Checked listening ports and running services +- dig → Checked DNS resolution and domain IP mapping +- curl -I → Checked HTTP response status and headers +- netstat -an → Viewed active network connections + +## Key Learnings: + +- DNS maps domain names to IP addresses +- TCP/UDP work at the transport layer +- HTTP/HTTPS works at the application layer +- traceroute helps identify network path issues +- curl helps check application/server responses + +## DevOps Troubleshooting Flow + +LINK IP TCP APPLICATION diff --git a/2026/day-15/Screenshot (424).png b/2026/day-15/Screenshot (424).png new file mode 100644 index 0000000000..0501c98d06 Binary files /dev/null and b/2026/day-15/Screenshot (424).png differ diff --git a/2026/day-15/day-15-networking-concepts.md b/2026/day-15/day-15-networking-concepts.md new file mode 100644 index 0000000000..0a0d72552d --- /dev/null +++ b/2026/day-15/day-15-networking-concepts.md @@ -0,0 +1,127 @@ +# Task 1: DNS – How Names Become IPs + +## What happens when you type google.com in a browser? + +When we type google.com in a browser, the browser asks DNS to find the IP address of that domain. +DNS searches its records and returns the IP address. +Then the browser connects to that IP address using TCP/TLS and sends an HTTP/HTTPS request. +The server sends the response back and the website loads. + +--- + +## DNS Record Types + +### A Record +A record maps a domain name to an IPv4 address. + +Example: + +google.com → 142.250.x.x + +--- + +### AAAA Record +AAAA record maps a domain name to an IPv6 address. + +Example: + +google.com → IPv6 address + +--- + +### CNAME Record +CNAME maps one domain name to another domain name. + +Example: + +www.example.com → example.com + +It is commonly used with CDN and load balancers. + +--- + +### MX Record +MX record tells which mail server receives emails for a domain. + +Example: + +company.com → mail.company.com + +It is used for email delivery. + +--- + +### NS Record +NS record tells which DNS servers are responsible for managing a domain's DNS records. + +Example: + +google.com → Google DNS servers + +--- +## dig google.com + + +## Task 2 + +1] the ipv4 is is ip address of the server it is 4 partin dots +it is start-255 end each + +2] public ip for use publically can open directly and coonect directly +and in private ip is not connect if you watn to connect this +then you have ssh or private key like use in ec2 ssh in home wifi etc + +3] - 10.0.0.0 - 10.255.255.255 +- 172.16.0.0 - 172.31.255.255 +- 192.168.0.0 - 192.168.255.255 + +Example: +172.31.45.68 (AWS EC2 private ip) + + +## Task 3 + CIDR SUBMASK TOTAL IP USABLE_HOST + + /24 255.255.255.0 256 254 + + /16 255.255.0.0 65,536 65,534 + + /28 255.255.255.240 16 14 + + + +## task 4 + + +port we need the port for knowing which application run in which port +app run container inside the port + + +PORT SERVICE + +22 SSH + +80 HTTPS + +443 HTTPS + +53 DNS + +3306 MYSQL + +6379 REDIS + +27017 MONGO DB + + + +## Task 5 putting it together + +1) curl http://amazon.com curl use for show application +showing the app is giving responce or not mens working or not +devops engineer use whe clien say appcation not working then they check +first -> dig -> ping -> curl this is flow + + +2) when we cant reach database then we can check first firwall is this open port or not + diff --git a/2026/day-16/check_number.sh b/2026/day-16/check_number.sh new file mode 100755 index 0000000000..bb98d1fd16 --- /dev/null +++ b/2026/day-16/check_number.sh @@ -0,0 +1,16 @@ +#!/bin/bash + + +read -r -p " Enter the number ": number + +if [[ $number < 0 ]]; then + echo "Negetive" + + +elif [[ $number > 0 ]]; then + echo "postive" + +else + echo "zero" + +fi diff --git a/2026/day-16/day_16_shell_scripting.md b/2026/day-16/day_16_shell_scripting.md new file mode 100644 index 0000000000..c165f9e0e7 --- /dev/null +++ b/2026/day-16/day_16_shell_scripting.md @@ -0,0 +1,86 @@ +Day 16 - 90 Days Of DevOps + +## 🐧 Topic: Shell Scripting Basics + +Today I started my Shell Scripting journey and learned the fundamentals of Bash scripting used in Linux automation. + +## 📚 What I Learned + +### 1. Shebang and First Shell Script + +Created my first shell script using: + +```bash +#!/bin/bash + +Learned that shebang tells Linux which interpreter should execute the script. + +Executed scripts using: + +chmod +x hello.sh +./hello.sh +2. Variables in Shell Script + +Learned how to store and reuse values using variables. + +Example: + +NAME="Chaitanya" +ROLE="DevOps Engineer" + +echo "Hello, I am $NAME and I am a $ROLE" + +Also learned the difference between single quotes and double quotes. + +Double quotes allow variables to work. +Single quotes treat everything as normal text. +3. User Input Using read + +Created scripts that take input from users. + +Example: + +read -p "Enter your name: " NAME + +Learned how scripts can interact with users dynamically. + +4. If-Else Conditions + +Practiced decision-making in Bash. + +Created scripts for: + +Checking whether a number is positive, negative, or zero +Checking whether a file exists + +Learned the structure: + +if +elif +else +fi +5. Automation Script + +Created a server checking script. + +The script: + +Stores a service name in a variable +Takes user confirmation +Checks service status using: +systemctl status + +This helped me understand how DevOps engineers automate daily Linux tasks. + +📝 Scripts Created +hello.sh +variables.sh +greet.sh +check_number.sh +file_check.sh +server_check.sh +🧠 Key Takeaways +Shell scripting helps automate repetitive Linux tasks. +Variables make scripts reusable and easier to manage. +Conditions help scripts make decisions automatically. +🚀 Day 16 Completed Successfull diff --git a/2026/day-16/greet.sh b/2026/day-16/greet.sh new file mode 100755 index 0000000000..cf590e584f --- /dev/null +++ b/2026/day-16/greet.sh @@ -0,0 +1,8 @@ +#!/bin/bash + + +read -r -p " Enter your name brohhh ": NAME + +read -r -p " say your favorite tool ": CICD + +echo " Hello $NAME your favorite tool is $CICD " diff --git a/2026/day-16/hello.sh b/2026/day-16/hello.sh new file mode 100755 index 0000000000..aae1fded33 --- /dev/null +++ b/2026/day-16/hello.sh @@ -0,0 +1 @@ +echo "hello, devops" diff --git a/2026/day-16/server_check.sh b/2026/day-16/server_check.sh new file mode 100755 index 0000000000..abdf72279a --- /dev/null +++ b/2026/day-16/server_check.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +SERVICE="ssh" + +read -r -p "Do you want to check the status ssh Y/N ?: " ANSWER + + +if [[ $ANSWER == "y" ]] +then + systemctl status $SERVICE + + if systemctl is-active --quiet $SERVICE + then + echo "$SERVICE is active" + + else + echo "$SERVICE is not active" + + fi + +else + echo "Skipped." + +fi + + + + diff --git a/2026/day-16/variable.sh b/2026/day-16/variable.sh new file mode 100755 index 0000000000..ff9f360e6d --- /dev/null +++ b/2026/day-16/variable.sh @@ -0,0 +1,9 @@ +#!/bin/bash + + +name="CHAITANYA" + +role="DEVOPS ENGINEER" + + +echo "hello I am $name and i am a $role" diff --git a/2026/day-17/args.demo.sh b/2026/day-17/args.demo.sh new file mode 100755 index 0000000000..1e19f9f646 --- /dev/null +++ b/2026/day-17/args.demo.sh @@ -0,0 +1,9 @@ + +#!/bin/bash + + +echo "Toatal number of arguments: $#" + +echo "print all arguments: $@" + +echo "print the script name: $0" diff --git a/2026/day-17/cont.sh b/2026/day-17/cont.sh new file mode 100755 index 0000000000..9acb2198d8 --- /dev/null +++ b/2026/day-17/cont.sh @@ -0,0 +1,8 @@ +#!/bin/bash + + +for i in {1..10}; do + + echo " number: $i " + +done diff --git a/2026/day-17/day-17-scripting.md b/2026/day-17/day-17-scripting.md new file mode 100644 index 0000000000..ea38a1b79f --- /dev/null +++ b/2026/day-17/day-17-scripting.md @@ -0,0 +1,72 @@ +# Day 17 – Shell Scripting: Loops, Arguments & Error Handling 🚀 + +Completed Day 17 of my #90DaysOfDevOps journey. + +Today I practiced Shell Scripting concepts and created multiple automation scripts: + +## Tasks Completed: + +✅ For Loop + +* Created `for_loop.sh` + + * Loops through a list of fruits and prints each fruit +* Created `count.sh` + + * Prints numbers 1 to 10 using a for loop + +✅ While Loop + +* Created `countdown.sh` + + * Takes user input + * Counts down to 0 using a while loop + * Prints "Done!" after completion + +✅ Command-Line Arguments + +* Created `greet.sh` + + * Used `$1` to accept name input + * Added argument validation +* Created `args_demo.sh` + + * Practiced: + + * `$0` → script name + * `$#` → number of arguments + * `$@` → all arguments + +✅ Package Installation Automation + +* Created `install_packages.sh` +* Added: + + * Package list using variables + * for loop automation + * Package checking using `dpkg -s` + * Install missing packages + * Skip already installed packages + * Root user validation + +✅ Error Handling + +* Created `safe_script.sh` +* Practiced: + + * `set -e` for stopping script on failure + * `||` operator for handling errors + * Directory creation + * Navigation + * File creation + +## Key Learnings: + +1. Shell scripts can automate repetitive server tasks. +2. Loops help process multiple items easily. +3. Error handling makes scripts safer and more reliable. + +All scripts and documentation added to my Day-17 folder. + +#90DaysOfDevOps #DevOpsKaJosh #TrainWithShubham + diff --git a/2026/day-17/devops.txt b/2026/day-17/devops.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/2026/day-17/for_loop.sh b/2026/day-17/for_loop.sh new file mode 100755 index 0000000000..1dc78ffdda --- /dev/null +++ b/2026/day-17/for_loop.sh @@ -0,0 +1,9 @@ +#!/bin/bash + + +for item in apple banana cherry +do + + echo "fruit is $item" + +done diff --git a/2026/day-17/great.sh b/2026/day-17/great.sh new file mode 100755 index 0000000000..5610784b92 --- /dev/null +++ b/2026/day-17/great.sh @@ -0,0 +1,11 @@ +#!/bin/bash + + + + +if [ -z $1 ]; then + echo "Usage: $0 " + +else + echo "hello $1" +fi diff --git a/2026/day-17/install_package.sh b/2026/day-17/install_package.sh new file mode 100755 index 0000000000..28b8fc8fde --- /dev/null +++ b/2026/day-17/install_package.sh @@ -0,0 +1,24 @@ +#!/bin/bash + + +if [ "$EUID" -ne 0 ]; then + echo "Run as root" + exit 1 +fi + +packages="nginx curl wget" + +for package in $packages +do + + if dpkg -s $package >/dev/null 2>&1 + then + echo "$package is alrady installed" + + else + echo "Installing $package.." + sudo apt-install -y $package + + fi + +done diff --git a/2026/day-17/safe_script.sh b/2026/day-17/safe_script.sh new file mode 100755 index 0000000000..0a61ae2901 --- /dev/null +++ b/2026/day-17/safe_script.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e + +mkdir -p /tmp/devops-test || echo "directory is alrady created" + +cd /tmp/devops-test || echo "this is not this folder " + +touch devops.txt || echo "your file fail to make " + +echo " all steps sucessfully" diff --git a/2026/day-18/day-18-scripting.md b/2026/day-18/day-18-scripting.md new file mode 100644 index 0000000000..e0491b4128 --- /dev/null +++ b/2026/day-18/day-18-scripting.md @@ -0,0 +1,31 @@ +🚀 **Day 18 of #90DaysOfDevOps Challenge** + +Today I explored one of the most important Bash scripting concepts—**Functions** and **Strict Mode**. + +### What I learned today: + +✅ Creating reusable Bash functions +✅ Passing arguments to functions +✅ Checking disk and memory usage using functions +✅ Understanding `set -e`, `set -u`, and `set -o pipefail` for writing safer scripts +✅ Difference between **local** and **global** variables +✅ Building a **System Information Reporter** that displays: + +* Hostname +* OS Information +* System Uptime +* Disk Usage +* Memory Usage +* Top CPU-consuming processes + +One thing I realized today is that becoming a DevOps Engineer isn't about memorizing scripts—it's about breaking problems into smaller pieces, understanding Linux commands, and building solutions step by step. + +Every day I'm improving my Linux, Bash scripting, Git, and debugging skills through consistent practice. + +GitHub Repository: +https://github.com/chaitanyakolse738-art/90DaysOfDevOps + +Feedback and suggestions are always welcome. 🚀 + +#90DaysOfDevOps #TrainWithShubham #DevOps #Linux #Bash #ShellScripting #Git #AWS #CloudComputing #LearningInPublic #OpenToWork + diff --git a/2026/day-18/disk_check.sh b/2026/day-18/disk_check.sh new file mode 100755 index 0000000000..f7908ae913 --- /dev/null +++ b/2026/day-18/disk_check.sh @@ -0,0 +1,26 @@ +#!/bin/bash + + +check_disk() { + +echo "====== Disk =======" + +df -h / + + +} + +check_memory() { + +echo "===== memory ======" + +free -h + +} + +check_disk + +check_memory + + + diff --git a/2026/day-18/documents_euo b/2026/day-18/documents_euo new file mode 100644 index 0000000000..db5897d13f --- /dev/null +++ b/2026/day-18/documents_euo @@ -0,0 +1,14 @@ + + +## set -e : stop execution if your scrpt have error + +## set -x : before executing the cmd print into terminal + +## set -u : catch type of missing variable + +## set -o pipeline: catch hidden error in the pipeline + + + + +## set -euo : stop if any error in the script dont run anyhting ahed of this diff --git a/2026/day-18/function.sh b/2026/day-18/function.sh new file mode 100755 index 0000000000..57511c63cd --- /dev/null +++ b/2026/day-18/function.sh @@ -0,0 +1,26 @@ +#!/bin/bash + + +great() { + + name="$1" + + echo "Hello, $name" + +} + + + +add() { + sum=$(($1 + $2)) + echo "toatal, $sum" + + +} + +great "chaitanya" +add 33 33 + + + + diff --git a/2026/day-18/local_demo.sh b/2026/day-18/local_demo.sh new file mode 100755 index 0000000000..3013f77141 --- /dev/null +++ b/2026/day-18/local_demo.sh @@ -0,0 +1,24 @@ +#!/bin/bash + + +local_function() { + + local name="chaitanya" + echo "after_local: $name" + +} + +global_function() { + + + name="vivek" + echo "after_global: $name" + +} + +local_function +echo "after local: $name" + +global_function +echo "after global: $name" + diff --git a/2026/day-18/strict_demo.sh b/2026/day-18/strict_demo.sh new file mode 100755 index 0000000000..7d07e87c97 --- /dev/null +++ b/2026/day-18/strict_demo.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -o pipeline + +echo "$undefined_var" + + +echo "this is undefined never run" + diff --git a/2026/day-18/system_info.sh b/2026/day-18/system_info.sh new file mode 100755 index 0000000000..fd2c262377 --- /dev/null +++ b/2026/day-18/system_info.sh @@ -0,0 +1,57 @@ +#!/bin/bash + + +show_hostname() { + echo "====== HOST NAME & OS INF0 =======" + echo "current hostname : $(hostname)" + echo "os info : $(uname -r)" + + +} + +up_time() { + + echo -e "\n =========== UPTIME =================" + + uptime -p + + +} + +disk_uses() { + + echo -e "\n ========= DISK USES ============" + + du -hsx * | sort -rh | head -5 + + +} + +memory() { + + echo -e "\n ========= MEMORY =========" + free -h + + +} + +cpu_consumpstion() { + + echo -e "\n ============ CPU CONSUMPTION ======" + ps -eo pid,ppid,cmd,%cpu --sort=-%cpu | head -n 6 + +} + +main() { + + +show_hostname +up_time +disk_uses +memory +cpu_consumpstion + +} + + +main diff --git a/2026/day-19/README.md b/2026/day-19/README.md deleted file mode 100644 index a8b21f33b3..0000000000 --- a/2026/day-19/README.md +++ /dev/null @@ -1,108 +0,0 @@ -# Day 19 – Shell Scripting Project: Log Rotation, Backup & Crontab - -## Task -Apply everything from Days 16–18 in real-world mini projects. - -You will: -- Write a **log rotation** script -- Write a **server backup** script -- Schedule them with **crontab** - ---- - -## Expected Output -- A markdown file: `day-19-project.md` -- All scripts you write during the tasks - ---- - -## Challenge Tasks - -### Task 1: Log Rotation Script -Create `log_rotate.sh` that: -1. Takes a log directory as an argument (e.g., `/var/log/myapp`) -2. Compresses `.log` files older than 7 days using `gzip` -3. Deletes `.gz` files older than 30 days -4. Prints how many files were compressed and deleted -5. Exits with an error if the directory doesn't exist - ---- - -### Task 2: Server Backup Script -Create `backup.sh` that: -1. Takes a source directory and backup destination as arguments -2. Creates a timestamped `.tar.gz` archive (e.g., `backup-2026-02-08.tar.gz`) -3. Verifies the archive was created successfully -4. Prints archive name and size -5. Deletes backups older than 14 days from the destination -6. Handles errors — exit if source doesn't exist - ---- - -### Task 3: Crontab -1. Read: `crontab -l` — what's currently scheduled? -2. Understand cron syntax: - ``` - * * * * * command - │ │ │ │ │ - │ │ │ │ └── Day of week (0-7) - │ │ │ └──── Month (1-12) - │ │ └────── Day of month (1-31) - │ └──────── Hour (0-23) - └────────── Minute (0-59) - ``` -3. Write cron entries (in your markdown, don't apply if unsure) for: - - Run `log_rotate.sh` every day at 2 AM - - Run `backup.sh` every Sunday at 3 AM - - Run a health check script every 5 minutes - ---- - -### Task 4: Combine — Scheduled Maintenance Script -Create `maintenance.sh` that: -1. Calls your log rotation function -2. Calls your backup function -3. Logs all output to `/var/log/maintenance.log` with timestamps -4. Write the cron entry to run it daily at 1 AM - ---- - -## Hints -- Compress old files: `find /path -name "*.log" -mtime +7 -exec gzip {} \;` -- Timestamp: `date +%Y-%m-%d` -- Tar: `tar -czf backup.tar.gz /source/dir` -- Cron edit: `crontab -e` -- Log with timestamp: `echo "$(date): message" >> logfile` - ---- - -## Documentation - -Create `day-19-project.md` with: -- Each script's code -- Sample outputs -- Cron entries you wrote -- What you learned (3 key points) - ---- - -## Submission -1. Add your scripts and `day-19-project.md` to `2026/day-19/` -2. Commit and push to your fork - ---- - -## Reference Video - -[![Watch the video](https://img.youtube.com/vi/PZYJ33bMXAw/0.jpg)](https://youtu.be/PZYJ33bMXAw?si=RzEzOSom7-FqnopA) - ---- - -## Learn in Public - -Share your shell scripting projects on LinkedIn. - -`#90DaysOfDevOps` `#DevOpsKaJosh` `#TrainWithShubham` - -Happy Learning! -**TrainWithShubham** diff --git a/2026/day-19/backup.sh b/2026/day-19/backup.sh new file mode 100755 index 0000000000..9e43e3649d --- /dev/null +++ b/2026/day-19/backup.sh @@ -0,0 +1,79 @@ +#!/bin/bash + + +SOURCE_DIR=$1 +TIMESTAMP=$(date +"%Y-%m-%d_%H-%M-%S") +BACKUP_DIR=$2 + + +if [ -z "$SOURCE_DIR" ] || [ -z "$BACKUP_DIR" ]; then + + echo "Uses: $0 " + + exit 1 +fi + + + +backup() { + + + ARCHIVE="${BACKUP_DIR}/backup-$TIMESTAMP.tar.gz" + + tar -czf "$ARCHIVE" "$SOURCE_DIR" + + + if [ $? -eq 0 ]; then + + + echo "backup created sucessfully" + + else + echo "backup failes" + + + fi + + + +} + +archive_name_size() { + + + echo "Archive Name: $(basename "$ARCHIVE")" + + echo "Archive size $(du -sh "$ARCHIVE"| cut -f1)" + + +} + + +delete_backup() { + + + ls -t "$BACKUP_DIR"/backup-* | tail -n +6 | xargs -I {} rm -- "{}" + + + +} + + +check_source() { + + + if [ ! -d $SOURCE_DIR ]; then + + echo " Uses: directory not exist" + exit 1 + + fi + + } + +backup +archive_name_size +delete_backup +check_source + + diff --git a/2026/day-19/backup/backup-2026-07-25_23-05-01.tar.gz b/2026/day-19/backup/backup-2026-07-25_23-05-01.tar.gz new file mode 100644 index 0000000000..c37c2a3052 Binary files /dev/null and b/2026/day-19/backup/backup-2026-07-25_23-05-01.tar.gz differ diff --git a/2026/day-19/backup/backup-2026-07-25_23-10-01.tar.gz b/2026/day-19/backup/backup-2026-07-25_23-10-01.tar.gz new file mode 100644 index 0000000000..c37c2a3052 Binary files /dev/null and b/2026/day-19/backup/backup-2026-07-25_23-10-01.tar.gz differ diff --git a/2026/day-19/backup/backup-2026-07-25_23-15-01.tar.gz b/2026/day-19/backup/backup-2026-07-25_23-15-01.tar.gz new file mode 100644 index 0000000000..c37c2a3052 Binary files /dev/null and b/2026/day-19/backup/backup-2026-07-25_23-15-01.tar.gz differ diff --git a/2026/day-19/backup/backup-2026-07-25_23-20-00.tar.gz b/2026/day-19/backup/backup-2026-07-25_23-20-00.tar.gz new file mode 100644 index 0000000000..c37c2a3052 Binary files /dev/null and b/2026/day-19/backup/backup-2026-07-25_23-20-00.tar.gz differ diff --git a/2026/day-19/backup/backup-2026-07-25_23-25-01.tar.gz b/2026/day-19/backup/backup-2026-07-25_23-25-01.tar.gz new file mode 100644 index 0000000000..c37c2a3052 Binary files /dev/null and b/2026/day-19/backup/backup-2026-07-25_23-25-01.tar.gz differ diff --git a/2026/day-19/backup/backup.1 b/2026/day-19/backup/backup.1 new file mode 100644 index 0000000000..1385f264af --- /dev/null +++ b/2026/day-19/backup/backup.1 @@ -0,0 +1 @@ +hey diff --git a/2026/day-19/data/backup.1 b/2026/day-19/data/backup.1 new file mode 100644 index 0000000000..ee465d0ee5 --- /dev/null +++ b/2026/day-19/data/backup.1 @@ -0,0 +1 @@ +backup.1 diff --git a/2026/day-19/data/bacup.2 b/2026/day-19/data/bacup.2 new file mode 100644 index 0000000000..d62d1dca88 --- /dev/null +++ b/2026/day-19/data/bacup.2 @@ -0,0 +1 @@ +backup.2 diff --git a/2026/day-19/data/bacup.3 b/2026/day-19/data/bacup.3 new file mode 100644 index 0000000000..4e255a0046 --- /dev/null +++ b/2026/day-19/data/bacup.3 @@ -0,0 +1 @@ +backup.3 diff --git a/2026/day-19/data/bacup.4 b/2026/day-19/data/bacup.4 new file mode 100644 index 0000000000..4805c21294 --- /dev/null +++ b/2026/day-19/data/bacup.4 @@ -0,0 +1 @@ +backup.4 diff --git a/2026/day-19/data/bacup.5 b/2026/day-19/data/bacup.5 new file mode 100644 index 0000000000..aff77f6ac3 --- /dev/null +++ b/2026/day-19/data/bacup.5 @@ -0,0 +1 @@ +backup.5 diff --git a/2026/day-19/day_19_project.md b/2026/day-19/day_19_project.md new file mode 100644 index 0000000000..7b46932518 --- /dev/null +++ b/2026/day-19/day_19_project.md @@ -0,0 +1,98 @@ +# Day 19 – Shell Scripting Project + +## Objective + +Learn to automate common Linux maintenance tasks using Bash scripting and Cron. + +--- + +## Task 1 – Log Rotation Script + +### Features + +- Accepts log directory as an argument +- Compresses `.log` files older than 7 days +- Deletes `.gz` files older than 30 days +- Validates directory existence +- Prints compressed and deleted file count + +--- + +## Task 2 – Backup Script + +### Features + +- Accepts source and destination directories +- Creates timestamped `.tar.gz` backup +- Verifies successful backup creation +- Displays archive name and size +- Deletes backups older than 14 days +- Validates source directory + +--- + +## Task 3 – Cron Jobs + +### Log Rotation + +```cron +0 2 * * * bash /home/devops/90DaysOfDevOps/2026/day-19/rotate.sh /var/log/apache2 +``` + +### Weekly Backup + +```cron +0 3 * * 0 bash /home/devops/90DaysOfDevOps/2026/day-19/backup.sh /home/devops/90DaysOfDevOps/2026/day-19/data /home/devops/90DaysOfDevOps/2026/day-19/backup +``` + +### Health Check + +```cron +*/5 * * * * bash /home/devops/90DaysOfDevOps/2026/day-19/healthcheck.sh +``` + +--- + +## Task 4 – Maintenance Script + +The maintenance script: + +- Executes the log rotation script +- Executes the backup script +- Logs execution details with timestamps +- Can be scheduled using Cron + +Cron: + +```cron +0 1 * * * bash /home/devops/90DaysOfDevOps/2026/day-19/maintenance.sh +``` + +--- + +## Sample Output + +``` +Maintenance Started - 2026-07-10 22:11:09 + +Compressed files: 0 +Deleted files: 0 + +Backup created successfully + +Archive Name: +backup-2026-07-10_22-11-09.tar.gz + +Archive Size: +4.0K + +Maintenance Completed +``` + +--- + +# What I Learned + +- How to automate log rotation using Bash. +- How to create compressed backups using tar and gzip. +- How to automate maintenance tasks using Cron jobs. diff --git a/2026/day-19/maintenance.sh b/2026/day-19/maintenance.sh new file mode 100755 index 0000000000..651f24349c --- /dev/null +++ b/2026/day-19/maintenance.sh @@ -0,0 +1,16 @@ +#!/bin/bash + + +LOG_FILE="/var/log/maintenance.log" + +exec >> "$LOG_FILE" 2>&1 + +echo "maintaines startes $(date +"%Y-%m-%d_%H-%M-%S")" + +./rotate.sh ./new_check + + +./backup.sh ./data ./backup + + +echo "maintanence sucessfully $(date +"%Y-%m-%d_%H-%M-%S")" diff --git a/2026/day-19/new_check/erro.log.gz b/2026/day-19/new_check/erro.log.gz new file mode 100644 index 0000000000..cc17c7675a Binary files /dev/null and b/2026/day-19/new_check/erro.log.gz differ diff --git a/2026/day-19/new_check/error.log.10 b/2026/day-19/new_check/error.log.10 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/2026/day-19/new_check/error.log.9 b/2026/day-19/new_check/error.log.9 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/2026/day-19/rotate.sh b/2026/day-19/rotate.sh new file mode 100755 index 0000000000..62513ddbde --- /dev/null +++ b/2026/day-19/rotate.sh @@ -0,0 +1,48 @@ +#!/bin/bash + + +LOG_DIR=$1 + +if [ -z $LOG_DIR ]; then + + echo "Error : missing directory argument" + echo -e "\n" + echo "uses: $0 /path/to/directory" + exit 1 + +fi + +check_dir() { + + if [ ! -d $LOG_DIR ]; then + echo "Directory does not exitst." + exit 1 + + fi + +} + +compress_file() { + + COMPRESSED=$(find "$LOG_DIR" -type f -name "*.log" -mtime +7 | wc -l) + + find "$LOG_DIR" -type f -name "*.log" -mtime +7 -exec gzip {} \; + + echo "Compressed files: $COMPRESSED" +} + +deleted_file() { + + DELETED=$(find "$LOG_DIR" -type f -name "*.gz" -mtime +30 | wc -l) + + find "$LOG_DIR" -type f -name "*.gz" -mtime +30 -delete + + echo "Deleted files: $DELETED" +} + + + + +check_dir +compress_file +deleted_file diff --git a/2026/day-20/archive/day_20_solution.md b/2026/day-20/archive/day_20_solution.md new file mode 100644 index 0000000000..5fefa110f0 --- /dev/null +++ b/2026/day-20/archive/day_20_solution.md @@ -0,0 +1,47 @@ +# Day 20 – Bash Scripting Challenge: Log Analyzer and Report Generator + +## 🚀 Project Overview + +Today I built a **Log Analyzer** using Bash scripting as part of the **#90DaysOfDevOps** challenge. + +The script automates the process of analyzing log files by validating input, detecting errors, identifying critical events, generating a summary report, and archiving processed logs. + +## ✨ Features + +* Accepts a log file as a command-line argument +* Validates user input and file existence +* Counts total **ERROR** and **Failed** entries +* Displays **CRITICAL** events with line numbers +* Finds the **Top 5 most common error messages** +* Generates a daily report: + + * Date of analysis + * Log file name + * Total lines processed + * Total error count + * Top 5 error messages + * Critical events +* Creates an `archive/` directory (if it doesn't exist) +* Moves processed log files into the archive + +## 🛠️ Commands & Tools Used + +* Bash +* grep +* awk +* sort +* uniq +* head +* wc +* mkdir +* mv +* date + +## 📚 What I Learned + +* How to automate log analysis using Bash scripting. +* How Linux pipelines (`|`) combine multiple commands to solve real-world problems. +* How DevOps engineers generate reports and archive processed logs for better log management. + +This project helped me understand how automation is used in real DevOps environments to reduce manual work and improve operational efficiency. + diff --git a/2026/day-21/shell_scripting_cheatsheet.md b/2026/day-21/shell_scripting_cheatsheet.md new file mode 100644 index 0000000000..05e88fb795 --- /dev/null +++ b/2026/day-21/shell_scripting_cheatsheet.md @@ -0,0 +1,92 @@ +# 🐧 Day 21 – Shell Scripting Cheat Sheet + +## 📖 Task Overview + +Today's challenge was to create a **personal Shell Scripting Cheat Sheet** that can be used as a quick reference throughout my DevOps journey. + +Instead of searching documentation every time, I now have a single place containing the most commonly used Shell scripting concepts, syntax, commands, and real-world examples. + +--- + +## ✅ What I Covered + +### 🔹 Shell Scripting Basics +- Shebang (`#!/bin/bash`) +- Running Shell Scripts +- Comments +- Variables +- User Input +- Command-Line Arguments + +### 🔹 Operators & Conditionals +- String Comparisons +- Integer Comparisons +- File Test Operators +- if / elif / else +- Logical Operators +- Case Statements + +### 🔹 Loops +- for Loop +- while Loop +- until Loop +- break & continue +- Looping through files +- Reading command output + +### 🔹 Functions +- Creating Functions +- Calling Functions +- Function Arguments +- Return Values +- Local Variables + +### 🔹 Text Processing Commands +- grep +- awk +- sed +- cut +- sort +- uniq +- tr +- wc +- head +- tail + +### 🔹 Useful DevOps One-Liners +- Delete old files +- Count log lines +- Replace strings across files +- Check running services +- Monitor disk usage +- Parse CSV / JSON +- Tail logs and filter errors + +### 🔹 Error Handling & Debugging +- Exit Codes +- `set -e` +- `set -u` +- `set -o pipefail` +- `set -x` +- `trap` + +### 🔹 Quick Reference Table +A summarized table of commonly used Shell scripting syntax for quick revision. + +--- + +## 🎯 Why I Built This + +This cheat sheet is designed to be my personal Shell Scripting reference guide. + +Whenever I forget a command or syntax while practicing Linux, Bash, CI/CD, or DevOps projects, I can quickly refer to this document instead of searching through multiple resources. + +--- + +## 🚀 Key Takeaway + +Building your own documentation is one of the best ways to revise concepts and improve problem-solving skills. This cheat sheet will continue to grow as I learn more advanced Shell scripting throughout my DevOps journey. + +--- + +#90DaysOfDevOps #TrainWithShubham #DevOpsKaJosh #Linux #ShellScripting #Bash #DevOps diff --git a/2026/day-21/shell_scripting_cheetsheet.md b/2026/day-21/shell_scripting_cheetsheet.md new file mode 100644 index 0000000000..c3ce30b57c --- /dev/null +++ b/2026/day-21/shell_scripting_cheetsheet.md @@ -0,0 +1,616 @@ +# 🐚 Shell Scripting Cheat Sheet + +A quick reference guide for Shell Scripting concepts learned during the #90DaysOfDevOps challenge. + +--- + +# 📚 Quick Reference Table + +| Topic | Key Syntax | Example | +|---------|------------|----------| +| Variable | `VAR="value"` | `NAME="DevOps"` | +| Argument | `$1`, `$2` | `./script.sh file.txt` | +| If | `if [ condition ]; then` | `if [ -f file ]; then` | +| For Loop | `for i in list; do` | `for i in 1 2 3; do` | +| Function | `name(){}` | `greet(){ echo "Hi"; }` | +| Grep | `grep pattern file` | `grep -i error log.txt` | +| Awk | `awk '{print $1}' file` | `awk -F: '{print $1}' /etc/passwd` | +| Sed | `sed 's/old/new/g'` | `sed -i 's/foo/bar/g' file` | + +--- + +# 1️⃣ Basics + +## Shebang + +```bash +#!/bin/bash +``` + +Tells Linux to execute the script using Bash. + +--- + +## Running a Script + +```bash +chmod +x script.sh +./script.sh +``` + +or + +```bash +bash script.sh +``` + +--- + +## Comments + +```bash +# Single line comment + +echo "Hello" # Inline comment +``` + +--- + +## Variables + +```bash +NAME="Chaitanya" + +echo $NAME + +echo "$NAME" + +echo '$NAME' +``` + +Double quotes expand variables. + +Single quotes print text literally. + +--- + +## Reading User Input + +```bash +read NAME + +echo $NAME +``` + +Prompt example + +```bash +read -p "Enter Name: " NAME +``` + +--- + +## Command Line Arguments + +```bash +echo $0 +echo $1 +echo $2 +echo $# +echo $@ +echo $? +``` + +| Variable | Meaning | +|----------|----------| +| `$0` | Script name | +| `$1` | First argument | +| `$2` | Second argument | +| `$#` | Number of arguments | +| `$@` | All arguments | +| `$?` | Previous command exit code | + +--- + +# 2️⃣ Operators & Conditionals + +## String Comparison + +```bash +[ "$A" = "$B" ] + +[ "$A" != "$B" ] + +[ -z "$A" ] + +[ -n "$A" ] +``` + +--- + +## Integer Comparison + +```bash +[ 5 -eq 5 ] + +[ 5 -ne 4 ] + +[ 5 -lt 8 ] + +[ 5 -gt 2 ] + +[ 5 -le 5 ] + +[ 5 -ge 3 ] +``` + +--- + +## File Tests + +```bash +-f file + +-d folder + +-e file + +-r file + +-w file + +-x file + +-s file +``` + +--- + +## If Else + +```bash +if [ condition ] +then + echo OK +elif [ condition ] +then + echo YES +else + echo NO +fi +``` + +--- + +## Logical Operators + +```bash +&& + +|| + +! +``` + +Example + +```bash +[ -f test.txt ] && echo Exists +``` + +--- + +## Case Statement + +```bash +case $1 in + +start) +echo Start +;; + +stop) +echo Stop +;; + +*) +echo Invalid +;; + +esac +``` + +--- + +# 3️⃣ Loops + +## For Loop + +```bash +for i in 1 2 3 +do +echo $i +done +``` + +C Style + +```bash +for((i=1;i<=5;i++)) +do +echo $i +done +``` + +--- + +## While Loop + +```bash +count=1 + +while [ $count -le 5 ] +do +echo $count +((count++)) +done +``` + +--- + +## Until Loop + +```bash +count=1 + +until [ $count -gt 5 ] +do +echo $count +((count++)) +done +``` + +--- + +## Break & Continue + +```bash +break + +continue +``` + +--- + +## Loop Files + +```bash +for file in *.log +do +echo $file +done +``` + +--- + +## Read File Line by Line + +```bash +while read line +do +echo $line +done < file.txt +``` + +--- + +# 4️⃣ Functions + +## Define Function + +```bash +greet(){ + +echo "Hello" + +} +``` + +--- + +## Call Function + +```bash +greet +``` + +--- + +## Function Arguments + +```bash +greet(){ + +echo $1 + +} + +greet Chaitanya +``` + +--- + +## Return + +```bash +return 0 +``` + +Print value + +```bash +echo "Done" +``` + +--- + +## Local Variable + +```bash +function test(){ + +local NAME="DevOps" + +} +``` + +--- + +# 5️⃣ Text Processing + +## grep + +```bash +grep error log.txt + +grep -i error log.txt + +grep -r error . + +grep -c error log.txt + +grep -n error log.txt + +grep -v error log.txt + +grep -E "error|warning" log.txt +``` + +--- + +## awk + +```bash +awk '{print $1}' file + +awk -F: '{print $1}' /etc/passwd + +awk '/error/' log.txt + +awk 'BEGIN{print "Start"} {print $1} END{print "Done"}' +``` + +--- + +## sed + +```bash +sed 's/foo/bar/g' file + +sed -i 's/foo/bar/g' file + +sed '3d' file +``` + +--- + +## cut + +```bash +cut -d: -f1 /etc/passwd +``` + +--- + +## sort + +```bash +sort file + +sort -n file + +sort -r file + +sort -u file +``` + +--- + +## uniq + +```bash +uniq file + +uniq -c file +``` + +--- + +## tr + +```bash +tr a-z A-Z + +tr -d '\r' +``` + +--- + +## wc + +```bash +wc file + +wc -l file + +wc -w file + +wc -c file +``` + +--- + +## head & tail + +```bash +head -5 file + +tail -10 file + +tail -f app.log +``` + +--- + +# 6️⃣ Useful One-Liners + +Delete files older than 30 days + +```bash +find . -type f -mtime +30 -delete +``` + +Count lines in all log files + +```bash +wc -l *.log +``` + +Replace text in multiple files + +```bash +sed -i 's/http/https/g' *.conf +``` + +Check service + +```bash +systemctl is-active nginx +``` + +Disk usage alert + +```bash +df -h +``` + +Watch logs + +```bash +tail -f app.log | grep ERROR +``` + +CSV Parsing + +```bash +cut -d, -f2 employees.csv +``` + +JSON Parsing + +```bash +jq '.name' user.json +``` + +--- + +# 7️⃣ Error Handling + +Exit Status + +```bash +echo $? + +exit 0 + +exit 1 +``` + +--- + +Exit on Error + +```bash +set -e +``` + +--- + +Unset Variable Error + +```bash +set -u +``` + +--- + +Pipe Error + +```bash +set -o pipefail +``` + +--- + +Debug Mode + +```bash +set -x +``` + +--- + +Trap + +```bash +cleanup(){ + +echo Cleaning + +} + +trap cleanup EXIT +``` + +--- + +# 📌 Useful Tips + +- Always quote variables (`"$VAR"`). +- Prefer `$(command)` over backticks. +- Use `set -euo pipefail` in production scripts. +- Keep functions small and reusable. +- Validate user input before processing. +- Add comments for complex logic. + +--- + +## 📖 References + +- Bash Manual +- GNU Coreutils +- Linux Man Pages + +--- + +⭐ Created as part of the **#90DaysOfDevOps** challenge. diff --git a/2026/day-22/devops-git-practice/git-command.md b/2026/day-22/devops-git-practice/git-command.md new file mode 100644 index 0000000000..c3681a0ce9 --- /dev/null +++ b/2026/day-22/devops-git-practice/git-command.md @@ -0,0 +1,44 @@ +# Git Local SetUp + +- Check git version + +`git -v` + +- If git is not installed + +`sudo apt update` + +`sudo apt install git` + +- Setup git configuration + +`git config --global user.name "chaitanya kolse"` + +`git config --global user.email "chaitayakolse738@gmail.com"` + +# Git Commands + +| Command | Usage | Example | +|----------|----------|----------| +| `git init` | initialize a repo inside directory | `git init` | +| `git clone ` | clone an existing repo | `git clone https://github.com/chaitanya738-art/90DaysOfDevOps.git` | +| `git add file` | add untracked files | `git add demo.txt` | +| `git commit` | make a commit | `git commit -m "added demo.txt"` | +| `git reset file` | unstage a file | `git reset demo.txt` | +| `git status` | check if anything to commit/add | `git status` | +| `git log` | check commit history | `git log` | +| `git diff` | show unstaged changes | `git diff` | +| `git restore file` | discard local changes | `git restore demo.txt` | +| `git branch` | list all branches | `git branch` | +| `git branch feature` | create a new branch | `git branch feature` | +| `git checkout feature` | switch branch | `git checkout feature` | +| `git checkout -b feature` | create and switch branch | `git checkout -b feature` | +| `git merge feature` | merge branch into current branch | `git merge feature` | +| `git remote -v` | view remote repositories | `git remote -v` | +| `git push origin master` | push changes to GitHub | `git push origin master` | +| `git pull origin master` | pull latest changes | `git pull origin master` | +| `git fetch` | download remote changes | `git fetch` | +| `git stash` | temporarily save changes | `git stash` | +| `git stash pop` | restore stashed changes | `git stash pop` | +| `git revert ` | creates new commit that undoes changes made by given commit | `git revert abc123` | +| `git tag` | list tags | `git tag` | diff --git a/2026/day-23/day-23-notes.md b/2026/day-23/day-23-notes.md new file mode 100644 index 0000000000..8e59e894be --- /dev/null +++ b/2026/day-23/day-23-notes.md @@ -0,0 +1,57 @@ +### Git branches + + +## what is a branch in Git + +- the branch in git workplace place here we do our work. + +## why do we use branches instead of committing everything to main? + +- becase we need seperate workspace to do our work if we write in direct main it can brack you branch and application. + + +## what is Head in Git ? + +- head is in git target the current commit-id in the bracnh + +## what happens to your files when you switch branhes? + +- it can make brack work work . + +- it can make unsaved your work while switching . + +## what is diffrence between origin and upstrem + +- orign is that mens you own repo where you are working . + +- upstrem mens another person repo thats you forked thats is upstrem. + + +## what is the diffrence between in git fetch and pull + +- git fetch only download latst changes from github + +- git pull is dowload latest changes and merge this changes in you repo. + + +# what is diffrence between clone and fork? + +- clone mens we direct clone another repo in local we canot push changes on this repository. because we dont have acess it. + +- fork mens we fork this repo thats repo copy on your acount now you can psuh changes add changes in this repo becuse now you have copy to this originl repo yourside. + + +# when would you use clone vs fork + +- if i want only practice on local the use clone. + +- when i want practice on local with github also this changes change then i use fork + + +## After forking, how do you keep your fork in sync with the original repository? + +1. Add the original repository as an upstream remote. +2. Run git fetch upstream. +3. Merge or rebase the latest changes from upstream/main into your branch. + + diff --git a/2026/day-26/git-commands.md b/2026/day-26/git-commands.md new file mode 100644 index 0000000000..f568da6779 --- /dev/null +++ b/2026/day-26/git-commands.md @@ -0,0 +1,44 @@ +# Git Local SetUp + +- Check git version + +`git -v` + +- If git is not installed + +`sudo apt update` + +`sudo apt install git` + +- Setup git configuration + +`git config --global user.name "Chaitanya kolse"` + +`git config --global user.email "Chaitanyakolse738@gmail.com"` + +# Git Commands + +| Command | Usage | Example | +|----------|----------|----------| +| `git init` | initialize a repo inside directory | `git init` | +| `git clone ` | clone an existing repo | `git clone https://github.com/chaitanya738-art/90DaysOfDevOps.git` | +| `git add file` | add untracked files | `git add demo.txt` | +| `git commit` | make a commit | `git commit -m "added demo.txt"` | +| `git reset file` | unstage a file | `git reset demo.txt` | +| `git status` | check if anything to commit/add | `git status` | +| `git log` | check commit history | `git log` | +| `git diff` | show unstaged changes | `git diff` | +| `git restore file` | discard local changes | `git restore demo.txt` | +| `git branch` | list all branches | `git branch` | +| `git branch feature` | create a new branch | `git branch feature` | +| `git checkout feature` | switch branch | `git checkout feature` | +| `git checkout -b feature` | create and switch branch | `git checkout -b feature` | +| `git merge feature` | merge branch into current branch | `git merge feature` | +| `git remote -v` | view remote repositories | `git remote -v` | +| `git push origin master` | push changes to GitHub | `git push origin master` | +| `git pull origin master` | pull latest changes | `git pull origin master` | +| `git fetch` | download remote changes | `git fetch` | +| `git stash` | temporarily save changes | `git stash` | +| `git stash pop` | restore stashed changes | `git stash pop` | +| `git revert ` | creates new commit that undoes changes made by given commit | `git revert abc123` | +| `git tag` | list tags | `git tag` |