Compare commits
4 commits
main
...
ci/upgrade
Author | SHA1 | Date | |
---|---|---|---|
f1679c6a08 | |||
30f1608149 | |||
06ad505cb5 | |||
539b256525 |
44
.drone.yml
|
@ -95,6 +95,48 @@ trigger:
|
||||||
node:
|
node:
|
||||||
nix: 1
|
nix: 1
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: website
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: hrektts/mdbook
|
||||||
|
commands:
|
||||||
|
- cd doc/book
|
||||||
|
- mdbook build
|
||||||
|
|
||||||
|
- name: upload
|
||||||
|
image: plugins/s3
|
||||||
|
settings:
|
||||||
|
bucket: garagehq.deuxfleurs.fr
|
||||||
|
access_key:
|
||||||
|
from_secret: garagehq_aws_access_key_id
|
||||||
|
secret_key:
|
||||||
|
from_secret: garagehq_aws_secret_access_key
|
||||||
|
source: doc/book/book/**/*
|
||||||
|
strip_prefix: doc/book/book/
|
||||||
|
target: /
|
||||||
|
path_style: true
|
||||||
|
endpoint: https://garage.deuxfleurs.fr
|
||||||
|
region: garage
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
branch:
|
||||||
|
- main
|
||||||
|
repo:
|
||||||
|
- Deuxfleurs/garage
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event:
|
||||||
|
- custom
|
||||||
|
- push
|
||||||
|
- pull_request
|
||||||
|
|
||||||
|
node:
|
||||||
|
nix: 1
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
|
@ -473,6 +515,6 @@ node:
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 3fc19d6f9a3555519c8405e3281b2e74289bb802f644740d5481d53df3a01fa4
|
hmac: 0ba1f5febd521c77c4c0ecb6724888a8d3307024fc74feea1d5bf6bb3bce8429
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
1
.gitattributes
vendored
|
@ -1 +0,0 @@
|
||||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
|
1667
Cargo.lock
generated
|
@ -4,10 +4,9 @@ members = [
|
||||||
"src/rpc",
|
"src/rpc",
|
||||||
"src/table",
|
"src/table",
|
||||||
"src/model",
|
"src/model",
|
||||||
"src/admin",
|
|
||||||
"src/api",
|
"src/api",
|
||||||
"src/web",
|
"src/web",
|
||||||
"src/garage"
|
"src/garage",
|
||||||
]
|
]
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
|
|
86
default.nix
|
@ -11,26 +11,14 @@ with import ./nix/common.nix;
|
||||||
let
|
let
|
||||||
crossSystem = { config = target; };
|
crossSystem = { config = target; };
|
||||||
in let
|
in let
|
||||||
log = v: builtins.trace v v;
|
|
||||||
|
|
||||||
pkgs = import pkgsSrc {
|
pkgs = import pkgsSrc {
|
||||||
inherit system crossSystem;
|
inherit system crossSystem;
|
||||||
overlays = [ cargo2nixOverlay ];
|
overlays = [ cargo2nixOverlay ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
Rust and Nix triples are not the same. Cargo2nix has a dedicated library
|
|
||||||
to convert Nix triples to Rust ones. We need this conversion as we want to
|
|
||||||
set later options linked to our (rust) target in a generic way. Not only
|
|
||||||
the triple terminology is different, but also the "roles" are named differently.
|
|
||||||
Nix uses a build/host/target terminology where Nix's "host" maps to Cargo's "target".
|
|
||||||
*/
|
|
||||||
rustTarget = log (pkgs.rustBuilder.rustLib.rustTriple pkgs.stdenv.hostPlatform);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Cargo2nix is built for rustOverlay which installs Rust from Mozilla releases.
|
Cargo2nix is built for rustOverlay which installs Rust from Mozilla releases.
|
||||||
We want our own Rust to avoid incompatibilities, like we had with musl 1.2.0.
|
We want our own Rust to avoir incompatibilities, like we had with musl 1.2.0.
|
||||||
rustc was built with musl < 1.2.0 and nix shipped musl >= 1.2.0 which lead to compilation breakage.
|
rustc was built with musl < 1.2.0 and nix shipped musl >= 1.2.0 which lead to compilation breakage.
|
||||||
So we want a Rust release that is bound to our Nix repository to avoid these problems.
|
So we want a Rust release that is bound to our Nix repository to avoid these problems.
|
||||||
See here for more info: https://musl.libc.org/time64.html
|
See here for more info: https://musl.libc.org/time64.html
|
||||||
|
@ -49,69 +37,51 @@ in let
|
||||||
|
|
||||||
overrides = pkgs.rustBuilder.overrides.all ++ [
|
overrides = pkgs.rustBuilder.overrides.all ++ [
|
||||||
/*
|
/*
|
||||||
[1] We need to alter Nix hardening to be able to statically compile: PIE,
|
We want to inject the git version while keeping the build deterministic.
|
||||||
Position Independent Executables seems to be supported only on amd64. Having
|
|
||||||
this flags set either make our executables crash or compile as dynamic on many platforms.
|
|
||||||
In the following section codegenOpts, we reactive it for the supported targets
|
|
||||||
(only amd64 curently) through the `-static-pie` flag. PIE is a feature used
|
|
||||||
by ASLR, which helps mitigate security issues.
|
|
||||||
Learn more about Nix Hardening: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/cc-wrapper/add-hardening.sh
|
|
||||||
|
|
||||||
[2] We want to inject the git version while keeping the build deterministic.
|
|
||||||
As we do not want to consider the .git folder as part of the input source,
|
As we do not want to consider the .git folder as part of the input source,
|
||||||
we ask the user (the CI often) to pass the value to Nix.
|
we ask the user (the CI often) to pass the value to Nix.
|
||||||
*/
|
*/
|
||||||
(pkgs.rustBuilder.rustLib.makeOverride {
|
(pkgs.rustBuilder.rustLib.makeOverride {
|
||||||
name = "garage";
|
name = "garage";
|
||||||
overrideAttrs = drv:
|
overrideAttrs = drv: if git_version != null then {
|
||||||
/* [1] */ { hardeningDisable = [ "pie" ]; }
|
preConfigure = ''
|
||||||
//
|
${drv.preConfigure or ""}
|
||||||
/* [2] */ (if git_version != null then {
|
export GIT_VERSION="${git_version}"
|
||||||
preConfigure = ''
|
'';
|
||||||
${drv.preConfigure or ""}
|
} else {};
|
||||||
export GIT_VERSION="${git_version}"
|
|
||||||
'';
|
|
||||||
} else {});
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/*
|
||||||
|
On a sandbox pure NixOS environment, /usr/bin/file is not available.
|
||||||
|
This is a known problem: https://github.com/NixOS/nixpkgs/issues/98440
|
||||||
|
We simply patch the file as suggested
|
||||||
|
*/
|
||||||
|
/*(pkgs.rustBuilder.rustLib.makeOverride {
|
||||||
|
name = "libsodium-sys";
|
||||||
|
overrideAttrs = drv: {
|
||||||
|
preConfigure = ''
|
||||||
|
${drv.preConfigure or ""}
|
||||||
|
sed -i 's,/usr/bin/file,${file}/bin/file,g' ./configure
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
})*/
|
||||||
];
|
];
|
||||||
|
|
||||||
packageFun = import ./Cargo.nix;
|
packageFun = import ./Cargo.nix;
|
||||||
|
|
||||||
/*
|
|
||||||
We compile fully static binaries with musl to simplify deployment on most systems.
|
|
||||||
When possible, we reactivate PIE hardening (see above).
|
|
||||||
|
|
||||||
Also, if you set the RUSTFLAGS environment variable, the following parameters will
|
|
||||||
be ignored.
|
|
||||||
|
|
||||||
For more information on static builds, please refer to Rust's RFC 1721.
|
|
||||||
https://rust-lang.github.io/rfcs/1721-crt-static.html#specifying-dynamicstatic-c-runtime-linkage
|
|
||||||
*/
|
|
||||||
|
|
||||||
codegenOpts = {
|
|
||||||
"armv6l-unknown-linux-musleabihf" = [ "target-feature=+crt-static" "link-arg=-static" ]; /* compile as dynamic with static-pie */
|
|
||||||
"aarch64-unknown-linux-musl" = [ "target-feature=+crt-static" "link-arg=-static" ]; /* segfault with static-pie */
|
|
||||||
"i686-unknown-linux-musl" = [ "target-feature=+crt-static" "link-arg=-static" ]; /* segfault with static-pie */
|
|
||||||
"x86_64-unknown-linux-musl" = [ "target-feature=+crt-static" "link-arg=-static-pie" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
The following definition is not elegant as we use a low level function of Cargo2nix
|
The following definition is not elegant as we use a low level function of Cargo2nix
|
||||||
that enables us to pass our custom rustChannel object. We need this low level definition
|
that enables us to pass our custom rustChannel object
|
||||||
to pass Nix's Rust toolchains instead of Mozilla's one.
|
|
||||||
|
|
||||||
target is mandatory but must be kept to null to allow cargo2nix to set it to the appropriate value
|
|
||||||
for each crate.
|
|
||||||
*/
|
*/
|
||||||
rustPkgs = pkgs.rustBuilder.makePackageSet {
|
rustPkgs = pkgs.rustBuilder.makePackageSet {
|
||||||
inherit packageFun rustChannel release codegenOpts;
|
inherit packageFun rustChannel release;
|
||||||
packageOverrides = overrides;
|
packageOverrides = overrides;
|
||||||
target = null;
|
target = null; /* we set target to null because we want that cargo2nix computes it automatically */
|
||||||
|
|
||||||
buildRustPackages = pkgs.buildPackages.rustBuilder.makePackageSet {
|
buildRustPackages = pkgs.buildPackages.rustBuilder.makePackageSet {
|
||||||
inherit rustChannel packageFun codegenOpts;
|
inherit rustChannel packageFun;
|
||||||
packageOverrides = overrides;
|
packageOverrides = overrides;
|
||||||
target = null;
|
target = null; /* we set target to null because we want that cargo2nix computes it automatically */
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
These are the sources for the documentation but not the whole website.
|
|
||||||
The website templates and other things are in garage_website, which
|
|
||||||
uses this as a submodule.
|
|
|
@ -1,5 +0,0 @@
|
||||||
+++
|
|
||||||
template = "documentation.html"
|
|
||||||
page_template = "documentation.html"
|
|
||||||
redirect_to = "documentation/quick-start/"
|
|
||||||
+++
|
|
6
doc/book/book.toml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[book]
|
||||||
|
authors = ["Quentin Dufour"]
|
||||||
|
language = "en"
|
||||||
|
multilingual = false
|
||||||
|
src = "src"
|
||||||
|
title = "Garage Documentation"
|
|
@ -1,285 +0,0 @@
|
||||||
+++
|
|
||||||
title = "Browsing tools"
|
|
||||||
weight = 20
|
|
||||||
+++
|
|
||||||
|
|
||||||
Browsing tools allow you to query the S3 API without too many abstractions.
|
|
||||||
These tools are particularly suitable for debug, backups, website deployments or any scripted task that need to handle data.
|
|
||||||
|
|
||||||
| Name | Status | Note |
|
|
||||||
|------|--------|------|
|
|
||||||
| [Minio client](#minio-client) | ✅ | Recommended |
|
|
||||||
| [AWS CLI](#aws-cli) | ✅ | Recommended |
|
|
||||||
| [rclone](#rclone) | ✅ | |
|
|
||||||
| [s3cmd](#s3cmd) | ✅ | |
|
|
||||||
| [(Cyber)duck](#cyberduck) | ✅ | |
|
|
||||||
| [WinSCP (libs3)](#winscp) | ✅ | No instructions yet |
|
|
||||||
|
|
||||||
|
|
||||||
## Minio client
|
|
||||||
|
|
||||||
Use the following command to set an "alias", i.e. define a new S3 server to be
|
|
||||||
used by the Minio client:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
mc alias set \
|
|
||||||
garage \
|
|
||||||
<endpoint> \
|
|
||||||
<access key> \
|
|
||||||
<secret key> \
|
|
||||||
--api S3v4
|
|
||||||
```
|
|
||||||
|
|
||||||
Remember that `mc` is sometimes called `mcli` (such as on Arch Linux), to avoid conflicts
|
|
||||||
with Midnight Commander.
|
|
||||||
|
|
||||||
Some commands:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# list buckets
|
|
||||||
mc ls garage/
|
|
||||||
|
|
||||||
# list objets in a bucket
|
|
||||||
mc ls garage/my_files
|
|
||||||
|
|
||||||
# copy from your filesystem to garage
|
|
||||||
mc cp /proc/cpuinfo garage/my_files/cpuinfo.txt
|
|
||||||
|
|
||||||
# copy from garage to your filesystem
|
|
||||||
mc cp garage/my_files/cpuinfo.txt /tmp/cpuinfo.txt
|
|
||||||
|
|
||||||
# mirror a folder from your filesystem to garage
|
|
||||||
mc mirror --overwrite ./book garage/garagehq.deuxfleurs.fr
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## AWS CLI
|
|
||||||
|
|
||||||
Create a file named `~/.aws/credentials` and put:
|
|
||||||
|
|
||||||
```toml
|
|
||||||
[default]
|
|
||||||
aws_access_key_id=xxxx
|
|
||||||
aws_secret_access_key=xxxx
|
|
||||||
```
|
|
||||||
|
|
||||||
Then a file named `~/.aws/config` and put:
|
|
||||||
|
|
||||||
```toml
|
|
||||||
[default]
|
|
||||||
region=garage
|
|
||||||
```
|
|
||||||
|
|
||||||
Now, supposing Garage is listening on `http://127.0.0.1:3900`, you can list your buckets with:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
aws --endpoint-url http://127.0.0.1:3900 s3 ls
|
|
||||||
```
|
|
||||||
|
|
||||||
Passing the `--endpoint-url` parameter to each command is annoying but AWS developers do not provide a corresponding configuration entry.
|
|
||||||
As a workaround, you can redefine the aws command by editing the file `~/.bashrc`:
|
|
||||||
|
|
||||||
```
|
|
||||||
function aws { command aws --endpoint-url http://127.0.0.1:3900 $@ ; }
|
|
||||||
```
|
|
||||||
|
|
||||||
*Do not forget to run `source ~/.bashrc` or to start a new terminal before running the next commands.*
|
|
||||||
|
|
||||||
Now you can simply run:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# list buckets
|
|
||||||
aws s3 ls
|
|
||||||
|
|
||||||
# list objects of a bucket
|
|
||||||
aws s3 ls s3://my_files
|
|
||||||
|
|
||||||
# copy from your filesystem to garage
|
|
||||||
aws s3 cp /proc/cpuinfo s3://my_files/cpuinfo.txt
|
|
||||||
|
|
||||||
# copy from garage to your filesystem
|
|
||||||
aws s3 cp s3/my_files/cpuinfo.txt /tmp/cpuinfo.txt
|
|
||||||
```
|
|
||||||
|
|
||||||
## `rclone`
|
|
||||||
|
|
||||||
`rclone` can be configured using the interactive assistant invoked using `rclone config`.
|
|
||||||
|
|
||||||
You can also configure `rclone` by writing directly its configuration file.
|
|
||||||
Here is a template `rclone.ini` configuration file (mine is located at `~/.config/rclone/rclone.conf`):
|
|
||||||
|
|
||||||
```ini
|
|
||||||
[garage]
|
|
||||||
type = s3
|
|
||||||
provider = Other
|
|
||||||
env_auth = false
|
|
||||||
access_key_id = <access key>
|
|
||||||
secret_access_key = <secret key>
|
|
||||||
region = <region>
|
|
||||||
endpoint = <endpoint>
|
|
||||||
force_path_style = true
|
|
||||||
acl = private
|
|
||||||
bucket_acl = private
|
|
||||||
```
|
|
||||||
|
|
||||||
Now you can run:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# list buckets
|
|
||||||
rclone lsd garage:
|
|
||||||
|
|
||||||
# list objects of a bucket aggregated in directories
|
|
||||||
rclone lsd garage:my-bucket
|
|
||||||
|
|
||||||
# copy from your filesystem to garage
|
|
||||||
echo hello world > /tmp/hello.txt
|
|
||||||
rclone copy /tmp/hello.txt garage:my-bucket/
|
|
||||||
|
|
||||||
# copy from garage to your filesystem
|
|
||||||
rclone copy garage:quentin.divers/hello.txt .
|
|
||||||
|
|
||||||
# see all available subcommands
|
|
||||||
rclone help
|
|
||||||
```
|
|
||||||
|
|
||||||
**Advice with rclone:** use the `--fast-list` option when accessing buckets with large amounts of objects.
|
|
||||||
This will tremendously accelerate operations such as `rclone sync` or `rclone ncdu` by reducing the number
|
|
||||||
of ListObjects calls that are made.
|
|
||||||
|
|
||||||
|
|
||||||
## `s3cmd`
|
|
||||||
|
|
||||||
Here is a template for the `s3cmd.cfg` file to talk with Garage:
|
|
||||||
|
|
||||||
```ini
|
|
||||||
[default]
|
|
||||||
access_key = <access key>
|
|
||||||
secret_key = <secret key>
|
|
||||||
host_base = <endpoint without http(s)://>
|
|
||||||
host_bucket = <same as host_base>
|
|
||||||
use_https = <False or True>
|
|
||||||
```
|
|
||||||
|
|
||||||
And use it as follow:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# List buckets
|
|
||||||
s3cmd ls
|
|
||||||
|
|
||||||
# s3cmd objects inside a bucket
|
|
||||||
s3cmd ls s3://my-bucket
|
|
||||||
|
|
||||||
# copy from your filesystem to garage
|
|
||||||
echo hello world > /tmp/hello.txt
|
|
||||||
s3cmd put /tmp/hello.txt s3://my-bucket/
|
|
||||||
|
|
||||||
# copy from garage to your filesystem
|
|
||||||
s3cmd get s3://my-bucket/hello.txt hello.txt
|
|
||||||
```
|
|
||||||
|
|
||||||
## Cyberduck & duck {#cyberduck}
|
|
||||||
|
|
||||||
Both Cyberduck (the GUI) and duck (the CLI) have a concept of "Connection Profiles" that contain some presets for a specific provider.
|
|
||||||
We wrote the following connection profile for Garage:
|
|
||||||
|
|
||||||
```xml
|
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>Protocol</key>
|
|
||||||
<string>s3</string>
|
|
||||||
<key>Vendor</key>
|
|
||||||
<string>garage</string>
|
|
||||||
<key>Scheme</key>
|
|
||||||
<string>https</string>
|
|
||||||
<key>Description</key>
|
|
||||||
<string>GarageS3</string>
|
|
||||||
<key>Default Hostname</key>
|
|
||||||
<string>127.0.0.1</string>
|
|
||||||
<key>Default Port</key>
|
|
||||||
<string>4443</string>
|
|
||||||
<key>Hostname Configurable</key>
|
|
||||||
<false/>
|
|
||||||
<key>Port Configurable</key>
|
|
||||||
<false/>
|
|
||||||
<key>Username Configurable</key>
|
|
||||||
<true/>
|
|
||||||
<key>Username Placeholder</key>
|
|
||||||
<string>Access Key ID (GK...)</string>
|
|
||||||
<key>Password Placeholder</key>
|
|
||||||
<string>Secret Key</string>
|
|
||||||
<key>Properties</key>
|
|
||||||
<array>
|
|
||||||
<string>s3service.disable-dns-buckets=true</string>
|
|
||||||
</array>
|
|
||||||
<key>Region</key>
|
|
||||||
<string>garage</string>
|
|
||||||
<key>Regions</key>
|
|
||||||
<array>
|
|
||||||
<string>garage</string>
|
|
||||||
</array>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
```
|
|
||||||
|
|
||||||
*Note: If your garage instance is configured with vhost access style, you can remove `s3service.disable-dns-buckets=true`.*
|
|
||||||
|
|
||||||
### Instructions for the GUI
|
|
||||||
|
|
||||||
Copy the connection profile, and save it anywhere as `garage.cyberduckprofile`.
|
|
||||||
Then find this file with your file explorer and double click on it: Cyberduck will open a connection wizard for this profile.
|
|
||||||
Simply follow the wizard and you should be done!
|
|
||||||
|
|
||||||
### Instuctions for the CLI
|
|
||||||
|
|
||||||
To configure duck (Cyberduck's CLI tool), start by creating its folder hierarchy:
|
|
||||||
|
|
||||||
```
|
|
||||||
mkdir -p ~/.duck/profiles/
|
|
||||||
```
|
|
||||||
|
|
||||||
Then, save the connection profile for Garage in `~/.duck/profiles/garage.cyberduckprofile`.
|
|
||||||
To set your credentials in `~/.duck/credentials`, use the following commands to generate the appropriate string:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
export AWS_ACCESS_KEY_ID="GK..."
|
|
||||||
export AWS_SECRET_ACCESS_KEY="..."
|
|
||||||
export HOST="s3.garage.localhost"
|
|
||||||
export PORT="4443"
|
|
||||||
export PROTOCOL="https"
|
|
||||||
|
|
||||||
cat > ~/.duck/credentials <<EOF
|
|
||||||
$PROTOCOL\://$AWS_ACCESS_KEY_ID@$HOST\:$PORT=$AWS_SECRET_ACCESS_KEY
|
|
||||||
EOF
|
|
||||||
```
|
|
||||||
|
|
||||||
And finally, I recommend appending a small wrapper to your `~/.bashrc` to avoid setting the username on each command (do not forget to replace `GK...` by your access key):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
function duck { command duck --username GK... $@ ; }
|
|
||||||
```
|
|
||||||
|
|
||||||
Finally, you can then use `duck` as follow:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# List buckets
|
|
||||||
duck --list garage:/
|
|
||||||
|
|
||||||
# List objects in a bucket
|
|
||||||
duck --list garage:/my-files/
|
|
||||||
|
|
||||||
# Download an object
|
|
||||||
duck --download garage:/my-files/an-object.txt /tmp/object.txt
|
|
||||||
|
|
||||||
# Upload an object
|
|
||||||
duck --upload /tmp/object.txt garage:/my-files/another-object.txt
|
|
||||||
|
|
||||||
# Delete an object
|
|
||||||
duck --delete garage:/my-files/an-object.txt
|
|
||||||
```
|
|
||||||
|
|
||||||
## WinSCP (libs3) {#winscp}
|
|
||||||
|
|
||||||
*No instruction yet. You can find ones in french [in our wiki](https://wiki.deuxfleurs.fr/fr/Guide/Garage/WinSCP).*
|
|
||||||
|
|
|
@ -1,86 +0,0 @@
|
||||||
+++
|
|
||||||
title = "Websites (Hugo, Jekyll, Publii...)"
|
|
||||||
weight = 10
|
|
||||||
+++
|
|
||||||
|
|
||||||
Garage is also suitable to host static websites.
|
|
||||||
While they can be deployed with traditional CLI tools, some static website generators have integrated options to ease your workflow.
|
|
||||||
|
|
||||||
| Name | Status | Note |
|
|
||||||
|------|--------|------|
|
|
||||||
| [Hugo](#hugo) | ✅ | Publishing logic is integrated in the tool |
|
|
||||||
| [Publii](#publii) | ✅ | Require a correctly configured s3 vhost endpoint |
|
|
||||||
| [Generic Static Site Generator](#generic-static-site-generator) | ✅ | Works for Jekyll, Zola, Gatsby, Pelican, etc. |
|
|
||||||
|
|
||||||
## Hugo
|
|
||||||
|
|
||||||
Add to your `config.toml` the following section:
|
|
||||||
|
|
||||||
```toml
|
|
||||||
[[deployment.targets]]
|
|
||||||
URL = "s3://<bucket>?endpoint=<endpoint>&disableSSL=<bool>&s3ForcePathStyle=true®ion=garage"
|
|
||||||
```
|
|
||||||
|
|
||||||
For example:
|
|
||||||
|
|
||||||
```toml
|
|
||||||
[[deployment.targets]]
|
|
||||||
URL = "s3://my-blog?endpoint=localhost:9000&disableSSL=true&s3ForcePathStyle=true®ion=garage"
|
|
||||||
```
|
|
||||||
|
|
||||||
Then inform hugo of your credentials:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
export AWS_ACCESS_KEY_ID=GKxxx
|
|
||||||
export AWS_SECRET_ACCESS_KEY=xxx
|
|
||||||
```
|
|
||||||
|
|
||||||
And finally build and deploy your website:
|
|
||||||
|
|
||||||
```bsh
|
|
||||||
hugo
|
|
||||||
hugo deploy
|
|
||||||
```
|
|
||||||
|
|
||||||
*External links:*
|
|
||||||
- [gocloud.dev > aws > Supported URL parameters](https://pkg.go.dev/gocloud.dev/aws?utm_source=godoc#ConfigFromURLParams)
|
|
||||||
- [Hugo Documentation > hugo deploy](https://gohugo.io/hosting-and-deployment/hugo-deploy/)
|
|
||||||
|
|
||||||
## Publii
|
|
||||||
|
|
||||||
[![A screenshot of Publii's GUI](./publii.png)](./publii.png)
|
|
||||||
|
|
||||||
Deploying a website to Garage from Publii is natively supported.
|
|
||||||
First, make sure that your Garage administrator allowed and configured Garage to support vhost access style.
|
|
||||||
We also suppose that your bucket ("my-bucket") and key is already created and configured.
|
|
||||||
|
|
||||||
Then, from the left menu, click on server. Choose "S3" as the protocol.
|
|
||||||
In the configuration window, enter:
|
|
||||||
- Your finale website URL (eg. "http://my-bucket.web.garage.localhost:3902")
|
|
||||||
- Tick "Use a custom S3 provider"
|
|
||||||
- Set the S3 endpoint, (eg. "http://s3.garage.localhost:3900")
|
|
||||||
- Then put your access key (eg. "GK..."), your secret key, and your bucket (eg. "my-bucket")
|
|
||||||
- And hit the button "Save settings"
|
|
||||||
|
|
||||||
Now, each time you want to publish your website from Publii, just hit the bottom left button "Sync your website"!
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Generic Static Site Generator
|
|
||||||
|
|
||||||
Some tools do not support sending to a S3 backend but output a compiled folder on your system.
|
|
||||||
We can then use any CLI tool to upload this content to our S3 target.
|
|
||||||
|
|
||||||
First, start by [configuring minio client](@/documentation/connect/cli.md#minio-client).
|
|
||||||
|
|
||||||
Then build your website (example for jekyll):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
jekyll build
|
|
||||||
```
|
|
||||||
|
|
||||||
And copy its output folder (`_site` for Jekyll) on S3:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
mc mirror --overwrite _site garage/my-site
|
|
||||||
```
|
|
|
@ -1,31 +0,0 @@
|
||||||
+++
|
|
||||||
title="Cookbook"
|
|
||||||
template = "documentation.html"
|
|
||||||
weight = 2
|
|
||||||
sort_by = "weight"
|
|
||||||
+++
|
|
||||||
|
|
||||||
A cookbook, when you cook, is a collection of recipes.
|
|
||||||
Similarly, Garage's cookbook contains a collection of recipes that are known to works well!
|
|
||||||
This chapter could also be referred as "Tutorials" or "Best practices".
|
|
||||||
|
|
||||||
- **[Multi-node deployment](@/documentation/cookbook/real-world.md):** This page will walk you through all of the necessary
|
|
||||||
steps to deploy Garage in a real-world setting.
|
|
||||||
|
|
||||||
- **[Building from source](@/documentation/cookbook/from-source.md):** This page explains how to build Garage from
|
|
||||||
source in case a binary is not provided for your architecture, or if you want to
|
|
||||||
hack with us!
|
|
||||||
|
|
||||||
- **[Integration with Systemd](@/documentation/cookbook/systemd.md):** This page explains how to run Garage
|
|
||||||
as a Systemd service (instead of as a Docker container).
|
|
||||||
|
|
||||||
- **[Configuring a gateway node](@/documentation/cookbook/gateways.md):** This page explains how to run a gateway node in a Garage cluster, i.e. a Garage node that doesn't store data but accelerates access to data present on the other nodes.
|
|
||||||
|
|
||||||
- **[Hosting a website](@/documentation/cookbook/exposing-websites.md):** This page explains how to use Garage
|
|
||||||
to host a static website.
|
|
||||||
|
|
||||||
- **[Configuring a reverse-proxy](@/documentation/cookbook/reverse-proxy.md):** This page explains how to configure a reverse-proxy to add TLS support to your S3 api endpoint.
|
|
||||||
|
|
||||||
- **[Recovering from failures](@/documentation/cookbook/recovering.md):** Garage's first selling point is resilience
|
|
||||||
to hardware failures. This section explains how to recover from such a failure in the
|
|
||||||
best possible way.
|
|
|
@ -1,69 +0,0 @@
|
||||||
+++
|
|
||||||
title = "Exposing buckets as websites"
|
|
||||||
weight = 25
|
|
||||||
+++
|
|
||||||
|
|
||||||
## Configuring a bucket for website access
|
|
||||||
|
|
||||||
There are two methods to expose buckets as website:
|
|
||||||
|
|
||||||
1. using the PutBucketWebsite S3 API call, which is allowed for access keys that have the owner permission bit set
|
|
||||||
|
|
||||||
2. from the Garage CLI, by an adminstrator of the cluster
|
|
||||||
|
|
||||||
The `PutBucketWebsite` API endpoint [is documented](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html) in the official AWS docs.
|
|
||||||
This endpoint can also be called [using `aws s3api`](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-bucket-website.html) on the command line.
|
|
||||||
The website configuration supported by Garage is only a subset of the possibilities on Amazon S3: redirections are not supported, only the index document and error document can be specified.
|
|
||||||
|
|
||||||
If you want to expose your bucket as a website from the CLI, use this simple command:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
garage bucket website --allow my-website
|
|
||||||
```
|
|
||||||
|
|
||||||
Now it will be **publicly** exposed on the web endpoint (by default listening on port 3902).
|
|
||||||
|
|
||||||
## How exposed websites work
|
|
||||||
|
|
||||||
Our website serving logic is as follow:
|
|
||||||
|
|
||||||
- Supports only static websites (no support for PHP or other languages)
|
|
||||||
- Does not support directory listing
|
|
||||||
- The index file is defined per-bucket and can be specified in the `PutBucketWebsite` call
|
|
||||||
or on the CLI using the `--index-document` parameter (default: `index.html`)
|
|
||||||
- A custom error document for 404 errors can be specified in the `PutBucketWebsite` call
|
|
||||||
or on the CLI using the `--error-document` parameter
|
|
||||||
|
|
||||||
Now we need to infer the URL of your website through your bucket name.
|
|
||||||
Let assume:
|
|
||||||
- we set `root_domain = ".web.example.com"` in `garage.toml` ([ref](@/documentation/reference-manual/configuration.md#root_domain))
|
|
||||||
- our bucket name is `garagehq.deuxfleurs.fr`.
|
|
||||||
|
|
||||||
Our bucket will be served if the Host field matches one of these 2 values (the port is ignored):
|
|
||||||
|
|
||||||
- `garagehq.deuxfleurs.fr.web.example.com`: you can dedicate a subdomain to your users (here `web.example.com`).
|
|
||||||
|
|
||||||
- `garagehq.deuxfleurs.fr`: your users can bring their own domain name, they just need to point them to your Garage cluster.
|
|
||||||
|
|
||||||
You can try this logic locally, without configuring any DNS, thanks to `curl`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# prepare your test
|
|
||||||
echo hello world > /tmp/index.html
|
|
||||||
mc cp /tmp/index.html garage/garagehq.deuxfleurs.fr
|
|
||||||
|
|
||||||
curl -H 'Host: garagehq.deuxfleurs.fr' http://localhost:3902
|
|
||||||
# should print "hello world"
|
|
||||||
|
|
||||||
curl -H 'Host: garagehq.deuxfleurs.fr.web.example.com' http://localhost:3902
|
|
||||||
# should also print "hello world"
|
|
||||||
```
|
|
||||||
|
|
||||||
Now that you understand how website logic works on Garage, you can:
|
|
||||||
|
|
||||||
- make the website endpoint listens on port 80 (instead of 3902)
|
|
||||||
- use iptables to redirect the port 80 to the port 3902:
|
|
||||||
`iptables -t nat -A PREROUTING -p tcp -dport 80 -j REDIRECT -to-port 3902`
|
|
||||||
- or configure a [reverse proxy](@/documentation/cookbook/reverse-proxy.md) in front of Garage to add TLS (HTTPS), CORS support, etc.
|
|
||||||
|
|
||||||
You can also take a look at [Website Integration](@/documentation/connect/websites.md) to see how you can add Garage to your workflow.
|
|
|
@ -1,205 +0,0 @@
|
||||||
+++
|
|
||||||
title = "S3 Compatibility status"
|
|
||||||
weight = 20
|
|
||||||
+++
|
|
||||||
|
|
||||||
## Endpoint implementation
|
|
||||||
|
|
||||||
All APIs that are missing on Garage will return a 501 Not Implemented.
|
|
||||||
Some `x-amz-` headers are not implemented.
|
|
||||||
|
|
||||||
*The compatibility list for other platforms is given only for information purposes and based on available documentation. Some entries might be inexact. Feel free to open a PR to fix this table. Minio is missing because they do not provide a public S3 compatibility list.*
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
| Feature | Garage | [Openstack Swift](https://docs.openstack.org/swift/latest/s3_compat.html) | [Ceph Object Gateway](https://docs.ceph.com/en/latest/radosgw/s3/) | [Riak CS](https://docs.riak.com/riak/cs/2.1.1/references/apis/storage/s3/index.html) | [OpenIO](https://docs.openio.io/latest/source/arch-design/s3_compliancy.html) |
|
|
||||||
|------------------------------|----------------------------------|-----------------|---------------|---------|-----|
|
|
||||||
| [signature v2](https://docs.aws.amazon.com/general/latest/gr/signature-version-2.html) (deprecated) | ❌ Missing | ✅ | ❌ | ✅ | ✅ |
|
|
||||||
| [signature v4](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html) | ✅ Implemented | ✅ | ✅ | ❌ | ✅ |
|
|
||||||
| [URL path-style](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#path-style-access) (eg. `host.tld/bucket/key`) | ✅ Implemented | ✅ | ✅ | ❓| ✅ |
|
|
||||||
| [URL vhost-style](https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html#virtual-hosted-style-access) URL (eg. `bucket.host.tld/key`) | ✅ Implemented | ❌| ✅| ✅ | ✅ |
|
|
||||||
| [Presigned URLs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html) | ✅ Implemented | ❌| ✅ | ✅ | ✅(❓) |
|
|
||||||
|
|
||||||
*Note:* OpenIO does not says if it supports presigned URLs. Because it is part of signature v4 and they claim they support it without additional precisions, we suppose that OpenIO supports presigned URLs.
|
|
||||||
|
|
||||||
### Core endoints
|
|
||||||
|
|
||||||
| Endpoint | Garage | [Openstack Swift](https://docs.openstack.org/swift/latest/s3_compat.html) | [Ceph Object Gateway](https://docs.ceph.com/en/latest/radosgw/s3/) | [Riak CS](https://docs.riak.com/riak/cs/2.1.1/references/apis/storage/s3/index.html) | [OpenIO](https://docs.openio.io/latest/source/arch-design/s3_compliancy.html) |
|
|
||||||
|------------------------------|----------------------------------|-----------------|---------------|---------|-----|
|
|
||||||
| [CreateBucket](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html) | ✅ Implemented | ✅ | ✅ | ✅ | ✅ |
|
|
||||||
| [DeleteBucket](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucket.html) | ✅ Implemented | ✅ | ✅ | ✅ | ✅ |
|
|
||||||
| [GetBucketLocation](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLocation.html) | ✅ Implemented | ✅ | ✅ | ❌ | ✅ |
|
|
||||||
| [HeadBucket](https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadBucket.html) | ✅ Implemented | ✅ | ✅ | ✅ | ✅ |
|
|
||||||
| [ListBuckets](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBuckets.html) | ✅ Implemented | ❌| ✅ | ✅ | ✅ |
|
|
||||||
| [HeadObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html) | ✅ Implemented | ✅ | ✅ | ✅ | ✅ |
|
|
||||||
| [CopyObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CopyObject.html) | ✅ Implemented | ✅ | ✅ | ✅ | ✅ |
|
|
||||||
| [DeleteObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html) | ✅ Implemented | ✅ | ✅ | ✅ | ✅ |
|
|
||||||
| [DeleteObjects](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjects.html) | ✅ Implemented | ✅ | ✅ | ✅ | ✅ |
|
|
||||||
| [GetObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) | ✅ Implemented | ✅ | ✅ | ✅ | ✅ |
|
|
||||||
| [ListObjects](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjects.html) | ✅ Implemented (see details below) | ✅ | ✅ | ✅ | ❌|
|
|
||||||
| [ListObjectsV2](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html) | ✅ Implemented | ❌| ❌| ❌| ✅ |
|
|
||||||
| [PostObject](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html) (compatibility API) | ❌ Missing | ❌| ✅ | ❌| ❌|
|
|
||||||
| [PutObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html) | ✅ Implemented | ✅ | ✅ | ✅ | ✅ |
|
|
||||||
|
|
||||||
**ListObjects:** Implemented, but there isn't a very good specification of what `encoding-type=url` covers so there might be some encoding bugs. In our implementation the url-encoded fields are in the same in ListObjects as they are in ListObjectsV2.
|
|
||||||
|
|
||||||
*Note: Ceph API documentation is incomplete and miss at least HeadBucket and UploadPartCopy, but these endpoints are documented in [Red Hat Ceph Storage - Chapter 2. Ceph Object Gateway and the S3 API](https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/4/html/developer_guide/ceph-object-gateway-and-the-s3-api)*
|
|
||||||
|
|
||||||
### Multipart Upload endpoints
|
|
||||||
|
|
||||||
| Endpoint | Garage | [Openstack Swift](https://docs.openstack.org/swift/latest/s3_compat.html) | [Ceph Object Gateway](https://docs.ceph.com/en/latest/radosgw/s3/) | [Riak CS](https://docs.riak.com/riak/cs/2.1.1/references/apis/storage/s3/index.html) | [OpenIO](https://docs.openio.io/latest/source/arch-design/s3_compliancy.html) |
|
|
||||||
|------------------------------|----------------------------------|-----------------|---------------|---------|-----|
|
|
||||||
| [AbortMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html) | ✅ Implemented | ✅ | ✅ | ✅ | ✅ |
|
|
||||||
| [CompleteMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html) | ✅ Implemented (see details below) | ✅ | ✅ | ✅ | ✅ |
|
|
||||||
| [CreateMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateMultipartUpload.html) | ✅ Implemented | ✅| ✅ | ✅ | ✅ |
|
|
||||||
| [ListMultipartUpload](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUpload.html) | ✅ Implemented | ✅ | ✅ | ✅ | ✅ |
|
|
||||||
| [ListParts](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html) | ✅ Implemented | ✅ | ✅ | ✅ | ✅ |
|
|
||||||
| [UploadPart](https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html) | ✅ Implemented (see details below) | ✅ | ✅| ✅ | ✅ |
|
|
||||||
| [UploadPartCopy](https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html) | ✅ Implemented | ✅ | ✅ | ✅ | ✅ |
|
|
||||||
|
|
||||||
Our implementation of Multipart Upload is currently a bit more restrictive than Amazon's one in some edge cases.
|
|
||||||
For more information, please refer to our [issue tracker](https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/204).
|
|
||||||
|
|
||||||
### Website endpoints
|
|
||||||
|
|
||||||
| Endpoint | Garage | [Openstack Swift](https://docs.openstack.org/swift/latest/s3_compat.html) | [Ceph Object Gateway](https://docs.ceph.com/en/latest/radosgw/s3/) | [Riak CS](https://docs.riak.com/riak/cs/2.1.1/references/apis/storage/s3/index.html) | [OpenIO](https://docs.openio.io/latest/source/arch-design/s3_compliancy.html) |
|
|
||||||
|------------------------------|----------------------------------|-----------------|---------------|---------|-----|
|
|
||||||
| [DeleteBucketWebsite](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketWebsite.html) | ✅ Implemented | ❌| ❌| ❌| ❌|
|
|
||||||
| [GetBucketWebsite](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketWebsite.html) | ✅ Implemented | ❌ | ❌| ❌| ❌|
|
|
||||||
| [PutBucketWebsite](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketWebsite.html) | ⚠ Partially implemented (see below)| ❌| ❌| ❌| ❌|
|
|
||||||
| [DeleteBucketCors](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketCors.html) | ✅ Implemented | ❌| ❌| ❌| ✅ |
|
|
||||||
| [GetBucketCors](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketCors.html) | ✅ Implemented | ❌ | ❌| ❌| ✅ |
|
|
||||||
| [PutBucketCors](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketCors.html) | ✅ Implemented | ❌| ❌| ❌| ✅ |
|
|
||||||
|
|
||||||
**PutBucketWebsite:** Implemented, but only stores the index document suffix and the error document path. Redirects are not supported.
|
|
||||||
|
|
||||||
*Note: Ceph radosgw has some support for static websites but it is different from Amazon one plus it does not implement its configuration endpoints.*
|
|
||||||
|
|
||||||
### ACL, Policies endpoints
|
|
||||||
|
|
||||||
Amazon has 2 access control mechanisms in S3: ACL (legacy) and policies (new one).
|
|
||||||
Garage implements none of them, and has its own system instead, built around a per-access-key-per-bucket logic.
|
|
||||||
See Garage CLI reference manual to learn how to use Garage's permission system.
|
|
||||||
|
|
||||||
| Endpoint | Garage | [Openstack Swift](https://docs.openstack.org/swift/latest/s3_compat.html) | [Ceph Object Gateway](https://docs.ceph.com/en/latest/radosgw/s3/) | [Riak CS](https://docs.riak.com/riak/cs/2.1.1/references/apis/storage/s3/index.html) | [OpenIO](https://docs.openio.io/latest/source/arch-design/s3_compliancy.html) |
|
|
||||||
|------------------------------|----------------------------------|-----------------|---------------|---------|-----|
|
|
||||||
| [DeleteBucketPolicy](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketPolicy.html) | ❌ Missing | ❌| ❌| ✅ | ❌|
|
|
||||||
| [GetBucketPolicy](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicy.html) | ❌ Missing | ❌| ❌| ⚠ | ❌|
|
|
||||||
| [GetBucketPolicyStatus](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketPolicyStatus.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [PutBucketPolicy](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketPolicy.html) | ❌ Missing | ❌| ❌| ⚠ | ❌|
|
|
||||||
| [GetBucketAcl](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAcl.html) | ❌ Missing | ✅ | ✅ | ✅ | ✅ |
|
|
||||||
| [PutBucketAcl](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAcl.html) | ❌ Missing | ✅ | ✅ | ✅ | ✅ |
|
|
||||||
| [GetObjectAcl](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectAcl.html) | ❌ Missing | ✅ | ✅ | ✅ | ✅ |
|
|
||||||
| [PutObjectAcl](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectAcl.html) | ❌ Missing | ✅ | ✅ | ✅ | ✅ |
|
|
||||||
|
|
||||||
*Notes:* Ceph claims that it supports bucket policies but does not implement any Policy endpoints. They probably refer to their own permission system. Riak CS only supports a subset of the policy configuration.
|
|
||||||
|
|
||||||
### Versioning, Lifecycle endpoints
|
|
||||||
|
|
||||||
Garage does not support (yet) object versioning.
|
|
||||||
If you need this feature, please [share your use case in our dedicated issue](https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/166).
|
|
||||||
|
|
||||||
| Endpoint | Garage | [Openstack Swift](https://docs.openstack.org/swift/latest/s3_compat.html) | [Ceph Object Gateway](https://docs.ceph.com/en/latest/radosgw/s3/) | [Riak CS](https://docs.riak.com/riak/cs/2.1.1/references/apis/storage/s3/index.html) | [OpenIO](https://docs.openio.io/latest/source/arch-design/s3_compliancy.html) |
|
|
||||||
|------------------------------|----------------------------------|-----------------|---------------|---------|-----|
|
|
||||||
| [DeleteBucketLifecycle](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketLifecycle.html) | ❌ Missing | ❌| ✅| ❌| ✅|
|
|
||||||
| [GetBucketLifecycleConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLifecycleConfiguration.html) | ❌ Missing | ❌| ⚠ | ❌| ✅|
|
|
||||||
| [PutBucketLifecycleConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLifecycleConfiguration.html) | ❌ Missing | ❌| ⚠ | ❌| ✅|
|
|
||||||
| [GetBucketVersioning](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketVersioning.html) | ❌ Stub (see below) | ✅| ✅ | ❌| ✅|
|
|
||||||
| [ListObjectVersions](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectVersions.html) | ❌ Missing | ❌| ✅ | ❌| ✅|
|
|
||||||
| [PutBucketVersioning](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html) | ❌ Missing | ❌| ✅| ❌| ✅|
|
|
||||||
|
|
||||||
|
|
||||||
**GetBucketVersioning:** Stub implementation (Garage does not yet support versionning so this always returns "versionning not enabled").
|
|
||||||
|
|
||||||
*Note: Ceph only supports `Expiration`, `NoncurrentVersionExpiration` and `AbortIncompleteMultipartUpload` on its Lifecycle endpoints.*
|
|
||||||
|
|
||||||
### Replication endpoints
|
|
||||||
|
|
||||||
Please open an issue if you have a use case for replication.
|
|
||||||
|
|
||||||
| Endpoint | Garage | [Openstack Swift](https://docs.openstack.org/swift/latest/s3_compat.html) | [Ceph Object Gateway](https://docs.ceph.com/en/latest/radosgw/s3/) | [Riak CS](https://docs.riak.com/riak/cs/2.1.1/references/apis/storage/s3/index.html) | [OpenIO](https://docs.openio.io/latest/source/arch-design/s3_compliancy.html) |
|
|
||||||
|------------------------------|----------------------------------|-----------------|---------------|---------|-----|
|
|
||||||
| [DeleteBucketReplication](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketReplication.html) | ❌ Missing | ❌| ✅ | ❌| ❌|
|
|
||||||
| [GetBucketReplication](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketReplication.html) | ❌ Missing | ❌| ✅ | ❌| ❌|
|
|
||||||
| [PutBucketReplication](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketReplication.html) | ❌ Missing | ❌| ⚠ | ❌| ❌|
|
|
||||||
|
|
||||||
*Note: Ceph documentation briefly says that Ceph supports [replication though the S3 API](https://docs.ceph.com/en/latest/radosgw/multisite-sync-policy/#s3-replication-api) but with some limitations. Additionaly, replication endpoints are not documented in the S3 compatibility page so I don't know what kind of support we can expect.*
|
|
||||||
|
|
||||||
### Locking objects
|
|
||||||
|
|
||||||
Amazon defines a concept of [object locking](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock.html) that can be achieved either through a Retention period or a Legal hold.
|
|
||||||
|
|
||||||
| Endpoint | Garage | [Openstack Swift](https://docs.openstack.org/swift/latest/s3_compat.html) | [Ceph Object Gateway](https://docs.ceph.com/en/latest/radosgw/s3/) | [Riak CS](https://docs.riak.com/riak/cs/2.1.1/references/apis/storage/s3/index.html) | [OpenIO](https://docs.openio.io/latest/source/arch-design/s3_compliancy.html) |
|
|
||||||
|------------------------------|----------------------------------|-----------------|---------------|---------|-----|
|
|
||||||
| [GetObjectLegalHold](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLegalHold.html) | ❌ Missing | ❌| ✅ | ❌| ❌|
|
|
||||||
| [PutObjectLegalHold](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectLegalHold.html) | ❌ Missing | ❌| ✅ | ❌| ❌|
|
|
||||||
| [GetObjectRetention](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectRetention.html) | ❌ Missing | ❌| ✅ | ❌| ❌|
|
|
||||||
| [PutObjectRetention](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectRetention.html) | ❌ Missing | ❌| ✅ | ❌| ❌|
|
|
||||||
| [GetObjectLockConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectLockConfiguration.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [PutObjectLockConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectLockConfiguration.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
|
|
||||||
### (Server-side) encryption
|
|
||||||
|
|
||||||
We think that you can either encrypt your server partition or do client-side encryption, so we did not implement server-side encryption for Garage.
|
|
||||||
Please open an issue if you have a use case.
|
|
||||||
|
|
||||||
| Endpoint | Garage | [Openstack Swift](https://docs.openstack.org/swift/latest/s3_compat.html) | [Ceph Object Gateway](https://docs.ceph.com/en/latest/radosgw/s3/) | [Riak CS](https://docs.riak.com/riak/cs/2.1.1/references/apis/storage/s3/index.html) | [OpenIO](https://docs.openio.io/latest/source/arch-design/s3_compliancy.html) |
|
|
||||||
|------------------------------|----------------------------------|-----------------|---------------|---------|-----|
|
|
||||||
| [DeleteBucketEncryption](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketEncryption.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [GetBucketEncryption](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketEncryption.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [PutBucketEncryption](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketEncryption.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
|
|
||||||
### Misc endpoints
|
|
||||||
|
|
||||||
| Endpoint | Garage | [Openstack Swift](https://docs.openstack.org/swift/latest/s3_compat.html) | [Ceph Object Gateway](https://docs.ceph.com/en/latest/radosgw/s3/) | [Riak CS](https://docs.riak.com/riak/cs/2.1.1/references/apis/storage/s3/index.html) | [OpenIO](https://docs.openio.io/latest/source/arch-design/s3_compliancy.html) |
|
|
||||||
|------------------------------|----------------------------------|-----------------|---------------|---------|-----|
|
|
||||||
| [GetBucketNotificationConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketNotificationConfiguration.html) | ❌ Missing | ❌| ✅ | ❌| ❌|
|
|
||||||
| [PutBucketNotificationConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketNotificationConfiguration.html) | ❌ Missing | ❌| ✅ | ❌| ❌|
|
|
||||||
| [DeleteBucketTagging](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketTagging.html) | ❌ Missing | ❌| ❌| ❌| ✅ |
|
|
||||||
| [GetBucketTagging](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketTagging.html) | ❌ Missing | ❌| ❌| ❌| ✅ |
|
|
||||||
| [PutBucketTagging](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketTagging.html) | ❌ Missing | ❌| ❌| ❌| ✅ |
|
|
||||||
| [DeleteObjectTagging](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html) | ❌ Missing | ❌| ❌| ❌| ✅ |
|
|
||||||
| [GetObjectTagging](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html) | ❌ Missing | ❌| ❌| ❌| ✅ |
|
|
||||||
| [PutObjectTagging](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html) | ❌ Missing | ❌| ❌| ❌| ✅ |
|
|
||||||
| [GetObjectTorrent](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTorrent.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
|
|
||||||
### Vendor specific endpoints
|
|
||||||
|
|
||||||
<details><summary>Display Amazon specifc endpoints</summary>
|
|
||||||
|
|
||||||
|
|
||||||
| Endpoint | Garage | [Openstack Swift](https://docs.openstack.org/swift/latest/s3_compat.html) | [Ceph Object Gateway](https://docs.ceph.com/en/latest/radosgw/s3/) | [Riak CS](https://docs.riak.com/riak/cs/2.1.1/references/apis/storage/s3/index.html) | [OpenIO](https://docs.openio.io/latest/source/arch-design/s3_compliancy.html) |
|
|
||||||
|------------------------------|----------------------------------|-----------------|---------------|---------|-----|
|
|
||||||
| [DeleteBucketAnalyticsConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketAnalyticsConfiguration.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [DeleteBucketIntelligentTieringConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketIntelligentTieringConfiguration.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [DeleteBucketInventoryConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketInventoryConfiguration.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [DeleteBucketMetricsConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketMetricsConfiguration.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [DeleteBucketOwnershipControls](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteBucketOwnershipControls.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [DeletePublicAccessBlock](https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeletePublicAccessBlock.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [GetBucketAccelerateConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAccelerateConfiguration.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [GetBucketAnalyticsConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketAnalyticsConfiguration.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [GetBucketIntelligentTieringConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketIntelligentTieringConfiguration.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [GetBucketInventoryConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketInventoryConfiguration.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [GetBucketLogging](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketLogging.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [GetBucketMetricsConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketMetricsConfiguration.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [GetBucketOwnershipControls](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketOwnershipControls.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [GetBucketRequestPayment](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetBucketRequestPayment.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [GetPublicAccessBlock](https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetPublicAccessBlock.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [ListBucketAnalyticsConfigurations](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketAnalyticsConfigurations.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [ListBucketIntelligentTieringConfigurations](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketIntelligentTieringConfigurations.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [ListBucketInventoryConfigurations](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketInventoryConfigurations.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [ListBucketMetricsConfigurations](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListBucketMetricsConfigurations.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [PutBucketAccelerateConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAccelerateConfiguration.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [PutBucketAnalyticsConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketAnalyticsConfiguration.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [PutBucketIntelligentTieringConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketIntelligentTieringConfiguration.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [PutBucketInventoryConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketInventoryConfiguration.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [PutBucketLogging](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketLogging.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [PutBucketMetricsConfiguration](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketMetricsConfiguration.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [PutBucketOwnershipControls](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketOwnershipControls.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [PutBucketRequestPayment](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketRequestPayment.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [PutPublicAccessBlock](https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutPublicAccessBlock.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [RestoreObject](https://docs.aws.amazon.com/AmazonS3/latest/API/API_RestoreObject.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
| [SelectObjectContent](https://docs.aws.amazon.com/AmazonS3/latest/API/API_SelectObjectContent.html) | ❌ Missing | ❌| ❌| ❌| ❌|
|
|
||||||
|
|
||||||
</details>
|
|
||||||
|
|
49
doc/book/src/SUMMARY.md
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
# Summary
|
||||||
|
|
||||||
|
[The Garage Data Store](./intro.md)
|
||||||
|
|
||||||
|
- [Quick start](./quick_start/index.md)
|
||||||
|
|
||||||
|
- [Cookbook](./cookbook/index.md)
|
||||||
|
- [Multi-node deployment](./cookbook/real_world.md)
|
||||||
|
- [Building from source](./cookbook/from_source.md)
|
||||||
|
- [Integration with systemd](./cookbook/systemd.md)
|
||||||
|
- [Configuring a gateway node](./cookbook/gateways.md)
|
||||||
|
- [Exposing buckets as websites](./cookbook/exposing_websites.md)
|
||||||
|
- [Configuring a reverse proxy](./cookbook/reverse_proxy.md)
|
||||||
|
- [Recovering from failures](./cookbook/recovering.md)
|
||||||
|
|
||||||
|
- [Integrations](./connect/index.md)
|
||||||
|
- [Apps (Nextcloud, Peertube...)](./connect/apps.md)
|
||||||
|
- [Websites (Hugo, Jekyll, Publii...)](./connect/websites.md)
|
||||||
|
- [Repositories (Docker, Nix, Git...)](./connect/repositories.md)
|
||||||
|
- [CLI tools (rclone, awscli, mc...)](./connect/cli.md)
|
||||||
|
- [Backups (restic, duplicity...)](./connect/backup.md)
|
||||||
|
- [Your code (PHP, JS, Go...)](./connect/code.md)
|
||||||
|
- [FUSE (s3fs, goofys, s3backer...)](./connect/fs.md)
|
||||||
|
|
||||||
|
|
||||||
|
- [Reference Manual](./reference_manual/index.md)
|
||||||
|
- [Garage configuration file](./reference_manual/configuration.md)
|
||||||
|
- [Cluster layout management](./reference_manual/layout.md)
|
||||||
|
- [Garage CLI](./reference_manual/cli.md)
|
||||||
|
- [S3 compatibility status](./reference_manual/s3_compatibility.md)
|
||||||
|
|
||||||
|
- [Design](./design/index.md)
|
||||||
|
- [Goals and use Cases](./design/goals.md)
|
||||||
|
- [Benchmarks](./design/benchmarks.md)
|
||||||
|
- [Related work](./design/related_work.md)
|
||||||
|
- [Internals](./design/internals.md)
|
||||||
|
|
||||||
|
- [Development](./development/index.md)
|
||||||
|
- [Setup your environment](./development/devenv.md)
|
||||||
|
- [Development scripts](./development/scripts.md)
|
||||||
|
- [Release process](./development/release_process.md)
|
||||||
|
- [Miscellaneous notes](./development/miscellaneous_notes.md)
|
||||||
|
|
||||||
|
- [Working Documents](./working_documents/index.md)
|
||||||
|
- [S3 compatibility target](./working_documents/compatibility_target.md)
|
||||||
|
- [Load balancing data](./working_documents/load_balancing.md)
|
||||||
|
- [Migrating from 0.5 to 0.6](./working_documents/migration_06.md)
|
||||||
|
- [Migrating from 0.3 to 0.4](./working_documents/migration_04.md)
|
||||||
|
- [Design draft](./working_documents/design_draft.md)
|
|
@ -1,23 +1,6 @@
|
||||||
+++
|
# Apps (Nextcloud, Peertube...)
|
||||||
title = "Apps (Nextcloud, Peertube...)"
|
|
||||||
weight = 5
|
|
||||||
+++
|
|
||||||
|
|
||||||
In this section, we cover the following web applications:
|
In this section, we cover the following software: [Nextcloud](#nextcloud), [Peertube](#peertube), [Mastodon](#mastodon), [Matrix](#matrix)
|
||||||
|
|
||||||
| Name | Status | Note |
|
|
||||||
|------|--------|------|
|
|
||||||
| [Nextcloud](#nextcloud) | ✅ | Both Primary Storage and External Storage are supported |
|
|
||||||
| [Peertube](#peertube) | ✅ | Must be configured with the website endpoint |
|
|
||||||
| [Mastodon](#mastodon) | ❓ | Not yet tested |
|
|
||||||
| [Matrix](#matrix) | ✅ | Tested with `synapse-s3-storage-provider` |
|
|
||||||
| [Pixelfed](#pixelfed) | ❓ | Not yet tested |
|
|
||||||
| [Pleroma](#pleroma) | ❓ | Not yet tested |
|
|
||||||
| [Lemmy](#lemmy) | ❓ | Not yet tested |
|
|
||||||
| [Funkwhale](#funkwhale) | ❓ | Not yet tested |
|
|
||||||
| [Misskey](#misskey) | ❓ | Not yet tested |
|
|
||||||
| [Prismo](#prismo) | ❓ | Not yet tested |
|
|
||||||
| [Owncloud OCIS](#owncloud-infinite-scale-ocis) | ❓| Not yet tested |
|
|
||||||
|
|
||||||
## Nextcloud
|
## Nextcloud
|
||||||
|
|
||||||
|
@ -83,7 +66,7 @@ To test your new configuration, just reload your Nextcloud webpage and start sen
|
||||||
|
|
||||||
**From the GUI.** Activate the "External storage support" app from the "Applications" page (click on your account icon on the top right corner of your screen to display the menu). Go to your parameters page (also located below your account icon). Click on external storage (or the corresponding translation in your language).
|
**From the GUI.** Activate the "External storage support" app from the "Applications" page (click on your account icon on the top right corner of your screen to display the menu). Go to your parameters page (also located below your account icon). Click on external storage (or the corresponding translation in your language).
|
||||||
|
|
||||||
[![Screenshot of the External Storage form](cli-nextcloud-gui.png)](cli-nextcloud-gui.png)
|
[![Screenshot of the External Storage form](./cli-nextcloud-gui.png)](./cli-nextcloud-gui.png)
|
||||||
*Click on the picture to zoom*
|
*Click on the picture to zoom*
|
||||||
|
|
||||||
Add a new external storage. Put what you want in "folder name" (eg. "shared"). Select "Amazon S3". Keep "Access Key" for the Authentication field.
|
Add a new external storage. Put what you want in "folder name" (eg. "shared"). Select "Amazon S3". Keep "Access Key" for the Authentication field.
|
||||||
|
@ -125,8 +108,109 @@ Do not change the `use_path_style` and `legacy_auth` entries, other configuratio
|
||||||
|
|
||||||
Peertube proposes a clever integration of S3 by directly exposing its endpoint instead of proxifying requests through the application.
|
Peertube proposes a clever integration of S3 by directly exposing its endpoint instead of proxifying requests through the application.
|
||||||
In other words, Peertube is only responsible of the "control plane" and offload the "data plane" to Garage.
|
In other words, Peertube is only responsible of the "control plane" and offload the "data plane" to Garage.
|
||||||
In return, this system is a bit harder to configure.
|
In return, this system is a bit harder to configure, especially with Garage that supports less feature than other older S3 backends.
|
||||||
We show how it is still possible to configure Garage with Peertube, allowing you to spread the load and the bandwidth usage on the Garage cluster.
|
We show that it is still possible to configure Garage with Peertube, allowing you to spread the load and the bandwidth usage on the Garage cluster.
|
||||||
|
|
||||||
|
### Enable path-style access by patching Peertube
|
||||||
|
|
||||||
|
First, you will need to apply a small patch on Peertube ([#4510](https://github.com/Chocobozzz/PeerTube/pull/4510)):
|
||||||
|
|
||||||
|
```diff
|
||||||
|
From e3b4c641bdf67e07d406a1d49d6aa6b1fbce2ab4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Martin Honermeyer <maze@strahlungsfrei.de>
|
||||||
|
Date: Sun, 31 Oct 2021 12:34:04 +0100
|
||||||
|
Subject: [PATCH] Allow setting path-style access for object storage
|
||||||
|
|
||||||
|
---
|
||||||
|
config/default.yaml | 4 ++++
|
||||||
|
config/production.yaml.example | 4 ++++
|
||||||
|
server/initializers/config.ts | 1 +
|
||||||
|
server/lib/object-storage/shared/client.ts | 3 ++-
|
||||||
|
.../production/config/custom-environment-variables.yaml | 2 ++
|
||||||
|
5 files changed, 13 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/config/default.yaml b/config/default.yaml
|
||||||
|
index cf9d69a6211..4efd56fb804 100644
|
||||||
|
--- a/config/default.yaml
|
||||||
|
+++ b/config/default.yaml
|
||||||
|
@@ -123,6 +123,10 @@ object_storage:
|
||||||
|
# You can also use AWS_SECRET_ACCESS_KEY env variable
|
||||||
|
secret_access_key: ''
|
||||||
|
|
||||||
|
+ # Reference buckets via path rather than subdomain
|
||||||
|
+ # (i.e. "my-endpoint.com/bucket" instead of "bucket.my-endpoint.com")
|
||||||
|
+ force_path_style: false
|
||||||
|
+
|
||||||
|
# Maximum amount to upload in one request to object storage
|
||||||
|
max_upload_part: 2GB
|
||||||
|
|
||||||
|
diff --git a/config/production.yaml.example b/config/production.yaml.example
|
||||||
|
index 70993bf57a3..9ca2de5f4c9 100644
|
||||||
|
--- a/config/production.yaml.example
|
||||||
|
+++ b/config/production.yaml.example
|
||||||
|
@@ -121,6 +121,10 @@ object_storage:
|
||||||
|
# You can also use AWS_SECRET_ACCESS_KEY env variable
|
||||||
|
secret_access_key: ''
|
||||||
|
|
||||||
|
+ # Reference buckets via path rather than subdomain
|
||||||
|
+ # (i.e. "my-endpoint.com/bucket" instead of "bucket.my-endpoint.com")
|
||||||
|
+ force_path_style: false
|
||||||
|
+
|
||||||
|
# Maximum amount to upload in one request to object storage
|
||||||
|
max_upload_part: 2GB
|
||||||
|
|
||||||
|
diff --git a/server/initializers/config.ts b/server/initializers/config.ts
|
||||||
|
index 8375bf4304c..d726c59a4b6 100644
|
||||||
|
--- a/server/initializers/config.ts
|
||||||
|
+++ b/server/initializers/config.ts
|
||||||
|
@@ -91,6 +91,7 @@ const CONFIG = {
|
||||||
|
ACCESS_KEY_ID: config.get<string>('object_storage.credentials.access_key_id'),
|
||||||
|
SECRET_ACCESS_KEY: config.get<string>('object_storage.credentials.secret_access_key')
|
||||||
|
},
|
||||||
|
+ FORCE_PATH_STYLE: config.get<boolean>('object_storage.force_path_style'),
|
||||||
|
VIDEOS: {
|
||||||
|
BUCKET_NAME: config.get<string>('object_storage.videos.bucket_name'),
|
||||||
|
PREFIX: config.get<string>('object_storage.videos.prefix'),
|
||||||
|
diff --git a/server/lib/object-storage/shared/client.ts b/server/lib/object-storage/shared/client.ts
|
||||||
|
index c9a61459336..eadad02f93f 100644
|
||||||
|
--- a/server/lib/object-storage/shared/client.ts
|
||||||
|
+++ b/server/lib/object-storage/shared/client.ts
|
||||||
|
@@ -26,7 +26,8 @@ function getClient () {
|
||||||
|
accessKeyId: OBJECT_STORAGE.CREDENTIALS.ACCESS_KEY_ID,
|
||||||
|
secretAccessKey: OBJECT_STORAGE.CREDENTIALS.SECRET_ACCESS_KEY
|
||||||
|
}
|
||||||
|
- : undefined
|
||||||
|
+ : undefined,
|
||||||
|
+ forcePathStyle: CONFIG.OBJECT_STORAGE.FORCE_PATH_STYLE
|
||||||
|
})
|
||||||
|
|
||||||
|
logger.info('Initialized S3 client %s with region %s.', getEndpoint(), OBJECT_STORAGE.REGION, lTags())
|
||||||
|
diff --git a/support/docker/production/config/custom-environment-variables.yaml b/support/docker/production/config/custom-environment-variables.yaml
|
||||||
|
index c7cd28e6521..a960bab0bc9 100644
|
||||||
|
--- a/support/docker/production/config/custom-environment-variables.yaml
|
||||||
|
+++ b/support/docker/production/config/custom-environment-variables.yaml
|
||||||
|
@@ -54,6 +54,8 @@ object_storage:
|
||||||
|
|
||||||
|
region: "PEERTUBE_OBJECT_STORAGE_REGION"
|
||||||
|
|
||||||
|
+ force_path_style: "PEERTUBE_OBJECT_STORAGE_FORCE_PATH_STYLE"
|
||||||
|
+
|
||||||
|
max_upload_part:
|
||||||
|
__name: "PEERTUBE_OBJECT_STORAGE_MAX_UPLOAD_PART"
|
||||||
|
__format: "json"
|
||||||
|
```
|
||||||
|
|
||||||
|
You can then recompile it with:
|
||||||
|
|
||||||
|
```
|
||||||
|
npm run build
|
||||||
|
```
|
||||||
|
|
||||||
|
And it can be started with:
|
||||||
|
|
||||||
|
```
|
||||||
|
NODE_ENV=production NODE_CONFIG_DIR=/srv/peertube/config node dist/server.js
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### Create resources in Garage
|
### Create resources in Garage
|
||||||
|
@ -148,32 +232,30 @@ garage bucket create peertube-playlist
|
||||||
Now we allow our key to read and write on these buckets:
|
Now we allow our key to read and write on these buckets:
|
||||||
|
|
||||||
```
|
```
|
||||||
garage bucket allow peertube-playlists --read --write --owner --key peertube-key
|
garage bucket allow peertube-playlist --read --write --key peertube-key
|
||||||
garage bucket allow peertube-videos --read --write --owner --key peertube-key
|
garage bucket allow peertube-video --read --write --key peertube-key
|
||||||
```
|
```
|
||||||
|
|
||||||
We also need to expose these buckets publicly to serve their content to users:
|
Finally, we need to expose these buckets publicly to serve their content to users:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
garage bucket website --allow peertube-playlists
|
garage bucket website --allow peertube-playlist
|
||||||
garage bucket website --allow peertube-videos
|
garage bucket website --allow peertube-video
|
||||||
```
|
|
||||||
|
|
||||||
Finally, we must allow Cross-Origin Resource Sharing (CORS).
|
|
||||||
CORS are required by your browser to allow requests triggered from the peertube website (eg. peertube.tld) to your bucket's domain (eg. peertube-videos.web.garage.tld)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
export CORS='{"CORSRules":[{"AllowedHeaders":["*"],"AllowedMethods":["GET"],"AllowedOrigins":["*"]}]}'
|
|
||||||
aws --endpoint http://s3.garage.localhost s3api put-bucket-cors --bucket peertube-playlists --cors-configuration $CORS
|
|
||||||
aws --endpoint http://s3.garage.localhost s3api put-bucket-cors --bucket peertube-videos --cors-configuration $CORS
|
|
||||||
```
|
```
|
||||||
|
|
||||||
These buckets are now accessible on the web port (by default 3902) with the following URL: `http://<bucket><root_domain>:<web_port>` where the root domain is defined in your configuration file (by default `.web.garage`). So we have currently the following URLs:
|
These buckets are now accessible on the web port (by default 3902) with the following URL: `http://<bucket><root_domain>:<web_port>` where the root domain is defined in your configuration file (by default `.web.garage`). So we have currently the following URLs:
|
||||||
* http://peertube-playlists.web.garage:3902
|
* http://peertube-playlist.web.garage:3902
|
||||||
* http://peertube-videos.web.garage:3902
|
* http://peertube-video.web.garage:3902
|
||||||
|
|
||||||
Make sure you (will) have a corresponding DNS entry for them.
|
Make sure you (will) have a corresponding DNS entry for them.
|
||||||
|
|
||||||
|
### Configure a Reverse Proxy to serve CORS
|
||||||
|
|
||||||
|
Now we will configure a reverse proxy in front of Garage.
|
||||||
|
This is required as we have no other way to serve CORS headers yet.
|
||||||
|
Check the [Configuring a reverse proxy](/cookbook/reverse_proxy.html) section to know how.
|
||||||
|
|
||||||
|
Now make sure that your 2 dns entries are pointing to your reverse proxy.
|
||||||
|
|
||||||
### Configure Peertube
|
### Configure Peertube
|
||||||
|
|
||||||
|
@ -186,6 +268,9 @@ object_storage:
|
||||||
# Put localhost only if you have a garage instance running on that node
|
# Put localhost only if you have a garage instance running on that node
|
||||||
endpoint: 'http://localhost:3900' # or "garage.example.com" if you have TLS on port 443
|
endpoint: 'http://localhost:3900' # or "garage.example.com" if you have TLS on port 443
|
||||||
|
|
||||||
|
# This entry has been added by our patch, must be set to true
|
||||||
|
force_path_style: true
|
||||||
|
|
||||||
# Garage supports only one region for now, named garage
|
# Garage supports only one region for now, named garage
|
||||||
region: 'garage'
|
region: 'garage'
|
||||||
|
|
||||||
|
@ -202,23 +287,28 @@ object_storage:
|
||||||
prefix: ''
|
prefix: ''
|
||||||
|
|
||||||
# You must fill this field to make Peertube use our reverse proxy/website logic
|
# You must fill this field to make Peertube use our reverse proxy/website logic
|
||||||
base_url: 'http://peertube-playlists.web.garage.localhost' # Example: 'https://mirror.example.com'
|
base_url: 'http://peertube-playlist.web.garage' # Example: 'https://mirror.example.com'
|
||||||
|
|
||||||
# Same settings but for webtorrent videos
|
# Same settings but for webtorrent videos
|
||||||
videos:
|
videos:
|
||||||
bucket_name: 'peertube-video'
|
bucket_name: 'peertube-video'
|
||||||
prefix: ''
|
prefix: ''
|
||||||
# You must fill this field to make Peertube use our reverse proxy/website logic
|
# You must fill this field to make Peertube use our reverse proxy/website logic
|
||||||
base_url: 'http://peertube-videos.web.garage.localhost'
|
base_url: 'http://peertube-video.web.garage'
|
||||||
```
|
```
|
||||||
|
|
||||||
### That's all
|
### That's all
|
||||||
|
|
||||||
Everything must be configured now, simply restart Peertube and try to upload a video.
|
Everything must be configured now, simply restart Peertube and try to upload a video.
|
||||||
|
You must see in your browser console that data are fetched directly from our bucket (through the reverse proxy).
|
||||||
|
|
||||||
Peertube will start by serving the video from its own domain while it is encoding.
|
### Miscellaneous
|
||||||
Once the encoding is done, the video is uploaded to Garage.
|
|
||||||
You can now reload the page and see in your browser console that data are fetched directly from your bucket.
|
*Known bug:* The playback does not start and some 400 Bad Request Errors appear in your browser console and on Garage.
|
||||||
|
If the description of the error contains HTTP Invalid Range: InvalidRange, the error is due to a buggy ffmpeg version.
|
||||||
|
You must avoid the 4.4.0 and use either a newer or older version.
|
||||||
|
|
||||||
|
*Associated issues:* [#137](https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/137), [#138](https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/138), [#140](https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/140). These issues are non blocking.
|
||||||
|
|
||||||
*External link:* [Peertube Documentation > Remote Storage](https://docs.joinpeertube.org/admin-remote-storage)
|
*External link:* [Peertube Documentation > Remote Storage](https://docs.joinpeertube.org/admin-remote-storage)
|
||||||
|
|
||||||
|
@ -339,34 +429,31 @@ And add a new line. For example, to run it every 10 minutes:
|
||||||
|
|
||||||
## Pixelfed
|
## Pixelfed
|
||||||
|
|
||||||
[Pixelfed Technical Documentation > Configuration](https://docs.pixelfed.org/technical-documentation/env.html#filesystem)
|
https://docs.pixelfed.org/technical-documentation/env.html#filesystem
|
||||||
|
|
||||||
## Pleroma
|
## Pleroma
|
||||||
|
|
||||||
[Pleroma Documentation > Pleroma.Uploaders.S3](https://docs-develop.pleroma.social/backend/configuration/cheatsheet/#pleromauploaderss3)
|
https://docs-develop.pleroma.social/backend/configuration/cheatsheet/#pleromauploaderss3
|
||||||
|
|
||||||
## Lemmy
|
## Lemmy
|
||||||
|
|
||||||
Lemmy uses pict-rs that [supports S3 backends](https://git.asonix.dog/asonix/pict-rs/commit/f9f4fc63d670f357c93f24147c2ee3e1278e2d97)
|
via pict-rs
|
||||||
|
https://git.asonix.dog/asonix/pict-rs/commit/f9f4fc63d670f357c93f24147c2ee3e1278e2d97
|
||||||
|
|
||||||
## Funkwhale
|
## Funkwhale
|
||||||
|
|
||||||
[Funkwhale Documentation > S3 Storage](https://docs.funkwhale.audio/admin/configuration.html#s3-storage)
|
https://docs.funkwhale.audio/admin/configuration.html#s3-storage
|
||||||
|
|
||||||
## Misskey
|
## Misskey
|
||||||
|
|
||||||
[Misskey Github > commit 9d94424](https://github.com/misskey-dev/misskey/commit/9d944243a3a59e8880a360cbfe30fd5a3ec8d52d)
|
https://github.com/misskey-dev/misskey/commit/9d944243a3a59e8880a360cbfe30fd5a3ec8d52d
|
||||||
|
|
||||||
## Prismo
|
## Prismo
|
||||||
|
|
||||||
[Prismo Gitlab > .env.production.sample](https://gitlab.com/prismosuite/prismo/-/blob/dev/.env.production.sample#L26-33)
|
https://gitlab.com/prismosuite/prismo/-/blob/dev/.env.production.sample#L26-33
|
||||||
|
|
||||||
## Owncloud Infinite Scale (ocis)
|
## Owncloud Infinite Scale (ocis)
|
||||||
|
|
||||||
OCIS could be compatible with S3:
|
|
||||||
- [Deploying OCIS with S3](https://owncloud.dev/ocis/deployment/ocis_s3/)
|
|
||||||
- [OCIS 1.7 release note](https://central.owncloud.org/t/owncloud-infinite-scale-tech-preview-1-7-enables-s3-storage/32514/3)
|
|
||||||
|
|
||||||
## Unsupported
|
## Unsupported
|
||||||
|
|
||||||
- Mobilizon: No S3 integration
|
- Mobilizon: No S3 integration
|
|
@ -1,8 +1,4 @@
|
||||||
+++
|
# Backups (restic, duplicity...)
|
||||||
title = "Backups (restic, duplicity...)"
|
|
||||||
weight = 25
|
|
||||||
+++
|
|
||||||
|
|
||||||
|
|
||||||
Backups are essential for disaster recovery but they are not trivial to manage.
|
Backups are essential for disaster recovery but they are not trivial to manage.
|
||||||
Using Garage as your backup target will enable you to scale your storage as needed while ensuring high availability.
|
Using Garage as your backup target will enable you to scale your storage as needed while ensuring high availability.
|
||||||
|
@ -25,7 +21,7 @@ If you still want to use Borg, you can use it with `rclone mount`.
|
||||||
|
|
||||||
## Duplicati
|
## Duplicati
|
||||||
|
|
||||||
*External links:* [Duplicati Documentation > Storage Providers](https://github.com/kees-z/DuplicatiDocs/blob/master/docs/05-storage-providers.md#user-content-s3-compatible)
|
*External links:* [Duplicati Documentation > Storage Providers](https://github.com/kees-z/DuplicatiDocs/blob/master/docs/05-storage-providers.md#s3-compatible)
|
||||||
|
|
||||||
## knoxite
|
## knoxite
|
||||||
|
|
Before Width: | Height: | Size: 197 KiB After Width: | Height: | Size: 197 KiB |
171
doc/book/src/connect/cli.md
Normal file
|
@ -0,0 +1,171 @@
|
||||||
|
# CLI tools
|
||||||
|
|
||||||
|
CLI tools allow you to query the S3 API without too many abstractions.
|
||||||
|
These tools are particularly suitable for debug, backups, website deployments or any scripted task that need to handle data.
|
||||||
|
|
||||||
|
## Minio client (recommended)
|
||||||
|
|
||||||
|
Use the following command to set an "alias", i.e. define a new S3 server to be
|
||||||
|
used by the Minio client:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mc alias set \
|
||||||
|
garage \
|
||||||
|
<endpoint> \
|
||||||
|
<access key> \
|
||||||
|
<secret key> \
|
||||||
|
--api S3v4
|
||||||
|
```
|
||||||
|
|
||||||
|
Remember that `mc` is sometimes called `mcli` (such as on Arch Linux), to avoid conflicts
|
||||||
|
with Midnight Commander.
|
||||||
|
|
||||||
|
Some commands:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# list buckets
|
||||||
|
mc ls garage/
|
||||||
|
|
||||||
|
# list objets in a bucket
|
||||||
|
mc ls garage/my_files
|
||||||
|
|
||||||
|
# copy from your filesystem to garage
|
||||||
|
mc cp /proc/cpuinfo garage/my_files/cpuinfo.txt
|
||||||
|
|
||||||
|
# copy from garage to your filesystem
|
||||||
|
mc cp garage/my_files/cpuinfo.txt /tmp/cpuinfo.txt
|
||||||
|
|
||||||
|
# mirror a folder from your filesystem to garage
|
||||||
|
mc mirror --overwrite ./book garage/garagehq.deuxfleurs.fr
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## AWS CLI
|
||||||
|
|
||||||
|
Create a file named `~/.aws/credentials` and put:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[default]
|
||||||
|
aws_access_key_id=xxxx
|
||||||
|
aws_secret_access_key=xxxx
|
||||||
|
```
|
||||||
|
|
||||||
|
Then a file named `~/.aws/config` and put:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[default]
|
||||||
|
region=garage
|
||||||
|
```
|
||||||
|
|
||||||
|
Now, supposing Garage is listening on `http://127.0.0.1:3900`, you can list your buckets with:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
aws --endpoint-url http://127.0.0.1:3900 s3 ls
|
||||||
|
```
|
||||||
|
|
||||||
|
Passing the `--endpoint-url` parameter to each command is annoying but AWS developers do not provide a corresponding configuration entry.
|
||||||
|
As a workaround, you can redefine the aws command by editing the file `~/.bashrc`:
|
||||||
|
|
||||||
|
```
|
||||||
|
function aws { command aws --endpoint-url http://127.0.0.1:3900 $@ ; }
|
||||||
|
```
|
||||||
|
|
||||||
|
*Do not forget to run `source ~/.bashrc` or to start a new terminal before running the next commands.*
|
||||||
|
|
||||||
|
Now you can simply run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# list buckets
|
||||||
|
aws s3 ls
|
||||||
|
|
||||||
|
# list objects of a bucket
|
||||||
|
aws s3 ls s3://my_files
|
||||||
|
|
||||||
|
# copy from your filesystem to garage
|
||||||
|
aws s3 cp /proc/cpuinfo s3://my_files/cpuinfo.txt
|
||||||
|
|
||||||
|
# copy from garage to your filesystem
|
||||||
|
aws s3 cp s3/my_files/cpuinfo.txt /tmp/cpuinfo.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
## `rclone`
|
||||||
|
|
||||||
|
`rclone` can be configured using the interactive assistant invoked using `rclone config`.
|
||||||
|
|
||||||
|
You can also configure `rclone` by writing directly its configuration file.
|
||||||
|
Here is a template `rclone.ini` configuration file (mine is located at `~/.config/rclone/rclone.conf`):
|
||||||
|
|
||||||
|
```ini
|
||||||
|
[garage]
|
||||||
|
type = s3
|
||||||
|
provider = Other
|
||||||
|
env_auth = false
|
||||||
|
access_key_id = <access key>
|
||||||
|
secret_access_key = <secret key>
|
||||||
|
region = <region>
|
||||||
|
endpoint = <endpoint>
|
||||||
|
force_path_style = true
|
||||||
|
acl = private
|
||||||
|
bucket_acl = private
|
||||||
|
```
|
||||||
|
|
||||||
|
Now you can run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# list buckets
|
||||||
|
rclone lsd garage:
|
||||||
|
|
||||||
|
# list objects of a bucket aggregated in directories
|
||||||
|
rclone lsd garage:my-bucket
|
||||||
|
|
||||||
|
# copy from your filesystem to garage
|
||||||
|
echo hello world > /tmp/hello.txt
|
||||||
|
rclone copy /tmp/hello.txt garage:my-bucket/
|
||||||
|
|
||||||
|
# copy from garage to your filesystem
|
||||||
|
rclone copy garage:quentin.divers/hello.txt .
|
||||||
|
|
||||||
|
# see all available subcommands
|
||||||
|
rclone help
|
||||||
|
```
|
||||||
|
|
||||||
|
**Advice with rclone:** use the `--fast-list` option when accessing buckets with large amounts of objects.
|
||||||
|
This will tremendously accelerate operations such as `rclone sync` or `rclone ncdu` by reducing the number
|
||||||
|
of ListObjects calls that are made.
|
||||||
|
|
||||||
|
|
||||||
|
## `s3cmd`
|
||||||
|
|
||||||
|
Here is a template for the `s3cmd.cfg` file to talk with Garage:
|
||||||
|
|
||||||
|
```ini
|
||||||
|
[default]
|
||||||
|
access_key = <access key>
|
||||||
|
secret_key = <secret key>
|
||||||
|
host_base = <endpoint without http(s)://>
|
||||||
|
host_bucket = <same as host_base>
|
||||||
|
use_https = <False or True>
|
||||||
|
```
|
||||||
|
|
||||||
|
And use it as follow:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# List buckets
|
||||||
|
s3cmd ls
|
||||||
|
|
||||||
|
# s3cmd objects inside a bucket
|
||||||
|
s3cmd ls s3://my-bucket
|
||||||
|
|
||||||
|
# copy from your filesystem to garage
|
||||||
|
echo hello world > /tmp/hello.txt
|
||||||
|
s3cmd put /tmp/hello.txt s3://my-bucket/
|
||||||
|
|
||||||
|
# copy from garage to your filesystem
|
||||||
|
s3cmd get s3://my-bucket/hello.txt hello.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
## Cyberduck & duck
|
||||||
|
|
||||||
|
TODO
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
+++
|
# Your code (PHP, JS, Go...)
|
||||||
title = "Your code (PHP, JS, Go...)"
|
|
||||||
weight = 30
|
|
||||||
+++
|
|
||||||
|
|
||||||
If you are developping a new application, you may want to use Garage to store your user's media.
|
If you are developping a new application, you may want to use Garage to store your user's media.
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
+++
|
# FUSE (s3fs, goofys, s3backer...)
|
||||||
title = "FUSE (s3fs, goofys, s3backer...)"
|
|
||||||
weight = 25
|
|
||||||
+++
|
|
||||||
|
|
||||||
**WARNING! Garage is not POSIX compatible.
|
**WARNING! Garage is not POSIX compatible.
|
||||||
Mounting S3 buckets as filesystems will not provide POSIX compatibility.
|
Mounting S3 buckets as filesystems will not provide POSIX compatibility.
|
||||||
|
@ -14,7 +11,7 @@ Ideally, avoid these solutions at all for any serious or production use.
|
||||||
|
|
||||||
## rclone mount
|
## rclone mount
|
||||||
|
|
||||||
rclone uses the same configuration when used [in CLI](@/documentation/connect/cli.md) and mount mode.
|
rclone uses the same configuration when used [in CLI](/connect/cli.html) and mount mode.
|
||||||
We suppose you have the following entry in your `rclone.ini` (mine is located in `~/.config/rclone/rclone.conf`):
|
We suppose you have the following entry in your `rclone.ini` (mine is located in `~/.config/rclone/rclone.conf`):
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
|
@ -56,11 +53,11 @@ fusermount -u /tmp/my-bucket
|
||||||
|
|
||||||
## s3fs
|
## s3fs
|
||||||
|
|
||||||
*External link:* [s3fs github > README.md](https://github.com/s3fs-fuse/s3fs-fuse#user-content-examples)
|
*External link:* [s3fs github > README.md](https://github.com/s3fs-fuse/s3fs-fuse#examples)
|
||||||
|
|
||||||
## goofys
|
## goofys
|
||||||
|
|
||||||
*External link:* [goofys github > README.md](https://github.com/kahing/goofys#user-content-usage)
|
*External link:* [goofys github > README.md](https://github.com/kahing/goofys#usage)
|
||||||
|
|
||||||
## s3backer
|
## s3backer
|
||||||
|
|
|
@ -1,21 +1,14 @@
|
||||||
+++
|
# Integrations
|
||||||
title = "Integrations"
|
|
||||||
weight = 3
|
|
||||||
sort_by = "weight"
|
|
||||||
template = "documentation.html"
|
|
||||||
+++
|
|
||||||
|
|
||||||
|
|
||||||
Garage implements the Amazon S3 protocol, which makes it compatible with many existing software programs.
|
Garage implements the Amazon S3 protocol, which makes it compatible with many existing software programs.
|
||||||
|
|
||||||
In particular, you will find here instructions to connect it with:
|
In particular, you will find here instructions to connect it with:
|
||||||
|
|
||||||
- [Browsing tools](@/documentation/connect/cli.md)
|
- [web applications](./apps.md)
|
||||||
- [Applications](@/documentation/connect/apps/index.md)
|
- [website hosting](./websites.md)
|
||||||
- [Website hosting](@/documentation/connect/websites.md)
|
- [software repositories](./repositories.md)
|
||||||
- [Software repositories](@/documentation/connect/repositories.md)
|
- [CLI tools](./cli.md)
|
||||||
- [Your own code](@/documentation/connect/code.md)
|
- [your own code](./code.md)
|
||||||
- [FUSE](@/documentation/connect/fs.md)
|
|
||||||
|
|
||||||
### Generic instructions
|
### Generic instructions
|
||||||
|
|
||||||
|
@ -32,14 +25,14 @@ you will need the following parameters:
|
||||||
like this: `GK3515373e4c851ebaad366558` (access key),
|
like this: `GK3515373e4c851ebaad366558` (access key),
|
||||||
`7d37d093435a41f2aab8f13c19ba067d9776c90215f56614adad6ece597dbb34` (secret key).
|
`7d37d093435a41f2aab8f13c19ba067d9776c90215f56614adad6ece597dbb34` (secret key).
|
||||||
These keys are created and managed using the `garage` CLI, as explained in the
|
These keys are created and managed using the `garage` CLI, as explained in the
|
||||||
[quick start](@/documentation/quick-start/_index.md) guide.
|
[quick start](../quick_start/index.md) guide.
|
||||||
|
|
||||||
Most S3 clients can be configured easily with these parameters,
|
Most S3 clients can be configured easily with these parameters,
|
||||||
provided that you follow the following guidelines:
|
provided that you follow the following guidelines:
|
||||||
|
|
||||||
- **Be careful to DNS-style/path-style access:** Garage supports both DNS-style buckets, which are now by default
|
- **Force path style:** Garage does not support DNS-style buckets, which are now by default
|
||||||
on Amazon S3, and legacy path-style buckets. If you use a reverse proxy in front of Garage,
|
on Amazon S3. Instead, Garage uses the legacy path-style bucket addressing.
|
||||||
make sure that you configured it to support the access-style required by the software you want to use.
|
Remember to configure your client to acknowledge this fact.
|
||||||
|
|
||||||
- **Configuring the S3 region:** Garage requires your client to talk to the correct "S3 region",
|
- **Configuring the S3 region:** Garage requires your client to talk to the correct "S3 region",
|
||||||
which is set in the configuration file. This is often set just to `garage`.
|
which is set in the configuration file. This is often set just to `garage`.
|
|
@ -1,20 +1,8 @@
|
||||||
+++
|
# Repositories (Docker, Nix, Git...)
|
||||||
title = "Repositories (Docker, Nix, Git...)"
|
|
||||||
weight = 15
|
|
||||||
+++
|
|
||||||
|
|
||||||
Whether you need to store and serve binary packages or source code, you may want to deploy a tool referred as a repository or registry.
|
Whether you need to store and serve binary packages or source code, you may want to deploy a tool referred as a repository or registry.
|
||||||
Garage can also help you serve this content.
|
Garage can also help you serve this content.
|
||||||
|
|
||||||
| Name | Status | Note |
|
|
||||||
|------|--------|------|
|
|
||||||
| [Gitea](#gitea) | ✅ | |
|
|
||||||
| [Docker](#docker) | ✅ | Requires garage >= v0.6.0 |
|
|
||||||
| [Nix](#nix) | ✅ | |
|
|
||||||
| [Gitlab](#gitlab) | ❓ | Not yet tested |
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Gitea
|
## Gitea
|
||||||
|
|
||||||
You can use Garage with Gitea to store your [git LFS](https://git-lfs.github.com/) data, your users' avatar, and their attachements.
|
You can use Garage with Gitea to store your [git LFS](https://git-lfs.github.com/) data, your users' avatar, and their attachements.
|
||||||
|
@ -64,42 +52,18 @@ $ aws s3 ls s3://gitea/avatars/
|
||||||
|
|
||||||
*External link:* [Gitea Documentation > Configuration Cheat Sheet](https://docs.gitea.io/en-us/config-cheat-sheet/)
|
*External link:* [Gitea Documentation > Configuration Cheat Sheet](https://docs.gitea.io/en-us/config-cheat-sheet/)
|
||||||
|
|
||||||
|
## Gitlab
|
||||||
|
|
||||||
|
*External link:* [Gitlab Documentation > Object storage](https://docs.gitlab.com/ee/administration/object_storage.html)
|
||||||
|
|
||||||
|
|
||||||
|
## Private NPM Registry (Verdacio)
|
||||||
|
|
||||||
|
*External link:* [Verdaccio Github Repository > aws-storage plugin](https://github.com/verdaccio/verdaccio/tree/master/packages/plugins/aws-storage)
|
||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
|
|
||||||
Create a bucket and a key for your docker registry, then create `config.yml` with the following content:
|
Not yet compatible, follow [#103](https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/103).
|
||||||
|
|
||||||
```yml
|
|
||||||
version: 0.1
|
|
||||||
http:
|
|
||||||
addr: 0.0.0.0:5000
|
|
||||||
secret: asecretforlocaldevelopment
|
|
||||||
debug:
|
|
||||||
addr: localhost:5001
|
|
||||||
storage:
|
|
||||||
s3:
|
|
||||||
accesskey: GKxxxx
|
|
||||||
secretkey: yyyyy
|
|
||||||
region: garage
|
|
||||||
regionendpoint: http://localhost:3900
|
|
||||||
bucket: docker
|
|
||||||
secure: false
|
|
||||||
v4auth: true
|
|
||||||
rootdirectory: /
|
|
||||||
```
|
|
||||||
|
|
||||||
Replace the `accesskey`, `secretkey`, `bucket`, `regionendpoint` and `secure` values by the one fitting your deployment.
|
|
||||||
|
|
||||||
Then simply run the docker registry:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker run \
|
|
||||||
--net=host \
|
|
||||||
-v `pwd`/config.yml:/etc/docker/registry/config.yml \
|
|
||||||
registry:2
|
|
||||||
```
|
|
||||||
|
|
||||||
*We started a plain text registry but docker clients require encrypted registries. You must either [setup TLS](https://docs.docker.com/registry/deploying/#run-an-externally-accessible-registry) on your registry or add `--insecure-registry=localhost:5000` to your docker daemon parameters.*
|
|
||||||
|
|
||||||
|
|
||||||
*External link:* [Docker Documentation > Registry storage drivers > S3 storage driver](https://docs.docker.com/registry/storage-drivers/s3/)
|
*External link:* [Docker Documentation > Registry storage drivers > S3 storage driver](https://docs.docker.com/registry/storage-drivers/s3/)
|
||||||
|
|
||||||
|
@ -125,8 +89,8 @@ garage bucket website nix.example.com --allow
|
||||||
```
|
```
|
||||||
|
|
||||||
If you need more information about exposing buckets as websites on Garage,
|
If you need more information about exposing buckets as websites on Garage,
|
||||||
check [Exposing buckets as websites](@/documentation/cookbook/exposing-websites.md)
|
check [Exposing buckets as websites](/cookbook/exposing_websites.html)
|
||||||
and [Configuring a reverse proxy](@/documentation/cookbook/reverse-proxy.md).
|
and [Configuring a reverse proxy](/cookbook/reverse_proxy.html).
|
||||||
|
|
||||||
Next, we want to check that our bucket works:
|
Next, we want to check that our bucket works:
|
||||||
|
|
||||||
|
@ -203,9 +167,3 @@ on the binary cache, the client will download the result from the cache instead
|
||||||
|
|
||||||
Channels additionnaly serve Nix definitions, ie. a `.nix` file referencing
|
Channels additionnaly serve Nix definitions, ie. a `.nix` file referencing
|
||||||
all the derivations you want to serve.
|
all the derivations you want to serve.
|
||||||
|
|
||||||
## Gitlab
|
|
||||||
|
|
||||||
*External link:* [Gitlab Documentation > Object storage](https://docs.gitlab.com/ee/administration/object_storage.html)
|
|
||||||
|
|
||||||
|
|
78
doc/book/src/connect/websites.md
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
# Websites (Hugo, Jekyll, Publii...)
|
||||||
|
|
||||||
|
Garage is also suitable to host static websites.
|
||||||
|
While they can be deployed with traditional CLI tools, some static website generators have integrated options to ease your workflow.
|
||||||
|
|
||||||
|
## Hugo
|
||||||
|
|
||||||
|
Add to your `config.toml` the following section:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[[deployment.targets]]
|
||||||
|
URL = "s3://<bucket>?endpoint=<endpoint>&disableSSL=<bool>&s3ForcePathStyle=true®ion=garage"
|
||||||
|
```
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[[deployment.targets]]
|
||||||
|
URL = "s3://my-blog?endpoint=localhost:9000&disableSSL=true&s3ForcePathStyle=true®ion=garage"
|
||||||
|
```
|
||||||
|
|
||||||
|
Then inform hugo of your credentials:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export AWS_ACCESS_KEY_ID=GKxxx
|
||||||
|
export AWS_SECRET_ACCESS_KEY=xxx
|
||||||
|
```
|
||||||
|
|
||||||
|
And finally build and deploy your website:
|
||||||
|
|
||||||
|
```bsh
|
||||||
|
hugo
|
||||||
|
hugo deploy
|
||||||
|
```
|
||||||
|
|
||||||
|
*External links:*
|
||||||
|
- [gocloud.dev > aws > Supported URL parameters](https://pkg.go.dev/gocloud.dev/aws?utm_source=godoc#ConfigFromURLParams)
|
||||||
|
- [Hugo Documentation > hugo deploy](https://gohugo.io/hosting-and-deployment/hugo-deploy/)
|
||||||
|
|
||||||
|
## Publii
|
||||||
|
|
||||||
|
It would require a patch either on Garage or on Publii to make both systems work.
|
||||||
|
|
||||||
|
Currently, the proposed workaround is to deploy your website manually:
|
||||||
|
- On the left menu, click on Server, choose Manual Deployment (the logo looks like a compressed file)
|
||||||
|
- Set your website URL, keep Output type as "Non-compressed catalog"
|
||||||
|
- Click on Save changes
|
||||||
|
- Click on Sync your website (bottom left of the app)
|
||||||
|
- On the new page, click again on Sync your website
|
||||||
|
- Click on Get website files
|
||||||
|
- You need to synchronize the output folder you see in your file explorer, we will use minio client.
|
||||||
|
|
||||||
|
Be sure that you [configured minio client](cli.html#minio-client-recommended).
|
||||||
|
|
||||||
|
Then copy this output folder
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mc mirror --overwrite output garage/my-site
|
||||||
|
```
|
||||||
|
|
||||||
|
## Generic (eg. Jekyll)
|
||||||
|
|
||||||
|
Some tools do not support sending to a S3 backend but output a compiled folder on your system.
|
||||||
|
We can then use any CLI tool to upload this content to our S3 target.
|
||||||
|
|
||||||
|
First, start by [configuring minio client](cli.html#minio-client-recommended).
|
||||||
|
|
||||||
|
Then build your website:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
jekyll build
|
||||||
|
```
|
||||||
|
|
||||||
|
And copy jekyll's output folder on S3:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mc mirror --overwrite _site garage/my-site
|
||||||
|
```
|
48
doc/book/src/cookbook/exposing_websites.md
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
# Exposing buckets as websites
|
||||||
|
|
||||||
|
You can expose your bucket as a website with this simple command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
garage bucket website --allow my-website
|
||||||
|
```
|
||||||
|
|
||||||
|
Now it will be **publicly** exposed on the web endpoint (by default listening on port 3902).
|
||||||
|
|
||||||
|
Our website serving logic is as follow:
|
||||||
|
- Supports only static websites (no support for PHP or other languages)
|
||||||
|
- Does not support directory listing
|
||||||
|
- The index is defined in your `garage.toml`. ([ref](/reference_manual/configuration.html#index))
|
||||||
|
|
||||||
|
Now we need to infer the URL of your website through your bucket name.
|
||||||
|
Let assume:
|
||||||
|
- we set `root_domain = ".web.example.com"` in `garage.toml` ([ref](/reference_manual/configuration.html#root_domain))
|
||||||
|
- our bucket name is `garagehq.deuxfleurs.fr`.
|
||||||
|
|
||||||
|
Our bucket will be served if the Host field matches one of these 2 values (the port is ignored):
|
||||||
|
|
||||||
|
- `garagehq.deuxfleurs.fr.web.example.com`: you can dedicate a subdomain to your users (here `web.example.com`).
|
||||||
|
|
||||||
|
- `garagehq.deuxfleurs.fr`: your users can bring their own domain name, they just need to point them to your Garage cluster.
|
||||||
|
|
||||||
|
You can try this logic locally, without configuring any DNS, thanks to `curl`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# prepare your test
|
||||||
|
echo hello world > /tmp/index.html
|
||||||
|
mc cp /tmp/index.html garage/garagehq.deuxfleurs.fr
|
||||||
|
|
||||||
|
curl -H 'Host: garagehq.deuxfleurs.fr' http://localhost:3902
|
||||||
|
# should print "hello world"
|
||||||
|
|
||||||
|
curl -H 'Host: garagehq.deuxfleurs.fr.web.example.com' http://localhost:3902
|
||||||
|
# should also print "hello world"
|
||||||
|
```
|
||||||
|
|
||||||
|
Now that you understand how website logic works on Garage, you can:
|
||||||
|
|
||||||
|
- make the website endpoint listens on port 80 (instead of 3902)
|
||||||
|
- use iptables to redirect the port 80 to the port 3902:
|
||||||
|
`iptables -t nat -A PREROUTING -p tcp -dport 80 -j REDIRECT -to-port 3902`
|
||||||
|
- or configure a [reverse proxy](reverse_proxy.html) in front of Garage to add TLS (HTTPS), CORS support, etc.
|
||||||
|
|
||||||
|
You can also take a look at [Website Integration](/connect/websites.html) to see how you can add Garage to your workflow.
|
|
@ -1,10 +1,9 @@
|
||||||
+++
|
# Compiling Garage from source
|
||||||
title = "Compiling Garage from source"
|
|
||||||
weight = 10
|
|
||||||
+++
|
|
||||||
|
|
||||||
|
|
||||||
Garage is a standard Rust project. First, you need `rust` and `cargo`. For instance on Debian:
|
Garage is a standard Rust project.
|
||||||
|
First, you need `rust` and `cargo`.
|
||||||
|
For instance on Debian:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
|
@ -13,13 +12,6 @@ sudo apt-get install -y rustc cargo
|
||||||
|
|
||||||
You can also use [Rustup](https://rustup.rs/) to setup a Rust toolchain easily.
|
You can also use [Rustup](https://rustup.rs/) to setup a Rust toolchain easily.
|
||||||
|
|
||||||
In addition, you will need a full C toolchain. On Debian-based distributions, it can be installed as follows:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install build-essential
|
|
||||||
```
|
|
||||||
|
|
||||||
## Using source from `crates.io`
|
## Using source from `crates.io`
|
||||||
|
|
||||||
Garage's source code is published on `crates.io`, Rust's official package repository.
|
Garage's source code is published on `crates.io`, Rust's official package repository.
|
|
@ -1,7 +1,4 @@
|
||||||
+++
|
# Gateways
|
||||||
title = "Configuring a gateway node"
|
|
||||||
weight = 20
|
|
||||||
+++
|
|
||||||
|
|
||||||
Gateways allow you to expose Garage endpoints (S3 API and websites) without storing data on the node.
|
Gateways allow you to expose Garage endpoints (S3 API and websites) without storing data on the node.
|
||||||
|
|
||||||
|
@ -15,6 +12,9 @@ You can configure Garage as a gateway on all nodes that will consume your S3 API
|
||||||
|
|
||||||
- **It simplifies security.** Instead of having to maintain and renew a TLS certificate, you leverage the Secret Handshake protocol we use for our cluster. The S3 API protocol will be in plain text but limited to your local machine.
|
- **It simplifies security.** Instead of having to maintain and renew a TLS certificate, you leverage the Secret Handshake protocol we use for our cluster. The S3 API protocol will be in plain text but limited to your local machine.
|
||||||
|
|
||||||
|
## Limitations
|
||||||
|
|
||||||
|
Currently it will not work with minio client. Follow issue [#64](https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/64) for more information.
|
||||||
|
|
||||||
## Spawn a Gateway
|
## Spawn a Gateway
|
||||||
|
|
26
doc/book/src/cookbook/index.md
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# Cookbook
|
||||||
|
|
||||||
|
A cookbook, when you cook, is a collection of recipes.
|
||||||
|
Similarly, Garage's cookbook contains a collection of recipes that are known to works well!
|
||||||
|
This chapter could also be referred as "Tutorials" or "Best practices".
|
||||||
|
|
||||||
|
- **[Multi-node deployment](real_world.md):** This page will walk you through all of the necessary
|
||||||
|
steps to deploy Garage in a real-world setting.
|
||||||
|
|
||||||
|
- **[Building from source](from_source.md):** This page explains how to build Garage from
|
||||||
|
source in case a binary is not provided for your architecture, or if you want to
|
||||||
|
hack with us!
|
||||||
|
|
||||||
|
- **[Integration with Systemd](systemd.md):** This page explains how to run Garage
|
||||||
|
as a Systemd service (instead of as a Docker container).
|
||||||
|
|
||||||
|
- **[Configuring a gateway node](gateways.md):** This page explains how to run a gateway node in a Garage cluster, i.e. a Garage node that doesn't store data but accelerates access to data present on the other nodes.
|
||||||
|
|
||||||
|
- **[Hosting a website](exposing_websites.md):** This page explains how to use Garage
|
||||||
|
to host a static website.
|
||||||
|
|
||||||
|
- **[Configuring a reverse-proxy](reverse_proxy.md):** This page explains how to configure a reverse-proxy to add TLS support to your S3 api endpoint.
|
||||||
|
|
||||||
|
- **[Recovering from failures](recovering.md):** Garage's first selling point is resilience
|
||||||
|
to hardware failures. This section explains how to recover from such a failure in the
|
||||||
|
best possible way.
|
|
@ -1,13 +1,10 @@
|
||||||
+++
|
# Deploying Garage on a real-world cluster
|
||||||
title = "Deployment on a cluster"
|
|
||||||
weight = 5
|
|
||||||
+++
|
|
||||||
|
|
||||||
To run Garage in cluster mode, we recommend having at least 3 nodes.
|
To run Garage in cluster mode, we recommend having at least 3 nodes.
|
||||||
This will allow you to setup Garage for three-way replication of your data,
|
This will allow you to setup Garage for three-way replication of your data,
|
||||||
the safest and most available mode proposed by Garage.
|
the safest and most available mode proposed by Garage.
|
||||||
|
|
||||||
We recommend first following the [quick start guide](@/documentation/quick-start/_index.md) in order
|
We recommend first following the [quick start guide](../quick_start/index.md) in order
|
||||||
to get familiar with Garage's command line and usage patterns.
|
to get familiar with Garage's command line and usage patterns.
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +23,7 @@ To run a real-world deployment, make sure the following conditions are met:
|
||||||
to drastically reduce Garage's response times.
|
to drastically reduce Garage's response times.
|
||||||
|
|
||||||
- This guide will assume you are using Docker containers to deploy Garage on each node.
|
- This guide will assume you are using Docker containers to deploy Garage on each node.
|
||||||
Garage can also be run independently, for instance as a [Systemd service](@/documentation/cookbook/systemd.md).
|
Garage can also be run independently, for instance as a [Systemd service](systemd.md).
|
||||||
You can also use an orchestrator such as Nomad or Kubernetes to automatically manage
|
You can also use an orchestrator such as Nomad or Kubernetes to automatically manage
|
||||||
Docker containers on a fleet of nodes.
|
Docker containers on a fleet of nodes.
|
||||||
|
|
||||||
|
@ -281,15 +278,15 @@ garage layout apply
|
||||||
```
|
```
|
||||||
|
|
||||||
**WARNING:** if you want to use the layout modification commands in a script,
|
**WARNING:** if you want to use the layout modification commands in a script,
|
||||||
make sure to read [this page](@/documentation/reference-manual/layout.md) first.
|
make sure to read [this page](/reference_manual/layout.html) first.
|
||||||
|
|
||||||
|
|
||||||
## Using your Garage cluster
|
## Using your Garage cluster
|
||||||
|
|
||||||
Creating buckets and managing keys is done using the `garage` CLI,
|
Creating buckets and managing keys is done using the `garage` CLI,
|
||||||
and is covered in the [quick start guide](@/documentation/quick-start/_index.md).
|
and is covered in the [quick start guide](../quick_start/index.md).
|
||||||
Remember also that the CLI is self-documented thanks to the `--help` flag and
|
Remember also that the CLI is self-documented thanks to the `--help` flag and
|
||||||
the `help` subcommand (e.g. `garage help`, `garage key --help`).
|
the `help` subcommand (e.g. `garage help`, `garage key --help`).
|
||||||
|
|
||||||
Configuring S3-compatible applicatiosn to interact with Garage
|
Configuring S3-compatible applicatiosn to interact with Garage
|
||||||
is covered in the [Integrations](@/documentation/connect/_index.md) section.
|
is covered in the [Integrations](/connect/index.html) section.
|
|
@ -1,7 +1,4 @@
|
||||||
+++
|
# Recovering from failures
|
||||||
title = "Recovering from failures"
|
|
||||||
weight = 35
|
|
||||||
+++
|
|
||||||
|
|
||||||
Garage is meant to work on old, second-hand hardware.
|
Garage is meant to work on old, second-hand hardware.
|
||||||
In particular, this makes it likely that some of your drives will fail, and some manual intervention will be needed.
|
In particular, this makes it likely that some of your drives will fail, and some manual intervention will be needed.
|
||||||
|
@ -94,7 +91,7 @@ might be faster but most of the pieces will be deleted anyway from the disk and
|
||||||
|
|
||||||
First, set up a new drive to store the metadata directory for the replacement node (a SSD is recommended),
|
First, set up a new drive to store the metadata directory for the replacement node (a SSD is recommended),
|
||||||
and for the data directory if necessary. You can then start Garage on the new node.
|
and for the data directory if necessary. You can then start Garage on the new node.
|
||||||
The restarted node should generate a new node ID, and it should be shown with `NO ROLE ASSIGNED` in `garage status`.
|
The restarted node should generate a new node ID, and it should be shown as `NOT CONFIGURED` in `garage status`.
|
||||||
The ID of the lost node should be shown in `garage status` in the section for disconnected/unavailable nodes.
|
The ID of the lost node should be shown in `garage status` in the section for disconnected/unavailable nodes.
|
||||||
|
|
||||||
Then, replace the broken node by the new one, using:
|
Then, replace the broken node by the new one, using:
|
|
@ -1,9 +1,6 @@
|
||||||
+++
|
# Configuring a reverse proxy
|
||||||
title = "Configuring a reverse proxy"
|
|
||||||
weight = 30
|
|
||||||
+++
|
|
||||||
|
|
||||||
The main reason to add a reverse proxy in front of Garage is to provide TLS to your users and serve multiple web services on port 443.
|
The main reason to add a reverse proxy in front of Garage is to provide TLS to your users.
|
||||||
|
|
||||||
In production you will likely need your certificates signed by a certificate authority.
|
In production you will likely need your certificates signed by a certificate authority.
|
||||||
The most automated way is to use a provider supporting the [ACME protocol](https://datatracker.ietf.org/doc/html/rfc8555)
|
The most automated way is to use a provider supporting the [ACME protocol](https://datatracker.ietf.org/doc/html/rfc8555)
|
||||||
|
@ -58,15 +55,16 @@ If you directly put the instructions in the root `nginx.conf`, keep in mind that
|
||||||
|
|
||||||
And do not forget to reload nginx with `systemctl reload nginx` or `nginx -s reload`.
|
And do not forget to reload nginx with `systemctl reload nginx` or `nginx -s reload`.
|
||||||
|
|
||||||
### Exposing the S3 endpoints
|
### Defining backends
|
||||||
|
|
||||||
First, we need to tell to nginx how to access our Garage cluster.
|
First, we need to tell to nginx how to access our Garage cluster.
|
||||||
Because we have multiple nodes, we want to leverage all of them by spreading the load.
|
Because we have multiple nodes, we want to leverage all of them by spreading the load.
|
||||||
In nginx, we can do that with the `upstream` directive.
|
|
||||||
|
|
||||||
Then in a `server` directive, we define the vhosts, the TLS certificates and the proxy rule.
|
In nginx, we can do that with the upstream directive.
|
||||||
|
Because we have 2 endpoints: one for the S3 API and one to serve websites,
|
||||||
|
we create 2 backends named respectively `s3_backend` and `web_backend`.
|
||||||
|
|
||||||
A possible configuration:
|
A documented example for the `s3_backend` assuming you chose port 3900:
|
||||||
|
|
||||||
```nginx
|
```nginx
|
||||||
upstream s3_backend {
|
upstream s3_backend {
|
||||||
|
@ -80,34 +78,9 @@ upstream s3_backend {
|
||||||
# that are more powerful than others
|
# that are more powerful than others
|
||||||
server garage2.example.com:3900 weight=2;
|
server garage2.example.com:3900 weight=2;
|
||||||
}
|
}
|
||||||
|
|
||||||
server {
|
|
||||||
listen [::]:443 http2 ssl;
|
|
||||||
|
|
||||||
ssl_certificate /tmp/garage.crt;
|
|
||||||
ssl_certificate_key /tmp/garage.key;
|
|
||||||
|
|
||||||
# You need multiple server names here:
|
|
||||||
# - s3.garage.tld is used for path-based s3 requests
|
|
||||||
# - *.s3.garage.tld is used for vhost-based s3 requests
|
|
||||||
server_name s3.garage.tld *.s3.garage.tld;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
proxy_pass http://s3_backend;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Exposing the web endpoint
|
A similar example for the `web_backend` assuming you chose port 3902:
|
||||||
|
|
||||||
To better understand the logic involved, you can refer to the [Exposing buckets as websites](/cookbook/exposing_websites.html) section.
|
|
||||||
Otherwise, the configuration is very similar to the S3 endpoint.
|
|
||||||
You must only adapt `upstream` with the web port instead of the s3 port and change the `server_name` and `proxy_pass` entry
|
|
||||||
|
|
||||||
A possible configuration:
|
|
||||||
|
|
||||||
|
|
||||||
```nginx
|
```nginx
|
||||||
upstream web_backend {
|
upstream web_backend {
|
||||||
|
@ -116,19 +89,65 @@ upstream web_backend {
|
||||||
server garage1.example.com:3902;
|
server garage1.example.com:3902;
|
||||||
server garage2.example.com:3902 weight=2;
|
server garage2.example.com:3902 weight=2;
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Exposing the S3 API
|
||||||
|
|
||||||
|
The configuration section for the S3 API is simple as we only support path-access style yet.
|
||||||
|
We simply configure the TLS parameters and forward all the requests to the backend:
|
||||||
|
|
||||||
|
```nginx
|
||||||
server {
|
server {
|
||||||
listen [::]:443 http2 ssl;
|
listen [::]:443 http2 ssl;
|
||||||
|
|
||||||
ssl_certificate /tmp/garage.crt;
|
ssl_certificate /tmp/garage.crt;
|
||||||
ssl_certificate_key /tmp/garage.key;
|
ssl_certificate_key /tmp/garage.key;
|
||||||
|
|
||||||
# You need multiple server names here:
|
# should be the endpoint you want
|
||||||
# - *.web.garage.tld is used for your users wanting a website without reserving a domain name
|
# aws uses s3.amazonaws.com for example
|
||||||
# - example.com, my-site.tld, etc. are reserved domain name by your users that chose to host their website as a garage's bucket
|
server_name garage.example.com;
|
||||||
server_name *.web.garage.tld example.com my-site.tld;
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
proxy_pass http://s3_backend;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### Exposing the web endpoint
|
||||||
|
|
||||||
|
The web endpoint is a bit more complicated to configure as it listens on many different `Host` fields.
|
||||||
|
To better understand the logic involved, you can refer to the [Exposing buckets as websites](/cookbook/exposing_websites.html) section.
|
||||||
|
Also, for some applications, you may need to serve CORS headers: Garage can not serve them directly but we show how we can use nginx to serve them.
|
||||||
|
You can use the following example as your starting point:
|
||||||
|
|
||||||
|
```nginx
|
||||||
|
server {
|
||||||
|
listen [::]:443 http2 ssl;
|
||||||
|
ssl_certificate /tmp/garage.crt;
|
||||||
|
ssl_certificate_key /tmp/garage.key;
|
||||||
|
|
||||||
|
# We list all the Hosts fields that can access our buckets
|
||||||
|
server_name *.web.garage
|
||||||
|
example.com
|
||||||
|
my-site.tld
|
||||||
|
;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
# Add these headers only if you want to allow CORS requests
|
||||||
|
# For production use, more specific rules would be better for your security
|
||||||
|
add_header Access-Control-Allow-Origin *;
|
||||||
|
add_header Access-Control-Max-Age 3600;
|
||||||
|
add_header Access-Control-Expose-Headers Content-Length;
|
||||||
|
add_header Access-Control-Allow-Headers Range;
|
||||||
|
|
||||||
|
# We do not forward OPTIONS requests to Garage
|
||||||
|
# as it does not support them but they are needed for CORS.
|
||||||
|
if ($request_method = OPTIONS) {
|
||||||
|
return 200;
|
||||||
|
}
|
||||||
|
|
||||||
proxy_pass http://web_backend;
|
proxy_pass http://web_backend;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
|
@ -136,6 +155,7 @@ server {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Apache httpd
|
## Apache httpd
|
||||||
|
|
||||||
@TODO
|
@TODO
|
|
@ -1,7 +1,4 @@
|
||||||
+++
|
# Starting Garage with systemd
|
||||||
title = "Starting Garage with systemd"
|
|
||||||
weight = 15
|
|
||||||
+++
|
|
||||||
|
|
||||||
We make some assumptions for this systemd deployment.
|
We make some assumptions for this systemd deployment.
|
||||||
|
|
3
doc/book/src/cookbook/website.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Hosting a website
|
||||||
|
|
||||||
|
TODO
|
|
@ -1,7 +1,4 @@
|
||||||
+++
|
# Benchmarks
|
||||||
title = "Benchmarks"
|
|
||||||
weight = 10
|
|
||||||
+++
|
|
||||||
|
|
||||||
With Garage, we wanted to build a software defined storage service that follow the [KISS principle](https://en.wikipedia.org/wiki/KISS_principle),
|
With Garage, we wanted to build a software defined storage service that follow the [KISS principle](https://en.wikipedia.org/wiki/KISS_principle),
|
||||||
that is suitable for geo-distributed deployments and more generally that would work well for community hosting (like a Mastodon instance).
|
that is suitable for geo-distributed deployments and more generally that would work well for community hosting (like a Mastodon instance).
|
||||||
|
@ -28,7 +25,7 @@ We selected 5 standard endpoints that are often in the critical path: ListBucket
|
||||||
|
|
||||||
In this first benchmark, we consider 5 instances that are located in a different place each. To simulate the distance, we configure mknet with a RTT between each node of 100 ms +/- 20 ms of jitter. We get the following graph, where the colored bars represent the mean latency while the error bars the minimum and maximum one:
|
In this first benchmark, we consider 5 instances that are located in a different place each. To simulate the distance, we configure mknet with a RTT between each node of 100 ms +/- 20 ms of jitter. We get the following graph, where the colored bars represent the mean latency while the error bars the minimum and maximum one:
|
||||||
|
|
||||||
![Comparison of endpoints latency for minio and garage](./endpoint-latency.png)
|
![Comparison of endpoints latency for minio and garage](./img/endpoint-latency.png)
|
||||||
|
|
||||||
Compared to garage, minio latency drastically increases on 3 endpoints: GetObject, PutObject, RemoveObject.
|
Compared to garage, minio latency drastically increases on 3 endpoints: GetObject, PutObject, RemoveObject.
|
||||||
|
|
||||||
|
@ -46,7 +43,7 @@ We consider that intra-DC communications are now very cheap with a latency of 0.
|
||||||
The inter-DC remains costly with the same value as before (100ms +/- 20ms of jitter).
|
The inter-DC remains costly with the same value as before (100ms +/- 20ms of jitter).
|
||||||
We plot a similar graph as before:
|
We plot a similar graph as before:
|
||||||
|
|
||||||
![Comparison of endpoints latency for minio and garage with 6 nodes in 3 DC](./endpoint-latency-dc.png)
|
![Comparison of endpoints latency for minio and garage with 6 nodes in 3 DC](./img/endpoint-latency-dc.png)
|
||||||
|
|
||||||
This new graph is very similar to the one before, neither minio or garage seems to benefit from this new topology, but they also do not suffer from it.
|
This new graph is very similar to the one before, neither minio or garage seems to benefit from this new topology, but they also do not suffer from it.
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
+++
|
# Goals and use cases
|
||||||
title = "Goals and use cases"
|
|
||||||
weight = 5
|
|
||||||
+++
|
|
||||||
|
|
||||||
## Goals and non-goals
|
## Goals and non-goals
|
||||||
|
|
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 129 KiB |
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 124 KiB |
|
@ -1,20 +1,15 @@
|
||||||
+++
|
# Design
|
||||||
title = "Design"
|
|
||||||
weight = 5
|
|
||||||
sort_by = "weight"
|
|
||||||
template = "documentation.html"
|
|
||||||
+++
|
|
||||||
|
|
||||||
The design section helps you to see Garage from a "big picture"
|
The design section helps you to see Garage from a "big picture"
|
||||||
perspective. It will allow you to understand if Garage is a good fit for
|
perspective. It will allow you to understand if Garage is a good fit for
|
||||||
you, how to better use it, how to contribute to it, what can Garage could
|
you, how to better use it, how to contribute to it, what can Garage could
|
||||||
and could not do, etc.
|
and could not do, etc.
|
||||||
|
|
||||||
- **[Goals and use cases](@/documentation/design/goals.md):** This page explains why Garage was concieved and what practical use cases it targets.
|
- **[Goals and use cases](goals.md):** This page explains why Garage was concieved and what practical use cases it targets.
|
||||||
|
|
||||||
- **[Related work](@/documentation/design/related-work.md):** This pages presents the theoretical background on which Garage is built, and describes other software storage solutions and why they didn't work for us.
|
- **[Related work](related_work.md):** This pages presents the theoretical background on which Garage is built, and describes other software storage solutions and why they didn't work for us.
|
||||||
|
|
||||||
- **[Internals](@/documentation/design/internals.md):** This page enters into more details on how Garage manages data internally.
|
- **[Internals](internals.md):** This page enters into more details on how Garage manages data internally.
|
||||||
|
|
||||||
## Talks
|
## Talks
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
+++
|
# Internals
|
||||||
title = "Internals"
|
|
||||||
weight = 20
|
|
||||||
+++
|
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
|
@ -17,7 +14,7 @@ In the meantime, you can find some information at the following links:
|
||||||
|
|
||||||
- [this presentation (in French)](https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/main/doc/talks/2020-12-02_wide-team/talk.pdf)
|
- [this presentation (in French)](https://git.deuxfleurs.fr/Deuxfleurs/garage/src/branch/main/doc/talks/2020-12-02_wide-team/talk.pdf)
|
||||||
|
|
||||||
- [an old design draft](@/documentation/working-documents/design-draft.md)
|
- [an old design draft](/working_documents/design_draft.md)
|
||||||
|
|
||||||
|
|
||||||
## Garbage collection
|
## Garbage collection
|
|
@ -1,7 +1,4 @@
|
||||||
+++
|
# Related work
|
||||||
title = "Related work"
|
|
||||||
weight = 15
|
|
||||||
+++
|
|
||||||
|
|
||||||
## Context
|
## Context
|
||||||
|
|
||||||
|
@ -24,7 +21,7 @@ Openstack Cinder proxy previous solution to provide an uniform API.
|
||||||
File storage provides a higher abstraction, they are one filesystem among others, which means they don't necessarily have all the exotic features of every filesystem.
|
File storage provides a higher abstraction, they are one filesystem among others, which means they don't necessarily have all the exotic features of every filesystem.
|
||||||
Often, they relax some POSIX constraints while many applications will still be compatible without any modification.
|
Often, they relax some POSIX constraints while many applications will still be compatible without any modification.
|
||||||
As an example, we are able to run MariaDB (very slowly) over GlusterFS...
|
As an example, we are able to run MariaDB (very slowly) over GlusterFS...
|
||||||
We can also mention CephFS (read [RADOS](https://doi.org/10.1145/1374596.1374606) whitepaper [[pdf](https://ceph.com/assets/pdfs/weil-rados-pdsw07.pdf)]), Lustre, LizardFS, MooseFS, etc.
|
We can also mention CephFS (read [RADOS](https://ceph.com/wp-content/uploads/2016/08/weil-rados-pdsw07.pdf) whitepaper), Lustre, LizardFS, MooseFS, etc.
|
||||||
OpenStack Manila proxy previous solutions to provide an uniform API.
|
OpenStack Manila proxy previous solutions to provide an uniform API.
|
||||||
|
|
||||||
Finally object storages provide the highest level abstraction.
|
Finally object storages provide the highest level abstraction.
|
|
@ -1,7 +1,4 @@
|
||||||
+++
|
# Setup your development environment
|
||||||
title = "Setup your environment"
|
|
||||||
weight = 5
|
|
||||||
+++
|
|
||||||
|
|
||||||
Depending on your tastes, you can bootstrap your development environment in a traditional Rust way or through Nix.
|
Depending on your tastes, you can bootstrap your development environment in a traditional Rust way or through Nix.
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
+++
|
# Development
|
||||||
title = "Development"
|
|
||||||
weight = 6
|
|
||||||
sort_by = "weight"
|
|
||||||
template = "documentation.html"
|
|
||||||
+++
|
|
||||||
|
|
||||||
Now that you are a Garage expert, you want to enhance it, you are in the right place!
|
Now that you are a Garage expert, you want to enhance it, you are in the right place!
|
||||||
We discuss here how to hack on Garage, how we manage its development, etc.
|
We discuss here how to hack on Garage, how we manage its development, etc.
|
|
@ -1,7 +1,4 @@
|
||||||
+++
|
# Miscellaneous Notes
|
||||||
title = "Miscellaneous notes"
|
|
||||||
weight = 20
|
|
||||||
+++
|
|
||||||
|
|
||||||
## Quirks about cargo2nix/rust in Nix
|
## Quirks about cargo2nix/rust in Nix
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
+++
|
# Release process
|
||||||
title = "Release process"
|
|
||||||
weight = 15
|
|
||||||
+++
|
|
||||||
|
|
||||||
Before releasing a new version of Garage, our code pass through a succession of checks and transformations.
|
Before releasing a new version of Garage, our code pass through a succession of checks and transformations.
|
||||||
We define them as our release process.
|
We define them as our release process.
|
||||||
|
@ -32,10 +29,9 @@ We generate the following binary artifacts for now:
|
||||||
- **os**: linux
|
- **os**: linux
|
||||||
- **format**: static binary, docker container
|
- **format**: static binary, docker container
|
||||||
|
|
||||||
Additionnaly we also build two web pages and one JSON document:
|
Additionnaly we also build two web pages:
|
||||||
- the documentation (this website)
|
- the documentation (this website)
|
||||||
- [the release page](https://garagehq.deuxfleurs.fr/_releases.html)
|
- [the release page](https://garagehq.deuxfleurs.fr/releases.html)
|
||||||
- [the release list in JSON format](https://garagehq.deuxfleurs.fr/_releases.json)
|
|
||||||
|
|
||||||
We publish the static binaries on our own garage cluster (you can access them through the releases page)
|
We publish the static binaries on our own garage cluster (you can access them through the releases page)
|
||||||
and the docker containers on Docker Hub.
|
and the docker containers on Docker Hub.
|
|
@ -1,7 +1,4 @@
|
||||||
+++
|
# Development scripts
|
||||||
title = "Development scripts"
|
|
||||||
weight = 10
|
|
||||||
+++
|
|
||||||
|
|
||||||
We maintain a `script/` folder that contains some useful script to ease testing on Garage.
|
We maintain a `script/` folder that contains some useful script to ease testing on Garage.
|
||||||
|
|
||||||
|
@ -34,7 +31,7 @@ You can inspect the detailed configuration, including ports, by inspecting `/tmp
|
||||||
This script also spawns a simple HTTPS reverse proxy through `socat` for the S3 endpoint that listens on port `4443`.
|
This script also spawns a simple HTTPS reverse proxy through `socat` for the S3 endpoint that listens on port `4443`.
|
||||||
Some libraries might require a TLS endpoint to work, refer to our issue [#64](https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/64) for more detailed information on this subject.
|
Some libraries might require a TLS endpoint to work, refer to our issue [#64](https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/64) for more detailed information on this subject.
|
||||||
|
|
||||||
This script covers the [Launching the garage server](@/documentation/quick-start/_index.md#launching-the-garage-server) section of our Quick start page.
|
This script covers the [Launching the garage server](/quick_start/index.html#launching-the-garage-server) section of our Quick start page.
|
||||||
|
|
||||||
### 2. Make them join the cluster
|
### 2. Make them join the cluster
|
||||||
|
|
||||||
|
@ -44,7 +41,7 @@ This script covers the [Launching the garage server](@/documentation/quick-start
|
||||||
|
|
||||||
This script will configure each instance by assigning them a zone (`dc1`) and a weight (`1`).
|
This script will configure each instance by assigning them a zone (`dc1`) and a weight (`1`).
|
||||||
|
|
||||||
This script covers the [Creating a cluster layout](@/documentation/quick-start/_index.md#creating-a-cluster-layout) section of our Quick start page.
|
This script covers the [Configuring your Garage node](/quick_start/index.html#configuring-your-garage-node) section of our Quick start page.
|
||||||
|
|
||||||
### 3. Create a key and a bucket
|
### 3. Create a key and a bucket
|
||||||
|
|
||||||
|
@ -55,7 +52,7 @@ This script covers the [Creating a cluster layout](@/documentation/quick-start/_
|
||||||
This script will create a bucket named `eprouvette` with a key having read and write rights on this bucket.
|
This script will create a bucket named `eprouvette` with a key having read and write rights on this bucket.
|
||||||
The key is stored in a filed named `/tmp/garage.s3` and can be used by the following tools to pre-configure them.
|
The key is stored in a filed named `/tmp/garage.s3` and can be used by the following tools to pre-configure them.
|
||||||
|
|
||||||
This script covers the [Creating buckets and keys](@/documentation/quick-start/_index.md#creating-buckets-and-keys) section of our Quick start page.
|
This script covers the [Creating buckets and keys](/quick_start/index.html#creating-buckets-and-keys) section of our Quick start page.
|
||||||
|
|
||||||
## Handlers for generic tools
|
## Handlers for generic tools
|
||||||
|
|
BIN
doc/book/src/img/eu-flag-logo.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
44
doc/book/src/img/logo.svg
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg width="128" height="128" version="1.1" viewBox="0 0 33.867 33.867" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
||||||
|
<metadata>
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||||
|
<dc:title/>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g stroke-width=".14689">
|
||||||
|
<path d="m20.613 10.981a2.2034 2.2034 0 0 1-0.73445-0.07638l-9.2042-2.4839a2.2342 2.2342 0 0 1-0.69332-0.32757z"/>
|
||||||
|
<g fill="#4e4e4e">
|
||||||
|
<path class="cls-1" d="m6.6028 26.612 1.3661-0.0088h0.01763q0.75796 0 0.75796 0.71389v2.3003a6.5748 6.5748 0 0 1-2.2886 0.37898q-1.2515 0-1.8861-0.8505t-0.63457-2.3179q0-1.4689 0.7888-2.2827a2.5823 2.5823 0 0 1 1.9301-0.81524 3.5371 3.5371 0 0 1 2.0667 0.64338 1.0385 1.0385 0 0 1-0.18068 0.46711 1.2603 1.2603 0 0 1-0.33932 0.35254 2.5926 2.5926 0 0 0-1.5027-0.51999 1.4175 1.4175 0 0 0-1.1854 0.54203q-0.42304 0.53909-0.42304 1.6966 0 2.1769 1.604 2.1769a4.4743 4.4743 0 0 0 0.97829-0.11457v-0.83728q0-0.3966 0.01763-0.58756h-0.64633a0.60519 0.60519 0 0 1-0.40101-0.11018 0.44067 0.44067 0 0 1-0.12779-0.35254 1.51 1.51 0 0 1 0.088134-0.47446z"/>
|
||||||
|
<path class="cls-1" d="m13.401 29.379a1.1413 1.1413 0 0 1-0.14689 0.31288 1.0664 1.0664 0 0 1-0.22474 0.25118 0.99592 0.99592 0 0 1-0.80937-0.51705 1.7847 1.7847 0 0 1-1.2603 0.56406q-0.67863 0-1.0282-0.3966a1.3573 1.3573 0 0 1-0.34372-0.9166q0-0.73445 0.48033-1.1149a1.9404 1.9404 0 0 1 1.2354-0.3687q0.40542 0 0.76677 0.03525v-0.2644q0-0.69626-0.66982-0.69626-0.47592 0-1.3485 0.31728a1.2368 1.2368 0 0 1-0.29378-0.78439 4.9164 4.9164 0 0 1 1.9096-0.3966 1.5526 1.5526 0 0 1 1.0752 0.37016q0.41423 0.37016 0.41423 1.1193v1.7979q-0.0029 0.48474 0.24384 0.68745zm-2.2122-0.22034a1.2471 1.2471 0 0 0 0.88134-0.42304v-0.77852a5.9182 5.9182 0 0 0-0.66982-0.03525 0.73445 0.73445 0 0 0-0.54643 0.18214 0.6331 0.6331 0 0 0-0.18508 0.46711 0.62282 0.62282 0 0 0 0.14689 0.44067 0.48768 0.48768 0 0 0 0.3731 0.14689z"/>
|
||||||
|
<path class="cls-1" d="m14.115 26.012a1.0547 1.0547 0 0 1 0.14689-0.32169 0.88134 0.88134 0 0 1 0.22474-0.25118 1.1017 1.1017 0 0 1 0.92982 0.78439q0.35254-0.78439 1.1369-0.78439a2.7028 2.7028 0 0 1 0.51118 0.06169 1.9786 1.9786 0 0 1-0.2644 1.0282 2.2357 2.2357 0 0 0-0.3966-0.05288q-0.53762 0-0.86372 0.57287v2.8174a3.0627 3.0627 0 0 1-0.53762 0.04407 3.3785 3.3785 0 0 1-0.55525-0.04407v-2.9525q-0.0059-0.6375-0.33197-0.90191z"/>
|
||||||
|
<path class="cls-1" d="m21.157 29.379a1.1413 1.1413 0 0 1-0.15423 0.31288 1.0664 1.0664 0 0 1-0.22474 0.25118 0.99592 0.99592 0 0 1-0.8079-0.51705 1.7847 1.7847 0 0 1-1.2603 0.56406q-0.67864 0-1.0282-0.3966a1.3573 1.3573 0 0 1-0.34372-0.9166q0-0.73445 0.48033-1.1149a1.9404 1.9404 0 0 1 1.2295-0.37457q0.40542 0 0.76677 0.03525v-0.2644q0-0.69626-0.66982-0.69626-0.47592 0-1.3485 0.31728a1.2368 1.2368 0 0 1-0.29378-0.7844 4.9164 4.9164 0 0 1 1.9096-0.3966 1.5526 1.5526 0 0 1 1.0752 0.37016q0.41423 0.37016 0.41423 1.1193v1.8038q0.0088 0.48474 0.25559 0.68745zm-2.2151-0.22034a1.2471 1.2471 0 0 0 0.88134-0.42304v-0.77852a5.9182 5.9182 0 0 0-0.66982-0.03525 0.73445 0.73445 0 0 0-0.54643 0.18508 0.6331 0.6331 0 0 0-0.18508 0.46711 0.62282 0.62282 0 0 0 0.14689 0.44067 0.48768 0.48768 0 0 0 0.3731 0.14395z"/>
|
||||||
|
<path class="cls-1" d="m22.241 29.344q-0.3966-0.60813-0.3966-1.679t0.50236-1.679a1.5188 1.5188 0 0 1 1.2074-0.60813 1.7039 1.7039 0 0 1 1.1898 0.44067 0.99739 0.99739 0 0 1 0.69626-0.37898 0.82552 0.82552 0 0 1 0.23356 0.24677 1.0282 1.0282 0 0 1 0.14689 0.30847q-0.24678 0.21152-0.24678 0.75796v2.4971q0 1.4013-0.4583 1.983-0.4583 0.58169-1.5071 0.58756a4.2598 4.2598 0 0 1-1.5776-0.29378 1.1854 1.1854 0 0 1 0.27322-0.80202 2.882 2.882 0 0 0 1.1854 0.27322q0.57728 0 0.79761-0.29378a1.322 1.322 0 0 0 0.22034-0.81084v-0.35254a1.6936 1.6936 0 0 1-1.1017 0.41423 1.3014 1.3014 0 0 1-1.1648-0.61106zm2.2651-0.71389v-2.0447a1.1355 1.1355 0 0 0-0.75796-0.36135 0.63604 0.63604 0 0 0-0.57728 0.37898 2.2988 2.2988 0 0 0-0.20712 1.0841q0 0.70508 0.18949 1.04a0.56406 0.56406 0 0 0 0.49796 0.33491 1.1193 1.1193 0 0 0 0.8549-0.43186z"/>
|
||||||
|
<path class="cls-1" d="m30.105 28.039h-2.4678a1.4924 1.4924 0 0 0 0.23356 0.80643q0.20712 0.28644 0.72711 0.28644a2.6778 2.6778 0 0 0 1.1546-0.30847 1.159 1.159 0 0 1 0.31728 0.66982 2.8467 2.8467 0 0 1-1.6966 0.50236q-0.99151 0-1.4234-0.64338-0.43186-0.64338-0.43186-1.6657 0-1.0282 0.47592-1.6657a1.5923 1.5923 0 0 1 1.3617-0.64338q0.88134 0 1.3617 0.53321a1.9434 1.9434 0 0 1 0.47593 1.344 3.4519 3.4519 0 0 1-0.08813 0.7844zm-1.701-1.8684q-0.7227 0-0.77558 1.0929h1.5335v-0.10576a1.25 1.25 0 0 0-0.18508-0.71389 0.64338 0.64338 0 0 0-0.567-0.27321z"/>
|
||||||
|
</g>
|
||||||
|
<path d="m17.034 3.0341a2.9114 2.9114 0 0 0-1.1462 0.24753l-11.697 5.1749a0.42304 0.42304 0 0 0-0.22169 0.56586 0.20418 0.20418 0 0 0 0.01757 0.04702l1.8769 3.7099h1.6288l-0.23151-1.2935c-0.0191-0.10429-0.18819-0.84337-0.3483-1.3751l5.4746 1.71c0.07196 0.34089 0.16746 0.65935 0.28112 0.9586h8.8765c0.0978-0.29932 0.17499-0.61834 0.22738-0.9586l5.4627-1.7053c-0.16011 0.53174-0.32713 1.2662-0.34623 1.3705l-0.23151 1.2935h1.6283l1.8593-3.6763 0.01757-0.03359 0.0181-0.04547a0.027909 0.027909 0 0 0 0-0.01188 0.39367 0.39367 0 0 0 0.01757-0.13643 0.41864 0.41864 0 0 0-0.26303-0.4191l-11.697-5.1749a2.9114 2.9114 0 0 0-1.2041-0.24753z" fill="#ffd952"/>
|
||||||
|
<path d="m17.034 5.4825a2.9114 2.9114 0 0 0-1.1462 0.24753l-11.697 5.1749a0.42304 0.42304 0 0 0-0.22169 0.56534 0.20418 0.20418 0 0 0 0.01757 0.04703l1.018 2.0118h2.1632c-0.068234-0.28802-0.15662-0.64282-0.25528-0.97049l3.1073 0.97048h14.121l3.0939-0.96583c-0.09841 0.32682-0.18541 0.67924-0.25321 0.96583h2.1627l1.0005-1.9782 0.01757-0.03359 0.0181-0.04547a0.027909 0.027909 0 0 0 0-0.01188 0.39367 0.39367 0 0 0 0.01757-0.13643 0.41864 0.41864 0 0 0-0.26303-0.41858l-11.697-5.1749a2.9114 2.9114 0 0 0-1.2041-0.24753z" fill="#49c8fa"/>
|
||||||
|
<path class="cls-2" d="m30.198 13.82a0.39367 0.39367 0 0 1-0.01762 0.13661 0.027909 0.027909 0 0 1 0 0.01175l-0.01762 0.04554-0.01762 0.03379-2.8306 5.5965c-0.39367 0.77705-1.1178 0.75355-0.99592-0.03232l0.56993-3.1817c0.0191-0.10429 0.18655-0.83874 0.34666-1.3705l-5.4629 1.7054c-0.85784 5.5716-8.1891 5.6641-9.3848 0l-5.4746-1.7098c0.16011 0.53174 0.32904 1.2706 0.34813 1.3749l0.56994 3.1816c0.12192 0.78586-0.60225 0.80937-0.99592 0.03232l-2.8482-5.6303a0.20418 0.20418 0 0 1-0.01763-0.04701 0.42304 0.42304 0 0 1 0.2218-0.56553l11.697-5.175a2.9114 2.9114 0 0 1 2.3502 0l11.697 5.175a0.41864 0.41864 0 0 1 0.26294 0.41864z" fill="#ffd952"/>
|
||||||
|
<path class="cls-3" d="m20.801 14.796 5.0574-2.0359a0.21446 0.21446 0 0 0 0-0.39807c-0.58756-0.24531-1.3132-0.52734-2.0242-0.82259-0.13073-0.05435-1.369 0.83434-1.4821 0.92541l-2.1799 1.7421c-0.52734 0.44214-0.07051 0.86959 0.62869 0.58903z" fill="#45c8ff"/>
|
||||||
|
<circle class="cls-3" cx="17.135" cy="16.785" r="2.6367" fill="#45c8ff"/>
|
||||||
|
<path d="m20.613 10.981a2.2034 2.2034 0 0 1-0.73445-0.07638l-9.2042-2.4839a2.2342 2.2342 0 0 1-0.69332-0.32757z"/>
|
||||||
|
<g fill="#4e4e4e">
|
||||||
|
<path class="cls-1" d="m6.6028 26.612 1.3661-0.0088h0.01763q0.75796 0 0.75796 0.71389v2.3003a6.5748 6.5748 0 0 1-2.2886 0.37898q-1.2515 0-1.8861-0.8505t-0.63457-2.3179q0-1.4689 0.7888-2.2827a2.5823 2.5823 0 0 1 1.9301-0.81524 3.5371 3.5371 0 0 1 2.0667 0.64338 1.0385 1.0385 0 0 1-0.18068 0.46711 1.2603 1.2603 0 0 1-0.33932 0.35254 2.5926 2.5926 0 0 0-1.5027-0.51999 1.4175 1.4175 0 0 0-1.1854 0.54203q-0.42304 0.53909-0.42304 1.6966 0 2.1769 1.604 2.1769a4.4743 4.4743 0 0 0 0.97829-0.11457v-0.83728q0-0.3966 0.01763-0.58756h-0.64633a0.60519 0.60519 0 0 1-0.40101-0.11018 0.44067 0.44067 0 0 1-0.12779-0.35254 1.51 1.51 0 0 1 0.088134-0.47446z"/>
|
||||||
|
<path class="cls-1" d="m13.401 29.379a1.1413 1.1413 0 0 1-0.14689 0.31288 1.0664 1.0664 0 0 1-0.22474 0.25118 0.99592 0.99592 0 0 1-0.80937-0.51705 1.7847 1.7847 0 0 1-1.2603 0.56406q-0.67863 0-1.0282-0.3966a1.3573 1.3573 0 0 1-0.34372-0.9166q0-0.73445 0.48033-1.1149a1.9404 1.9404 0 0 1 1.2354-0.3687q0.40542 0 0.76677 0.03525v-0.2644q0-0.69626-0.66982-0.69626-0.47592 0-1.3485 0.31728a1.2368 1.2368 0 0 1-0.29378-0.78439 4.9164 4.9164 0 0 1 1.9096-0.3966 1.5526 1.5526 0 0 1 1.0752 0.37016q0.41423 0.37016 0.41423 1.1193v1.7979q-0.0029 0.48474 0.24384 0.68745zm-2.2122-0.22034a1.2471 1.2471 0 0 0 0.88134-0.42304v-0.77852a5.9182 5.9182 0 0 0-0.66982-0.03525 0.73445 0.73445 0 0 0-0.54643 0.18214 0.6331 0.6331 0 0 0-0.18508 0.46711 0.62282 0.62282 0 0 0 0.14689 0.44067 0.48768 0.48768 0 0 0 0.3731 0.14689z"/>
|
||||||
|
<path class="cls-1" d="m14.115 26.012a1.0547 1.0547 0 0 1 0.14689-0.32169 0.88134 0.88134 0 0 1 0.22474-0.25118 1.1017 1.1017 0 0 1 0.92982 0.78439q0.35254-0.78439 1.1369-0.78439a2.7028 2.7028 0 0 1 0.51118 0.06169 1.9786 1.9786 0 0 1-0.2644 1.0282 2.2357 2.2357 0 0 0-0.3966-0.05288q-0.53762 0-0.86372 0.57287v2.8174a3.0627 3.0627 0 0 1-0.53762 0.04407 3.3785 3.3785 0 0 1-0.55525-0.04407v-2.9525q-0.0059-0.6375-0.33197-0.90191z"/>
|
||||||
|
<path class="cls-1" d="m21.157 29.379a1.1413 1.1413 0 0 1-0.15423 0.31288 1.0664 1.0664 0 0 1-0.22474 0.25118 0.99592 0.99592 0 0 1-0.8079-0.51705 1.7847 1.7847 0 0 1-1.2603 0.56406q-0.67864 0-1.0282-0.3966a1.3573 1.3573 0 0 1-0.34372-0.9166q0-0.73445 0.48033-1.1149a1.9404 1.9404 0 0 1 1.2295-0.37457q0.40542 0 0.76677 0.03525v-0.2644q0-0.69626-0.66982-0.69626-0.47592 0-1.3485 0.31728a1.2368 1.2368 0 0 1-0.29378-0.7844 4.9164 4.9164 0 0 1 1.9096-0.3966 1.5526 1.5526 0 0 1 1.0752 0.37016q0.41423 0.37016 0.41423 1.1193v1.8038q0.0088 0.48474 0.25559 0.68745zm-2.2151-0.22034a1.2471 1.2471 0 0 0 0.88134-0.42304v-0.77852a5.9182 5.9182 0 0 0-0.66982-0.03525 0.73445 0.73445 0 0 0-0.54643 0.18508 0.6331 0.6331 0 0 0-0.18508 0.46711 0.62282 0.62282 0 0 0 0.14689 0.44067 0.48768 0.48768 0 0 0 0.3731 0.14395z"/>
|
||||||
|
<path class="cls-1" d="m22.241 29.344q-0.3966-0.60813-0.3966-1.679t0.50236-1.679a1.5188 1.5188 0 0 1 1.2074-0.60813 1.7039 1.7039 0 0 1 1.1898 0.44067 0.99739 0.99739 0 0 1 0.69626-0.37898 0.82552 0.82552 0 0 1 0.23356 0.24677 1.0282 1.0282 0 0 1 0.14689 0.30847q-0.24678 0.21152-0.24678 0.75796v2.4971q0 1.4013-0.4583 1.983-0.4583 0.58169-1.5071 0.58756a4.2598 4.2598 0 0 1-1.5776-0.29378 1.1854 1.1854 0 0 1 0.27322-0.80202 2.882 2.882 0 0 0 1.1854 0.27322q0.57728 0 0.79761-0.29378a1.322 1.322 0 0 0 0.22034-0.81084v-0.35254a1.6936 1.6936 0 0 1-1.1017 0.41423 1.3014 1.3014 0 0 1-1.1648-0.61106zm2.2651-0.71389v-2.0447a1.1355 1.1355 0 0 0-0.75796-0.36135 0.63604 0.63604 0 0 0-0.57728 0.37898 2.2988 2.2988 0 0 0-0.20712 1.0841q0 0.70508 0.18949 1.04a0.56406 0.56406 0 0 0 0.49796 0.33491 1.1193 1.1193 0 0 0 0.8549-0.43186z"/>
|
||||||
|
<path class="cls-1" d="m30.105 28.039h-2.4678a1.4924 1.4924 0 0 0 0.23356 0.80643q0.20712 0.28644 0.72711 0.28644a2.6778 2.6778 0 0 0 1.1546-0.30847 1.159 1.159 0 0 1 0.31728 0.66982 2.8467 2.8467 0 0 1-1.6966 0.50236q-0.99151 0-1.4234-0.64338-0.43186-0.64338-0.43186-1.6657 0-1.0282 0.47592-1.6657a1.5923 1.5923 0 0 1 1.3617-0.64338q0.88134 0 1.3617 0.53321a1.9434 1.9434 0 0 1 0.47593 1.344 3.4519 3.4519 0 0 1-0.08813 0.7844zm-1.701-1.8684q-0.7227 0-0.77558 1.0929h1.5335v-0.10576a1.25 1.25 0 0 0-0.18508-0.71389 0.64338 0.64338 0 0 0-0.567-0.27321z"/>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
<path d="m17.034 3.0341a2.9114 2.9114 0 0 0-1.1462 0.24753l-11.697 5.1749a0.42304 0.42304 0 0 0-0.22169 0.56586 0.20418 0.20418 0 0 0 0.01757 0.04702l1.8769 3.7099h1.6288l-0.23151-1.2935c-0.0191-0.10429-0.18819-0.84337-0.3483-1.3751l5.4746 1.71c0.07196 0.34089 0.16746 0.65935 0.28112 0.9586h8.8765c0.0978-0.29932 0.17499-0.61834 0.22738-0.9586l5.4627-1.7053c-0.16011 0.53174-0.32713 1.2662-0.34623 1.3705l-0.23151 1.2935h1.6283l1.8593-3.6763 0.01757-0.03359 0.0181-0.04547a0.027909 0.027909 0 0 0 0-0.01188 0.39367 0.39367 0 0 0 0.01757-0.13643 0.41864 0.41864 0 0 0-0.26303-0.4191l-11.697-5.1749a2.9114 2.9114 0 0 0-1.2041-0.24753z" fill="#ff9329"/>
|
||||||
|
<path d="m17.034 5.4825a2.9114 2.9114 0 0 0-1.1462 0.24753l-11.697 5.1749a0.42304 0.42304 0 0 0-0.22169 0.56534 0.20418 0.20418 0 0 0 0.01757 0.04703l1.018 2.0118h2.1632c-0.068234-0.28802-0.15662-0.64282-0.25528-0.97049l3.1073 0.97048h14.121l3.0939-0.96583c-0.09841 0.32682-0.18541 0.67924-0.25321 0.96583h2.1627l1.0005-1.9782 0.01757-0.03359 0.0181-0.04547a0.027909 0.027909 0 0 0 0-0.01188 0.39367 0.39367 0 0 0 0.01757-0.13643 0.41864 0.41864 0 0 0-0.26303-0.41858l-11.697-5.1749a2.9114 2.9114 0 0 0-1.2041-0.24753z" fill="#4e4e4e"/>
|
||||||
|
<path class="cls-2" d="m30.198 13.82a0.39367 0.39367 0 0 1-0.01762 0.13661 0.027909 0.027909 0 0 1 0 0.01175l-0.01762 0.04554-0.01762 0.03379-2.8306 5.5965c-0.39367 0.77705-1.1178 0.75355-0.99592-0.03232l0.56993-3.1817c0.0191-0.10429 0.18655-0.83874 0.34666-1.3705l-5.4629 1.7054c-0.85784 5.5716-8.1891 5.6641-9.3848 0l-5.4746-1.7098c0.16011 0.53174 0.32904 1.2706 0.34813 1.3749l0.56994 3.1816c0.12192 0.78586-0.60225 0.80937-0.99592 0.03232l-2.8482-5.6303a0.20418 0.20418 0 0 1-0.01763-0.04701 0.42304 0.42304 0 0 1 0.2218-0.56553l11.697-5.175a2.9114 2.9114 0 0 1 2.3502 0l11.697 5.175a0.41864 0.41864 0 0 1 0.26294 0.41864z" fill="#ff9329"/>
|
||||||
|
<path class="cls-3" d="m20.801 14.796 5.0574-2.0359a0.21446 0.21446 0 0 0 0-0.39807c-0.58756-0.24531-1.3132-0.52734-2.0242-0.82259-0.13073-0.05435-1.369 0.83434-1.4821 0.92541l-2.1799 1.7421c-0.52734 0.44214-0.07051 0.86959 0.62869 0.58903z" fill="#4e4e4e"/>
|
||||||
|
<circle class="cls-3" cx="17.135" cy="16.785" r="2.6367" fill="#4e4e4e"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 13 KiB |
3
doc/book/src/img/map.svg
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
doc/book/src/img/ngi-logo.png
Normal file
After Width: | Height: | Size: 34 KiB |
3
doc/book/src/img/software.svg
Normal file
After Width: | Height: | Size: 310 KiB |
3
doc/book/src/img/usage.svg
Normal file
After Width: | Height: | Size: 35 KiB |
101
doc/book/src/intro.md
Normal file
|
@ -0,0 +1,101 @@
|
||||||
|
<p align="center" style="text-align:center;">
|
||||||
|
<a href="https://garagehq.deuxfleurs.fr">
|
||||||
|
<img alt="Garage's Logo" src="img/logo.svg" height="200" />
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center" style="text-align:center;">
|
||||||
|
[ <a href="https://garagehq.deuxfleurs.fr/_releases.html">Download</a>
|
||||||
|
| <a href="https://git.deuxfleurs.fr/Deuxfleurs/garage">Git repository</a>
|
||||||
|
| <a href="https://matrix.to/#/%23garage:deuxfleurs.fr">Matrix channel</a>
|
||||||
|
| <a href="https://drone.deuxfleurs.fr/Deuxfleurs/garage">Drone CI</a>
|
||||||
|
]
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
# Data resiliency for everyone
|
||||||
|
|
||||||
|
Garage is an **open-source** distributed **storage service** you can **self-host** to fullfill many needs:
|
||||||
|
|
||||||
|
<p align="center" style="text-align:center; margin-bottom: 5rem;">
|
||||||
|
<img alt="Summary of the possible usages with a related icon: host a website, store media and backup target" src="img/usage.svg" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center" style="text-align:center; margin-bottom: 5rem;">
|
||||||
|
<a href="/design/goals.html#use-cases">⮞ learn more about use cases ⮜</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
Garage implements the **[Amazon S3 API](https://docs.aws.amazon.com/AmazonS3/latest/API/Welcome.html)** and thus is already **compatible** with many applications:
|
||||||
|
|
||||||
|
<p align="center" style="text-align:center; margin-bottom: 8rem;">
|
||||||
|
<img alt="Garage is already compatible with Nextcloud, Mastodon, Matrix Synapse, Cyberduck, RClone and Peertube" src="img/software.svg" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center" style="text-align:center; margin-bottom: 5rem;">
|
||||||
|
<a href="/connect/index.html">⮞ learn more about integrations ⮜</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
Garage provides **data resiliency** by **replicating** data 3x over **distant** servers:
|
||||||
|
|
||||||
|
<p align="center" style="text-align:center; margin-bottom: 5rem;">
|
||||||
|
<img alt="An example deployment on a map with servers in 5 zones: UK, France, Belgium, Germany and Switzerland. Each chunk of data is replicated in 3 of these 5 zones." src="img/map.svg" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center" style="text-align:center; margin-bottom: 5rem;">
|
||||||
|
<a href="/design/index.html">⮞ learn more about our design ⮜</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
Did you notice that *this website* is hosted and served by Garage?
|
||||||
|
|
||||||
|
## Keeping requirements low
|
||||||
|
|
||||||
|
We worked hard to keep requirements as low as possible as we target the largest possible public.
|
||||||
|
|
||||||
|
* **CPU:** any x86\_64 CPU from the last 10 years, ARMv7 or ARMv8.
|
||||||
|
* **RAM:** 1GB
|
||||||
|
* **Disk Space:** at least 16GB
|
||||||
|
* **Network:** 200ms or less, 50 Mbps or more
|
||||||
|
* **Heterogeneous hardware:** build a cluster with whatever second-hand machines are available
|
||||||
|
|
||||||
|
*For the network, as we do not use consensus algorithms like Paxos or Raft, Garage is not as latency sensitive.*
|
||||||
|
*Thanks to Rust and its zero-cost abstractions, we keep CPU and memory low.*
|
||||||
|
|
||||||
|
## Built on the shoulder of giants
|
||||||
|
|
||||||
|
- [Dynamo: Amazon’s Highly Available Key-value Store ](https://dl.acm.org/doi/abs/10.1145/1323293.1294281) by DeCandia et al.
|
||||||
|
- [Conflict-Free Replicated Data Types](https://link.springer.com/chapter/10.1007/978-3-642-24550-3_29) by Shapiro et al.
|
||||||
|
- [Maglev: A Fast and Reliable Software Network Load Balancer](https://www.usenix.org/conference/nsdi16/technical-sessions/presentation/eisenbud) by Eisenbud et al.
|
||||||
|
|
||||||
|
## Talks
|
||||||
|
|
||||||
|
- [(fr, 2021-11-13, video) Garage : Mille et une façons de stocker vos données](https://video.tedomum.net/w/moYKcv198dyMrT8hCS5jz9) and [slides (html)](https://rfid.deuxfleurs.fr/presentations/2021-11-13/garage/) - during [RFID#1](https://rfid.deuxfleurs.fr/programme/2021-11-13/) event
|
||||||
|
|
||||||
|
- [(en, 2021-04-28, pdf) Distributed object storage is centralised](https://git.deuxfleurs.fr/Deuxfleurs/garage/raw/commit/b1f60579a13d3c5eba7f74b1775c84639ea9b51a/doc/talks/2021-04-28_spirals-team/talk.pdf)
|
||||||
|
|
||||||
|
- [(fr, 2020-12-02, pdf) Garage : jouer dans la cour des grands quand on est un hébergeur associatif](https://git.deuxfleurs.fr/Deuxfleurs/garage/raw/commit/b1f60579a13d3c5eba7f74b1775c84639ea9b51a/doc/talks/2020-12-02_wide-team/talk.pdf)
|
||||||
|
|
||||||
|
## Community
|
||||||
|
|
||||||
|
If you want to discuss with us, you can join our Matrix channel at [#garage:deuxfleurs.fr](https://matrix.to/#/#garage:deuxfleurs.fr).
|
||||||
|
Our code repository and issue tracker, which is the place where you should report bugs, is managed on [Deuxfleurs' Gitea](https://git.deuxfleurs.fr/Deuxfleurs/garage).
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
Garage's source code, is released under the [AGPL v3 License](https://www.gnu.org/licenses/agpl-3.0.en.html).
|
||||||
|
Please note that if you patch Garage and then use it to provide any service over a network, you must share your code!
|
||||||
|
|
||||||
|
# Sponsors and funding
|
||||||
|
|
||||||
|
The Deuxfleurs association has received a grant from [NGI POINTER](https://pointer.ngi.eu/), to fund 3 people working on Garage full-time for a year: from October 2021 to September 2022.
|
||||||
|
|
||||||
|
<div style="display: flex; justify-content: space-around">
|
||||||
|
<a href="https://pointer.ngi.eu/">
|
||||||
|
<img style="height:100px" src="img/ngi-logo.png" alt="NGI Pointer logo">
|
||||||
|
</a>
|
||||||
|
<a href="https://ec.europa.eu/programmes/horizon2020/what-horizon-2020">
|
||||||
|
<img style="height:100px" src="img/eu-flag-logo.png" alt="EU flag logo">
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
_This project has received funding from the European Union’s Horizon 2020 research and innovation programme within the framework of the NGI-POINTER Project funded under grant agreement N° 871528._
|
|
@ -1,9 +1,4 @@
|
||||||
+++
|
# Quick Start
|
||||||
title = "Quick Start"
|
|
||||||
weight = 0
|
|
||||||
sort_by = "weight"
|
|
||||||
template = "documentation.html"
|
|
||||||
+++
|
|
||||||
|
|
||||||
Let's start your Garage journey!
|
Let's start your Garage journey!
|
||||||
In this chapter, we explain how to deploy Garage as a single-node server
|
In this chapter, we explain how to deploy Garage as a single-node server
|
||||||
|
@ -11,7 +6,7 @@ and how to interact with it.
|
||||||
|
|
||||||
Our goal is to introduce you to Garage's workflows.
|
Our goal is to introduce you to Garage's workflows.
|
||||||
Following this guide is recommended before moving on to
|
Following this guide is recommended before moving on to
|
||||||
[configuring a multi-node cluster](@/documentation/cookbook/real-world.md).
|
[configuring a multi-node cluster](../cookbook/real_world.md).
|
||||||
|
|
||||||
Note that this kind of deployment should not be used in production,
|
Note that this kind of deployment should not be used in production,
|
||||||
as it provides no redundancy for your data!
|
as it provides no redundancy for your data!
|
||||||
|
@ -20,7 +15,7 @@ as it provides no redundancy for your data!
|
||||||
|
|
||||||
Download the latest Garage binary from the release pages on our repository:
|
Download the latest Garage binary from the release pages on our repository:
|
||||||
|
|
||||||
<https://garagehq.deuxfleurs.fr/download/>
|
<https://garagehq.deuxfleurs.fr/_releases.html>
|
||||||
|
|
||||||
Place this binary somewhere in your `$PATH` so that you can invoke the `garage`
|
Place this binary somewhere in your `$PATH` so that you can invoke the `garage`
|
||||||
command directly (for instance you can copy the binary in `/usr/local/bin`
|
command directly (for instance you can copy the binary in `/usr/local/bin`
|
||||||
|
@ -28,12 +23,10 @@ or in `~/.local/bin`).
|
||||||
|
|
||||||
If a binary of the last version is not available for your architecture,
|
If a binary of the last version is not available for your architecture,
|
||||||
or if you want a build customized for your system,
|
or if you want a build customized for your system,
|
||||||
you can [build Garage from source](@/documentation/cookbook/from-source.md).
|
you can [build Garage from source](../cookbook/from_source.md).
|
||||||
|
|
||||||
|
|
||||||
## Configuring and starting Garage
|
## Writing a first configuration file
|
||||||
|
|
||||||
### Writing a first configuration file
|
|
||||||
|
|
||||||
This first configuration file should allow you to get started easily with the simplest
|
This first configuration file should allow you to get started easily with the simplest
|
||||||
possible Garage deployment.
|
possible Garage deployment.
|
||||||
|
@ -56,11 +49,11 @@ bootstrap_peers = []
|
||||||
[s3_api]
|
[s3_api]
|
||||||
s3_region = "garage"
|
s3_region = "garage"
|
||||||
api_bind_addr = "[::]:3900"
|
api_bind_addr = "[::]:3900"
|
||||||
root_domain = ".s3.garage.localhost"
|
root_domain = ".s3.garage"
|
||||||
|
|
||||||
[s3_web]
|
[s3_web]
|
||||||
bind_addr = "[::]:3902"
|
bind_addr = "[::]:3902"
|
||||||
root_domain = ".web.garage.localhost"
|
root_domain = ".web.garage"
|
||||||
index = "index.html"
|
index = "index.html"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -75,12 +68,12 @@ Garage server will not be persistent. Change these to locations on your local di
|
||||||
your data to be persisted properly.
|
your data to be persisted properly.
|
||||||
|
|
||||||
|
|
||||||
### Launching the Garage server
|
## Launching the Garage server
|
||||||
|
|
||||||
Use the following command to launch the Garage server with our configuration file:
|
Use the following command to launch the Garage server with our configuration file:
|
||||||
|
|
||||||
```
|
```
|
||||||
garage server
|
RUST_LOG=garage=info garage server
|
||||||
```
|
```
|
||||||
|
|
||||||
You can tune Garage's verbosity as follows (from less verbose to more verbose):
|
You can tune Garage's verbosity as follows (from less verbose to more verbose):
|
||||||
|
@ -91,11 +84,11 @@ RUST_LOG=garage=debug garage server
|
||||||
RUST_LOG=garage=trace garage server
|
RUST_LOG=garage=trace garage server
|
||||||
```
|
```
|
||||||
|
|
||||||
Log level `info` is the default value and is recommended for most use cases.
|
Log level `info` is recommended for most use cases.
|
||||||
Log level `debug` can help you check why your S3 API calls are not working.
|
Log level `debug` can help you check why your S3 API calls are not working.
|
||||||
|
|
||||||
|
|
||||||
### Checking that Garage runs correctly
|
## Checking that Garage runs correctly
|
||||||
|
|
||||||
The `garage` utility is also used as a CLI tool to configure your Garage deployment.
|
The `garage` utility is also used as a CLI tool to configure your Garage deployment.
|
||||||
It uses values from the TOML configuration file to find the Garage daemon running on the
|
It uses values from the TOML configuration file to find the Garage daemon running on the
|
||||||
|
@ -154,7 +147,7 @@ garage help
|
||||||
garage bucket allow --help
|
garage bucket allow --help
|
||||||
```
|
```
|
||||||
|
|
||||||
### Create a bucket
|
#### Create a bucket
|
||||||
|
|
||||||
Let's take an example where we want to deploy NextCloud using Garage as the
|
Let's take an example where we want to deploy NextCloud using Garage as the
|
||||||
main data storage.
|
main data storage.
|
||||||
|
@ -172,7 +165,7 @@ garage bucket list
|
||||||
garage bucket info nextcloud-bucket
|
garage bucket info nextcloud-bucket
|
||||||
```
|
```
|
||||||
|
|
||||||
### Create an API key
|
#### Create an API key
|
||||||
|
|
||||||
The `nextcloud-bucket` bucket now exists on the Garage server,
|
The `nextcloud-bucket` bucket now exists on the Garage server,
|
||||||
however it cannot be accessed until we add an API key with the proper access rights.
|
however it cannot be accessed until we add an API key with the proper access rights.
|
||||||
|
@ -202,7 +195,7 @@ garage key list
|
||||||
garage key info nextcloud-app-key
|
garage key info nextcloud-app-key
|
||||||
```
|
```
|
||||||
|
|
||||||
### Allow a key to access a bucket
|
#### Allow a key to access a bucket
|
||||||
|
|
||||||
Now that we have a bucket and a key, we need to give permissions to the key on the bucket:
|
Now that we have a bucket and a key, we need to give permissions to the key on the bucket:
|
||||||
|
|
||||||
|
@ -231,7 +224,7 @@ Before reading the following, you need a working `mc` command on your path.
|
||||||
Note that on certain Linux distributions such as Arch Linux, the Minio client binary
|
Note that on certain Linux distributions such as Arch Linux, the Minio client binary
|
||||||
is called `mcli` instead of `mc` (to avoid name clashes with the Midnight Commander).
|
is called `mcli` instead of `mc` (to avoid name clashes with the Midnight Commander).
|
||||||
|
|
||||||
### Configure `mc`
|
#### Configure `mc`
|
||||||
|
|
||||||
You need your access key and secret key created above.
|
You need your access key and secret key created above.
|
||||||
We will assume you are invoking `mc` on the same machine as the Garage server,
|
We will assume you are invoking `mc` on the same machine as the Garage server,
|
||||||
|
@ -259,7 +252,7 @@ or `$HOME/.bashrc` file:
|
||||||
export MC_REGION=garage
|
export MC_REGION=garage
|
||||||
```
|
```
|
||||||
|
|
||||||
### Use `mc`
|
#### Use `mc`
|
||||||
|
|
||||||
You can not list buckets from `mc` currently.
|
You can not list buckets from `mc` currently.
|
||||||
|
|
||||||
|
@ -273,7 +266,7 @@ mc mirror localdir/ my-garage/another-bucket
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### Other tools for interacting with Garage
|
#### Other tools for interacting with Garage
|
||||||
|
|
||||||
The following tools can also be used to send and recieve files from/to Garage:
|
The following tools can also be used to send and recieve files from/to Garage:
|
||||||
|
|
||||||
|
@ -282,5 +275,5 @@ The following tools can also be used to send and recieve files from/to Garage:
|
||||||
- [Cyberduck](https://cyberduck.io/)
|
- [Cyberduck](https://cyberduck.io/)
|
||||||
- [`s3cmd`](https://s3tools.org/s3cmd)
|
- [`s3cmd`](https://s3tools.org/s3cmd)
|
||||||
|
|
||||||
Refer to the ["Integrations" section](@/documentation/connect/_index.md) to learn how to
|
Refer to the ["Integrations" section](../connect/index.md) to learn how to
|
||||||
configure application and command line utilities to integrate with Garage.
|
configure application and command line utilities to integrate with Garage.
|
|
@ -1,7 +1,4 @@
|
||||||
+++
|
# Garage CLI
|
||||||
title = "Garage CLI"
|
|
||||||
weight = 15
|
|
||||||
+++
|
|
||||||
|
|
||||||
The Garage CLI is mostly self-documented. Make use of the `help` subcommand
|
The Garage CLI is mostly self-documented. Make use of the `help` subcommand
|
||||||
and the `--help` flag to discover all available options.
|
and the `--help` flag to discover all available options.
|
|
@ -1,7 +1,4 @@
|
||||||
+++
|
# Garage configuration file format reference
|
||||||
title = "Configuration file format"
|
|
||||||
weight = 5
|
|
||||||
+++
|
|
||||||
|
|
||||||
Here is an example `garage.toml` configuration file that illustrates all of the possible options:
|
Here is an example `garage.toml` configuration file that illustrates all of the possible options:
|
||||||
|
|
||||||
|
@ -29,10 +26,6 @@ bootstrap_peers = [
|
||||||
consul_host = "consul.service"
|
consul_host = "consul.service"
|
||||||
consul_service_name = "garage-daemon"
|
consul_service_name = "garage-daemon"
|
||||||
|
|
||||||
kubernetes_namespace = "garage"
|
|
||||||
kubernetes_service_name = "garage-daemon"
|
|
||||||
kubernetes_skip_crd = false
|
|
||||||
|
|
||||||
sled_cache_capacity = 134217728
|
sled_cache_capacity = 134217728
|
||||||
sled_flush_every_ms = 2000
|
sled_flush_every_ms = 2000
|
||||||
|
|
||||||
|
@ -44,13 +37,14 @@ root_domain = ".s3.garage"
|
||||||
[s3_web]
|
[s3_web]
|
||||||
bind_addr = "[::]:3902"
|
bind_addr = "[::]:3902"
|
||||||
root_domain = ".web.garage"
|
root_domain = ".web.garage"
|
||||||
|
index = "index.html"
|
||||||
```
|
```
|
||||||
|
|
||||||
The following gives details about each available configuration option.
|
The following gives details about each available configuration option.
|
||||||
|
|
||||||
## Available configuration options
|
## Available configuration options
|
||||||
|
|
||||||
### `metadata_dir`
|
#### `metadata_dir`
|
||||||
|
|
||||||
The directory in which Garage will store its metadata. This contains the node identifier,
|
The directory in which Garage will store its metadata. This contains the node identifier,
|
||||||
the network configuration and the peer list, the list of buckets and keys as well
|
the network configuration and the peer list, the list of buckets and keys as well
|
||||||
|
@ -58,29 +52,26 @@ as the index of all objects, object version and object blocks.
|
||||||
|
|
||||||
Store this folder on a fast SSD drive if possible to maximize Garage's performance.
|
Store this folder on a fast SSD drive if possible to maximize Garage's performance.
|
||||||
|
|
||||||
### `data_dir`
|
#### `data_dir`
|
||||||
|
|
||||||
The directory in which Garage will store the data blocks of objects.
|
The directory in which Garage will store the data blocks of objects.
|
||||||
This folder can be placed on an HDD. The space available for `data_dir`
|
This folder can be placed on an HDD. The space available for `data_dir`
|
||||||
should be counted to determine a node's capacity
|
should be counted to determine a node's capacity
|
||||||
when [adding it to the cluster layout](@/documentation/cookbook/real-world.md).
|
when [configuring it](../getting_started/05_cluster.md).
|
||||||
|
|
||||||
### `block_size`
|
#### `block_size`
|
||||||
|
|
||||||
Garage splits stored objects in consecutive chunks of size `block_size`
|
Garage splits stored objects in consecutive chunks of size `block_size`
|
||||||
(except the last one which might be smaller). The default size is 1MB and
|
(except the last one which might be smaller). The default size is 1MB and
|
||||||
should work in most cases. We recommend increasing it to e.g. 10MB if
|
should work in most cases. If you are interested in tuning this, feel free
|
||||||
you are using Garage to store large files and have fast network connections
|
to do so (and remember to report your findings to us!). If this value is
|
||||||
between all nodes (e.g. 1gbps).
|
changed for a running Garage installation, only files newly uploaded will be
|
||||||
|
affected. Previously uploaded files will remain available. This however
|
||||||
|
means that chunks from existing files will not be deduplicated with chunks
|
||||||
|
from newly uploaded files, meaning you might use more storage space that is
|
||||||
|
optimally possible.
|
||||||
|
|
||||||
If you are interested in tuning this, feel free to do so (and remember to
|
#### `replication_mode`
|
||||||
report your findings to us!). When this value is changed for a running Garage
|
|
||||||
installation, only files newly uploaded will be affected. Previously uploaded
|
|
||||||
files will remain available. This however means that chunks from existing files
|
|
||||||
will not be deduplicated with chunks from newly uploaded files, meaning you
|
|
||||||
might use more storage space that is optimally possible.
|
|
||||||
|
|
||||||
### `replication_mode`
|
|
||||||
|
|
||||||
Garage supports the following replication modes:
|
Garage supports the following replication modes:
|
||||||
|
|
||||||
|
@ -120,12 +111,12 @@ default value (currently `3`). Finally, zstd has also compression designed to be
|
||||||
than default compression levels, they range from `-1` (smaller file) to `-99` (faster
|
than default compression levels, they range from `-1` (smaller file) to `-99` (faster
|
||||||
compression).
|
compression).
|
||||||
|
|
||||||
If you do not specify a `compression_level` entry, Garage will set it to `1` for you. With
|
If you do not specify a `compression_level` entry, garage will set it to `1` for you. With
|
||||||
this parameters, zstd consumes low amount of cpu and should work faster than line speed in
|
this parameters, zstd consumes low amount of cpu and should work faster than line speed in
|
||||||
most situations, while saving some space and intra-cluster
|
most situations, while saving some space and intra-cluster
|
||||||
bandwidth.
|
bandwidth.
|
||||||
|
|
||||||
If you want to totally deactivate zstd in Garage, you can pass the special value `'none'`. No
|
If you want to totally deactivate zstd in garage, you can pass the special value `'none'`. No
|
||||||
zstd related code will be called, your chunks will be stored on disk without any processing.
|
zstd related code will be called, your chunks will be stored on disk without any processing.
|
||||||
|
|
||||||
Compression is done synchronously, setting a value too high will add latency to write queries.
|
Compression is done synchronously, setting a value too high will add latency to write queries.
|
||||||
|
@ -133,7 +124,7 @@ Compression is done synchronously, setting a value too high will add latency to
|
||||||
This value can be different between nodes, compression is done by the node which receive the
|
This value can be different between nodes, compression is done by the node which receive the
|
||||||
API call.
|
API call.
|
||||||
|
|
||||||
### `rpc_secret`
|
#### `rpc_secret`
|
||||||
|
|
||||||
Garage uses a secret key that is shared between all nodes of the cluster
|
Garage uses a secret key that is shared between all nodes of the cluster
|
||||||
in order to identify these nodes and allow them to communicate together.
|
in order to identify these nodes and allow them to communicate together.
|
||||||
|
@ -141,7 +132,7 @@ This key should be specified here in the form of a 32-byte hex-encoded
|
||||||
random string. Such a string can be generated with a command
|
random string. Such a string can be generated with a command
|
||||||
such as `openssl rand -hex 32`.
|
such as `openssl rand -hex 32`.
|
||||||
|
|
||||||
### `rpc_bind_addr`
|
#### `rpc_bind_addr`
|
||||||
|
|
||||||
The address and port on which to bind for inter-cluster communcations
|
The address and port on which to bind for inter-cluster communcations
|
||||||
(reffered to as RPC for remote procedure calls).
|
(reffered to as RPC for remote procedure calls).
|
||||||
|
@ -150,14 +141,14 @@ the node, even in the case of a NAT: the NAT should be configured to forward the
|
||||||
port number to the same internal port nubmer. This means that if you have several nodes running
|
port number to the same internal port nubmer. This means that if you have several nodes running
|
||||||
behind a NAT, they should each use a different RPC port number.
|
behind a NAT, they should each use a different RPC port number.
|
||||||
|
|
||||||
### `rpc_public_addr`
|
#### `rpc_public_addr`
|
||||||
|
|
||||||
The address and port that other nodes need to use to contact this node for
|
The address and port that other nodes need to use to contact this node for
|
||||||
RPC calls. **This parameter is optional but recommended.** In case you have
|
RPC calls. **This parameter is optional but recommended.** In case you have
|
||||||
a NAT that binds the RPC port to a port that is different on your public IP,
|
a NAT that binds the RPC port to a port that is different on your public IP,
|
||||||
this field might help making it work.
|
this field might help making it work.
|
||||||
|
|
||||||
### `bootstrap_peers`
|
#### `bootstrap_peers`
|
||||||
|
|
||||||
A list of peer identifiers on which to contact other Garage peers of this cluster.
|
A list of peer identifiers on which to contact other Garage peers of this cluster.
|
||||||
These peer identifiers have the following syntax:
|
These peer identifiers have the following syntax:
|
||||||
|
@ -173,41 +164,25 @@ be obtained by running `garage node id` and then included directly in the
|
||||||
key will be returned by `garage node id` and you will have to add the IP
|
key will be returned by `garage node id` and you will have to add the IP
|
||||||
yourself.
|
yourself.
|
||||||
|
|
||||||
### `consul_host` and `consul_service_name`
|
#### `consul_host` and `consul_service_name`
|
||||||
|
|
||||||
Garage supports discovering other nodes of the cluster using Consul. For this
|
Garage supports discovering other nodes of the cluster using Consul.
|
||||||
to work correctly, nodes need to know their IP address by which they can be
|
This works only when nodes are announced in Consul by an orchestrator such as Nomad,
|
||||||
reached by other nodes of the cluster, which should be set in `rpc_public_addr`.
|
as Garage is not able to announce itself.
|
||||||
|
|
||||||
The `consul_host` parameter should be set to the hostname of the Consul server,
|
The `consul_host` parameter should be set to the hostname of the Consul server,
|
||||||
and `consul_service_name` should be set to the service name under which Garage's
|
and `consul_service_name` should be set to the service name under which Garage's
|
||||||
RPC ports are announced.
|
RPC ports are announced.
|
||||||
|
|
||||||
Garage does not yet support talking to Consul over TLS.
|
#### `sled_cache_capacity`
|
||||||
|
|
||||||
### `kubernetes_namespace`, `kubernetes_service_name` and `kubernetes_skip_crd`
|
|
||||||
|
|
||||||
Garage supports discovering other nodes of the cluster using kubernetes custom
|
|
||||||
resources. For this to work `kubernetes_namespace` and `kubernetes_service_name`
|
|
||||||
need to be configured.
|
|
||||||
|
|
||||||
`kubernetes_namespace` sets the namespace in which the custom resources are
|
|
||||||
configured. `kubernetes_service_name` is added as a label to these resources to
|
|
||||||
filter them, to allow for multiple deployments in a single namespace.
|
|
||||||
|
|
||||||
`kubernetes_skip_crd` can be set to true to disable the automatic creation and
|
|
||||||
patching of the `garagenodes.deuxfleurs.fr` CRD. You will need to create the CRD
|
|
||||||
manually.
|
|
||||||
|
|
||||||
### `sled_cache_capacity`
|
|
||||||
|
|
||||||
This parameter can be used to tune the capacity of the cache used by
|
This parameter can be used to tune the capacity of the cache used by
|
||||||
[sled](https://sled.rs), the database Garage uses internally to store metadata.
|
[sled](https://sled.rs), the database Garage uses internally to store metadata.
|
||||||
Tune this to fit the RAM you wish to make available to your Garage instance.
|
Tune this to fit the RAM you wish to make available to your Garage instance.
|
||||||
This value has a conservative default (128MB) so that Garage doesn't use too much
|
More cache means faster Garage, but the default value (128MB) should be plenty
|
||||||
RAM by default, but feel free to increase this for higher performance.
|
for most use cases.
|
||||||
|
|
||||||
### `sled_flush_every_ms`
|
#### `sled_flush_every_ms`
|
||||||
|
|
||||||
This parameters can be used to tune the flushing interval of sled.
|
This parameters can be used to tune the flushing interval of sled.
|
||||||
Increase this if sled is thrashing your SSD, at the risk of losing more data in case
|
Increase this if sled is thrashing your SSD, at the risk of losing more data in case
|
||||||
|
@ -215,21 +190,20 @@ of a power outage (though this should not matter much as data is replicated on o
|
||||||
nodes). The default value, 2000ms, should be appropriate for most use cases.
|
nodes). The default value, 2000ms, should be appropriate for most use cases.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## The `[s3_api]` section
|
## The `[s3_api]` section
|
||||||
|
|
||||||
### `api_bind_addr`
|
#### `api_bind_addr`
|
||||||
|
|
||||||
The IP and port on which to bind for accepting S3 API calls.
|
The IP and port on which to bind for accepting S3 API calls.
|
||||||
This endpoint does not suport TLS: a reverse proxy should be used to provide it.
|
This endpoint does not suport TLS: a reverse proxy should be used to provide it.
|
||||||
|
|
||||||
### `s3_region`
|
#### `s3_region`
|
||||||
|
|
||||||
Garage will accept S3 API calls that are targetted to the S3 region defined here.
|
Garage will accept S3 API calls that are targetted to the S3 region defined here.
|
||||||
API calls targetted to other regions will fail with a AuthorizationHeaderMalformed error
|
API calls targetted to other regions will fail with a AuthorizationHeaderMalformed error
|
||||||
message that redirects the client to the correct region.
|
message that redirects the client to the correct region.
|
||||||
|
|
||||||
### `root_domain` {#root_domain}
|
#### `root_domain`
|
||||||
|
|
||||||
The optionnal suffix to access bucket using vhost-style in addition to path-style request.
|
The optionnal suffix to access bucket using vhost-style in addition to path-style request.
|
||||||
Note path-style requests are always enabled, whether or not vhost-style is configured.
|
Note path-style requests are always enabled, whether or not vhost-style is configured.
|
||||||
|
@ -239,20 +213,18 @@ but might be required by softwares not supporting path-style requests.
|
||||||
If `root_domain` is `s3.garage.eu`, a bucket called `my-bucket` can be interacted with
|
If `root_domain` is `s3.garage.eu`, a bucket called `my-bucket` can be interacted with
|
||||||
using the hostname `my-bucket.s3.garage.eu`.
|
using the hostname `my-bucket.s3.garage.eu`.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## The `[s3_web]` section
|
## The `[s3_web]` section
|
||||||
|
|
||||||
Garage allows to publish content of buckets as websites. This section configures the
|
Garage allows to publish content of buckets as websites. This section configures the
|
||||||
behaviour of this module.
|
behaviour of this module.
|
||||||
|
|
||||||
### `bind_addr`
|
#### `bind_addr`
|
||||||
|
|
||||||
The IP and port on which to bind for accepting HTTP requests to buckets configured
|
The IP and port on which to bind for accepting HTTP requests to buckets configured
|
||||||
for website access.
|
for website access.
|
||||||
This endpoint does not suport TLS: a reverse proxy should be used to provide it.
|
This endpoint does not suport TLS: a reverse proxy should be used to provide it.
|
||||||
|
|
||||||
### `root_domain`
|
#### `root_domain`
|
||||||
|
|
||||||
The optionnal suffix appended to bucket names for the corresponding HTTP Host.
|
The optionnal suffix appended to bucket names for the corresponding HTTP Host.
|
||||||
|
|
||||||
|
@ -260,3 +232,6 @@ For instance, if `root_domain` is `web.garage.eu`, a bucket called `deuxfleurs.f
|
||||||
will be accessible either with hostname `deuxfleurs.fr.web.garage.eu`
|
will be accessible either with hostname `deuxfleurs.fr.web.garage.eu`
|
||||||
or with hostname `deuxfleurs.fr`.
|
or with hostname `deuxfleurs.fr`.
|
||||||
|
|
||||||
|
#### `index`
|
||||||
|
|
||||||
|
The name of the index file to return for requests ending with `/` (usually `index.html`).
|
|
@ -1,9 +1,4 @@
|
||||||
+++
|
# Reference Manual
|
||||||
title = "Reference Manual"
|
|
||||||
weight = 4
|
|
||||||
sort_by = "weight"
|
|
||||||
template = "documentation.html"
|
|
||||||
+++
|
|
||||||
|
|
||||||
A reference manual contains some extensive descriptions about the features and the behaviour of the software.
|
A reference manual contains some extensive descriptions about the features and the behaviour of the software.
|
||||||
Reading of this chapter is recommended once you have a good knowledge/understanding of Garage.
|
Reading of this chapter is recommended once you have a good knowledge/understanding of Garage.
|
|
@ -1,13 +1,10 @@
|
||||||
+++
|
# Creating and updating a cluster layout
|
||||||
title = "Cluster layout management"
|
|
||||||
weight = 10
|
|
||||||
+++
|
|
||||||
|
|
||||||
The cluster layout in Garage is a table that assigns to each node a role in
|
The cluster layout in Garage is a table that assigns to each node a role in
|
||||||
the cluster. The role of a node in Garage can either be a storage node with
|
the cluster. The role of a node in Garage can either be a storage node with
|
||||||
a certain capacity, or a gateway node that does not store data and is only
|
a certain capacity, or a gateway node that does not store data and is only
|
||||||
used as an API entry point for faster cluster access.
|
used as an API entry point for faster cluster access.
|
||||||
An introduction to building cluster layouts can be found in the [production deployment](@/documentation/cookbook/real-world.md) page.
|
An introduction to building cluster layouts can be found in the [production deployment](/cookbook/real_world.md) page.
|
||||||
|
|
||||||
## How cluster layouts work in Garage
|
## How cluster layouts work in Garage
|
||||||
|
|
64
doc/book/src/reference_manual/s3_compatibility.md
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
# S3 Compatibility status
|
||||||
|
|
||||||
|
## Global S3 features
|
||||||
|
|
||||||
|
Implemented:
|
||||||
|
|
||||||
|
- path-style URLs (`garage.tld/bucket/key`)
|
||||||
|
- vhost-style URLs (`bucket.garage.tld/key`)
|
||||||
|
- putting and getting objects in buckets
|
||||||
|
- multipart uploads
|
||||||
|
- listing objects
|
||||||
|
- access control on a per-access-key-per-bucket basis
|
||||||
|
- CORS headers on web endpoint
|
||||||
|
|
||||||
|
Not implemented:
|
||||||
|
|
||||||
|
- object-level ACL
|
||||||
|
- [object versioning](https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/166)
|
||||||
|
- encryption
|
||||||
|
- most `x-amz-` headers
|
||||||
|
|
||||||
|
|
||||||
|
## Endpoint implementation
|
||||||
|
|
||||||
|
All APIs that are not mentionned are not implemented and will return a 501 Not Implemented.
|
||||||
|
|
||||||
|
| Endpoint | Status |
|
||||||
|
|------------------------------|----------------------------------|
|
||||||
|
| AbortMultipartUpload | Implemented |
|
||||||
|
| CompleteMultipartUpload | Implemented |
|
||||||
|
| CopyObject | Implemented |
|
||||||
|
| CreateBucket | Implemented |
|
||||||
|
| CreateMultipartUpload | Implemented |
|
||||||
|
| DeleteBucket | Implemented |
|
||||||
|
| DeleteBucketCors | Implemented |
|
||||||
|
| DeleteBucketWebsite | Implemented |
|
||||||
|
| DeleteObject | Implemented |
|
||||||
|
| DeleteObjects | Implemented |
|
||||||
|
| GetBucketCors | Implemented |
|
||||||
|
| GetBucketLocation | Implemented |
|
||||||
|
| GetBucketVersioning | Stub (see below) |
|
||||||
|
| GetBucketWebsite | Implemented |
|
||||||
|
| GetObject | Implemented |
|
||||||
|
| HeadBucket | Implemented |
|
||||||
|
| HeadObject | Implemented |
|
||||||
|
| ListBuckets | Implemented |
|
||||||
|
| ListObjects | Implemented, bugs? (see below) |
|
||||||
|
| ListObjectsV2 | Implemented |
|
||||||
|
| ListMultipartUpload | Implemented |
|
||||||
|
| ListParts | Implemented |
|
||||||
|
| PutObject | Implemented |
|
||||||
|
| PutBucketCors | Implemented |
|
||||||
|
| PutBucketWebsite | Partially implemented (see below)|
|
||||||
|
| UploadPart | Implemented |
|
||||||
|
| UploadPartCopy | Implemented |
|
||||||
|
|
||||||
|
|
||||||
|
- **GetBucketVersioning:** Stub implementation (Garage does not yet support versionning so this always returns
|
||||||
|
"versionning not enabled").
|
||||||
|
|
||||||
|
- **ListObjects:** Implemented, but there isn't a very good specification of what `encoding-type=url` covers so there might be some encoding bugs. In our implementation the url-encoded fields are in the same in ListObjects as they are in ListObjectsV2.
|
||||||
|
|
||||||
|
- **PutBucketWebsite:** Implemented, but only stores the index document suffix and the error document path. Redirects are not supported.
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
+++
|
# S3 compatibility target
|
||||||
title = "S3 compatibility target"
|
|
||||||
weight = 5
|
|
||||||
+++
|
|
||||||
|
|
||||||
If there is a specific S3 functionnality you have a need for, feel free to open
|
If there is a specific S3 functionnality you have a need for, feel free to open
|
||||||
a PR to put the corresponding endpoints higher in the list. Please explain
|
a PR to put the corresponding endpoints higher in the list. Please explain
|
||||||
|
@ -27,8 +24,8 @@ your motivations for doing so in the PR message.
|
||||||
| | CompleteMultipartUpload |
|
| | CompleteMultipartUpload |
|
||||||
| | AbortMultipartUpload |
|
| | AbortMultipartUpload |
|
||||||
| | UploadPart |
|
| | UploadPart |
|
||||||
| | ListMultipartUploads |
|
| | [*ListMultipartUploads*](https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/103) |
|
||||||
| | ListParts |
|
| | [*ListParts*](https://git.deuxfleurs.fr/Deuxfleurs/garage/issues/103) |
|
||||||
| **A-tier** | |
|
| **A-tier** | |
|
||||||
| | GetBucketCors |
|
| | GetBucketCors |
|
||||||
| | PutBucketCors |
|
| | PutBucketCors |
|
||||||
|
@ -37,7 +34,6 @@ your motivations for doing so in the PR message.
|
||||||
| | GetBucketWebsite |
|
| | GetBucketWebsite |
|
||||||
| | PutBucketWebsite |
|
| | PutBucketWebsite |
|
||||||
| | DeleteBucketWebsite |
|
| | DeleteBucketWebsite |
|
||||||
| | [PostObject](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html) |
|
|
||||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
|
||||||
| **B-tier** | |
|
| **B-tier** | |
|
||||||
| | GetBucketAcl |
|
| | GetBucketAcl |
|
|
@ -1,7 +1,4 @@
|
||||||
+++
|
# Design draft
|
||||||
title = "Design draft"
|
|
||||||
weight = 25
|
|
||||||
+++
|
|
||||||
|
|
||||||
**WARNING: this documentation is a design draft which was written before Garage's actual implementation.
|
**WARNING: this documentation is a design draft which was written before Garage's actual implementation.
|
||||||
The general principle are similar, but details have not been updated.**
|
The general principle are similar, but details have not been updated.**
|
||||||
|
@ -162,4 +159,4 @@ Number K of tokens per node: decided by the operator & stored in the operator's
|
||||||
- CDC: <https://www.usenix.org/system/files/conference/atc16/atc16-paper-xia.pdf>
|
- CDC: <https://www.usenix.org/system/files/conference/atc16/atc16-paper-xia.pdf>
|
||||||
- Erasure coding: <http://web.eecs.utk.edu/~jplank/plank/papers/CS-08-627.html>
|
- Erasure coding: <http://web.eecs.utk.edu/~jplank/plank/papers/CS-08-627.html>
|
||||||
- [Openstack Storage Concepts](https://docs.openstack.org/arch-design/design-storage/design-storage-concepts.html)
|
- [Openstack Storage Concepts](https://docs.openstack.org/arch-design/design-storage/design-storage-concepts.html)
|
||||||
- [RADOS](https://doi.org/10.1145/1374596.1374606) [[pdf](https://ceph.com/assets/pdfs/weil-rados-pdsw07.pdf)]
|
- [RADOS](https://ceph.com/wp-content/uploads/2016/08/weil-rados-pdsw07.pdf)
|
|
@ -1,9 +1,4 @@
|
||||||
+++
|
# Working Documents
|
||||||
title = "Working Documents"
|
|
||||||
weight = 7
|
|
||||||
sort_by = "weight"
|
|
||||||
template = "documentation.html"
|
|
||||||
+++
|
|
||||||
|
|
||||||
Working documents are documents that reflect the fact that Garage is a software that evolves quickly.
|
Working documents are documents that reflect the fact that Garage is a software that evolves quickly.
|
||||||
They are a way to communicate our ideas, our changes, and so on before or while we are implementing them in Garage.
|
They are a way to communicate our ideas, our changes, and so on before or while we are implementing them in Garage.
|
|
@ -1,7 +1,4 @@
|
||||||
+++
|
# Load Balancing Data (planned for version 0.2)
|
||||||
title = "Load balancing data"
|
|
||||||
weight = 10
|
|
||||||
+++
|
|
||||||
|
|
||||||
**This is being yet improved in release 0.5. The working document has not been updated yet, it still only applies to Garage 0.2 through 0.4.**
|
**This is being yet improved in release 0.5. The working document has not been updated yet, it still only applies to Garage 0.2 through 0.4.**
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
+++
|
# Migrating from 0.3 to 0.4
|
||||||
title = "Migrating from 0.3 to 0.4"
|
|
||||||
weight = 20
|
|
||||||
+++
|
|
||||||
|
|
||||||
**Migrating from 0.3 to 0.4 is unsupported. This document is only intended to
|
**Migrating from 0.3 to 0.4 is unsupported. This document is only intended to
|
||||||
document the process internally for the Deuxfleurs cluster where we have to do
|
document the process internally for the Deuxfleurs cluster where we have to do
|
|
@ -1,7 +1,4 @@
|
||||||
+++
|
# Migrating from 0.5 to 0.6
|
||||||
title = "Migrating from 0.5 to 0.6"
|
|
||||||
weight = 15
|
|
||||||
+++
|
|
||||||
|
|
||||||
**This guide explains how to migrate to 0.6 if you have an existing 0.5 cluster.
|
**This guide explains how to migrate to 0.6 if you have an existing 0.5 cluster.
|
||||||
We don't recommend trying to migrate directly from 0.4 or older to 0.6.**
|
We don't recommend trying to migrate directly from 0.4 or older to 0.6.**
|
Before Width: | Height: | Size: 30 KiB |
13
doc/talks/2022-02-06-fosdem/.gitignore
vendored
|
@ -1,13 +0,0 @@
|
||||||
*
|
|
||||||
|
|
||||||
!assets
|
|
||||||
|
|
||||||
!.gitignore
|
|
||||||
!*.svg
|
|
||||||
!*.png
|
|
||||||
!*.jpg
|
|
||||||
!*.tex
|
|
||||||
!Makefile
|
|
||||||
!.gitignore
|
|
||||||
|
|
||||||
!talk.pdf
|
|
|
@ -1,3 +0,0 @@
|
||||||
talk.pdf: talk.tex
|
|
||||||
pdflatex talk.tex
|
|
||||||
|
|
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 263 KiB |
Before Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 129 KiB |
Before Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 145 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 174 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 87 KiB |
Before Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 124 KiB |
Before Width: | Height: | Size: 315 KiB |
BIN
doc/talks/2022-02-06-fosdem/talk.pdf
(Stored with Git LFS)
|
@ -1,270 +0,0 @@
|
||||||
%\nonstopmode
|
|
||||||
\documentclass[aspectratio=169]{beamer}
|
|
||||||
\usepackage[utf8]{inputenc}
|
|
||||||
% \usepackage[frenchb]{babel}
|
|
||||||
\usepackage{amsmath}
|
|
||||||
\usepackage{mathtools}
|
|
||||||
\usepackage{breqn}
|
|
||||||
\usepackage{multirow}
|
|
||||||
\usetheme{boxes}
|
|
||||||
\usepackage{graphicx}
|
|
||||||
%\useoutertheme[footline=authortitle,subsection=false]{miniframes}
|
|
||||||
|
|
||||||
\beamertemplatenavigationsymbolsempty
|
|
||||||
|
|
||||||
\definecolor{TitleOrange}{RGB}{255,137,0}
|
|
||||||
\setbeamercolor{title}{fg=TitleOrange}
|
|
||||||
\setbeamercolor{frametitle}{fg=TitleOrange}
|
|
||||||
|
|
||||||
\definecolor{ListOrange}{RGB}{255,145,5}
|
|
||||||
\setbeamertemplate{itemize item}{\color{ListOrange}$\blacktriangleright$}
|
|
||||||
|
|
||||||
\definecolor{verygrey}{RGB}{70,70,70}
|
|
||||||
\setbeamercolor{normal text}{fg=verygrey}
|
|
||||||
|
|
||||||
|
|
||||||
\usepackage{tabu}
|
|
||||||
\usepackage{multicol}
|
|
||||||
\usepackage{vwcol}
|
|
||||||
\usepackage{stmaryrd}
|
|
||||||
\usepackage{graphicx}
|
|
||||||
|
|
||||||
\usepackage[normalem]{ulem}
|
|
||||||
|
|
||||||
\title{Introducing Garage}
|
|
||||||
\subtitle{a new storage platform for self-hosted geo-distributed clusters}
|
|
||||||
\author{Deuxfleurs Association}
|
|
||||||
\date{FOSDEM '22}
|
|
||||||
|
|
||||||
\begin{document}
|
|
||||||
|
|
||||||
\begin{frame}
|
|
||||||
\centering
|
|
||||||
\includegraphics[width=.3\linewidth]{../../sticker/Garage.pdf}
|
|
||||||
\vspace{1em}
|
|
||||||
|
|
||||||
{\large\bf Deuxfleurs Association}
|
|
||||||
\vspace{1em}
|
|
||||||
|
|
||||||
\url{https://garagehq.deuxfleurs.fr/}
|
|
||||||
|
|
||||||
Matrix channel: \texttt{\#garage:deuxfleurs.fr}
|
|
||||||
\end{frame}
|
|
||||||
|
|
||||||
\begin{frame}
|
|
||||||
\frametitle{Our objective at Deuxfleurs}
|
|
||||||
|
|
||||||
\begin{center}
|
|
||||||
\textbf{Promote self-hosting and small-scale hosting\\
|
|
||||||
as an alternative to large cloud providers}
|
|
||||||
\end{center}
|
|
||||||
\vspace{2em}
|
|
||||||
\visible<2->{
|
|
||||||
Why is it hard?
|
|
||||||
}
|
|
||||||
\visible<3->{
|
|
||||||
\vspace{2em}
|
|
||||||
\begin{center}
|
|
||||||
\textbf{\underline{Resilience}}\\
|
|
||||||
{\footnotesize (we want good uptime/availability with low supervision)}
|
|
||||||
\end{center}
|
|
||||||
}
|
|
||||||
\end{frame}
|
|
||||||
|
|
||||||
\begin{frame}
|
|
||||||
\frametitle{How to be resilient (the hard way)}
|
|
||||||
|
|
||||||
Entreprise-grade systems typically employ:
|
|
||||||
\vspace{1em}
|
|
||||||
\begin{itemize}
|
|
||||||
\item RAID
|
|
||||||
\item Redundant power grid + UPS
|
|
||||||
\item Redundant Internet connections
|
|
||||||
\item Low-latency links
|
|
||||||
\item ...
|
|
||||||
\end{itemize}
|
|
||||||
\vspace{1em}
|
|
||||||
$\to$ it's costly and only worth it at DC scale
|
|
||||||
\end{frame}
|
|
||||||
|
|
||||||
\begin{frame}
|
|
||||||
\frametitle{How to be resilient (the \underline{\textbf{cheap}} way)}
|
|
||||||
|
|
||||||
\only<1,4-5>{
|
|
||||||
Instead, we use:
|
|
||||||
\vspace{1em}
|
|
||||||
\begin{itemize}
|
|
||||||
\item \textcolor<2->{gray}{Commodity hardware (e.g. old desktop PCs)}
|
|
||||||
\vspace{.5em}
|
|
||||||
\item<4-> \textcolor<5->{gray}{Commodity Internet (e.g. FTTB, FTTH) and power grid}
|
|
||||||
\vspace{.5em}
|
|
||||||
\item<5-> \textcolor<6->{gray}{\textbf{Geographical redundancy} (multi-site replication)}
|
|
||||||
\end{itemize}
|
|
||||||
}
|
|
||||||
\only<2>{
|
|
||||||
\begin{center}
|
|
||||||
\includegraphics[width=.8\linewidth]{assets/atuin.jpg}
|
|
||||||
\end{center}
|
|
||||||
}
|
|
||||||
\only<3>{
|
|
||||||
\begin{center}
|
|
||||||
\includegraphics[width=.8\linewidth]{assets/neptune.jpg}
|
|
||||||
\end{center}
|
|
||||||
}
|
|
||||||
\only<6>{
|
|
||||||
\begin{center}
|
|
||||||
\includegraphics[width=.5\linewidth]{assets/inframap.jpg}
|
|
||||||
\end{center}
|
|
||||||
}
|
|
||||||
\end{frame}
|
|
||||||
|
|
||||||
\begin{frame}
|
|
||||||
\frametitle{How to make this happen}
|
|
||||||
\begin{center}
|
|
||||||
\only<1>{\includegraphics[width=.8\linewidth]{assets/slide1.png}}%
|
|
||||||
\only<2>{\includegraphics[width=.8\linewidth]{assets/slide2.png}}%
|
|
||||||
\only<3>{\includegraphics[width=.8\linewidth]{assets/slide3.png}}%
|
|
||||||
\end{center}
|
|
||||||
\end{frame}
|
|
||||||
|
|
||||||
\begin{frame}
|
|
||||||
\frametitle{Distributed file systems are slow}
|
|
||||||
File systems are complex, for example:
|
|
||||||
\vspace{1em}
|
|
||||||
\begin{itemize}
|
|
||||||
\item Concurrent modification by several processes
|
|
||||||
\vspace{1em}
|
|
||||||
\item Folder hierarchies
|
|
||||||
\vspace{1em}
|
|
||||||
\item Other requirements of the POSIX spec
|
|
||||||
\end{itemize}
|
|
||||||
\vspace{1em}
|
|
||||||
Coordination in a distributed system is costly
|
|
||||||
|
|
||||||
\vspace{1em}
|
|
||||||
Costs explode with commodity hardware / Internet connections\\
|
|
||||||
{\small (we experienced this!)}
|
|
||||||
\end{frame}
|
|
||||||
|
|
||||||
\begin{frame}
|
|
||||||
\frametitle{A simpler solution: object storage}
|
|
||||||
Only two operations:
|
|
||||||
\vspace{1em}
|
|
||||||
\begin{itemize}
|
|
||||||
\item Put an object at a key
|
|
||||||
\vspace{1em}
|
|
||||||
\item Retrieve an object from its key
|
|
||||||
\end{itemize}
|
|
||||||
\vspace{1em}
|
|
||||||
{\footnotesize (and a few others)}
|
|
||||||
|
|
||||||
\vspace{1em}
|
|
||||||
Sufficient for many applications!
|
|
||||||
\end{frame}
|
|
||||||
|
|
||||||
\begin{frame}
|
|
||||||
\frametitle{A simpler solution: object storage}
|
|
||||||
\begin{center}
|
|
||||||
\includegraphics[width=.2\linewidth]{../2020-12-02_wide-team/img/Amazon-S3.jpg}
|
|
||||||
\hspace{5em}
|
|
||||||
\includegraphics[width=.2\linewidth]{assets/minio.png}
|
|
||||||
\end{center}
|
|
||||||
\vspace{1em}
|
|
||||||
S3: a de-facto standard, many compatible applications
|
|
||||||
|
|
||||||
\vspace{1em}
|
|
||||||
|
|
||||||
MinIO is self-hostable but not suited for geo-distributed deployments
|
|
||||||
\end{frame}
|
|
||||||
|
|
||||||
|
|
||||||
\begin{frame}
|
|
||||||
\frametitle{But what is Garage, exactly?}
|
|
||||||
\textbf{Garage is a self-hosted drop-in replacement for the Amazon S3 object store}\\
|
|
||||||
\vspace{.5em}
|
|
||||||
that implements resilience through geographical redundancy on commodity hardware
|
|
||||||
\begin{center}
|
|
||||||
\includegraphics[width=.8\linewidth]{assets/garageuses.png}
|
|
||||||
\end{center}
|
|
||||||
\end{frame}
|
|
||||||
|
|
||||||
\begin{frame}
|
|
||||||
\frametitle{What makes Garage different?}
|
|
||||||
\textbf{Coordination-free:}
|
|
||||||
\vspace{2em}
|
|
||||||
\begin{itemize}
|
|
||||||
\item No Raft or Paxos
|
|
||||||
\vspace{1em}
|
|
||||||
\item Internal data types are CRDTs
|
|
||||||
\vspace{1em}
|
|
||||||
\item All nodes are equivalent (no master/leader/index node)
|
|
||||||
\end{itemize}
|
|
||||||
\vspace{2em}
|
|
||||||
$\to$ less sensitive to higher latencies between nodes
|
|
||||||
\end{frame}
|
|
||||||
|
|
||||||
\begin{frame}
|
|
||||||
\frametitle{What makes Garage different?}
|
|
||||||
\begin{center}
|
|
||||||
\includegraphics[width=.9\linewidth]{assets/endpoint-latency-dc.png}
|
|
||||||
\end{center}
|
|
||||||
\end{frame}
|
|
||||||
|
|
||||||
\begin{frame}
|
|
||||||
\frametitle{What makes Garage different?}
|
|
||||||
\textbf{Consistency model:}
|
|
||||||
\vspace{2em}
|
|
||||||
\begin{itemize}
|
|
||||||
\item Not ACID (not required by S3 spec) / not linearizable
|
|
||||||
\vspace{1em}
|
|
||||||
\item \textbf{Read-after-write consistency}\\
|
|
||||||
{\footnotesize (stronger than eventual consistency)}
|
|
||||||
\end{itemize}
|
|
||||||
\end{frame}
|
|
||||||
|
|
||||||
\begin{frame}
|
|
||||||
\frametitle{What makes Garage different?}
|
|
||||||
\textbf{Location-aware:}
|
|
||||||
\vspace{2em}
|
|
||||||
\begin{center}
|
|
||||||
\includegraphics[width=\linewidth]{assets/location-aware.png}
|
|
||||||
\end{center}
|
|
||||||
\vspace{2em}
|
|
||||||
Garage replicates data on different zones when possible
|
|
||||||
\end{frame}
|
|
||||||
|
|
||||||
\begin{frame}
|
|
||||||
\frametitle{What makes Garage different?}
|
|
||||||
\begin{center}
|
|
||||||
\includegraphics[width=.8\linewidth]{assets/map.png}
|
|
||||||
\end{center}
|
|
||||||
\end{frame}
|
|
||||||
|
|
||||||
\begin{frame}
|
|
||||||
\frametitle{An ever-increasing compatibility list}
|
|
||||||
\begin{center}
|
|
||||||
\includegraphics[width=.7\linewidth]{assets/compatibility.png}
|
|
||||||
\end{center}
|
|
||||||
\end{frame}
|
|
||||||
|
|
||||||
\begin{frame}
|
|
||||||
\frametitle{Get Garage now!}
|
|
||||||
\begin{center}
|
|
||||||
\includegraphics[width=.3\linewidth]{../../logo/garage_hires.png}\\
|
|
||||||
\vspace{-1em}
|
|
||||||
\url{https://garagehq.deuxfleurs.fr/}\\
|
|
||||||
Matrix channel: \texttt{\#garage:deuxfleurs.fr}
|
|
||||||
|
|
||||||
\vspace{2em}
|
|
||||||
\includegraphics[width=.09\linewidth]{assets/rust_logo.png}
|
|
||||||
\includegraphics[width=.2\linewidth]{assets/AGPLv3_Logo.png}
|
|
||||||
\end{center}
|
|
||||||
\end{frame}
|
|
||||||
|
|
||||||
\begin{frame}
|
|
||||||
\frametitle{Demo time!}
|
|
||||||
\end{frame}
|
|
||||||
|
|
||||||
\end{document}
|
|
||||||
|
|
||||||
%% vim: set ts=4 sw=4 tw=0 noet spelllang=fr :
|
|
|
@ -55,7 +55,7 @@ let
|
||||||
parsed = map (entry: listToSet keys entry) elems;
|
parsed = map (entry: listToSet keys entry) elems;
|
||||||
|
|
||||||
subkeys = ["root" "version" "platform" "binary" ];
|
subkeys = ["root" "version" "platform" "binary" ];
|
||||||
builds = map (entry: entry // listToSet subkeys (lib.splitString "/" entry.path) // { url = "https://garagehq.deuxfleurs.fr/" + entry.path; }) parsed;
|
builds = map (entry: entry // listToSet subkeys (lib.splitString "/" entry.path)) parsed;
|
||||||
|
|
||||||
/* Aggregation */
|
/* Aggregation */
|
||||||
builds_per_version = lib.foldl (acc: v: acc // { ${v.version} = if builtins.hasAttr v.version acc then acc.${v.version} ++ [ v ] else [ v ]; }) {} builds;
|
builds_per_version = lib.foldl (acc: v: acc // { ${v.version} = if builtins.hasAttr v.version acc then acc.${v.version} ++ [ v ] else [ v ]; }) {} builds;
|
||||||
|
@ -89,8 +89,8 @@ let
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
json = pkgs.writeTextDir "share/_releases.json" (builtins.toJSON sorted_builds);
|
in
|
||||||
html = pkgs.writeTextDir "share/_releases.html" ''
|
pkgs.writeText "index.html" ''
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
@ -143,9 +143,4 @@ let
|
||||||
''))}
|
''))}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
'';
|
''
|
||||||
in
|
|
||||||
pkgs.symlinkJoin {
|
|
||||||
name = "releases";
|
|
||||||
paths = [ json html ];
|
|
||||||
}
|
|
||||||
|
|
|
@ -8,10 +8,10 @@ rec {
|
||||||
sha256 = "1xy9zpypqfxs5gcq5dcla4bfkhxmh5nzn9dyqkr03lqycm9wg5cr";
|
sha256 = "1xy9zpypqfxs5gcq5dcla4bfkhxmh5nzn9dyqkr03lqycm9wg5cr";
|
||||||
};
|
};
|
||||||
cargo2nixSrc = fetchGit {
|
cargo2nixSrc = fetchGit {
|
||||||
# As of 2022-03-17
|
# As of 2022-02-03
|
||||||
url = "https://github.com/superboum/cargo2nix";
|
url = "https://github.com/superboum/cargo2nix";
|
||||||
ref = "main";
|
ref = "backward-compat";
|
||||||
rev = "bcbf3ba99e9e01a61eb83a24624419c2dd9dec64";
|
rev = "08d963f32a774353ee8acf3f61749915875c1ec4";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|