Skip to content

Project — Production Shell Automation Framework

Capstone portfolio build — a modular shell automation framework for DevOps and platform workflows.

Project Overview

Goal: Design and ship a cohesive framework that demonstrates production Bash engineering: modular scripts, logging, configuration, scheduling, notifications, error handling, reporting, backup, monitoring, and security checks.

Deliverable for your portfolio:

Capability Example artefact
Modular scripts bin/rebashctl + lib/ + modules/
Logging JSON-ish or key=value logs on stderr; correlation id
Configuration config/framework.yaml or .conf parsed with yq/awk
Scheduling crontab examples + systemd timer/service sketches
Notifications Pluggable webhook/email stub (dry-run prints payload)
Error handling trap, exit taxonomy, optional retries
Reporting Dated HTML or Markdown bundle under out/reports/
Backup Directory backup module with retention + flock
Monitoring Disk/CPU/mem/service/cert checks
Security checks SSH config audit (read-only), world-writable path scan (lab scoped)

Estimated cost: £0.

Goals

  • One entrypoint dispatches modules without copy-paste
  • Config drives thresholds, inventories, and feature flags
  • Notifications are dry-run safe (no real spam by default)
  • Backup and deploy paths use locks and traps
  • Report module aggregates check results
  • Security checks are read-only unless --apply (default off)
  • validate.sh + documented demo on a clean Ubuntu VM

Stack

Piece Choice
Language Bash 4.2+
Parsers jq, yq (mikefarah)
Remote OpenSSH BatchMode
Schedule cron and/or systemd timers
Layout bin/, lib/, modules/, config/, templates/, out/, units/, tests/

Prerequisites

Milestones

Milestone 1 — Framework core

Entrypoint, module loader, logging, config, exit taxonomy, trap/flock helpers.

Milestone 2 — Monitoring + backup + security

Implement check modules, backup retention, and read-only security scans scoped to lab paths.

Milestone 3 — Scheduling + notifications + reporting

Timer/cron examples; notification stub; report bundle generator.

Milestone 4 — Hardening and demo

ShellCheck-clean scripts, smoke/integration validation, architecture diagram in README, short demo script/recording notes.

Architecture sketch

rebashctl -> config -> modules (monitor|backup|secure|report|notify)
                 |         |
                 +--> lib/common (log, lock, retry)
                 +--> out/reports + out/logs

Success criteria

  • Demo VM: install, run rebashctl report, show non-zero exit on forced alert
  • README includes operational runbook (cron, locks, failure modes)
  • No hardcoded secrets; webhook URLs come from env/config
  • Clear statement of non-goals (not a replacement for Prometheus/Ansible at scale)