DevOps
& Infrastructure

Hands-on guides, automation scripts, and CI/CD pipelines for Linux servers, Windows workstations, and the plumbing in between.

15
DevOps Guides
4
CI Jobs (lint + integration)
5
Silent Installers
3
OS Families Covered

DevOps Guides

Hands-on guides and automation scripts for Linux firewalls and WireGuard VPN access to Windows.

Fedora Firewalls: The Essentials

Complete guide to firewalld on Fedora — zones, services, rich rules, and the mental model behind trust levels. From first rule to production lockdown.

Fedora firewalld nftables

Ubuntu Firewalls: The Essentials

UFW from scratch — ordered rules, default policies, logging, and when to drop down to iptables. Straightforward firewall management without the ceremony.

Ubuntu UFW iptables

WireGuard Fedora Setup Script

Bash script that automates WireGuard server install on Fedora: key generation, wg0.conf creation, firewalld rules, and systemd service bring-up. Supports --add-peer.

Bash WireGuard systemd

WireGuard: Fedora ↔ Windows

Remote access VPN from Windows to a Fedora host, with SSH locked to the tunnel. Full walk-through from server config to Windows client — plus a concise quick-reference.

Fedora Windows SSH hardening

WireGuard: Ubuntu ↔ Windows

Ubuntu server + Windows client setup with UFW rules and SSH bound to the VPN subnet. Includes both the complete guide and a quick-start variant for fast rebuilds.

Ubuntu Windows UFW

Fedora 43 Server Hardening Script

One-shot Bash hardening pass: AIDE, auditd, fail2ban, SELinux enforcing, USBGuard, password quality, SSH lockdown, and firewalld baseline. Idempotent and log-everything.

Fedora Bash SELinux auditd

firewalld Port Forwarding: Host → VM

Expose a service running inside a libvirt VM on the host's LAN IP. Zone selection, masquerade, IP forwarding, and WireGuard-aware troubleshooting for when it only half-works.

firewalld libvirt Fedora

Samba Share: Fedora Host ↔ Windows KVM

Read/write folder on the Fedora host exposed over SMB to Windows guests on libvirt's default network. Covers SELinux contexts, firewalld in the libvirt zone, and Samba user mapping.

Samba Windows KVM SELinux

KVM + Active Directory

Single-forest Windows Server 2022 domain controller in a libvirt VM: qcow2 provisioning, static IP with self-referencing DNS, Install-ADDSForest, and an OU + test user ready for Exchange to pick up.

Windows Server libvirt Active Directory KVM

KVM + Exchange

Exchange Server 2019 joined to the lab forest: split OS / data disks, AD schema prep, silent install, OWA bring-up, test mailboxes, and a dependency-ordered clean-shutdown script so transaction logs don't strand a database dirty.

Exchange Windows Server libvirt KVM

AD: Monthly Patching (Two-DC)

Monthly Windows-update runbook for a two-DC pair. Baseline repadmin /replsummary + dcdiag, one-DC-at-a-time ordering, post-patch replication verification, and rollback notes for when DFSR refuses to converge.

Windows Server Active Directory Patching Windows

AD: Shutdown Playbook (Two-DC)

Four shutdown procedures for a two-DC pair: single-DC graceful, planned full outage, fast controlled emergency, and minimum-damage imminent power loss. Covers FSMO-host-last ordering, SYSVOL flush, and a post-boot health checklist.

Windows Server Active Directory Shutdown Windows

Exchange DAG: CU / SU Upgrade

Update playbook for a two-server Exchange 2019 DAG covering both Cumulative and Security Updates. Baseline capture, Move-ActiveMailboxDatabase, StartDagServerMaintenance, silent install, health gate, and copy reactivation by ActivationPreference.

Exchange Windows Server Patching Windows

Exchange DAG: Shutdown Playbook

Four shutdown scenarios for a two-server Exchange 2019 DAG: one-at-a-time maintenance, planned full outage, fast controlled emergency, and imminent-power-loss triage. Covers quorum handling, dismount order, and IIS/W3SVC teardown.

Exchange Windows Server Shutdown Windows

Observability: Grafana + InfluxDB + Telegraf

Docker Compose stack that ingests Cisco IOS-XE model-driven telemetry over gRPC dial-out. Includes Cisco telemetry ietf subscription templates and ready-to-paste Flux queries for CPU, memory, interface rates, errors, and OSPF neighbor state.

Grafana InfluxDB Telegraf Cisco MDT

CI/CD Pipelines

Real GitHub Actions workflows that gate every script in this repo — run on each push, block merges on failure.

What's this?

A CI/CD pipeline is a set of automated checks that run every time the code in a repo changes. The goal is to catch regressions before a bad commit reaches anyone — the pipeline stops a broken change at the gate, not in production.

