From 1814cef5a104273639351249fed4436e1ff34ea2 Mon Sep 17 00:00:00 2001 From: brooke Date: Sat, 1 Mar 2025 17:32:21 -0500 Subject: [PATCH] update localfs compose file to remove garage.toml big mount and update volumes to include the new environment variables --- README.md | 63 ++++++++++++++++++++++++++++++++++++++++++--- compose.localfs.yml | 5 ++-- 2 files changed, 61 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3f48a1e..a0da8a4 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,63 @@ ## Quick start -* `abra app new garage --secrets` -* `abra app config ` -* `abra app deploy ` +* `abra app new garage` +* Garage is particular about the rpc secret, generate it locally with this command then insert it `openssl rand -hex 32` +* `abra app secret i rpc_secret v1 ` +> Note: all nodes must share the same rpc secret, do not lose this value if you plan to cluster garage! +* `abra app config ` +* `abra app deploy ` -For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech). +## Getting started + +#### Garage CLI +Start by creating an alias for the abra run command +``` +alias garage="abra app run app /garage" +``` +Run `garage status` to verify everything is working + +#### Assign Roles + +Terms: +* `node id` (reqired) - Node identifier supplied by the garage CLI, can be found by running `garage node id`. +* `zone` (reqired) - Identifier for how nodes will be grouped, a zone usually refers to a geographical location (us-east, paris-1, etc.) no specific syntax is required, zones can be called anything. +* `capacity` (reqired) - Disk space the node will be allocating to the cluster, use T and G for units (Terabytes and Gigabytes respectively). +* `tag` (optional) - Additional notes appended to garage status, usually a title for the node. + +command layout: +`garage layout assign -z -c -t ` + +Example (pulled from garage docs) + +``` +garage layout assign 563e -z par1 -c 1T -t mercury +garage layout assign 86f0 -z par1 -c 2T -t venus +garage layout assign 6814 -z lon1 -c 2T -t earth +garage layout assign 212f -z bru1 -c 1.5T -t mars +``` + +#### Adding & Connecting Nodes +> Connecting not currently implemented + +This abra recipe does not supply garage with the public ip address of your box, so when connecting to another garage node you must supply the local node's ip. + +Example, run from node 2: +``` +garage node connect @:3901 +``` + +Example, run from node 1: +``` +garage -h node connect @:3901 +``` +## Backups + +> Not currently implemented + +Backups will only capture a snapshot of the metadata directory, which includes bucket names, hashed secrets, and other related information. However, they do not include the actual data! + +If you're running Garage in a cluster, when you restore the metadata, other nodes will send the new node any missing data.\ +Finally, please note that Abra backups are not a substitute for a proper data replication strategy, and it's recommended to run Garage in a cluster if you need data redundancy. + +For more, see [`garagehq.deuxfleurs.fr`](https://garagehq.deuxfleurs.fr/documentation/cookbook/real-world/). diff --git a/compose.localfs.yml b/compose.localfs.yml index b51bee7..0a26619 100644 --- a/compose.localfs.yml +++ b/compose.localfs.yml @@ -5,6 +5,5 @@ services: app: image: dxflrs/garage:v1.0.0 volumes: - - conf:/etc/garage.toml - - meta:/var/lib/garage/meta - - data:/var/lib/garage/data \ No newline at end of file + - ${LOCAL_FOLDER_META:-meta}:/var/lib/garage/meta + - ${LOCAL_FOLDER_DATA:-data}:/var/lib/garage/data \ No newline at end of file