Skip to content

Project — Production Operations Toolkit

Advanced portfolio build — ops automation you could drop onto bastions with care.

Project Overview

Goal: Package production-oriented shell tools: host health, certificate expiry, SSH fan-out, and a staged deploy helper — all with flock, traps, and structured logs.

Deliverable for your portfolio:

  • CLI: rebash-ops <command>
  • Modules: health, certs, ssh-run, deploy, backup
  • Inventory file support (config/hosts.txt)
  • Lock files for deploy/backup
  • JSON or TSV summaries via jq where useful
  • validate.sh + sample systemd timer unit sketches

Estimated cost: £0.

Goals

  • Health aggregates disk, memory/load, and optional HTTP checks
  • Cert checker warns N days before expiry
  • SSH runner uses BatchMode and timeouts
  • Deploy supports dry-run, health check, and rollback symlink
  • Overlapping critical jobs are serialised with flock

Stack

Piece Choice
Language Bash
Extras jq, openssl, curl, OpenSSH
Layout bin/, lib/, cmd/, config/, out/, units/

Prerequisites

Milestones

Milestone 1 — Shared runtime

Logging contract, exit taxonomy, config loader, lock helpers.

Milestone 2 — Observability commands

health and certs with machine-readable RESULT lines.

Milestone 3 — Remote + deploy

ssh-run inventory loop; deploy staged releases under a lab prefix.

Milestone 4 — Packaging

Timer unit sketches, CHANGELOG, version flag, smoke validation.

Success criteria

  • Critical paths are dry-run capable
  • Failures are obvious in logs (stderr) and exit codes
  • README states security boundaries (no password auth, lab path prefixes)