pyinfra deployment implementations
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Michael Hanke 6e0711ff5e
All checks were successful
Codespell / Check for spelling errors (push) Successful in 15s
fix: user lingering detection fact did not work for new users
or those not already lingering.
2026-11-20 15:34:28 +01:00
.forgejo/workflows ci: codespell workflow added 2025-12-01 11:32:39 +01:00
deployments fix: add missing dependency 2026-11-10 09:47:33 +01:00
liab_deployments fix: user lingering detection fact did not work for new users 2026-11-20 15:34:28 +01:00
tests chore: Python packaging and hatch project setup 2025-12-01 11:15:01 +01:00
.gitignore chore: Python packaging and hatch project setup 2025-12-01 11:15:01 +01:00
CONTRIBUTING.md doc: targeted parameter naming conventions 2025-12-04 08:59:32 +01:00
LICENSE.txt chore: Python packaging and hatch project setup 2025-12-01 11:15:01 +01:00
pyproject.toml chore: we are using pyinfra 3.10 features (at least that is what is tested) 2026-09-02 14:16:50 +02:00
README.md feat: git-pages deployment 2026-10-08 06:11:14 +02:00

Lab-in-a-box deployments

PyPI - Version PyPI - Python Version

This repository contains implementations of (standard) deployment workflows for machines and services. Implementations are done in Python using pyinfra.

Assumptions

This effort does not aim to serve every use case and deployment scenario. Instead, it makes a few central assumptions:

  • Users have access to an account on a target machine that allows for root-access via sudo.
  • The base OS on a target machine is Debian (12+), or a sufficiently close derivative. There is no hard dependency, but nothing else has seen significant use (yet).
  • Users have means to configure the DNS for a domain they want to use for exposing deployed services.
  • Caddy is used as a web-server/reverse-proxy.
  • Podman is used as a container solution.

See deployments/bootstrap_server_mih-style.py for a demo deployment that would set up a compatible base server.

Conventions

All provided deployment follow a common set of conventions:

  • One service, one user: Each deployment creates/uses a service-dedicated user account. All code runs in user-space.
  • Containerized environments: Code is generally deployed in virtual environments -- typically user-space podman containers, but uv-managed virtual environments for (small) Python packages.
  • Systemd: Services are managed via user-space systemd service units.
  • Subdomains: Services are assumed to be deployed using dedicated subdomains (service.example.org, rather than example.org/service).

Repository layout

liab_deployments/deploy/

Workflow implementations. For details on particular workflows, check the comments at the top of each file.

OLD

These are yet to be integrated

  • bootstrap_server_mih-style: example base setup on top of a minimal Debian installation
  • forgejo_aneksajo_users: create accounts in a Forgejo instance from information in a TSV table

License

This software is distributed under the terms of the MIT license.