Declarative bucket and key configuration #450
Labels
No labels
action
check-aws
action
discussion-needed
action
for-external-contributors
action
for-newcomers
action
more-info-needed
action
need-funding
action
triage-required
kind
correctness
kind
ideas
kind
improvement
kind
performance
kind
testing
kind
usability
kind
wrong-behavior
prio
critical
prio
low
scope
admin-api
scope
background-healing
scope
build
scope
documentation
scope
k8s
scope
layout
scope
metadata
scope
ops
scope
rpc
scope
s3-api
scope
security
scope
telemetry
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Deuxfleurs/garage#450
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
It would be great if there was a way to specify all buckets, keys, layouts and other configuration declaratively, i.e. as a configuration file instead of having to use the cli to setup everything after installation. The setup would probably have to be inmutable in this case.
This would make migration to a new machine easier and also guarantee a certain a state of the server to always be present.
From a user's perspective you would define everything once and have the complete
"schema" with all your buckets, keys and so on in a file that you can backup and use to replicate the setup on a new server.
You can try using the Terraform provider at:
relating to:
#678
but im seeking how to configure layout , but i want to make it 100% automate so the problem the ID's i cant know beforehand
For reference, I wrote a little thing to achieve this with Nix, Consul, and a bunch of shell scripts.
https://github.com/privatevoid-net/depot/blob/master/cluster/services/storage/garage-options.nix
This allows you to declaratively define the layout:
https://github.com/privatevoid-net/depot/blob/master/cluster/services/storage/garage-layout.nix
As well as buckets, keys and permissions:
https://github.com/privatevoid-net/depot/blob/master/cluster/services/monitoring/default.nix#L77-L86
The layout is configured by hostname, so public keys don't need to be known beforehand. There is no boostrapping step (except for node discovery, which Garage can already do automatically with Consul).
It's a bit hacky (e.g. shouldn't have funny characters in bucket names, bucket aliases aren'y supported, hostname matching may be flawed), but it works pretty well as it is already. Maybe it can be used as a reference for how to implement this in Garage directly. Alternatively, having machine-readable CLI output would make it easier to create third-party declarative config tools.