No description
  • Shell 68.9%
  • HTML 31.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Kevin Heyer 13850b19d9 Add MIT license [skip ci]
The repository is public but had no license, so no one was allowed to use it.
MIT, copyright iac contributors.. No build needed.
2026-11-17 07:08:23 +01:00
.forgejo/workflows Drop files that iac-core now provides 2026-10-12 08:21:30 +02:00
.vibe Add the agent pointer for Mistral Vibe 2026-10-15 12:23:51 +02:00
files Sandbox the example service 2026-10-13 15:28:46 +02:00
handlers Move to iac-core v2: the app is an Ansible role 2026-10-11 15:43:44 +02:00
tasks Move to iac-core v2: the app is an Ansible role 2026-10-11 15:43:44 +02:00
tests Move to iac-core v2: the app is an Ansible role 2026-10-11 15:43:44 +02:00
.clinerules Add instructions for AI agents 2026-10-11 17:41:55 +02:00
.cursorrules Add instructions for AI agents 2026-10-11 17:41:55 +02:00
.windsurfrules Add instructions for AI agents 2026-10-11 17:41:55 +02:00
AGENTS.md Name pve.sh as the only host management in AGENTS.md 2026-10-27 15:01:37 +01:00
CHANGELOG.md Sandbox the example service 2026-10-13 15:28:46 +02:00
CLAUDE.md Add instructions for AI agents 2026-10-11 17:41:55 +02:00
GEMINI.md Add instructions for AI agents 2026-10-11 17:41:55 +02:00
iac.json Switch iac.json texts to English, add category and tags 2026-10-15 16:41:19 +02:00
LICENSE Add MIT license [skip ci] 2026-11-17 07:08:23 +01:00
README.md Point to the documentation section of the website 2026-10-12 10:31:40 +02:00

iac-example

Eine absichtlich kleine, aber vollständige iac-App zum Lernen: busybox httpd liefert eine statische Seite auf Port 8080 aus, als eigener Systemnutzer, nur aus privaten Netzen erreichbar. Das Repo ist eine Ansible-Rolle; jede Möglichkeit, die iac-core bietet, kommt genau einmal vor. Die App ist in der iac.json mit "hidden": true markiert und erscheint deshalb nicht auf der Website.

Die ausführliche Anleitung steht auf https://iac.heyer.systems/docs/eigene-app/.

In dieser Reihenfolge lesen

# Datei Worum es geht
1 iac.json Steckbrief: Ressourcen, Plattformen, Ports (daraus entsteht die Firewall), services, health, adopt.backup
2 tasks/main.yml der Sollzustand – Kopfkommentar zeigt, wer wann was aufruft
3 handlers/main.yml Neustart nur, wenn sich etwas geändert hat
4 files/ Dateien, wie sie im Gast landen: systemd-Unit, Standardseite, README
5 tasks/adopt_check.yml, tasks/adopt.yml bestehende Systeme übernehmen
6 tests/smoke.sh Prüfungen nur für diese App
7 .forgejo/workflows/ Lint – unverändert aus iac-core/templates/app/, die Schritte liegen in iac-core

Die Einstiege ct.sh und adopt.sh hat die App nicht selbst: Die Website liefert sie aus iac-core/entry/ aus (adopt.sh gibt es, weil tasks/adopt_check.yml existiert).

Das Beispiel gibt es nur als LXC: Ein VM-Image würde bei jedem Push und jede Woche gebaut. Eine VM-App braucht nur "vm" in supports und den Workflow image.yml (unverändert aus iac-core/templates/app/); ist das Image größer als 3 GiB, kommt "image": {"size": "8GiB"} in die iac.json – siehe iac-netbox.

Ausprobieren

Ohne Proxmox, in einem Docker-Container mit systemd (auf dem eigenen Rechner):

../iac-core/tools/dev-container.sh .        # installiert die App und führt den Smoke-Test aus
docker exec -it iac-dev-example bash        # hineinschauen

Auf einer Proxmox-Node:

bash -c "$(curl -fsSL https://iac.heyer.systems/example/ct.sh)"

Im Gast:

curl http://127.0.0.1:8080/                      # die Seite
bash /var/lib/iac/src/core/bin/iac-smoke         # dasselbe wie der Boot-Test
echo '<h1>iac-example: meine Seite</h1>' > /etc/iac-example/index.html
update                                           # eigene Seite wird übernommen