2021-04-20 21:31:37 +00:00
|
|
|
# Managing Garage
|
|
|
|
|
|
|
|
The garage project provides the network storage component for
|
2023-08-05 21:53:17 +00:00
|
|
|
Isle. If you're reading this document then you would likely benefit
|
2021-04-20 21:31:37 +00:00
|
|
|
greatly from reading the [garage documentation][garage] on their website. It's
|
|
|
|
extremely well written and concise.
|
|
|
|
|
2023-08-05 21:53:17 +00:00
|
|
|
Note that the `isle daemon` process will handle all setup steps described
|
2021-04-20 21:31:37 +00:00
|
|
|
in that documentation, but it's still good to have an understanding of how
|
|
|
|
garage works and what it can do.
|
|
|
|
|
|
|
|
[garage]: https://garagehq.deuxfleurs.fr/documentation/quick-start/
|
|
|
|
|
|
|
|
## Garage Runtime Note
|
|
|
|
|
2023-08-05 21:53:17 +00:00
|
|
|
There is an important thing to note regarding how isle runs garage. As
|
2021-04-20 21:31:37 +00:00
|
|
|
described in the [Contributing Storage](contributing-storage.md) document, a
|
2023-08-05 21:53:17 +00:00
|
|
|
single `isle daemon` process can be configured to provide any number of
|
2021-04-20 21:31:37 +00:00
|
|
|
storage allocations.
|
|
|
|
|
2023-08-05 21:53:17 +00:00
|
|
|
For each allocation which is configured, `isle daemon` will configure and
|
2021-04-20 21:31:37 +00:00
|
|
|
run a separate `garage server` instance as a sub-process. Each garage will use
|
|
|
|
the host's name as its zone in the garage cluster layout, which means that the
|
|
|
|
cluster will prefer to not replicate the same data within the same host, but may
|
|
|
|
do so if necessary.
|
|
|
|
|
|
|
|
## Garage CLI
|
|
|
|
|
2023-08-05 21:53:17 +00:00
|
|
|
Every `isle` binary contains a full `garage` binary embedded into it.
|
2021-04-20 21:31:37 +00:00
|
|
|
This binary can be accessed directly like so:
|
|
|
|
|
2024-12-18 20:54:15 +00:00
|
|
|
```bash
|
|
|
|
isle garage cli <subcmd> <args>
|
2021-04-20 21:31:37 +00:00
|
|
|
```
|
|
|
|
|
2023-08-05 21:53:17 +00:00
|
|
|
Before handing off execution to the `garage` binary, the `isle` process
|
2021-04-20 21:31:37 +00:00
|
|
|
will automatically set up the RPC host and secret environment variables.
|
|
|
|
|
|
|
|
If the host which is running the command has more than one allocation
|
|
|
|
configured, then the `garage server` process for the first allocation will be
|
|
|
|
connected to by this invocation of `garage`. If no allocations are configured,
|
|
|
|
then the `garage server` process of some other host in the network will be
|
|
|
|
connected to.
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
To display the current layout of the garage cluster:
|
|
|
|
|
2024-12-18 20:54:15 +00:00
|
|
|
```bash
|
|
|
|
isle garage cli layout show
|
2021-04-20 21:31:37 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
**(DO NOT CHANGE THE CLUSTER LAYOUT UNLESS YOU KNOW WHAT YOU'RE DOING!)**
|
|
|
|
|
|
|
|
To create a new bucket:
|
|
|
|
|
2024-12-18 20:54:15 +00:00
|
|
|
```bash
|
|
|
|
isle garage cli bucket create new-bucket
|
2021-04-20 21:31:37 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
To list existing buckets:
|
|
|
|
|
2024-12-18 20:54:15 +00:00
|
|
|
```bash
|
|
|
|
isle garage cli bucket list
|
2021-04-20 21:31:37 +00:00
|
|
|
```
|