A practical DevOps automation toolkit demonstrating Python scripting, Git workflow, Maven CI and Bash automation — built as a junior DevOps portfolio project.
| Script | Language | What it does |
|---|---|---|
scripts/health_checker.py |
Python | Checks system services, disk & memory — cross-platform (Windows + Linux) |
scripts/log_analyzer.py |
Python | Parses nginx access logs, reports traffic stats |
scripts/github_info.py |
Python | Fetches repo info & recent commits via GitHub API |
scripts/deploy_sim.sh |
Bash | Simulates a full deployment pipeline with logging |
maven-app/ |
Java/Maven | Buildable Maven project with JUnit 5 tests for CI simulation |
# Clone
git clone https://github.com/istrate-mihai/Devops-Automation-Toolkit.git
cd Devops-Automation-Toolkit
# Install Python deps
pip install -r requirements.txtOn Windows use python, on Linux/macOS use python3.
See docs/SETUP.md for full setup instructions including Git hooks and Maven build.
Monitors system services, disk usage, and memory. Works on both Windows (via sc query + wmic) and Linux (via systemctl + free).
python scripts/health_checker.py --json
python scripts/health_checker.py --services nginx docker redisOutput:
Services show
FAILEDif not installed/running — this is correct behaviour. Disk and memory are read from the real system.
Parses nginx combined access log format and reports traffic statistics.
# Generate a test log
echo '192.168.1.1 - - [15/Jan/2024:10:00:01 +0000] "GET /api/health HTTP/1.1" 200 512' > test.log
echo '192.168.1.2 - - [15/Jan/2024:10:00:02 +0000] "POST /api/login HTTP/1.1" 401 128' >> test.log
echo '192.168.1.1 - - [15/Jan/2024:10:00:03 +0000] "GET /index.html HTTP/1.1" 200 4096' >> test.log
python scripts/log_analyzer.py test.logOutput:
Fetches repository metadata and last 5 commits from the GitHub REST API.
python scripts/github_info.py torvalds/linux
python scripts/github_info.py docker/compose --token ghp_yourtokenSimulates a full deployment pipeline: prerequisites check → backup → tests → container swap.
bash scripts/deploy_sim.sh webapp production 2.1.0cd maven-app
mvn clean package
java -jar target/devops-automation-toolkit-1.0.0.jarOutput:
Tests run: 2, Failures: 0, Errors: 0 — JUnit 5 tests pass on every build.
Pipeline defined in .github/workflows/ci.yml. Runs automatically on every push to main or develop.
| Job | What it does | Time |
|---|---|---|
Python Lint |
flake8 on all scripts | 9s |
Python Script Smoke Test |
verifies scripts run without crashing | 6s |
Maven Build |
mvn clean package + JUnit tests |
23s |
* 5442253 (HEAD -> main, origin/main) Updated README.md and docs/SETUP.md
* a90c38a fix(scripts): fix flake8 linting errors (E302, E401, E702, E221, F401)
* 9dc8abf Tested Logs Locally
* ff7ec2f fix(scripts): make health_checker cross-platform (Windows + Linux)
* 350d063 feat(maven): pom.xml
* ad931c9 feat(maven): add App.java and AppTest.java source files
* a77e418 Added scripts for health_checker.py, log_analyzer.py, github_info.py, deploy_sim.sh
* 755b405 Added .github directory with ci.yml and added docs/SETUP.md
* bea2585 Initial Commit: Added README.md
This project follows Gitflow branching strategy with Conventional Commits enforced via a commit-msg hook.
main ← stable releases, tagged (v1.0.0)
develop ← integration branch
feature/* ← one branch per feature, merged --no-ff into develop
Starting a new feature:
git checkout develop
git checkout -b feature/my-feature
git commit -m "feat(scope): add my feature"
git checkout develop
git merge --no-ff feature/my-feature
git branch -d feature/my-featureConventional Commits types: feat fix docs style refactor test ci chore
| Hook | Trigger | What it does |
|---|---|---|
commit-msg |
Every commit | Enforces Conventional Commits format |
pre-commit |
Every commit | Runs flake8 on staged Python files |
# Activate after cloning (Linux/macOS)
chmod +x .git/hooks/commit-msg .git/hooks/pre-commit
pip install flake8devops-automation-toolkit/
├── README.md
├── .gitignore
├── requirements.txt
├── .github/
│ └── workflows/
│ └── ci.yml
├── scripts/
│ ├── health_checker.py # cross-platform: Windows + Linux
│ ├── log_analyzer.py
│ ├── github_info.py
│ └── deploy_sim.sh
├── maven-app/
│ ├── pom.xml
│ └── src/
│ ├── main/java/com/devops/App.java
│ └── test/java/com/devops/AppTest.java
└── docs/
├── SETUP.md
└── screenshots/
├── GithubActions.png
├── health_checker.png
├── log_analyzer.png
└── maven_build.png
MIT — open source, free to use, modify, and distribute.
Built as a DevOps portfolio project demonstrating: Gitflow workflow, Python scripting, Maven CI/CD, and Bash automation.