This one has three parallel jobs, triggered on every push to main, every pull request, a weekly cron, and a manual dispatch button:

  1. shell-lint — ShellCheck and shfmt scan every .sh in the repo without executing it. Catches real bugs (unquoted variables, cd without || exit, bashisms inside sh scripts) and formatting drift before the code ever runs on a real machine.
  2. ubuntu-workstation — spins up a clean ubuntu:24.04 container, creates a non-root user, runs dev-workstation.sh end-to-end, then asserts every tool the script claims to install (git, node, nvim, rg, fd, tmux, jq, bat) is actually on PATH afterwards. This is what catches "I refactored the install and now fd isn't installed anymore" — the script exits 0 but the tool is gone.
  3. fedora-hardening — spins up a clean fedora:latest container and runs Fedora-Server-Hardening-script.sh. Assertions then grep the declarative outputs (SSH keys in sshd_config, sysctl knobs, pwquality.conf minlen, faillock.conf deny count, audit rules, /etc/shadow permissions) to prove the hardening landed. systemd-dependent steps (service starts) are tolerated because a container isn't PID 1 init; the config-file surface is what matters.

Green on every commit is the difference between claiming the scripts work and proving they work on a fresh box. The run history is public under the repo's Actions tab — anyone can click in, read the logs, and verify.

CI — Lint & Integration Tests

GitHub Actions · 3 jobs

One workflow, three parallel jobs. Linting gates every .sh via ShellCheck + shfmt; two integration jobs run the dev-workstation installer in an Ubuntu container and the Fedora server-hardening script in a Fedora container, asserting the expected config landed. Runs on every push & PR, plus weekly to catch upstream package regressions.

shell-lint
(ShellCheck + shfmt)
ubuntu-workstation
Ubuntu 24.04 container
fedora-hardening
Fedora container
# .github/workflows/ci.yml name: CI on: [push, pull_request, workflow_dispatch] schedule: - cron: '0 6 * * 1' # weekly jobs: shell-lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: ludeeus/action-shellcheck@2.0.0 - run: shfmt -d -i 4 -ci $(shfmt -f .) ubuntu-workstation: runs-on: ubuntu-latest container: ubuntu:24.04 steps: - run: bash scripts/dev-workstation.sh - run: for b in git node rg fd nvim tmux jq bat; do command -v $b; done fedora-hardening: runs-on: ubuntu-latest container: fedora:latest steps: - run: bash scripts/Fedora-Server-Hardening-script.sh || true - run: grep -q '^PermitRootLogin no' /etc/ssh/sshd_config

Automated Installs

Silent, unattended installers and deployment scripts for common Windows software stacks.

Developer Workstation

~15 min unattended

Bootstraps a fresh dev box on Windows or Ubuntu. Installs VS Code, Git, Node.js, .NET SDK, Docker, plus shell tooling on Linux (ripgrep, fd, fzf, bat, tmux, neovim).

  1. Install package manager (Chocolatey on Windows, apt on Ubuntu)
  2. Deploy curated package list, skipping anything already present
  3. Add Docker's official repo on Ubuntu & enable the service
  4. Idempotent — safe to re-run
Windows (PowerShell as admin)
Ubuntu (bash)

Server Base Image

~15 min unattended

One-shot baseline hardening for Fedora or FreeBSD servers. AIDE, auditd, fail2ban, SELinux enforcing, USBGuard, SSH lockdown, and firewalld on Fedora; PF, SSH hardening, sysctl & blacklist.conf on FreeBSD. Log-everything, idempotent.

  1. Install security tooling (AIDE, auditd, fail2ban, rkhunter)
  2. Enforce SELinux / configure PF firewall
  3. Lock down SSH — no root login, key-only, limited ciphers
  4. Write a timestamped log of every change made
Fedora 43 (bash as root)
FreeBSD 14+ (sh as root)

Build Agent Node

~20 min unattended

Ubuntu 22.04 / 24.04 build agent with every common toolchain: Node, Python, Java, .NET, Go, Rust, Docker. Headless, idempotent, flag-driven (--skip-* / --with-cloud).

  1. Install language SDKs & runtimes (skip any with --skip-*)
  2. Install Docker Engine from the official repo
  3. Create a sandboxed ci user (unless --no-ci-user)
  4. Optionally install AWS / Azure / GCP CLIs with --with-cloud
Ubuntu (bash as root)

Fedora Network Lab Host

~10 min unattended

Bootstraps a Fedora workstation into a KVM/libvirt lab host for network automation — hypervisor, dev tools, and a full Python networking stack (Netmiko, NAPALM, Nornir, Scrapli, PyEZ).

  1. Install @virtualization & enable libvirtd
  2. Set CPU governor to performance
  3. Install Python netops libraries via pip
  4. Open SSH in firewalld & fix libvirt image perms
Fedora (bash)

About this site

What you'll find here, and what it's for.

A working notebook of infrastructure scripts and operational guides — patterns worth keeping documented somewhere durable and searchable. Everything here is built and tested in a home lab, then trimmed down to the parts that actually matter.

What's covered:

  • Server provisioning and hardening across Linux, Windows, and BSD
  • Networking: firewalls, port forwarding, site-to-site WireGuard
  • Virtualization with KVM/QEMU, including Windows guests and Samba shares
  • Observability: telemetry pipelines, time-series storage, dashboards
  • CI/CD wiring: shell + markdown linting, multi-OS integration tests
  • Reproducible installers behind one-line bootstrap commands

Scripts are written to be read first and run second — skim before you pipe anything to a shell. Nothing here is a finished product; it's a snapshot of a lab that's still being built.