ponas d3b6024cd8
deploy / checks (push) Skipped
deploy / prek (push) Skipped
deploy / deploy-sega (push) Skipped
prek / prek (push) Successful in 16s
checks / checks (push) Successful in 33s
ci: prek, and deploy to sega from main
2026-11-02 01:05:58 +01:00
2026-11-02 01:05:51 +01:00
2011-03-29 08:59:39 +02:00
2026-03-19 02:25:30 +01:00

A Django app for managing computer equipment.

Installation

Install system dependencies:

sudo apt install python-dev libldap2-dev libsasl2-dev bind9-utils

Use mise to manage Python and uv:

mise trust
mise install

Install Python dependencies with uv:

uv sync

Run migrations and start the development server:

uv run python manage.py migrate
uv run python manage.py runserver

mise.toml sets DJANGO_DEBUG=1; without it DEBUG is off. Local overrides go in mdbsite/local_settings.py.

Production

MDB runs on sega under edb-infra's mdb role (roles/mdb.md there): gunicorn from a release directory per commit, its settings in the file MDB_SETTINGS names (/etc/mdb/settings.py), which mdbsite/settings.py executes last. A push to main that passes the checks deploys itself while the repository variable DEPLOY_SEGA is true (.gitea/workflows/deploy.yaml). The DNS and DHCP sync runs as root on sega: sudo mdb-sync.

Development tasks

Dump test data:

uv run python manage.py dumpdata mdb --natural-foreign --indent=4 > mdb/fixtures/test_data.json

Features

  • Creates DHCPD configuration files
  • Creates DNS zone files for BIND
  • Creates PXE config files (with random secret for use with Puppet autosign)
  • Partial IPv6 support
S
Description
Machine Database
Readme GPL-2.0
767 KiB
0 Stars 9 Watchers 0 Forks
Languages
Python 100%