Skip to content
Projects

xNok/infra-bootstrap-tools

View on GitHub

About

IaC configurations to bootstrap and manage a small self-hosted project or homelab

Systems & Infrastructure

How these counts are measured

Measured star growth

in 24h
0
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.md

Original

Infra-Bootstrap-Tools (IBT)

Production-grade Infrastructure as Code for homelabs, edge nodes, and self-hosted clouds — from minimalist Docker Swarm to Zero-Trust Kubernetes GitOps.

Docs Ansible Galaxy Nix Kubernetes Zero-Trust Docker Swarm Terraform License: MIT


🎯 Reusable Deliverables & Artifacts

Infra-Bootstrap-Tools produces concrete, production-ready deliverables that you can consume directly in your own infrastructure:

Deliverable Description Location / Install Command
🌐 Documentation Website Full architecture guides, interactive runbooks, and diagrams xnok.github.io/infra-bootstrap-tools
📦 Ansible Galaxy Collection Battle-tested roles for Docker, Swarm, K3s, UFW hardening, and Flux ansible-galaxy collection install xnok.infra_bootstrap_tools
🚢 OCI GitOps Fleet Artifacts Versioned Flux D2 manifests & platform add-ons on GitHub Packages oci://ghcr.io/xnok/infra-bootstrap-tools/manifests/...
🐳 Production Compose Stacks Caddy (automated Let's Encrypt + OAuth portal), Portainer CE, Rclone stacks/
🧪 Local Test Harness Zero-cost Kind + local OCI registry integration test environment make k3s-test (bin/tests/flux-d2/test.sh)

🏛️ Architecture: The Dual-Orchestration Model

Infrastructure is not one-size-fits-all. A simple personal homelab does not warrant the overhead of an enterprise control plane. Conversely, complex multi-service architectures demand declarative GitOps, fine-grained RBAC, and zero-trust perimeter isolation.

infra-bootstrap-tools maintains strict architectural parity across two distinct orchestration tracks:

Architectural Parity: Docker Swarm vs Dark K3s

Choosing Your Track

Concern Docker Swarm Track (Pragmatic Homelab) Kubernetes Track (Dark K3s & GitOps)
Design Philosophy Minimalist, single-binary, low operational overhead Enterprise GitOps & Zero-Trust defense-in-depth
Control Plane Docker Swarm internal Raft manager K3s server bound strictly to 127.0.0.1
Perimeter & Ingress Caddy: Open ports 80/443, automated Let's Encrypt TLS OpenZiti: Zero public ports; API is completely dark
Workload Definition Docker Compose / Stack files (deploy: stanza) Kustomize Components & HelmReleases via Flux
Cluster Operations Portainer: Graphical web management dashboard FluxCD Operator: Branchless OCI GitOps reconciliation
Recommended For Low-spec hardware, utility containers, rapid homelabs Production homelabs, GitOps workflows, zero-trust edge

🚀 10-Minute Quickstart

1. Enter the Hermetic Nix Environment

Avoid tool version conflicts by entering our pre-configured Nix development shell:

# For Ansible & Swarm deployment:
nix develop .#ansible

# For Kubernetes, Flux, and Kind testing:
nix develop .#flux

# Full unified environment:
nix develop .#full

(If you use direnv, run direnv allow once to load dependencies automatically on directory entry).

2. Configure Credentials

Generate template secrets or connect via 1Password CLI:

./bin/bash/setup-secrets.sh

3. Deploy Your Chosen Track

# Track A: Deploy Docker Swarm on Cloud VMs (DigitalOcean / AWS)
make swarm-up

# Track B1: Run Zero-Cost Local Kubernetes Validation (Kind + Local Registry)
make k3s-test

# Track B2: Deploy Dark K3s on Cloud VMs
make k3s-up

# Teardown Cloud Infrastructure
make down

For the complete step-by-step walkthrough, see the Getting Started Runbook.


🛠️ Using & Contributing to This Monorepo Layout

If you are using this repository as a template for your own infrastructure or contributing changes, the monorepo is organized into clear functional layers:

Monorepo Directory Layout

.
├── ansible/                  # Ansible Collection: xnok.infra_bootstrap_tools
│   ├── playbooks/            # Orchestrator entrypoints (main.yml, k3s.yml, docker-swarm.yml)
│   └── roles/                # Modular roles (docker, k3s_server, k3s_os_hardening, etc.)
├── kubernetes/               # Enterprise Flux D2 GitOps Layout
│   ├── fleet/                # Per-cluster manifests & values (k3s, kind)
│   └── infra-addons/         # Opt-in Kustomize components (cert-manager, openziti, keycloak)
├── terraform/                # Cloud VM and networking provisioning (DigitalOcean, AWS)
├── stacks/                   # Docker Swarm Compose application stacks
├── website/                  # Hugo documentation source (published to GitHub Pages)
└── docs/                     # PARA Docs-as-Code knowledge management & active project notes

Development Standards & Quality Gates

  • Hermetic Toolchains: Managed via Nix Flakes in flake.nix.
  • Pre-commit Automation: Enforces yamllint, shellcheck, and ansible-lint before commits (.pre-commit-config.yaml).
  • Release Automation via Changesets: Every change that modifies packages creates an intentional changelog entry:
    npx changeset add
    
    GitHub Actions automatically versions packages, updates changelogs, tags releases, and publishes the Ansible Collection to Ansible Galaxy.
  • Docs-as-Code (PARA Method): Active tasks and architectural decisions are captured in docs/1-projects/ before code is committed, ensuring zero hidden knowledge.

📚 DevOps & Cloud Infrastructure Learning Plan

This repository acts as an interactive curriculum for learning modern infrastructure engineering, pairing hands-on code with in-depth technical writeups:

Level 1: Foundations (DevOps 101)

Level 2: Docker Swarm & Edge Ingress

Level 3: Zero-Trust Kubernetes & Enterprise GitOps


🤝 Contributing & Community

Contributions, issue reports, and feature proposals are welcome!

  1. Check open issues or create a project note in docs/1-projects/.
  2. Enter the development shell (nix develop).
  3. Create a changeset for your contribution (npx changeset add).
  4. Submit a Pull Request against main.

Explore the complete documentation site at https://xnok.github.io/infra-bootstrap-tools/.

Explore related projects

Loading…