docs: more garage CLI usage, avoid leaking secret
All checks were successful
Flake checks / Check (pull_request) Successful in 21m8s

This commit is contained in:
teutat3s 2024-10-23 20:53:05 +02:00
parent 0ae6bc637b
commit 68461d7a8e
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1

View file

@ -4,18 +4,47 @@
Requirements: Requirements:
- `garage` RPC credentials, in the shared keepass, search for 'garage rpc secret'.
- [Setup WireGuard](./administrative-access.md#ssh-access) for hosts: `trinkgenossin`, optionally: `delite`, `blue-shell` - [Setup WireGuard](./administrative-access.md#ssh-access) for hosts: `trinkgenossin`, optionally: `delite`, `blue-shell`
``` ```
ssh barkeeper@trinkgenossin.wg.pub.solar ssh barkeeper@trinkgenossin.wg.pub.solar
```
# Add a few spaces to avoid leaking the secret to the shell history
```
export GARAGE_RPC_SECRET=<secret-in-keepass> 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
```
```
garage bucket create <bucket-name> garage bucket create <bucket-name>
garage key create <bucket-name>-key garage key create <bucket-name>-key
garage bucket allow <bucket-name> --read --write --key <bucket-name>-key garage bucket allow <bucket-name> --read --write --key <bucket-name>-key
``` ```
Full example for `mastodon` bucket:
```
garage bucket create mastodon
garage key create mastodon-key
garage bucket allow mastodon --read --write --key mastodon-key
```
Docs: https://garagehq.deuxfleurs.fr/documentation/quick-start/#creating-buckets-and-keys 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/) Then [setup your favourite S3 client](https://garagehq.deuxfleurs.fr/documentation/connect/cli/)
@ -26,6 +55,7 @@ or use the bucket with any [S3 compatible software](https://garagehq.deuxfleurs.
``` ```
ssh barkeeper@trinkgenossin.wg.pub.solar ssh barkeeper@trinkgenossin.wg.pub.solar
# Add a few spaces to avoid leaking the secret to the shell history
export GARAGE_RPC_SECRET=<secret-in-keepass> export GARAGE_RPC_SECRET=<secret-in-keepass>
# Uses the default config /etc/garage.toml # Uses the default config /etc/garage.toml
@ -47,3 +77,9 @@ garage layout apply --version 1
``` ```
Source: https://garagehq.deuxfleurs.fr/documentation/cookbook/real-world/#creating-a-cluster-layout Source: https://garagehq.deuxfleurs.fr/documentation/cookbook/real-world/#creating-a-cluster-layout
Further reading:
- https://garagehq.deuxfleurs.fr/documentation/quick-start/
- https://garagehq.deuxfleurs.fr/documentation/connect/
- https://garagehq.deuxfleurs.fr/documentation/connect/apps/#mastodon