Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

Restructure documentation around reader tasks

348a43c364fbb04be834af44a7cd43a0931fa280 · Keenan Nemetz · 20d ago · parent b7383c19

Restructure documentation around reader tasks

Group the site by getting started, collaboration, CI, publishing, and administration. Rewrite the guides as executable procedures and move issue formats, merge semantics, configuration defaults, customization, and access-control mechanics into dedicated references.

Verify the quickstart and review flow against a throwaway instance, execute the service recipe, inspect the rendered site, and run the complete verify workflow.

Closes: 01M7B6X6RDYBAP3JVA5SYSA1K8

docs/packaging.md +104−92

@@ -1,50 +1,50 @@
1 # Packages
1 # Packages and upgrades
2 2
3 A release is published as a `.deb` and an `.rpm`, for `amd64` and `arm64`, built
4 when an annotated tag is pushed and attached to that release page; nothing is
5 published anywhere else. [Install § Package](install.md#package) is how to install
6 one.
7
8 This page is what the package does once it is installed: the paths it writes, the
9 unit it starts, how to upgrade, and how the release itself is built.
10
11 Both packages depend on `git` and the system SQLite library (`libsqlite3-0` on
12 Debian and Ubuntu, `sqlite-libs` on Fedora, RHEL, and Rocky), which is the same
13 requirement the standalone binary has; [Install § Release
14 binary](install.md#release-binary) explains why.
3 Vole releases include `.deb` and `.rpm` packages for `amd64` and `arm64`, plus
4 standalone Linux binaries, checksums, and an SBOM. This page describes the
5 installed package layout, upgrades, and Vole's own release build. For
6 installation, see [Install](install.md).
15 7
16 8 ## What the package installs
17 9
18 | Path | What it is |
10 | Path | Purpose |
19 11 |---|---|
20 | `/usr/bin/vole` | The binary, built from the tag with `vole version` set to it |
21 | `/usr/lib/systemd/system/vole.service` | The unit, with hardening and a `/var/lib/vole` state directory |
22 | `/usr/lib/systemd/system/vole-runner.service` | The CI runner's unit. Not enabled, and inert until `/etc/vole/runner.env` names an instance |
23 | `/etc/vole/runner.env` | Arguments for that unit, as a conffile. See [Deploying § CI runners](deploy/runner.md) |
24 | `/etc/containers/registries.conf.d/50-vole-runner.conf` | Where a short image name is looked up, as a conffile. Debian and Ubuntu ship no unqualified search registries, so a digest-pinned base written as a short name cannot resolve without it. See [Deploying § CI runners](deploy/runner.md#what-the-package-configures-in-the-container-runtime) |
25 | `/etc/containers/containers.conf.d/50-vole-runner.conf` | `cgroup_manager = "cgroupfs"` for the runner's rootless runtime, as a conffile. A system service has no systemd user manager for podman to ask for a cgroup scope. See [Deploying § CI runners](deploy/runner.md#what-the-package-configures-in-the-container-runtime) |
26 | `/etc/vole/vole.toml` | Configuration, marked as a conffile so your edits survive upgrades |
12 | `/usr/bin/vole` | Vole binary with the release version embedded |
13 | `/usr/lib/systemd/system/vole.service` | Hardened forge service |
14 | `/usr/lib/systemd/system/vole-runner.service` | Runner service, disabled until configured |
15 | `/etc/vole/vole.toml` | Forge configuration, preserved as a conffile |
16 | `/etc/vole/runner.env` | Runner arguments, preserved as a conffile |
17 | `/etc/containers/registries.conf.d/50-vole-runner.conf` | Short-name registry resolution for rootless Podman |
18 | `/etc/containers/containers.conf.d/50-vole-runner.conf` | `cgroupfs` configuration for the system runner unit |
27 19 | `/usr/share/doc/vole/` | `LICENSE` and `NOTICE` |
28 | `/var/lib/vole/data` | The instance: repositories, databases, stores, host key, audit log |
29
30 The package creates the `vole` service account and runs `vole admin init` against
31 the shipped config. It does not create an instance admin and does not enable the
32 service: who may administer the instance is the operator's decision, not the
33 package's.
34
35 The shipped config listens on `0.0.0.0:2222` for SSH and `127.0.0.1:8080` for the
36 web. Open 2222 in the firewall, set `public_url` before anyone signs in with a
37 passkey, and either terminate TLS in a proxy in front of 8080 or use `https_addr`
38 to let Vole obtain certificates itself. See
39 [Configuration § Automatic HTTPS with ACME](configuration.md#automatic-https-with-acme)
40 and [Configuration § Running behind a proxy](configuration.md#running-behind-a-proxy).
41
42 The unit is written for the packaged layout and is safe to use as shipped: it
43 drops all capabilities, sets `UMask=0027`, gives the service a private `/tmp` and
44 device tree, hides other processes, and makes `/var/lib/vole` the only writable
45 path. If you need to bind a port below 1024 — SSH on 2222 does not, HTTP on 80 and
46 HTTPS on 443 do — add the one capability with a drop-in, which must widen the
47 bounding set as well:
20 | `/var/lib/vole/data` | Repositories, databases, objects, logs, secrets, and host key |
21
22 The packages depend on Git and system SQLite: `libsqlite3-0` on Debian and
23 Ubuntu, or `sqlite-libs` on Fedora, RHEL, and Rocky. The standalone binary has
24 the same runtime requirements; see
25 [Install a release binary](install.md#install-a-release-binary).
26
27 Installation creates the `vole` service account and initializes the data
28 directory. It does not create an instance admin or enable the forge service.
29 Follow [Deploy a server](deploy/index.md) to configure the origin, create the
30 first admin, and start Vole. Follow [Set up a runner](deploy/runner.md) to
31 configure the separate runner unit.
32
33 Run local administration as the service user so new files retain the correct
34 ownership:
35
36 ```sh
37 sudo -u vole vole admin --config /etc/vole/vole.toml account list
38 ```
39
40 ## Service sandbox
41
42 The forge unit drops capabilities, sets `UMask=0027`, provides private temporary
43 and device trees, hides other processes, and makes `/var/lib/vole` its only
44 writable path. `MemoryDenyWriteExecute=true` is appropriate because the forge
45 runs no JIT.
46
47 To bind HTTP port 80 or HTTPS port 443, add only `CAP_NET_BIND_SERVICE`:
48 48
49 49 ```ini
50 50 # /etc/systemd/system/vole.service.d/bind.conf
@@ -53,76 +53,88 @@ CapabilityBoundingSet=CAP_NET_BIND_SERVICE
53 53 AmbientCapabilities=CAP_NET_BIND_SERVICE
54 54 ```
55 55
56 `MemoryDenyWriteExecute=true` is safe for the forge because it runs no JIT. A CI
57 runner executes repository code in containers and is a separate process with its
58 own unit; do not relax this unit to accommodate it.
56 Run `systemctl daemon-reload` and restart Vole after creating that drop-in. Do
57 not run the forge as root or relax its unit for CI; the runner has a separate
58 unit and security model.
59 59
60 ## First steps after install
60 ## Upgrading
61 61
62 ```sh
63 vole admin --config /etc/vole/vole.toml account create you --key ~/.ssh/id_ed25519.pub
64 vole admin --config /etc/vole/vole.toml repo create demo --owner you
65 vole admin --config /etc/vole/vole.toml acl set-default-role demo read
66 systemctl enable --now vole
67 ```
62 Database migrations run in place and cannot be rolled back by installing an
63 older binary. Back up and test recovery before upgrading:
68 64
69 Run admin commands as the `vole` user or with `--config /etc/vole/vole.toml`; the
70 service account owns the files they write. A command that writes as the wrong user
71 leaves state the service cannot open, so prefer:
65 1. Follow [Back up an instance](operations.md#back-up-an-instance), including
66 `users.db`, `runs.db`, secrets, repositories, objects, logs, and host keys.
67 2. Install the new package with `dpkg -i`, `apt install ./<package>`, or
68 `dnf install ./<package>`.
69 3. Restart the service if the package manager did not do so:
72 70
73 ```sh
74 sudo -u vole vole admin --config /etc/vole/vole.toml account list
75 ```
71 ```sh
72 sudo systemctl restart vole
73 ```
76 74
77 ## Upgrading
75 4. Check `vole version`, the service log, account sign-in, an SSH clone, and CI
76 runner connectivity.
77
78 Upgrade the instance before its runners. See
79 [Set up a runner § Upgrade](deploy/runner.md#upgrade).
80
81 ## How Vole's release is built
78 82
79 `users.db` is migrated in place the first time a newer binary opens it, and the
80 migration cannot be rolled back. Back up before upgrading:
83 `.vole/workflows/release.yaml` runs on annotated `v*` tags. It tests and scans
84 the tagged source, cross-compiles Linux binaries for both architectures, builds
85 packages with [nfpm](https://nfpm.goreleaser.com), generates an SBOM, writes
86 `SHA256SUMS`, and attaches the results to the tag's release.
87
88 The job requires bridge networking to download Go modules and pinned build
89 tools. Cross-compilation means any trusted Linux runner with the required image
90 can produce both architectures.
91
92 Reproduce the commands from a tagged checkout:
81 93
82 94 ```sh
83 sudo -u vole vole admin --config /etc/vole/vole.toml account backup /var/lib/vole/users.db.bak
84 sudo cp /var/lib/vole/data/ssh_host_ed25519_key /var/lib/vole/ssh_host_ed25519_key.bak
95 git switch --detach v0.2.0
96 go run ./cmd/vole workflow run release
85 97 ```
86 98
87 Then install the new package. See [Operations](operations.md) for what else is
88 worth copying.
99 A local workflow run checks the build in the defined container but does not
100 publish artifacts. The version comes from
101 `git describe --tags --exact-match`; an untagged checkout stops before building.
102 Build outputs use the tag commit time to support byte-for-byte reproduction.
89 103
90 ## How the release is built
104 ## Release contents and SBOM
91 105
92 `.vole/workflows/release.yaml` runs on a `v*` tag and does three things: it runs
93 the tests, it cross-compiles the binary for both architectures, and it packages
94 each one with [nfpm](https://nfpm.goreleaser.com) from `packaging/nfpm.yaml`. The
95 `.deb`, the `.rpm`, the plain binaries, and `SHA256SUMS` are attached to the tag's
96 release with `release: true`, so they appear on the release page like any other
97 attached file.
106 A Vole release includes:
98 107
99 Two requirements on the runner:
108 - `vole-linux-amd64` and `vole-linux-arm64`;
109 - Debian and RPM packages for both architectures;
110 - `vole-<version>.sbom.cdx.json` in CycloneDX JSON;
111 - `SHA256SUMS` covering every attached artifact.
100 112
101 - **Network.** `go build` fetches modules, and the packaging step fetches a pinned
102 `nfpm`, and a job container has none unless the runner was started with
103 `--container-network bridge`. The image build already needs the network; it
104 installs `git`, the C toolchain, and both architectures' SQLite development
105 files (see `.vole/images/release.yaml`).
106 - **Nothing else.** The binaries are cross-compiled, so any runner that can start a
107 Linux container produces the same four packages.
113 The SBOM lists linked Go modules, their versions and `go.sum` hashes, the Go
114 toolchain, and detected license evidence. One SBOM covers both architectures
115 because they share a module graph. It names the `go-sqlite3` binding but cannot
116 identify the system `libsqlite3` version installed beside the binary; query the
117 operating system package for that component.
108 118
109 Reproduce a release locally without a runner, from the tag:
119 To regenerate the SBOM from a tag:
110 120
111 121 ```sh
112 git switch --detach v0.2.0
113 go run ./cmd/vole workflow run release
122 go run github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@v1.9.0 \
123 app -json -noserial -std -licenses -main cmd/vole -output SBOM.cdx.json .
114 124 ```
115 125
116 That runs the steps in your working tree as a check of the commands. It does not
117 publish the artifacts. The packaging step fetches nfpm itself with a pinned
118 `go run`, so there is no tool to install first — only Go and the network.
126 The release workflow replaces the tool's wall-clock timestamp with the tag
127 commit time so rebuilding one tag produces the same SBOM.
128
129 ## Package verification in CI
119 130
120 The version comes from `git describe --tags --exact-match`, so a checkout with no
121 tag stops before building anything.
131 `.vole/workflows/verify.yaml` builds and packages one architecture on every
132 branch push using the same `packaging/nfpm.yaml`. Definition, path, and unit
133 errors therefore fail before a release tag. `scripts/check-deploy.py` also
134 renders and validates the cloud-init deployment files.
122 135
123 ## The package definition is checked on every push
136 ## Next
124 137
125 The CI workflow (`.vole/workflows/verify.yaml`) builds one architecture and packages
126 it with the same `packaging/nfpm.yaml` on every branch push. A broken definition,
127 install path, or unit file therefore fails the push that broke it, instead of the
128 tag that cannot be rebuilt.
138 - [Releases](releases.md) — create and attach project releases.
139 - [Operations](operations.md) — back up and restore the installed state.
140 - [Deploy a server](deploy/index.md) — configure the packaged forge.