This assignment tests your DevOps fundamentals:
- Bash scripting
- Git workflow (branching, commits, pull requests)
- Automation mindset
- System monitoring and logging
You will build a real-world automation toolkit and submit it via a Pull Request (PR).
devops-bash-toolkit-assestment/
β
βββ scripts/
β βββ user_info.sh
β βββ system_check.sh
β βββ file_manager.sh
β βββ backup.sh
β βββ process_monitor.sh
β
βββ run_all.sh # OPTIONAL (Bonus)
β
βββ README.md
π§βπ» Getting Started
- Fork the Repository
Click the Fork button on GitHub.
- Clone Your Fork
git clone <your-fork-url>
cd devops-bash-toolkit- Create a Feature Branch
git checkout -b feature/<your-name>- Complete the Scripts Implement all required scripts inside:
scripts/- Make Scripts Executable
chmod +x scripts/*.sh- Commit Your Work
git add .
git commit -m "feat: complete bash scripts"- Push to GitHub
git push origin feature/<your-name>- Create Pull Request
Open a Pull Request to the main repository.
πΉ A. user_info.sh Requirements
-
Prompt the user for:
-
Name
-
Age
-
Country
-
-
Validate:
- Age must be numeric
-
Output:
- A greeting message
-
Age category:
-
Minor (<18)
-
Adult (18β65)
-
Senior (65+)
-
-
Handle missing or invalid input gracefully
-
Save output to:
logs/user_info.logπΉ B. system_check.sh Requirements
-
Display:
-
Disk usage (df -h)
-
Memory usage (free -m)
-
CPU load (uptime)
-
-
Warn if disk usage exceeds 80%
-
Save report to:
logs/system_report_<date>.log-
Count total running processes
-
Display top 5 memory-consuming processes
πΉ C. file_manager.sh Requirements
-
Support the following commands:
-
create
-
delete
-
list
-
rename
-
-
Example usage:
./file_manager.sh create file.txt-
Prevent overwriting existing files
-
Log all actions to:
logs/file_manager.logπΉ D. backup.sh Requirements
-
Accept a directory as input
-
Validate that the directory exists
-
Create a compressed backup:
backup_<timestamp>.tar.gz- Store backups in:
backups/-
Keep only the last 5 backups (delete older ones)
-
Log backup activity
β E. process_monitor.sh(Optional Bonus) Requirements
-
Accept a process name as input
-
Check if the process is running
-
If NOT running:
- Attempt restart (or simulate restart)
-
Output:
-
Running
-
Stopped
-
Restarted
-
-
Use an array:
services=("nginx" "ssh" "docker")- Log monitoring results
β F. run_all.sh (Optional Bonus) Requirements
Provide an interactive menu:
- Run all
- System check
- Backup
- Exit
-
Use functions to organize logic
-
Call scripts from the scripts/ directory
-
Include:
set -euo pipefail -
Log all actions to:
logs/app.log- Handle script failures gracefully
Submission link: CLICK HERE