No description
- Shell 86.5%
- Jinja 6.2%
- Python 5%
- JavaScript 2.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .forgejo/workflows | ||
| .vibe | ||
| agents/skills/iac-app-creation | ||
| ansible | ||
| apt | ||
| bin | ||
| ci | ||
| docs | ||
| entry | ||
| image | ||
| lib | ||
| packages | ||
| renovate | ||
| schema | ||
| templates/app | ||
| tools | ||
| .clinerules | ||
| .cursorrules | ||
| .windsurfrules | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| GEMINI.md | ||
| LICENSE | ||
| modules.json | ||
| os.json | ||
| README.md | ||
iac-core
Gemeinsame Basis aller iac-*-Apps: Proxmox-VE-Einzeiler für LXC und VM auf Debian 13,
VM-Images mit bootstrap-vz, update im Gast. Den Sollzustand jedes Gasts stellt Ansible
her (ansible/site.yml, läuft lokal im Gast); jede App ist eine Ansible-Rolle.
- Konzept: docs/CONCEPT.md
- CI-Runner: docs/RUNNER.md
- Dokumentation (Quick-Guide, Module, eigene App): https://iac.heyer.systems/docs/
Aufbau
| Pfad | Inhalt |
|---|---|
ansible/site.yml |
der Sollzustand: iac_facts → iac_baseline → iac_modules → App → iac_finish |
ansible/roles/iac_* |
Rollen von iac-core: Fakten (iac.json, Instanz, Secrets), Baseline, Module, Abschluss (Firewall, Dienste, Health, instance.json), Hilfsrollen iac_service, iac_version, iac_tls und iac_apt_source |
ansible/roles/<modul> |
Module: postgresql, mariadb, mail-relay, valkey, clamav, elasticsearch, backup, disk-space, crowdsec, fail2ban, node-exporter, unattended-upgrades, auto-update, desktop, aliases (Übersicht) |
modules.json |
Modul-Katalog: Titel, Beschreibung, Plattformen – jedes Modul ist für jede App wählbar (update --add-modules) |
os.json |
Betriebssysteme der Gäste ("os" in iac.json, Standard debian; haos = Home Assistant OS als VM): Plattformen, Herkunft des Images und was iac dort kann |
lib/core.func |
Ausgabe, Downloads, Checksummen – Host und Gast |
lib/host.func |
Proxmox-Host: Dialoge, pct create, qm create, Image-Download |
lib/guest.func |
Gast: Sperre, Debian-Quellen, Ansible starten, Update, Adopt, Release-Upgrade |
lib/smoke.func |
check "…" '…' für die Smoke-Tests der Apps und Module |
bin/iac-install |
Sollzustand herstellen (LXC, Image-Build, erster Boot einer VM, update, Adopt) |
bin/iac-update |
wird von /usr/bin/update im Gast aufgerufen |
bin/iac-adopt |
bestehende Installation übernehmen (gestartet von /<app>/adopt.sh) |
bin/iac-smoke |
Selbsttest im Gast (Boot-Test und von Hand) |
bin/iac-tls |
Zertifikat des Gasts: Schlüssel und CSR erzeugen, Zertifikat einer CA einspielen (im Gast /usr/local/sbin/iac-tls) |
entry/ |
Einstiegsskripte ct.sh, vm.sh, adopt.sh – die Website liefert sie für jede App aus (/<app>/ct.sh), die Apps haben keine eigenen |
ci/ |
Composite Actions ci/lint und ci/image – die Schritte der Workflows aller Apps |
templates/app/ |
Vorlage für neue App-Repos (tools/new-app.sh), die kurzen Workflows für alle Apps |
packages/ |
Paketlisten von iac-core: base (alle), lxc, vm |
apt/ |
die einzigen Fremd-Repositories: <name>.sources mit gepinntem Schlüssel <name>.asc (Zammad, Elastic, Docker CE, Jellyfin) – Rolle iac_apt_source |
image/base.yml |
bootstrap-vz-Basismanifest |
tools/ |
Build, Boot-Test, Veröffentlichen, Lint (CI), new-app.sh, dev-container.sh, upstream-version.sh, runner/ |
schema/iac.schema.json |
Format der iac.json einer App |
Neue App
cd ~/repositories/iac
iac-core/tools/new-app.sh <name> # legt iac-<name>/ an (überschreibt nie etwas)
iac-core/tools/lint.sh iac-<name> # braucht shellcheck, jq und ansible-core
iac-core/tools/dev-container.sh iac-<name> # ohne Proxmox ausprobieren (Docker mit systemd)
Anleitung: https://iac.heyer.systems/docs/eigene-app/ – Beispiel zum Lesen: iac-example.
Im Gast:
bash /var/lib/iac/src/core/bin/iac-install # Sollzustand erneut herstellen
IAC_VERBOSE=1 bash /var/lib/iac/src/core/bin/iac-install # mit allen Task-Ergebnissen
bash /var/lib/iac/src/core/bin/iac-smoke # dasselbe wie der Boot-Test
Versionen
Apps laden iac-core über einen mitlaufenden Tag. Kompatible Änderungen werden durch
Verschieben des Tags ausgerollt:
git tag -f v2 && git push -f origin v2
| Tag | Stand |
|---|---|
v2 |
Ansible: die App ist eine Rolle (tasks/main.yml, handlers/, templates/, files/) |
v1 |
Bash-Hooks (app.func, packages.list, rootfs/). Eingefroren. Ein update in einem v1-Gast wechselt von selbst auf v2, sobald die App umgestellt ist |
Inkompatible Änderungen bekommen einen neuen Tag. Der Tag steht in entry/*.sh (IAC_CORE_REF)
und in den Workflows der Apps (uses: …/ci/lint@v2).
Zum Testen eines Branches: IAC_CORE_REF=<branch> bash -c "$(curl …/ct.sh)".