Support local MariaDB provisioning over a restricted Unix socket

This commit is contained in:
parkel committed 2026-11-21 01:21:07 +01:00
1 parent cdc82bac67
commit 091193baa0
8 files changed
+142 -26

No files matched your search

+22
View File
@@ -142,6 +142,28 @@ message when the installation needs attention.
Exit code `1` indicates an invalid manifest or an unavailable check, for example
when the MariaDB administrative connection fails.
### Enable local database provisioning
On a MariaDB node using `/run/mysqld/mysqld.sock`, install the matching Coulobre
package with its `mariadb` extra in a root-owned virtual environment at
`/opt/coulobre`. Enable the local provisioning socket.
```sh
getent group coulobre-db-provisioning >/dev/null || sudo groupadd --system coulobre-db-provisioning
sudo install -m 0644 deploy/systemd/coulobre-database-apply.socket \
deploy/systemd/coulobre-database-apply@.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now coulobre-database-apply.socket
```
Grant the socket group only to the service identity responsible for database
provisioning. Send one version 1 MariaDB database manifest as UTF-8 JSON to
`/run/coulobre-database-apply.sock`. The limit is 4 KiB. Close the writing half
of the socket and read the JSON reply to EOF. For a valid manifest, the reply
includes its identity, a state of `configured` or `failed`, and a diagnostic
on failure.
MariaDB passwords stay in the root-only credentials files on the node.
## Render a BIND9 zone
Open a hosting account and select **Add DNS zone** to configure a zone for