feat: add Garage S3-compatible storage recipe#59
Conversation
|
|
||
| =over 4 | ||
|
|
||
| =item C<rpc_secret> (required) — 64-character hex string used as the shared |
There was a problem hiding this comment.
This should not be a manual and required step, we should just run openssl rand -hex 32 and store it in a file rpc_secret.txt in the domain dir like we do with the generated key.rsa used to access guests made by trog-provisioner. This way other recipes relying on garage can immediately read this and configure appropriately.
| =item C<rpc_secret> (required) — 64-character hex string used as the shared | ||
| RPC secret between cluster nodes. Generate with C<openssl rand -hex 32>. | ||
|
|
||
| =item C<version> (optional, default C<v1.0.1>) — Garage release tag to download. |
There was a problem hiding this comment.
The default version ought not be hardcoded below, but fetch the latest released version of garage as the default.
| ExecStart=/usr/local/bin/garage -c /etc/garage.toml server | ||
| Restart=on-failure | ||
| RestartSec=5 | ||
| LimitNOFILE=65536 |
There was a problem hiding this comment.
LimitNOFILE ought to be configurable in the recipe, but default to this.
|
@troglodyne-bot rebase |
Rebase with requested adjustmentsBranch Changes applied
StatsActions performed
CI statusCI will be checked asynchronously. Automated by Kōan |
4a56903 to
5142f99
Compare
| $opts{metadata_dir} //= '/var/lib/garage/meta'; | ||
| $opts{replication_factor} //= 1; | ||
| $opts{s3_region} //= 'garage'; | ||
| $opts{api_port} //= 3900; |
There was a problem hiding this comment.
We need to make sure all the ports we are specifying here are opened up in the UFW recipe in the event this recipe is loaded, like many other recipes do via conditional UFW app configs.
|
@troglodyne-bot rebase |
Closes Troglodyne-Internet-Widgets#57. Adds Provisioner::Recipe::garage with a statically-linked binary download, /etc/garage.toml config, systemd service, and an idempotent post-start init script that applies a single-node cluster layout and creates any configured buckets. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rebase with requested adjustmentsBranch Changes applied
StatsActions performed
CI statusCI will be checked asynchronously. Automated by Kōan |
5142f99 to
eeffb3f
Compare
What
Adds
Provisioner::Recipe::garage— a provisioning recipe for Garage, a lightweight self-hosted S3-compatible object-storage server.Why
Resolves #57. Garage solves the internal file-sharing problem better than WebDAV: it exposes a standard S3 API that any client can use, and it's a single statically-linked binary with minimal ops overhead.
How
v1.0.1). Idempotent — skipped if the installed version already matches./etc/garage.toml(mode 0600, owned bygarageuser) — S3 region, ports, data/metadata dirs, andrpc_secretare all configurable viarecipes.yaml.queue_postrun_task.garage_init.shis also queued post-start. It waits for Garage to accept connections, applies a single-node cluster layout (zone + capacity), and creates any configured buckets. Fully idempotent — safe to re-run.Example
recipes.yamlTesting
lib/Provisioner/Recipe/garage.pmtemplate_fileskeys match the rendered filenames used ingarage.tt🤖 Generated with Claude Code