This page is a scrubbed, public-safe version of an internal AI/SI operations runbook — the
command cheat-sheet a systems engineer builds up over years of running Linux servers,
virtualisation hosts, firewalls, databases, certificates and Raspberry Pi devices.
It is organised into the same sections as the original workbook, one page each — reach any of
them from the AI/SI Prompts menu above. Every
task on this page shows three things:
A description — what the task achieves and which tools it uses.
The commands — the actual snippet, exactly as recorded, with every
credential, token, licence key and internal host name or IP replaced by a
<PLACEHOLDER>.
An AI prompt — a ready-to-paste instruction that asks an AI assistant to
regenerate that snippet as a clean, parameterised, re-runnable script.
The point of the AI-prompt column is to show how a pile of accumulated tribal knowledge can
be turned into something an assistant can reproduce and improve on demand: you keep the intent,
and let the model rewrite the mechanics for whatever host you are on today. Nothing on this
page should be run without reading it first — several snippets are destructive
(dd, rm -rf, postsuper -d ALL, firewall reloads).
Architecture Diagram
Setup GitHub Actions CI/CD with self-hosted runner, database replication, and reverse proxy
Complete workflow to establish SSH access to multiple servers, replicate MySQL database, configure a self-hosted GitHub Actions runner, create deployment users, and set up an Apache reverse proxy for service exposure.
AI Prompt
I have SSH and sudo access to two servers: mydev (ssh mydev) and mysqldb (ssh mysqldb). Generate a detailed, step-by-step runbook for the following:
Database Replication: Copy the MySQL database "mydevdb" from the mydev server to the mysqldb server. Generate the SQL to create a new user and password on mysqldb with full privileges on the replicated database. Output the username and password.
GitHub Actions Runner Setup: On the mysqldb server, install and configure a self-hosted GitHub Actions runner for the "mydev" project repository. Configure it to automatically deploy the mydev project to the mysqldb server whenever there is a push to the main branch. Create a dedicated "mydev" Linux user account on mysqldb for the runner process. Output the user account password.
Reverse Proxy Configuration: On the mydev server, configure Apache as a reverse proxy that forwards traffic from mydev.mrai.dev on port 3020 to the mysqldb server. Show the VirtualHost block configuration, SSL setup if applicable, and verification steps.
For each step, provide:
The exact commands to run (with <PLACEHOLDERS> for secrets)
Expected output and verification steps
Failure scenarios and troubleshooting
Assume CentOS/RHEL or Debian/Ubuntu as appropriate
Never hard-code credentials — generate them and display them for capture