liab-deployments/README.md

59 lines
3.2 KiB
Markdown

# Lab-in-a-box deployments
[![PyPI - Version](https://img.shields.io/pypi/v/liab-deployments.svg)](https://pypi.org/project/liab-deployments)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/liab-deployments.svg)](https://pypi.org/project/liab-deployments)
This repository contains implementations of (standard) deployment workflows for
machines and services. Implementations are done in Python using
[pyinfra](https://pyinfra.com).
## 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](https://caddyserver.com) is used as a web-server/reverse-proxy.
- [Podman](https://podman.io) 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](https://docs.astral.sh/uv)-managed virtual environments for (small) Python packages.
- Systemd: Services are managed via user-space [systemd](https://systemd.io) 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.
- `copyparty`: [copyparty](https://github.com/9001/copyparty) all-in-wonder fileserver that works with everything and anything
- `dumpthings`: [Metadata API and database](https://hub.psychoinformatics.de/datalink/dump-things-service)
- `forgejo`: [Forgejo(-aneksajo)](https://codeberg.org/forgejo-aneksajo/forgejo-aneksajo), but should also work with a plain Forgejo
- `forgejo_runner`: [Forgejo runner](https://forgejo.org/docs/latest/admin/actions/runner-installation) using the "offline registration" approach
- `gatus`: [Gatus](https://github.com/TwiN/gatus)
- `gitannex_staticwww`: git-annex repo (with submodules) is served as static content via caddy
- `hedgedoc`: [HedgeDoc](https://hedgedoc.org) v1 site, using a sqlite database
- `ntfy`: [ntfy.sh](https://ntfy.sh) pub-sub notification service
- `owntracks`: [OwnTracks](https://owntracks.org)
- `photoview`: [Photoview](https://photoview.github.io) using a sqlite database
#### 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](https://spdx.org/licenses/MIT.html) license.