2024-08-26 09:00:42 +00:00
|
|
|
# Garage
|
|
|
|
|
|
|
|
### How-To create a new bucket + keys
|
|
|
|
|
|
|
|
Requirements:
|
|
|
|
|
2024-10-23 18:53:05 +00:00
|
|
|
- `garage` RPC credentials, in the shared keepass, search for 'garage rpc secret'.
|
2024-08-26 09:00:42 +00:00
|
|
|
- [Setup WireGuard](./administrative-access.md#ssh-access) for hosts: `trinkgenossin`, optionally: `delite`, `blue-shell`
|
|
|
|
|
|
|
|
```
|
|
|
|
ssh barkeeper@trinkgenossin.wg.pub.solar
|
|
|
|
|
2024-10-23 18:53:05 +00:00
|
|
|
```
|
|
|
|
# Add a few spaces to avoid leaking the secret to the shell history
|
|
|
|
export GARAGE_RPC_SECRET=<secret-in-keepass>
|
|
|
|
```
|
|
|
|
|
|
|
|
Now, you can run the following command to check the cluster status:
|
|
|
|
|
|
|
|
```
|
|
|
|
garage status
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Command to list all existing buckets:
|
|
|
|
|
|
|
|
```
|
|
|
|
garage bucket list
|
|
|
|
```
|
2024-08-26 09:00:42 +00:00
|
|
|
|
|
|
|
garage bucket create <bucket-name>
|
|
|
|
garage key create <bucket-name>-key
|
|
|
|
garage bucket allow <bucket-name> --read --write --key <bucket-name>-key
|
|
|
|
```
|
|
|
|
|
2024-10-23 18:53:05 +00:00
|
|
|
Full example for `mastodon` bucket:
|
|
|
|
|
|
|
|
```
|
|
|
|
garage bucket create mastodon
|
|
|
|
|
|
|
|
garage key create mastodon-key
|
|
|
|
|
|
|
|
garage bucket allow mastodon --read --write --key mastodon-key
|
|
|
|
```
|
|
|
|
|
2024-08-26 09:00:42 +00:00
|
|
|
Docs: https://garagehq.deuxfleurs.fr/documentation/quick-start/#creating-buckets-and-keys
|
|
|
|
|
|
|
|
Then [setup your favourite S3 client](https://garagehq.deuxfleurs.fr/documentation/connect/cli/)
|
|
|
|
or use the bucket with any [S3 compatible software](https://garagehq.deuxfleurs.fr/documentation/connect/).
|
|
|
|
|
|
|
|
### Notes on manual setup steps
|
|
|
|
|
2024-08-24 01:06:17 +00:00
|
|
|
```
|
2024-08-25 01:27:42 +00:00
|
|
|
ssh barkeeper@trinkgenossin.wg.pub.solar
|
|
|
|
|
2024-08-24 01:06:17 +00:00
|
|
|
export GARAGE_RPC_SECRET=<secret-in-keepass>
|
|
|
|
|
2024-08-25 01:27:42 +00:00
|
|
|
# Uses the default config /etc/garage.toml
|
2024-08-24 01:06:17 +00:00
|
|
|
garage node id
|
|
|
|
|
|
|
|
garage node connect <node-id2>
|
|
|
|
garage node connect <node-id3>
|
|
|
|
|
|
|
|
garage status
|
|
|
|
|
|
|
|
#Zones
|
|
|
|
#DE-1 DE-2 NL-1
|
|
|
|
|
|
|
|
garage layout assign fdaa -z DE-1 -c 800G -t trinkgenossin
|
|
|
|
garage layout assign 8835 -z DE-2 -c 800G -t blue-shell
|
|
|
|
garage layout assign 73da -z NL-1 -c 800G -t delite
|
|
|
|
garage layout show
|
|
|
|
garage layout apply --version 1
|
|
|
|
```
|
2024-08-25 01:27:42 +00:00
|
|
|
|
|
|
|
Source: https://garagehq.deuxfleurs.fr/documentation/cookbook/real-world/#creating-a-cluster-layout
|
2024-10-23 18:53:05 +00:00
|
|
|
|
|
|
|
Further reading:
|
|
|
|
- https://garagehq.deuxfleurs.fr/documentation/quick-start/
|
|
|
|
- https://garagehq.deuxfleurs.fr/documentation/connect/
|
|
|
|
- https://garagehq.deuxfleurs.fr/documentation/connect/apps/#mastodon
|