mirror of
https://git.deuxfleurs.fr/Deuxfleurs/garage.git
synced 2026-11-10 08:09:16 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e4e870403 | ||
|
|
38ca35eb0f | ||
|
|
a2d87a012d | ||
|
|
899292ee28 | ||
|
|
c8e9c45889 | ||
|
|
e79b485aa8 | ||
|
|
d38d62f4d7 | ||
|
|
2885806e00 | ||
|
|
52437e4298 | ||
|
|
abcef7a3fd | ||
|
|
5d338f0b8f | ||
|
|
590c9bb4db | ||
|
|
c56b7e20c3 | ||
|
|
2f21181ccb | ||
|
|
2d1c073d2f | ||
|
|
5e7307cbf3 | ||
|
|
fd0e23e984 | ||
|
|
d7506b282c | ||
|
|
6bbdca2e48 | ||
|
|
c6d6cc1fc3 | ||
|
|
5fa6df6ee3 | ||
|
|
c6bed26347 | ||
|
|
d25e631a4a | ||
|
|
514eb29874 | ||
|
|
8ba6454e21 | ||
|
|
9dcc5232a6 | ||
|
|
1e13a66b42 | ||
|
|
2c9e849bbf | ||
|
|
34baade499 | ||
|
|
2f2a96b51d | ||
|
|
c9156f6828 | ||
|
|
4629ee25f7 | ||
|
|
a826c361a9 | ||
|
|
fb6db494cc | ||
|
|
97e2fa5b8b | ||
|
|
cfd259190f | ||
|
|
48e0436f29 | ||
|
|
9c745548c4 | ||
|
|
f7d9c2b383 | ||
|
|
e6862c5d3d | ||
|
|
d032e2017c | ||
|
|
0b12debf6c | ||
|
|
795b4a41b7 | ||
|
|
fd2472d488 | ||
|
|
d2a064bb1b | ||
|
|
88b4623bf1 | ||
|
|
325f79012c | ||
|
|
eb40475f1e | ||
|
|
22c0420607 | ||
|
|
1bd7689301 | ||
|
|
ec0da3b644 | ||
|
|
9511b20153 | ||
|
|
d067a40b3f | ||
|
|
ff6ec62d54 | ||
|
|
004eb94e14 | ||
|
|
46f620119b | ||
|
|
576d0d950e | ||
|
|
85a07c87d7 | ||
|
|
1f645830a4 | ||
|
|
5f308bd688 | ||
|
|
df758e8e0d | ||
|
|
e83864af24 | ||
|
|
3b49dd9e63 | ||
|
|
cef8d75983 | ||
|
|
cd0728cd20 | ||
|
|
0951b5db75 | ||
|
|
3d94eb8d4b | ||
|
|
004866caac | ||
|
|
913e6da41b | ||
|
|
e4881e62f1 | ||
|
|
7ccbfda26d | ||
|
|
6b19d7628e | ||
|
|
411f1d495c | ||
|
|
ba68506c36 | ||
|
|
21c83ab311 | ||
|
|
2e03d90585 | ||
|
|
29ce490dd6 | ||
|
|
c3e8e5e38c | ||
|
|
62a3003cca | ||
|
|
3151695011 | ||
|
|
f034e834fa | ||
|
|
bf0f792418 | ||
|
|
61f3de6496 | ||
|
|
71655c1e89 | ||
|
|
7c8fc04b96 | ||
|
|
f914db057a | ||
|
|
406b6da163 | ||
|
|
9f468b4439 | ||
|
|
97be7b38fa | ||
|
|
6a1079c412 | ||
|
|
b1629dd355 | ||
|
|
d405a9f839 | ||
|
|
7b9c047b11 | ||
|
|
10bbb26b30 | ||
|
|
89ff9f5576 | ||
|
|
bdaf55ab3f | ||
|
|
e96014ca60 | ||
|
|
568c4954e9 | ||
|
|
fe937c2901 | ||
|
|
3192088aac | ||
|
|
5a89350b38 | ||
|
|
3caea5fc06 | ||
|
|
ebc0e9319e | ||
|
|
f8c6a8373d | ||
|
|
076ce04fe5 | ||
|
|
f37d5d2b08 | ||
|
|
819f4f0050 | ||
|
|
69ddaafc60 | ||
|
|
145130481e | ||
|
|
6ed78abb5c | ||
|
|
19454c1679 | ||
|
|
1c03941b19 | ||
|
|
4f0b923c4f | ||
|
|
420bbc162d | ||
|
|
12ea4cda5f | ||
|
|
5fefbd94e9 | ||
|
|
ba810b2e81 | ||
|
|
f8ed3fdbc4 | ||
|
|
2daeb89834 | ||
|
|
4cb45bd398 | ||
|
|
d5ad797ad7 | ||
|
|
a99925e0ed | ||
|
|
f538dc34d3 | ||
|
|
ed58f8b0fe | ||
|
|
5037b97dd4 | ||
|
|
af1a530834 | ||
|
|
c99bfe69ea | ||
|
|
831f2b0207 | ||
|
|
c1eb1610ba | ||
|
|
5560a963e0 | ||
|
|
2aaba39ddc | ||
|
|
47467df83e | ||
|
|
9b7fea4cb0 | ||
|
|
44ce6ae5b4 | ||
|
|
22487ceddf | ||
|
|
6ccfbb2986 | ||
|
|
c939d2a936 | ||
|
|
65e9dde8c9 | ||
|
|
c9b733a4a6 |
175 changed files with 16397 additions and 8184 deletions
|
|
@ -1,6 +1,3 @@
|
||||||
labels:
|
|
||||||
nix: "enabled"
|
|
||||||
|
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
|
@ -12,32 +9,27 @@ when:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: check formatting
|
- name: check formatting
|
||||||
image: nixpkgs/nix:nixos-24.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
commands:
|
commands:
|
||||||
- nix-build -j4 --attr flakePackages.fmt
|
- nix-shell --attr devShell --run "cargo fmt -- --check"
|
||||||
|
|
||||||
- name: build
|
- name: build
|
||||||
image: nixpkgs/nix:nixos-24.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
commands:
|
commands:
|
||||||
- nix-build -j4 --attr flakePackages.dev
|
- nix-build -j4 --attr flakePackages.dev
|
||||||
|
|
||||||
- name: unit + func tests (lmdb)
|
- name: unit + func tests (lmdb)
|
||||||
image: nixpkgs/nix:nixos-24.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
commands:
|
commands:
|
||||||
- nix-build -j4 --attr flakePackages.tests-lmdb
|
- nix-build -j4 --attr flakePackages.tests-lmdb
|
||||||
|
|
||||||
- name: unit + func tests (sqlite)
|
- name: unit + func tests (sqlite)
|
||||||
image: nixpkgs/nix:nixos-24.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
commands:
|
commands:
|
||||||
- nix-build -j4 --attr flakePackages.tests-sqlite
|
- nix-build -j4 --attr flakePackages.tests-sqlite
|
||||||
|
|
||||||
- name: unit + func tests (fjall)
|
|
||||||
image: nixpkgs/nix:nixos-24.05
|
|
||||||
commands:
|
|
||||||
- nix-build -j4 --attr flakePackages.tests-fjall
|
|
||||||
|
|
||||||
- name: integration tests
|
- name: integration tests
|
||||||
image: nixpkgs/nix:nixos-24.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
commands:
|
commands:
|
||||||
- nix-build -j4 --attr flakePackages.dev
|
- nix-build -j4 --attr flakePackages.dev
|
||||||
- nix-shell --attr ci --run ./script/test-smoke.sh || (cat /tmp/garage.log; false)
|
- nix-shell --attr ci --run ./script/test-smoke.sh || (cat /tmp/garage.log; false)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
labels:
|
|
||||||
nix: "enabled"
|
|
||||||
|
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- deployment
|
- deployment
|
||||||
|
|
@ -11,7 +8,7 @@ depends_on:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: refresh-index
|
- name: refresh-index
|
||||||
image: nixpkgs/nix:nixos-24.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
environment:
|
environment:
|
||||||
AWS_ACCESS_KEY_ID:
|
AWS_ACCESS_KEY_ID:
|
||||||
from_secret: garagehq_aws_access_key_id
|
from_secret: garagehq_aws_access_key_id
|
||||||
|
|
@ -22,7 +19,7 @@ steps:
|
||||||
- nix-shell --attr ci --run "refresh_index"
|
- nix-shell --attr ci --run "refresh_index"
|
||||||
|
|
||||||
- name: multiarch-docker
|
- name: multiarch-docker
|
||||||
image: nixpkgs/nix:nixos-24.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
environment:
|
environment:
|
||||||
DOCKER_AUTH:
|
DOCKER_AUTH:
|
||||||
from_secret: docker_auth
|
from_secret: docker_auth
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
labels:
|
|
||||||
nix: "enabled"
|
|
||||||
|
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- deployment
|
- deployment
|
||||||
|
|
@ -19,17 +16,17 @@ matrix:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: nixpkgs/nix:nixos-24.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
commands:
|
commands:
|
||||||
- nix-build --attr releasePackages.${ARCH} --argstr git_version ${CI_COMMIT_TAG:-$CI_COMMIT_SHA}
|
- nix-build --attr releasePackages.${ARCH} --argstr git_version ${CI_COMMIT_TAG:-$CI_COMMIT_SHA}
|
||||||
|
|
||||||
- name: check is static binary
|
- name: check is static binary
|
||||||
image: nixpkgs/nix:nixos-24.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
commands:
|
commands:
|
||||||
- nix-shell --attr ci --run "./script/not-dynamic.sh result/bin/garage"
|
- nix-shell --attr ci --run "./script/not-dynamic.sh result/bin/garage"
|
||||||
|
|
||||||
- name: integration tests
|
- name: integration tests
|
||||||
image: nixpkgs/nix:nixos-24.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
commands:
|
commands:
|
||||||
- nix-shell --attr ci --run ./script/test-smoke.sh || (cat /tmp/garage.log; false)
|
- nix-shell --attr ci --run ./script/test-smoke.sh || (cat /tmp/garage.log; false)
|
||||||
when:
|
when:
|
||||||
|
|
@ -38,8 +35,16 @@ steps:
|
||||||
- matrix:
|
- matrix:
|
||||||
ARCH: i386
|
ARCH: i386
|
||||||
|
|
||||||
- name: upgrade tests
|
- name: upgrade tests from v1.0.0
|
||||||
image: nixpkgs/nix:nixos-24.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
|
commands:
|
||||||
|
- nix-shell --attr ci --run "./script/test-upgrade.sh v1.0.0 x86_64-unknown-linux-musl" || (cat /tmp/garage.log; false)
|
||||||
|
when:
|
||||||
|
- matrix:
|
||||||
|
ARCH: amd64
|
||||||
|
|
||||||
|
- name: upgrade tests from v0.8.4
|
||||||
|
image: nixpkgs/nix:nixos-22.05
|
||||||
commands:
|
commands:
|
||||||
- nix-shell --attr ci --run "./script/test-upgrade.sh v0.8.4 x86_64-unknown-linux-musl" || (cat /tmp/garage.log; false)
|
- nix-shell --attr ci --run "./script/test-upgrade.sh v0.8.4 x86_64-unknown-linux-musl" || (cat /tmp/garage.log; false)
|
||||||
when:
|
when:
|
||||||
|
|
@ -47,7 +52,7 @@ steps:
|
||||||
ARCH: amd64
|
ARCH: amd64
|
||||||
|
|
||||||
- name: push static binary
|
- name: push static binary
|
||||||
image: nixpkgs/nix:nixos-24.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
environment:
|
environment:
|
||||||
TARGET: "${TARGET}"
|
TARGET: "${TARGET}"
|
||||||
AWS_ACCESS_KEY_ID:
|
AWS_ACCESS_KEY_ID:
|
||||||
|
|
@ -58,7 +63,7 @@ steps:
|
||||||
- nix-shell --attr ci --run "to_s3"
|
- nix-shell --attr ci --run "to_s3"
|
||||||
|
|
||||||
- name: docker build and publish
|
- name: docker build and publish
|
||||||
image: nixpkgs/nix:nixos-24.05
|
image: nixpkgs/nix:nixos-22.05
|
||||||
environment:
|
environment:
|
||||||
DOCKER_PLATFORM: "linux/${ARCH}"
|
DOCKER_PLATFORM: "linux/${ARCH}"
|
||||||
CONTAINER_NAME: "dxflrs/${ARCH}_garage"
|
CONTAINER_NAME: "dxflrs/${ARCH}_garage"
|
||||||
|
|
|
||||||
2012
Cargo.lock
generated
2012
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
53
Cargo.toml
53
Cargo.toml
|
|
@ -24,18 +24,18 @@ default-members = ["src/garage"]
|
||||||
|
|
||||||
# Internal Garage crates
|
# Internal Garage crates
|
||||||
format_table = { version = "0.1.1", path = "src/format-table" }
|
format_table = { version = "0.1.1", path = "src/format-table" }
|
||||||
garage_api_common = { version = "1.3.1", path = "src/api/common" }
|
garage_api_common = { version = "2.0.0", path = "src/api/common" }
|
||||||
garage_api_admin = { version = "1.3.1", path = "src/api/admin" }
|
garage_api_admin = { version = "2.0.0", path = "src/api/admin" }
|
||||||
garage_api_s3 = { version = "1.3.1", path = "src/api/s3" }
|
garage_api_s3 = { version = "2.0.0", path = "src/api/s3" }
|
||||||
garage_api_k2v = { version = "1.3.1", path = "src/api/k2v" }
|
garage_api_k2v = { version = "2.0.0", path = "src/api/k2v" }
|
||||||
garage_block = { version = "1.3.1", path = "src/block" }
|
garage_block = { version = "2.0.0", path = "src/block" }
|
||||||
garage_db = { version = "1.3.1", path = "src/db", default-features = false }
|
garage_db = { version = "2.0.0", path = "src/db", default-features = false }
|
||||||
garage_model = { version = "1.3.1", path = "src/model", default-features = false }
|
garage_model = { version = "2.0.0", path = "src/model", default-features = false }
|
||||||
garage_net = { version = "1.3.1", path = "src/net" }
|
garage_net = { version = "2.0.0", path = "src/net" }
|
||||||
garage_rpc = { version = "1.3.1", path = "src/rpc" }
|
garage_rpc = { version = "2.0.0", path = "src/rpc" }
|
||||||
garage_table = { version = "1.3.1", path = "src/table" }
|
garage_table = { version = "2.0.0", path = "src/table" }
|
||||||
garage_util = { version = "1.3.1", path = "src/util" }
|
garage_util = { version = "2.0.0", path = "src/util" }
|
||||||
garage_web = { version = "1.3.1", path = "src/web" }
|
garage_web = { version = "2.0.0", path = "src/web" }
|
||||||
k2v-client = { version = "0.0.4", path = "src/k2v-client" }
|
k2v-client = { version = "0.0.4", path = "src/k2v-client" }
|
||||||
|
|
||||||
# External crates from crates.io
|
# External crates from crates.io
|
||||||
|
|
@ -48,16 +48,18 @@ blake2 = "0.10"
|
||||||
bytes = "1.0"
|
bytes = "1.0"
|
||||||
bytesize = "1.1"
|
bytesize = "1.1"
|
||||||
cfg-if = "1.0"
|
cfg-if = "1.0"
|
||||||
chrono = "0.4"
|
chrono = { version = "0.4", features = ["serde"] }
|
||||||
crc32fast = "1.4"
|
crc32fast = "1.4"
|
||||||
crc32c = "0.6"
|
crc32c = "0.6"
|
||||||
|
crc64fast-nvme = "1.2"
|
||||||
crypto-common = "0.1"
|
crypto-common = "0.1"
|
||||||
|
err-derive = "0.3"
|
||||||
gethostname = "0.4"
|
gethostname = "0.4"
|
||||||
git-version = "0.3.4"
|
git-version = "0.3.4"
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
hexdump = "0.1"
|
hexdump = "0.1"
|
||||||
html-escape = "0.2.13"
|
|
||||||
hmac = "0.12"
|
hmac = "0.12"
|
||||||
|
idna = "0.5"
|
||||||
itertools = "0.12"
|
itertools = "0.12"
|
||||||
ipnet = "2.9.0"
|
ipnet = "2.9.0"
|
||||||
lazy_static = "1.4"
|
lazy_static = "1.4"
|
||||||
|
|
@ -65,8 +67,8 @@ md-5 = "0.10"
|
||||||
mktemp = "0.5"
|
mktemp = "0.5"
|
||||||
nix = { version = "0.29", default-features = false, features = ["fs"] }
|
nix = { version = "0.29", default-features = false, features = ["fs"] }
|
||||||
nom = "7.1"
|
nom = "7.1"
|
||||||
parking_lot = "0.12"
|
|
||||||
parse_duration = "2.1"
|
parse_duration = "2.1"
|
||||||
|
paste = "1.0"
|
||||||
pin-project = "1.0.12"
|
pin-project = "1.0.12"
|
||||||
pnet_datalink = "0.34"
|
pnet_datalink = "0.34"
|
||||||
rand = "0.8"
|
rand = "0.8"
|
||||||
|
|
@ -84,14 +86,12 @@ pretty_env_logger = "0.5"
|
||||||
structopt = { version = "0.3", default-features = false }
|
structopt = { version = "0.3", default-features = false }
|
||||||
syslog-tracing = "0.3"
|
syslog-tracing = "0.3"
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
tracing-journald = "0.3.1"
|
|
||||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||||
|
|
||||||
heed = { version = "0.11", default-features = false, features = ["lmdb"] }
|
heed = { version = "0.11", default-features = false, features = ["lmdb"] }
|
||||||
rusqlite = "0.37"
|
rusqlite = "0.31.0"
|
||||||
r2d2 = "0.8"
|
r2d2 = "0.8"
|
||||||
r2d2_sqlite = "0.31"
|
r2d2_sqlite = "0.24"
|
||||||
fjall = "2.4"
|
|
||||||
|
|
||||||
async-compression = { version = "0.4", features = ["tokio", "zstd"] }
|
async-compression = { version = "0.4", features = ["tokio", "zstd"] }
|
||||||
zstd = { version = "0.13", default-features = false }
|
zstd = { version = "0.13", default-features = false }
|
||||||
|
|
@ -102,6 +102,7 @@ serde = { version = "1.0", default-features = false, features = ["derive", "rc"]
|
||||||
serde_bytes = "0.11"
|
serde_bytes = "0.11"
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
toml = { version = "0.8", default-features = false, features = ["parse"] }
|
toml = { version = "0.8", default-features = false, features = ["parse"] }
|
||||||
|
utoipa = { version = "5.3.1", features = ["chrono"] }
|
||||||
|
|
||||||
# newer version requires rust edition 2021
|
# newer version requires rust edition 2021
|
||||||
k8s-openapi = { version = "0.21", features = ["v1_24"] }
|
k8s-openapi = { version = "0.21", features = ["v1_24"] }
|
||||||
|
|
@ -137,7 +138,7 @@ prometheus = "0.13"
|
||||||
aws-sigv4 = { version = "1.1", default-features = false }
|
aws-sigv4 = { version = "1.1", default-features = false }
|
||||||
hyper-rustls = { version = "0.26", default-features = false, features = ["http1", "http2", "ring", "rustls-native-certs"] }
|
hyper-rustls = { version = "0.26", default-features = false, features = ["http1", "http2", "ring", "rustls-native-certs"] }
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
thiserror = "2.0"
|
thiserror = "1.0"
|
||||||
|
|
||||||
# ---- used only as build / dev dependencies ----
|
# ---- used only as build / dev dependencies ----
|
||||||
assert-json-diff = "2.0"
|
assert-json-diff = "2.0"
|
||||||
|
|
@ -147,8 +148,12 @@ aws-smithy-runtime = { version = "1.8", default-features = false, features = ["t
|
||||||
aws-sdk-config = { version = "1.62", default-features = false }
|
aws-sdk-config = { version = "1.62", default-features = false }
|
||||||
aws-sdk-s3 = { version = "1.79", default-features = false, features = ["rt-tokio"] }
|
aws-sdk-s3 = { version = "1.79", default-features = false, features = ["rt-tokio"] }
|
||||||
|
|
||||||
|
[profile.dev]
|
||||||
|
#lto = "thin" # disabled for now, adds 2-4 min to each CI build
|
||||||
|
lto = "off"
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
lto = "thin"
|
lto = true
|
||||||
codegen-units = 16
|
codegen-units = 1
|
||||||
opt-level = 3
|
opt-level = "s"
|
||||||
strip = "debuginfo"
|
strip = true
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Garage Adminstration API v0</title>
|
<title>Garage adminstration API v0</title>
|
||||||
<!-- needed for adaptive design -->
|
<!-- needed for adaptive design -->
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Garage Adminstration API v0</title>
|
<title>Garage adminstration API v1</title>
|
||||||
<!-- needed for adaptive design -->
|
<!-- needed for adaptive design -->
|
||||||
<meta charset="utf-8"/>
|
<meta charset="utf-8"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
|
||||||
24
doc/api/garage-admin-v2.html
Normal file
24
doc/api/garage-admin-v2.html
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Garage adminstration API v2</title>
|
||||||
|
<!-- needed for adaptive design -->
|
||||||
|
<meta charset="utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<link href="./css/redoc.css" rel="stylesheet">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Redoc doesn't change outer page styles
|
||||||
|
-->
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<redoc spec-url='./garage-admin-v2.json'></redoc>
|
||||||
|
<script src="./redoc.standalone.js"> </script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
4331
doc/api/garage-admin-v2.json
Normal file
4331
doc/api/garage-admin-v2.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -12,7 +12,7 @@ In this section, we cover the following web applications:
|
||||||
| [Mastodon](#mastodon) | ✅ | Natively supported |
|
| [Mastodon](#mastodon) | ✅ | Natively supported |
|
||||||
| [Matrix](#matrix) | ✅ | Tested with `synapse-s3-storage-provider` |
|
| [Matrix](#matrix) | ✅ | Tested with `synapse-s3-storage-provider` |
|
||||||
| [ejabberd](#ejabberd) | ✅ | `mod_s3_upload` |
|
| [ejabberd](#ejabberd) | ✅ | `mod_s3_upload` |
|
||||||
| [Pixelfed](#pixelfed) | ✅ | Natively supported |
|
| [Pixelfed](#pixelfed) | ❓ | Not yet tested |
|
||||||
| [Pleroma](#pleroma) | ❓ | Not yet tested |
|
| [Pleroma](#pleroma) | ❓ | Not yet tested |
|
||||||
| [Lemmy](#lemmy) | ✅ | Supported with pict-rs |
|
| [Lemmy](#lemmy) | ✅ | Supported with pict-rs |
|
||||||
| [Funkwhale](#funkwhale) | ❓ | Not yet tested |
|
| [Funkwhale](#funkwhale) | ❓ | Not yet tested |
|
||||||
|
|
@ -69,7 +69,7 @@ $CONFIG = array(
|
||||||
'hostname' => '127.0.0.1', // Can also be a domain name, eg. garage.example.com
|
'hostname' => '127.0.0.1', // Can also be a domain name, eg. garage.example.com
|
||||||
'port' => 3900, // Put your reverse proxy port or your S3 API port
|
'port' => 3900, // Put your reverse proxy port or your S3 API port
|
||||||
'use_ssl' => false, // Set it to true if you have a TLS enabled reverse proxy
|
'use_ssl' => false, // Set it to true if you have a TLS enabled reverse proxy
|
||||||
'region' => 'garage', // Garage default region is named "garage", edit according to your cluster config
|
'region' => 'garage', // Garage has only one region named "garage"
|
||||||
'use_path_style' => true // Garage supports only path style, must be set to true
|
'use_path_style' => true // Garage supports only path style, must be set to true
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
@ -135,7 +135,7 @@ bucket but doesn't also know the secret encryption key.
|
||||||
*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.
|
||||||
In Configuration, put your bucket name (eg. nextcloud), the host (eg. 127.0.0.1), the port (eg. 3900 or 443), the region ("garage" if you use the default, or the one your configured in your `garage.toml`). Tick the SSL box if you have put an HTTPS proxy in front of garage. You must tick the "Path access" box and you must leave the "Legacy authentication (v2)" box empty. Put your Key ID (eg. GK...) and your Secret Key in the last two input boxes. Finally click on the tick symbol on the right of your screen.
|
In Configuration, put your bucket name (eg. nextcloud), the host (eg. 127.0.0.1), the port (eg. 3900 or 443), the region (garage). Tick the SSL box if you have put an HTTPS proxy in front of garage. You must tick the "Path access" box and you must leave the "Legacy authentication (v2)" box empty. Put your Key ID (eg. GK...) and your Secret Key in the last two input boxes. Finally click on the tick symbol on the right of your screen.
|
||||||
|
|
||||||
Now go to your "Files" app and a new "linked folder" has appeared with the name you chose earlier (eg. "shared").
|
Now go to your "Files" app and a new "linked folder" has appeared with the name you chose earlier (eg. "shared").
|
||||||
|
|
||||||
|
|
@ -191,10 +191,10 @@ garage key create peertube-key
|
||||||
|
|
||||||
Keep the Key ID and the Secret key in a pad, they will be needed later.
|
Keep the Key ID and the Secret key in a pad, they will be needed later.
|
||||||
|
|
||||||
We need two buckets, one for normal videos (named peertube-videos) and one for webtorrent videos (named peertube-playlists).
|
We need two buckets, one for normal videos (named peertube-video) and one for webtorrent videos (named peertube-playlist).
|
||||||
```bash
|
```bash
|
||||||
garage bucket create peertube-videos
|
garage bucket create peertube-videos
|
||||||
garage bucket create peertube-playlists
|
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:
|
||||||
|
|
@ -238,7 +238,7 @@ 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
|
||||||
|
|
||||||
# Garage default region is named "garage", edit according to your config
|
# Garage supports only one region for now, named garage
|
||||||
region: 'garage'
|
region: 'garage'
|
||||||
|
|
||||||
credentials:
|
credentials:
|
||||||
|
|
@ -253,7 +253,7 @@ object_storage:
|
||||||
proxify_private_files: false
|
proxify_private_files: false
|
||||||
|
|
||||||
streaming_playlists:
|
streaming_playlists:
|
||||||
bucket_name: 'peertube-playlists'
|
bucket_name: 'peertube-playlist'
|
||||||
|
|
||||||
# Keep it empty for our example
|
# Keep it empty for our example
|
||||||
prefix: ''
|
prefix: ''
|
||||||
|
|
@ -441,7 +441,7 @@ media_storage_providers:
|
||||||
store_synchronous: True # do we want to wait that the file has been written before returning?
|
store_synchronous: True # do we want to wait that the file has been written before returning?
|
||||||
config:
|
config:
|
||||||
bucket: matrix # the name of our bucket, we chose matrix earlier
|
bucket: matrix # the name of our bucket, we chose matrix earlier
|
||||||
region_name: garage # "garage" by default, edit according to your cluster config
|
region_name: garage # only "garage" is supported for the region field
|
||||||
endpoint_url: http://localhost:3900 # the path to the S3 endpoint
|
endpoint_url: http://localhost:3900 # the path to the S3 endpoint
|
||||||
access_key_id: "GKxxx" # your Key ID
|
access_key_id: "GKxxx" # your Key ID
|
||||||
secret_access_key: "xxxx" # your Secret Key
|
secret_access_key: "xxxx" # your Secret Key
|
||||||
|
|
|
||||||
|
|
@ -161,49 +161,3 @@ kopia repository validate-provider
|
||||||
|
|
||||||
You can then run all the standard kopia commands: `kopia snapshot create`, `kopia mount`...
|
You can then run all the standard kopia commands: `kopia snapshot create`, `kopia mount`...
|
||||||
Everything should work out-of-the-box.
|
Everything should work out-of-the-box.
|
||||||
|
|
||||||
## Plakar
|
|
||||||
|
|
||||||
Create your key and bucket on Garage server:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
garage key create my-plakar-key
|
|
||||||
garage bucket create plakar-backups
|
|
||||||
garage bucket allow plakar-backups --read --write --key my-plakar-key
|
|
||||||
…
|
|
||||||
```
|
|
||||||
|
|
||||||
On Plakar server, add your Garage as a storage location:
|
|
||||||
```bash
|
|
||||||
plakar store add garageS3 s3://my-garage.tld/plakar-backups \
|
|
||||||
region=garage # Or as you've specified in garage.toml \
|
|
||||||
access_key=<Key ID from "garage key info my-plakar-key"> \
|
|
||||||
secret_access_key=<Secret key from "garage key info my-plakar-key">
|
|
||||||
```
|
|
||||||
|
|
||||||
Then create the repository.
|
|
||||||
```bash
|
|
||||||
plakar at @garageS3 create -plaintext # Unencrypted
|
|
||||||
# or
|
|
||||||
plakar at @garageS3 create #encrypted
|
|
||||||
```
|
|
||||||
|
|
||||||
If you encrypt your backups (Plakar default), you will need to define a strong passphrase. Do not forget to save your password safely. It will be needed to decrypt your backups.
|
|
||||||
|
|
||||||
|
|
||||||
After the repository has been created, check that everything works as expected (that might give an empty result as no file has been added yet, but no error message):
|
|
||||||
```bash
|
|
||||||
plakar at @garageS3 check
|
|
||||||
```
|
|
||||||
|
|
||||||
Now that everything is configure, you can use Garage as your backups storage. For instance sync it with a local backup storage:
|
|
||||||
```bash
|
|
||||||
$ plakar at ~/backups sync to @garageS3
|
|
||||||
```
|
|
||||||
|
|
||||||
Or list the S3 storage content:
|
|
||||||
```bash
|
|
||||||
$ plakar at @garageS3 ls
|
|
||||||
```
|
|
||||||
|
|
||||||
More information in Plakar documentation: https://www.plakar.io/docs/main/quickstart/
|
|
||||||
|
|
|
||||||
|
|
@ -8,18 +8,18 @@ have published Ansible roles. We list them and compare them below.
|
||||||
|
|
||||||
## Comparison of Ansible roles
|
## Comparison of Ansible roles
|
||||||
|
|
||||||
| Feature | [ansible-role-garage](#zorun-ansible-role-garage) | [garage-docker-ansible-deploy](#moan0s-garage-docker-ansible-deploy) | [eddster ansible-role-garage](#eddster-ansible-role-garage) |
|
| Feature | [ansible-role-garage](#zorun-ansible-role-garage) | [garage-docker-ansible-deploy](#moan0s-garage-docker-ansible-deploy) |
|
||||||
|------------------------------------|---------------------------------------------|---------------------------------------------------------------|---------------------------------|
|
|------------------------------------|---------------------------------------------|---------------------------------------------------------------|
|
||||||
| **Runtime** | Systemd | Docker | Systemd |
|
| **Runtime** | Systemd | Docker |
|
||||||
| **Target OS** | Any Linux | Any Linux | Any Linux |
|
| **Target OS** | Any Linux | Any Linux |
|
||||||
| **Architecture** | amd64, arm64, i686 | amd64, arm64 | arm64, arm, 386, amd64 |
|
| **Architecture** | amd64, arm64, i686 | amd64, arm64 |
|
||||||
| **Additional software** | None | Traefik | Ngnix and Keepalived (optional) |
|
| **Additional software** | None | Traefik |
|
||||||
| **Automatic node connection** | ❌ | ✅ | ✅ |
|
| **Automatic node connection** | ❌ | ✅ |
|
||||||
| **Layout management** | ❌ | ✅ | ✅ |
|
| **Layout management** | ❌ | ✅ |
|
||||||
| **Manage buckets & keys** | ❌ | ✅ (basic) | ✅ |
|
| **Manage buckets & keys** | ❌ | ✅ (basic) |
|
||||||
| **Allow custom Garage config** | ✅ | ❌ | ❌ |
|
| **Allow custom Garage config** | ✅ | ❌ |
|
||||||
| **Facilitate Garage upgrades** | ✅ | ❌ | ✅ |
|
| **Facilitate Garage upgrades** | ✅ | ❌ |
|
||||||
| **Multiple instances on one host** | ✅ | ✅ | ❌ |
|
| **Multiple instances on one host** | ✅ | ✅ |
|
||||||
|
|
||||||
|
|
||||||
## zorun/ansible-role-garage
|
## zorun/ansible-role-garage
|
||||||
|
|
@ -49,15 +49,3 @@ structured DNS names, etc).
|
||||||
|
|
||||||
As a result, this role makes it easier to start with Garage on Ansible,
|
As a result, this role makes it easier to start with Garage on Ansible,
|
||||||
but is less flexible.
|
but is less flexible.
|
||||||
|
|
||||||
## eddster2309/ansible-role-garage
|
|
||||||
|
|
||||||
[Source code](https://github.com/eddster2309/ansible-role-garage), [Ansible galaxy](https://galaxy.ansible.com/ui/standalone/roles/eddster2309/garage/)
|
|
||||||
|
|
||||||
This role is a opinionated but customisable role using the official Garage
|
|
||||||
static binaries and only requires Systemd. As such it should work on any
|
|
||||||
Linux based host. It includes all the nesscary configuration to
|
|
||||||
automatically setup a clustered Garage deployment. Most Garage
|
|
||||||
configuration options are exposed through Ansible variables so while you
|
|
||||||
can't provide a custom config you can get very close. It can optionally
|
|
||||||
installed a HA nginx deployment with Keepalived.
|
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,9 @@ Alpine Linux repositories (available since v3.17):
|
||||||
apk add garage
|
apk add garage
|
||||||
```
|
```
|
||||||
|
|
||||||
The default configuration file is installed to `/etc/garage/garage.toml`. You can run
|
The default configuration file is installed to `/etc/garage.toml`. You can run
|
||||||
Garage using: `rc-service garage start`.
|
Garage using: `rc-service garage start`. If you don't specify `rpc_secret`, it
|
||||||
|
will be automatically replaced with a random string on the first start.
|
||||||
If you don't specify `rpc_secret`, it will be automatically replaced with a random string on the first start.
|
|
||||||
|
|
||||||
Please note that this package is built without Consul discovery, Kubernetes
|
Please note that this package is built without Consul discovery, Kubernetes
|
||||||
discovery, OpenTelemetry exporter, and K2V features (K2V will be enabled once
|
discovery, OpenTelemetry exporter, and K2V features (K2V will be enabled once
|
||||||
|
|
@ -27,7 +26,7 @@ it's stable).
|
||||||
|
|
||||||
## Arch Linux
|
## Arch Linux
|
||||||
|
|
||||||
Garage is available in the official repositories under [extra](https://archlinux.org/packages/extra/x86_64/garage).
|
Garage is available in the [AUR](https://aur.archlinux.org/packages/garage).
|
||||||
|
|
||||||
## FreeBSD
|
## FreeBSD
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Firstly clone the repository:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://git.deuxfleurs.fr/Deuxfleurs/garage
|
git clone https://git.deuxfleurs.fr/Deuxfleurs/garage
|
||||||
cd garage/script/helm
|
cd garage/scripts/helm
|
||||||
```
|
```
|
||||||
|
|
||||||
Deploy with default options:
|
Deploy with default options:
|
||||||
|
|
@ -26,13 +26,6 @@ Or deploy with custom values:
|
||||||
helm install --create-namespace --namespace garage garage ./garage -f values.override.yaml
|
helm install --create-namespace --namespace garage garage ./garage -f values.override.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
If you want to manage the CustomRessourceDefinition used by garage for its `kubernetes_discovery` outside of the helm chart, add `garage.kubernetesSkipCrd: true` to your custom values and use the kustomization before deploying the helm chart:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
kubectl apply -k ../k8s/crd
|
|
||||||
helm install --create-namespace --namespace garage garage ./garage -f values.override.yaml
|
|
||||||
```
|
|
||||||
|
|
||||||
After deploying, cluster layout must be configured manually as described in [Creating a cluster layout](@/documentation/quick-start/_index.md#creating-a-cluster-layout). Use the following command to access garage CLI:
|
After deploying, cluster layout must be configured manually as described in [Creating a cluster layout](@/documentation/quick-start/_index.md#creating-a-cluster-layout). Use the following command to access garage CLI:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
|
||||||
|
|
@ -96,14 +96,14 @@ to store 2 TB of data in total.
|
||||||
## Get a Docker image
|
## Get a Docker image
|
||||||
|
|
||||||
Our docker image is currently named `dxflrs/garage` and is stored on the [Docker Hub](https://hub.docker.com/r/dxflrs/garage/tags?page=1&ordering=last_updated).
|
Our docker image is currently named `dxflrs/garage` and is stored on the [Docker Hub](https://hub.docker.com/r/dxflrs/garage/tags?page=1&ordering=last_updated).
|
||||||
We encourage you to use a fixed tag (eg. `v1.3.0`) and not the `latest` tag.
|
We encourage you to use a fixed tag (eg. `v2.0.0`) and not the `latest` tag.
|
||||||
For this example, we will use the latest published version at the time of the writing which is `v1.3.0` but it's up to you
|
For this example, we will use the latest published version at the time of the writing which is `v2.0.0` but it's up to you
|
||||||
to check [the most recent versions on the Docker Hub](https://hub.docker.com/r/dxflrs/garage/tags?page=1&ordering=last_updated).
|
to check [the most recent versions on the Docker Hub](https://hub.docker.com/r/dxflrs/garage/tags?page=1&ordering=last_updated).
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo docker pull dxflrs/garage:v1.3.0
|
sudo docker pull dxflrs/garage:v2.0.0
|
||||||
```
|
```
|
||||||
|
|
||||||
## Deploying and configuring Garage
|
## Deploying and configuring Garage
|
||||||
|
|
@ -171,7 +171,7 @@ docker run \
|
||||||
-v /etc/garage.toml:/etc/garage.toml \
|
-v /etc/garage.toml:/etc/garage.toml \
|
||||||
-v /var/lib/garage/meta:/var/lib/garage/meta \
|
-v /var/lib/garage/meta:/var/lib/garage/meta \
|
||||||
-v /var/lib/garage/data:/var/lib/garage/data \
|
-v /var/lib/garage/data:/var/lib/garage/data \
|
||||||
dxflrs/garage:v1.3.0
|
dxflrs/garage:v2.0.0
|
||||||
```
|
```
|
||||||
|
|
||||||
With this command line, Garage should be started automatically at each boot.
|
With this command line, Garage should be started automatically at each boot.
|
||||||
|
|
@ -185,7 +185,7 @@ If you want to use `docker-compose`, you may use the following `docker-compose.y
|
||||||
version: "3"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
garage:
|
garage:
|
||||||
image: dxflrs/garage:v1.3.0
|
image: dxflrs/garage:v2.0.0
|
||||||
network_mode: "host"
|
network_mode: "host"
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,6 @@ StateDirectory=garage
|
||||||
DynamicUser=true
|
DynamicUser=true
|
||||||
ProtectHome=true
|
ProtectHome=true
|
||||||
NoNewPrivileges=true
|
NoNewPrivileges=true
|
||||||
LimitNOFILE=42000
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
|
||||||
|
|
@ -129,10 +129,10 @@ docker run \
|
||||||
-d \
|
-d \
|
||||||
--name garaged \
|
--name garaged \
|
||||||
-p 3900:3900 -p 3901:3901 -p 3902:3902 -p 3903:3903 \
|
-p 3900:3900 -p 3901:3901 -p 3902:3902 -p 3903:3903 \
|
||||||
-v /path/to/garage.toml:/etc/garage.toml \
|
-v /etc/garage.toml:/path/to/garage.toml \
|
||||||
-v /path/to/garage/meta:/var/lib/garage/meta \
|
-v /var/lib/garage/meta:/path/to/garage/meta \
|
||||||
-v /path/to/garage/data:/var/lib/garage/data \
|
-v /var/lib/garage/data:/path/to/garage/data \
|
||||||
dxflrs/garage:v1.3.0
|
dxflrs/garage:v2.0.0
|
||||||
```
|
```
|
||||||
|
|
||||||
Under Linux, you can substitute `--network host` for `-p 3900:3900 -p 3901:3901 -p 3902:3902 -p 3903:3903`
|
Under Linux, you can substitute `--network host` for `-p 3900:3900 -p 3901:3901 -p 3902:3902 -p 3903:3903`
|
||||||
|
|
@ -182,12 +182,11 @@ ID Hostname Address Tag Zone Capacit
|
||||||
## Creating a cluster layout
|
## Creating a cluster layout
|
||||||
|
|
||||||
Creating a cluster layout for a Garage deployment means informing Garage
|
Creating a cluster layout for a Garage deployment means informing Garage
|
||||||
of the disk space available on each node of the cluster, `-c`,
|
of the disk space available on each node of the cluster
|
||||||
as well as the name of the zone (e.g. datacenter), `-z`, each machine is located in.
|
as well as the zone (e.g. datacenter) each machine is located in.
|
||||||
|
|
||||||
For our test deployment, we are have only one node with zone named `dc1` and a
|
For our test deployment, we are using only one node. The way in which we configure
|
||||||
capacity of `1G`, though the capacity is ignored for a single node deployment
|
it does not matter, you can simply write:
|
||||||
and can be changed later when adding new nodes.
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
garage layout assign -z dc1 -c 1G <node_id>
|
garage layout assign -z dc1 -c 1G <node_id>
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,7 @@ db_engine = "lmdb"
|
||||||
|
|
||||||
block_size = "1M"
|
block_size = "1M"
|
||||||
block_ram_buffer_max = "256MiB"
|
block_ram_buffer_max = "256MiB"
|
||||||
block_max_concurrent_reads = 16
|
|
||||||
block_max_concurrent_writes_per_request =10
|
|
||||||
lmdb_map_size = "1T"
|
lmdb_map_size = "1T"
|
||||||
|
|
||||||
compression_level = 1
|
compression_level = 1
|
||||||
|
|
@ -47,7 +46,6 @@ bootstrap_peers = [
|
||||||
"212fd62eeaca72c122b45a7f4fa0f55e012aa5e24ac384a72a3016413fa724ff@[fc00:F::1]:3901",
|
"212fd62eeaca72c122b45a7f4fa0f55e012aa5e24ac384a72a3016413fa724ff@[fc00:F::1]:3901",
|
||||||
]
|
]
|
||||||
|
|
||||||
allow_punycode = false
|
|
||||||
|
|
||||||
[consul_discovery]
|
[consul_discovery]
|
||||||
api = "catalog"
|
api = "catalog"
|
||||||
|
|
@ -82,6 +80,7 @@ add_host_to_metrics = true
|
||||||
[admin]
|
[admin]
|
||||||
api_bind_addr = "0.0.0.0:3903"
|
api_bind_addr = "0.0.0.0:3903"
|
||||||
metrics_token = "BCAdFjoa9G0KJR0WXnHHm7fs1ZAbfpI8iIZ+Z/a2NgI="
|
metrics_token = "BCAdFjoa9G0KJR0WXnHHm7fs1ZAbfpI8iIZ+Z/a2NgI="
|
||||||
|
metrics_require_token = true
|
||||||
admin_token = "UkLeGWEvHnXBqnueR3ISEMWpOnm40jH2tM2HnnL/0F4="
|
admin_token = "UkLeGWEvHnXBqnueR3ISEMWpOnm40jH2tM2HnnL/0F4="
|
||||||
trace_sink = "http://localhost:4317"
|
trace_sink = "http://localhost:4317"
|
||||||
```
|
```
|
||||||
|
|
@ -94,32 +93,29 @@ The following gives details about each available configuration option.
|
||||||
|
|
||||||
[Environment variables](#env_variables).
|
[Environment variables](#env_variables).
|
||||||
|
|
||||||
Top-level configuration options, in alphabetical order:
|
Top-level configuration options:
|
||||||
[`allow_punycode`](#allow_punycode),
|
|
||||||
[`allow_world_readable_secrets`](#allow_world_readable_secrets),
|
[`allow_world_readable_secrets`](#allow_world_readable_secrets),
|
||||||
[`block_max_concurrent_reads`](`block_max_concurrent_reads),
|
|
||||||
[`block_ram_buffer_max`](#block_ram_buffer_max),
|
[`block_ram_buffer_max`](#block_ram_buffer_max),
|
||||||
[`block_max_concurrent_writes_per_request`](#block_max_concurrent_writes_per_request),
|
|
||||||
[`block_size`](#block_size),
|
[`block_size`](#block_size),
|
||||||
[`bootstrap_peers`](#bootstrap_peers),
|
[`bootstrap_peers`](#bootstrap_peers),
|
||||||
[`compression_level`](#compression_level),
|
[`compression_level`](#compression_level),
|
||||||
[`consistency_mode`](#consistency_mode),
|
|
||||||
[`data_dir`](#data_dir),
|
[`data_dir`](#data_dir),
|
||||||
[`data_fsync`](#data_fsync),
|
[`data_fsync`](#data_fsync),
|
||||||
[`db_engine`](#db_engine),
|
[`db_engine`](#db_engine),
|
||||||
[`disable_scrub`](#disable_scrub),
|
[`disable_scrub`](#disable_scrub),
|
||||||
|
[`use_local_tz`](#use_local_tz),
|
||||||
[`lmdb_map_size`](#lmdb_map_size),
|
[`lmdb_map_size`](#lmdb_map_size),
|
||||||
[`metadata_auto_snapshot_interval`](#metadata_auto_snapshot_interval),
|
[`metadata_auto_snapshot_interval`](#metadata_auto_snapshot_interval),
|
||||||
[`metadata_dir`](#metadata_dir),
|
[`metadata_dir`](#metadata_dir),
|
||||||
[`metadata_fsync`](#metadata_fsync),
|
[`metadata_fsync`](#metadata_fsync),
|
||||||
[`metadata_snapshots_dir`](#metadata_snapshots_dir),
|
[`metadata_snapshots_dir`](#metadata_snapshots_dir),
|
||||||
[`replication_factor`](#replication_factor),
|
[`replication_factor`](#replication_factor),
|
||||||
|
[`consistency_mode`](#consistency_mode),
|
||||||
[`rpc_bind_addr`](#rpc_bind_addr),
|
[`rpc_bind_addr`](#rpc_bind_addr),
|
||||||
[`rpc_bind_outgoing`](#rpc_bind_outgoing),
|
[`rpc_bind_outgoing`](#rpc_bind_outgoing),
|
||||||
[`rpc_public_addr`](#rpc_public_addr),
|
[`rpc_public_addr`](#rpc_public_addr),
|
||||||
[`rpc_public_addr_subnet`](#rpc_public_addr_subnet)
|
[`rpc_public_addr_subnet`](#rpc_public_addr_subnet)
|
||||||
[`rpc_secret`/`rpc_secret_file`](#rpc_secret),
|
[`rpc_secret`/`rpc_secret_file`](#rpc_secret).
|
||||||
[`use_local_tz`](#use_local_tz).
|
|
||||||
|
|
||||||
The `[consul_discovery]` section:
|
The `[consul_discovery]` section:
|
||||||
[`api`](#consul_api),
|
[`api`](#consul_api),
|
||||||
|
|
@ -150,23 +146,20 @@ The `[s3_web]` section:
|
||||||
|
|
||||||
The `[admin]` section:
|
The `[admin]` section:
|
||||||
[`api_bind_addr`](#admin_api_bind_addr),
|
[`api_bind_addr`](#admin_api_bind_addr),
|
||||||
|
[`metrics_require_token`](#admin_metrics_require_token),
|
||||||
[`metrics_token`/`metrics_token_file`](#admin_metrics_token),
|
[`metrics_token`/`metrics_token_file`](#admin_metrics_token),
|
||||||
[`admin_token`/`admin_token_file`](#admin_token),
|
[`admin_token`/`admin_token_file`](#admin_token),
|
||||||
[`trace_sink`](#admin_trace_sink),
|
[`trace_sink`](#admin_trace_sink),
|
||||||
|
|
||||||
### Environment variables {#env_variables}
|
### Environment variables {#env_variables}
|
||||||
|
|
||||||
The following configuration parameters must be specified as environment variables,
|
The following configuration parameter must be specified as an environment
|
||||||
they do not exist in the configuration file:
|
variable, it does not exist in the configuration file:
|
||||||
|
|
||||||
- `GARAGE_LOG_TO_SYSLOG` (since `v0.9.4`): set this to `1` or `true` to make the
|
- `GARAGE_LOG_TO_SYSLOG` (since `v0.9.4`): set this to `1` or `true` to make the
|
||||||
Garage daemon send its logs to `syslog` (using the libc `syslog` function)
|
Garage daemon send its logs to `syslog` (using the libc `syslog` function)
|
||||||
instead of printing to stderr.
|
instead of printing to stderr.
|
||||||
|
|
||||||
- `GARAGE_LOG_TO_JOURNALD` (since `v1.2.0`): set this to `1` or `true` to make the
|
|
||||||
Garage daemon send its logs to `journald` (using the native protocol of `systemd-journald`)
|
|
||||||
instead of printing to stderr.
|
|
||||||
|
|
||||||
The following environment variables can be used to override the corresponding
|
The following environment variables can be used to override the corresponding
|
||||||
values in the configuration file:
|
values in the configuration file:
|
||||||
|
|
||||||
|
|
@ -178,7 +171,7 @@ values in the configuration file:
|
||||||
|
|
||||||
### Top-level configuration options
|
### Top-level configuration options
|
||||||
|
|
||||||
#### `replication_factor` (since `v1.0.0`) {#replication_factor}
|
#### `replication_factor` {#replication_factor}
|
||||||
|
|
||||||
The replication factor can be any positive integer smaller or equal the node count in your cluster.
|
The replication factor can be any positive integer smaller or equal the node count in your cluster.
|
||||||
The chosen replication factor has a big impact on the cluster's failure tolerancy and performance characteristics.
|
The chosen replication factor has a big impact on the cluster's failure tolerancy and performance characteristics.
|
||||||
|
|
@ -226,7 +219,7 @@ is in progress. In theory, no data should be lost as rebalancing is a
|
||||||
routine operation for Garage, although we cannot guarantee you that everything
|
routine operation for Garage, although we cannot guarantee you that everything
|
||||||
will go right in such an extreme scenario.
|
will go right in such an extreme scenario.
|
||||||
|
|
||||||
#### `consistency_mode` (since `v1.0.0`) {#consistency_mode}
|
#### `consistency_mode` {#consistency_mode}
|
||||||
|
|
||||||
The consistency mode setting determines the read and write behaviour of your cluster.
|
The consistency mode setting determines the read and write behaviour of your cluster.
|
||||||
|
|
||||||
|
|
@ -336,7 +329,6 @@ Since `v0.8.0`, Garage can use alternative storage backends as follows:
|
||||||
| --------- | ----------------- | ------------- |
|
| --------- | ----------------- | ------------- |
|
||||||
| [LMDB](https://www.symas.com/lmdb) (since `v0.8.0`, default since `v0.9.0`) | `"lmdb"` | `<metadata_dir>/db.lmdb/` |
|
| [LMDB](https://www.symas.com/lmdb) (since `v0.8.0`, default since `v0.9.0`) | `"lmdb"` | `<metadata_dir>/db.lmdb/` |
|
||||||
| [Sqlite](https://sqlite.org) (since `v0.8.0`) | `"sqlite"` | `<metadata_dir>/db.sqlite` |
|
| [Sqlite](https://sqlite.org) (since `v0.8.0`) | `"sqlite"` | `<metadata_dir>/db.sqlite` |
|
||||||
| [Fjall](https://github.com/fjall-rs/fjall) (**experimental support** since `v1.3.0`) | `"fjall"` | `<metadata_dir>/db.fjall/` |
|
|
||||||
| [Sled](https://sled.rs) (old default, removed since `v1.0`) | `"sled"` | `<metadata_dir>/db/` |
|
| [Sled](https://sled.rs) (old default, removed since `v1.0`) | `"sled"` | `<metadata_dir>/db/` |
|
||||||
|
|
||||||
Sled was supported until Garage v0.9.x, and was removed in Garage v1.0.
|
Sled was supported until Garage v0.9.x, and was removed in Garage v1.0.
|
||||||
|
|
@ -373,14 +365,6 @@ LMDB works very well, but is known to have the following limitations:
|
||||||
so it is not the best choice for high-performance storage clusters,
|
so it is not the best choice for high-performance storage clusters,
|
||||||
but it should work fine in many cases.
|
but it should work fine in many cases.
|
||||||
|
|
||||||
- Fjall: a storage engine based on LSM trees, which theoretically allow for
|
|
||||||
higher write throughput than other storage engines that are based on B-trees.
|
|
||||||
Using Fjall could potentially improve Garage's performance significantly in
|
|
||||||
write-heavy workloads. **Support for Fjall is experimental at this point**,
|
|
||||||
we have added it to Garage for evaluation purposes only. **Do not use it for
|
|
||||||
production-critical workloads.**
|
|
||||||
|
|
||||||
|
|
||||||
It is possible to convert Garage's metadata directory from one format to another
|
It is possible to convert Garage's metadata directory from one format to another
|
||||||
using the `garage convert-db` command, which should be used as follows:
|
using the `garage convert-db` command, which should be used as follows:
|
||||||
|
|
||||||
|
|
@ -418,7 +402,6 @@ Here is how this option impacts the different database engines:
|
||||||
|----------|------------------------------------|-------------------------------|
|
|----------|------------------------------------|-------------------------------|
|
||||||
| Sqlite | `PRAGMA synchronous = OFF` | `PRAGMA synchronous = NORMAL` |
|
| Sqlite | `PRAGMA synchronous = OFF` | `PRAGMA synchronous = NORMAL` |
|
||||||
| LMDB | `MDB_NOMETASYNC` + `MDB_NOSYNC` | `MDB_NOMETASYNC` |
|
| LMDB | `MDB_NOMETASYNC` + `MDB_NOSYNC` | `MDB_NOMETASYNC` |
|
||||||
| Fjall | default options | not supported |
|
|
||||||
|
|
||||||
Note that the Sqlite database is always ran in `WAL` mode (`PRAGMA journal_mode = WAL`).
|
Note that the Sqlite database is always ran in `WAL` mode (`PRAGMA journal_mode = WAL`).
|
||||||
|
|
||||||
|
|
@ -525,37 +508,6 @@ node.
|
||||||
|
|
||||||
The default value is 256MiB.
|
The default value is 256MiB.
|
||||||
|
|
||||||
#### `block_max_concurrent_reads` (since `v1.3.0` / `v2.1.0`) {#block_max_concurrent_reads}
|
|
||||||
|
|
||||||
The maximum number of blocks (individual files in the data directory) open
|
|
||||||
simultaneously for reading.
|
|
||||||
|
|
||||||
Reducing this number does not limit the number of data blocks that can be
|
|
||||||
transferred through the network simultaneously. This mechanism was just added
|
|
||||||
as a backpressure mechanism for HDD read speed: it helps avoid a situation
|
|
||||||
where too many requests are coming in and Garage is reading too many block
|
|
||||||
files simultaneously, thus not making timely progress on any of the reads.
|
|
||||||
|
|
||||||
When a request to read a data block comes in through the network, the requests
|
|
||||||
awaits for one of the `block_max_concurrent_reads` slots to be available
|
|
||||||
(internally implemented using a Semaphore object). Once it acquired a read
|
|
||||||
slot, it reads the entire block file to RAM and frees the slot as soon as the
|
|
||||||
block file is finished reading. Only after the slot is released will the
|
|
||||||
block's data start being transferred over the network. If the request fails to
|
|
||||||
acquire a reading slot wihtin 15 seconds, it fails with a timeout error.
|
|
||||||
Timeout events can be monitored through the `block_read_semaphore_timeouts`
|
|
||||||
metric in Prometheus: a non-zero number of such events indicates an I/O
|
|
||||||
bottleneck on HDD read speed.
|
|
||||||
|
|
||||||
|
|
||||||
#### `block_max_concurrent_writes_per_request` (since `v2.1.0`) {#block_max_concurrent_writes_per_request}
|
|
||||||
|
|
||||||
This parameter is designed to adapt to the concurrent write performance of
|
|
||||||
different storage media.Maximum number of parallel block writes per put request
|
|
||||||
Higher values improve throughput but increase memory usage.
|
|
||||||
|
|
||||||
Default: 3, Recommended: 10-30 for NVMe, 3-10 for HDD
|
|
||||||
|
|
||||||
#### `lmdb_map_size` {#lmdb_map_size}
|
#### `lmdb_map_size` {#lmdb_map_size}
|
||||||
|
|
||||||
This parameters can be used to set the map size used by LMDB,
|
This parameters can be used to set the map size used by LMDB,
|
||||||
|
|
@ -654,7 +606,7 @@ 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.
|
||||||
|
|
||||||
#### `allow_world_readable_secrets` or `GARAGE_ALLOW_WORLD_READABLE_SECRETS` (env) {#allow_world_readable_secrets}
|
### `allow_world_readable_secrets` or `GARAGE_ALLOW_WORLD_READABLE_SECRETS` (env) {#allow_world_readable_secrets}
|
||||||
|
|
||||||
Garage checks the permissions of your secret files to make sure they're not
|
Garage checks the permissions of your secret files to make sure they're not
|
||||||
world-readable. In some cases, the check might fail and consider your files as
|
world-readable. In some cases, the check might fail and consider your files as
|
||||||
|
|
@ -666,13 +618,6 @@ permission verification.
|
||||||
Alternatively, you can set the `GARAGE_ALLOW_WORLD_READABLE_SECRETS`
|
Alternatively, you can set the `GARAGE_ALLOW_WORLD_READABLE_SECRETS`
|
||||||
environment variable to `true` to bypass the permissions check.
|
environment variable to `true` to bypass the permissions check.
|
||||||
|
|
||||||
#### `allow_punycode` {#allow_punycode}
|
|
||||||
|
|
||||||
Allow creating buckets with names containing punycode. When used for buckets served
|
|
||||||
as websites, this allows using almost any unicode character in the domain name.
|
|
||||||
|
|
||||||
Default to `false`.
|
|
||||||
|
|
||||||
### The `[consul_discovery]` section
|
### The `[consul_discovery]` section
|
||||||
|
|
||||||
Garage supports discovering other nodes of the cluster using Consul. For this
|
Garage supports discovering other nodes of the cluster using Consul. For this
|
||||||
|
|
@ -824,10 +769,34 @@ See [administration API reference](@/documentation/reference-manual/admin-api.md
|
||||||
Alternatively, since `v0.8.5`, a path can be used to create a unix socket. Note that for security reasons,
|
Alternatively, since `v0.8.5`, a path can be used to create a unix socket. Note that for security reasons,
|
||||||
the socket will have 0220 mode. Make sure to set user and group permissions accordingly.
|
the socket will have 0220 mode. Make sure to set user and group permissions accordingly.
|
||||||
|
|
||||||
|
#### `admin_token`, `admin_token_file` or `GARAGE_ADMIN_TOKEN`, `GARAGE_ADMIN_TOKEN_FILE` (env) {#admin_token}
|
||||||
|
|
||||||
|
The token for accessing all administration functions on the admin endpoint,
|
||||||
|
with the exception of the metrics endpoint (see `metrics_token`).
|
||||||
|
|
||||||
|
You can use any random string for this value. We recommend generating a random
|
||||||
|
token with `openssl rand -base64 32`.
|
||||||
|
|
||||||
|
For Garage version earlier than `v2.0`, if this token is not set,
|
||||||
|
access to these endpoints is disabled entirely.
|
||||||
|
|
||||||
|
Since Garage `v2.0`, additional admin API tokens can be defined dynamically
|
||||||
|
in your Garage cluster using administration commands. This new admin token system
|
||||||
|
is more flexible since it allows admin tokens to have an expiration date,
|
||||||
|
and to have a scope restricted to certain admin API functions. If `admin_token`
|
||||||
|
is set, it behaves as an admin token without expiration and with full scope.
|
||||||
|
Otherwise, only admin API tokens defined dynamically can be used.
|
||||||
|
|
||||||
|
`admin_token` was introduced in Garage `v0.7.2`.
|
||||||
|
`admin_token_file` and the `GARAGE_ADMIN_TOKEN` environment variable are supported since Garage `v0.8.2`.
|
||||||
|
|
||||||
|
`GARAGE_ADMIN_TOKEN_FILE` is supported since `v0.8.5` / `v0.9.1`.
|
||||||
|
|
||||||
#### `metrics_token`, `metrics_token_file` or `GARAGE_METRICS_TOKEN`, `GARAGE_METRICS_TOKEN_FILE` (env) {#admin_metrics_token}
|
#### `metrics_token`, `metrics_token_file` or `GARAGE_METRICS_TOKEN`, `GARAGE_METRICS_TOKEN_FILE` (env) {#admin_metrics_token}
|
||||||
|
|
||||||
The token for accessing the Metrics endpoint. If this token is not set, the
|
The token for accessing the Prometheus metrics endpoint (`/metrics`).
|
||||||
Metrics endpoint can be accessed without access control.
|
If this token is not set, and unless `metrics_require_token` is set to `true`,
|
||||||
|
the metrics endpoint can be accessed without access control.
|
||||||
|
|
||||||
You can use any random string for this value. We recommend generating a random token with `openssl rand -base64 32`.
|
You can use any random string for this value. We recommend generating a random token with `openssl rand -base64 32`.
|
||||||
|
|
||||||
|
|
@ -836,17 +805,12 @@ You can use any random string for this value. We recommend generating a random t
|
||||||
|
|
||||||
`GARAGE_METRICS_TOKEN_FILE` is supported since `v0.8.5` / `v0.9.1`.
|
`GARAGE_METRICS_TOKEN_FILE` is supported since `v0.8.5` / `v0.9.1`.
|
||||||
|
|
||||||
#### `admin_token`, `admin_token_file` or `GARAGE_ADMIN_TOKEN`, `GARAGE_ADMIN_TOKEN_FILE` (env) {#admin_token}
|
#### `metrics_require_token` (since `v2.0.0`) {#admin_metrics_require_token}
|
||||||
|
|
||||||
The token for accessing all of the other administration endpoints. If this
|
If this is set to `true`, accessing the metrics endpoint will always require
|
||||||
token is not set, access to these endpoints is disabled entirely.
|
an access token. Valid tokens include the `metrics_token` if it is set,
|
||||||
|
and admin API token defined dynamicaly in Garage which have
|
||||||
You can use any random string for this value. We recommend generating a random token with `openssl rand -base64 32`.
|
the `Metrics` endpoint in their scope.
|
||||||
|
|
||||||
`admin_token` was introduced in Garage `v0.7.2`.
|
|
||||||
`admin_token_file` and the `GARAGE_ADMIN_TOKEN` environment variable are supported since Garage `v0.8.2`.
|
|
||||||
|
|
||||||
`GARAGE_ADMIN_TOKEN_FILE` is supported since `v0.8.5` / `v0.9.1`.
|
|
||||||
|
|
||||||
#### `trace_sink` {#admin_trace_sink}
|
#### `trace_sink` {#admin_trace_sink}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,17 +23,17 @@ Feel free to open a PR to suggest fixes this table. Minio is missing because the
|
||||||
- 2022-05-25 - Many Ceph S3 endpoints are not documented but implemented. Following a notification from the Ceph community, we added them.
|
- 2022-05-25 - Many Ceph S3 endpoints are not documented but implemented. Following a notification from the Ceph community, we added them.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## High-level features
|
## High-level 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) |
|
| 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/AmazonS3/latest/API/Appendix-Sigv2.html) (deprecated) | ❌ Missing | ✅ | ✅ | ✅ | ✅ |
|
| [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 | ✅ | ✅ | ❌ | ✅ |
|
| [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 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 | ❌| ✅| ✅ | ✅ |
|
| [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 | ❌| ✅ | ✅ | ✅(❓) |
|
| [Presigned URLs](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html) | ✅ Implemented | ❌| ✅ | ✅ | ✅(❓) |
|
||||||
| [SSE-C encryption](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html) | ✅ Implemented | ❓ | ✅ | ❌ | ✅ |
|
| [SSE-C encryption](https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html) | ✅ Implemented | ❓ | ✅ | ❌ | ✅ |
|
||||||
| [Bucket versioning](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Versioning.html) | ❌ Missing | ✅ | ✅ | ❌ | ✅ |
|
|
||||||
|
|
||||||
*Note:* OpenIO does not says if it supports presigned URLs. Because it is part
|
*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,
|
of signature v4 and they claim they support it without additional precisions,
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,9 @@ We will bump the version numbers prefixed to each API endpoint each time the syn
|
||||||
or semantics change, meaning that code that relies on these endpoints will break
|
or semantics change, meaning that code that relies on these endpoints will break
|
||||||
when changes are introduced.
|
when changes are introduced.
|
||||||
|
|
||||||
The Garage administration API was introduced in version 0.7.2, this document
|
The Garage administration API was introduced in version 0.7.2, and was
|
||||||
does not apply to older versions of Garage.
|
changed several times.
|
||||||
|
This document applies only to the Garage v2 API (starting with Garage v2.0.0).
|
||||||
|
|
||||||
|
|
||||||
## Access control
|
## Access control
|
||||||
|
|
@ -52,34 +53,28 @@ Returns an HTTP status 200 if the node is ready to answer user's requests,
|
||||||
and an HTTP status 503 (Service Unavailable) if there are some partitions
|
and an HTTP status 503 (Service Unavailable) if there are some partitions
|
||||||
for which a quorum of nodes is not available.
|
for which a quorum of nodes is not available.
|
||||||
A simple textual message is also returned in a body with content-type `text/plain`.
|
A simple textual message is also returned in a body with content-type `text/plain`.
|
||||||
See `/v1/health` for an API that also returns JSON output.
|
See `/v2/GetClusterHealth` for an API that also returns JSON output.
|
||||||
|
|
||||||
|
### Other special endpoints
|
||||||
|
|
||||||
|
#### CheckDomain `GET /check?domain=<domain>`
|
||||||
|
|
||||||
|
Checks whether this Garage cluster serves a website for domain `<domain>`.
|
||||||
|
Returns HTTP 200 Ok if yes, or HTTP 4xx if no website is available for this domain.
|
||||||
|
|
||||||
### Cluster operations
|
### Cluster operations
|
||||||
|
|
||||||
#### GetClusterStatus `GET /v1/status`
|
#### GetClusterStatus `GET /v2/GetClusterStatus`
|
||||||
|
|
||||||
Returns the cluster's current status in JSON, including:
|
Returns the cluster's current status in JSON, including:
|
||||||
|
|
||||||
- ID of the node being queried and its version of the Garage daemon
|
|
||||||
- Live nodes
|
- Live nodes
|
||||||
- Currently configured cluster layout
|
- Currently configured cluster layout
|
||||||
- Staged changes to the cluster layout
|
|
||||||
|
|
||||||
Example response body:
|
Example response body:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"node": "b10c110e4e854e5aa3f4637681befac755154b20059ec163254ddbfae86b09df",
|
|
||||||
"garageVersion": "v1.3.0",
|
|
||||||
"garageFeatures": [
|
|
||||||
"k2v",
|
|
||||||
"lmdb",
|
|
||||||
"sqlite",
|
|
||||||
"metrics",
|
|
||||||
"bundled-libs"
|
|
||||||
],
|
|
||||||
"rustVersion": "1.68.0",
|
|
||||||
"dbEngine": "LMDB (using Heed crate)",
|
|
||||||
"layoutVersion": 5,
|
"layoutVersion": 5,
|
||||||
"nodes": [
|
"nodes": [
|
||||||
{
|
{
|
||||||
|
|
@ -169,7 +164,7 @@ Example response body:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### GetClusterHealth `GET /v1/health`
|
#### GetClusterHealth `GET /v2/GetClusterHealth`
|
||||||
|
|
||||||
Returns the cluster's current health in JSON format, with the following variables:
|
Returns the cluster's current health in JSON format, with the following variables:
|
||||||
|
|
||||||
|
|
@ -202,7 +197,7 @@ Example response body:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### ConnectClusterNodes `POST /v1/connect`
|
#### ConnectClusterNodes `POST /v2/ConnectClusterNodes`
|
||||||
|
|
||||||
Instructs this Garage node to connect to other Garage nodes at specified addresses.
|
Instructs this Garage node to connect to other Garage nodes at specified addresses.
|
||||||
|
|
||||||
|
|
@ -232,7 +227,7 @@ Example response:
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
#### GetClusterLayout `GET /v1/layout`
|
#### GetClusterLayout `GET /v2/GetClusterLayout`
|
||||||
|
|
||||||
Returns the cluster's current layout in JSON, including:
|
Returns the cluster's current layout in JSON, including:
|
||||||
|
|
||||||
|
|
@ -293,7 +288,7 @@ Example response body:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### UpdateClusterLayout `POST /v1/layout`
|
#### UpdateClusterLayout `POST /v2/UpdateClusterLayout`
|
||||||
|
|
||||||
Send modifications to the cluster layout. These modifications will
|
Send modifications to the cluster layout. These modifications will
|
||||||
be included in the staged role changes, visible in subsequent calls
|
be included in the staged role changes, visible in subsequent calls
|
||||||
|
|
@ -330,7 +325,7 @@ This returns the new cluster layout with the proposed staged changes,
|
||||||
as returned by GetClusterLayout.
|
as returned by GetClusterLayout.
|
||||||
|
|
||||||
|
|
||||||
#### ApplyClusterLayout `POST /v1/layout/apply`
|
#### ApplyClusterLayout `POST /v2/ApplyClusterLayout`
|
||||||
|
|
||||||
Applies to the cluster the layout changes currently registered as
|
Applies to the cluster the layout changes currently registered as
|
||||||
staged layout changes.
|
staged layout changes.
|
||||||
|
|
@ -350,23 +345,11 @@ existing layout in the cluster.
|
||||||
This returns the message describing all the calculations done to compute the new
|
This returns the message describing all the calculations done to compute the new
|
||||||
layout, as well as the description of the layout as returned by GetClusterLayout.
|
layout, as well as the description of the layout as returned by GetClusterLayout.
|
||||||
|
|
||||||
#### RevertClusterLayout `POST /v1/layout/revert`
|
#### RevertClusterLayout `POST /v2/RevertClusterLayout`
|
||||||
|
|
||||||
Clears all of the staged layout changes.
|
Clears all of the staged layout changes.
|
||||||
|
|
||||||
Request body format:
|
This requests contains an empty body.
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"version": 13
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Reverting the staged changes is done by incrementing the version number
|
|
||||||
and clearing the contents of the staged change list.
|
|
||||||
Similarly to the CLI, the body must include the incremented
|
|
||||||
version number, which MUST be 1 + the value of the currently
|
|
||||||
existing layout in the cluster.
|
|
||||||
|
|
||||||
This returns the new cluster layout with all changes reverted,
|
This returns the new cluster layout with all changes reverted,
|
||||||
as returned by GetClusterLayout.
|
as returned by GetClusterLayout.
|
||||||
|
|
@ -374,7 +357,7 @@ as returned by GetClusterLayout.
|
||||||
|
|
||||||
### Access key operations
|
### Access key operations
|
||||||
|
|
||||||
#### ListKeys `GET /v1/key`
|
#### ListKeys `GET /v2/ListKeys`
|
||||||
|
|
||||||
Returns all API access keys in the cluster.
|
Returns all API access keys in the cluster.
|
||||||
|
|
||||||
|
|
@ -393,8 +376,8 @@ Example response:
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
#### GetKeyInfo `GET /v1/key?id=<acces key id>`
|
#### GetKeyInfo `GET /v2/GetKeyInfo?id=<acces key id>`
|
||||||
#### GetKeyInfo `GET /v1/key?search=<pattern>`
|
#### GetKeyInfo `GET /v2/GetKeyInfo?search=<pattern>`
|
||||||
|
|
||||||
Returns information about the requested API access key.
|
Returns information about the requested API access key.
|
||||||
|
|
||||||
|
|
@ -468,7 +451,7 @@ Example response:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### CreateKey `POST /v1/key`
|
#### CreateKey `POST /v2/CreateKey`
|
||||||
|
|
||||||
Creates a new API access key.
|
Creates a new API access key.
|
||||||
|
|
||||||
|
|
@ -483,7 +466,7 @@ Request body format:
|
||||||
This returns the key info, including the created secret key,
|
This returns the key info, including the created secret key,
|
||||||
in the same format as the result of GetKeyInfo.
|
in the same format as the result of GetKeyInfo.
|
||||||
|
|
||||||
#### ImportKey `POST /v1/key/import`
|
#### ImportKey `POST /v2/ImportKey`
|
||||||
|
|
||||||
Imports an existing API key.
|
Imports an existing API key.
|
||||||
This will check that the imported key is in the valid format, i.e.
|
This will check that the imported key is in the valid format, i.e.
|
||||||
|
|
@ -501,7 +484,7 @@ Request body format:
|
||||||
|
|
||||||
This returns the key info in the same format as the result of GetKeyInfo.
|
This returns the key info in the same format as the result of GetKeyInfo.
|
||||||
|
|
||||||
#### UpdateKey `POST /v1/key?id=<acces key id>`
|
#### UpdateKey `POST /v2/UpdateKey?id=<acces key id>`
|
||||||
|
|
||||||
Updates information about the specified API access key.
|
Updates information about the specified API access key.
|
||||||
|
|
||||||
|
|
@ -523,14 +506,14 @@ The possible flags in `allow` and `deny` are: `createBucket`.
|
||||||
|
|
||||||
This returns the key info in the same format as the result of GetKeyInfo.
|
This returns the key info in the same format as the result of GetKeyInfo.
|
||||||
|
|
||||||
#### DeleteKey `DELETE /v1/key?id=<acces key id>`
|
#### DeleteKey `POST /v2/DeleteKey?id=<acces key id>`
|
||||||
|
|
||||||
Deletes an API access key.
|
Deletes an API access key.
|
||||||
|
|
||||||
|
|
||||||
### Bucket operations
|
### Bucket operations
|
||||||
|
|
||||||
#### ListBuckets `GET /v1/bucket`
|
#### ListBuckets `GET /v2/ListBuckets`
|
||||||
|
|
||||||
Returns all storage buckets in the cluster.
|
Returns all storage buckets in the cluster.
|
||||||
|
|
||||||
|
|
@ -572,8 +555,8 @@ Example response:
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
#### GetBucketInfo `GET /v1/bucket?id=<bucket id>`
|
#### GetBucketInfo `GET /v2/GetBucketInfo?id=<bucket id>`
|
||||||
#### GetBucketInfo `GET /v1/bucket?globalAlias=<alias>`
|
#### GetBucketInfo `GET /v2/GetBucketInfo?globalAlias=<alias>`
|
||||||
|
|
||||||
Returns information about the requested storage bucket.
|
Returns information about the requested storage bucket.
|
||||||
|
|
||||||
|
|
@ -616,7 +599,7 @@ Example response:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### CreateBucket `POST /v1/bucket`
|
#### CreateBucket `POST /v2/CreateBucket`
|
||||||
|
|
||||||
Creates a new storage bucket.
|
Creates a new storage bucket.
|
||||||
|
|
||||||
|
|
@ -656,7 +639,7 @@ or no alias at all.
|
||||||
Technically, you can also specify both `globalAlias` and `localAlias` and that would create
|
Technically, you can also specify both `globalAlias` and `localAlias` and that would create
|
||||||
two aliases, but I don't see why you would want to do that.
|
two aliases, but I don't see why you would want to do that.
|
||||||
|
|
||||||
#### UpdateBucket `PUT /v1/bucket?id=<bucket id>`
|
#### UpdateBucket `POST /v2/UpdateBucket?id=<bucket id>`
|
||||||
|
|
||||||
Updates configuration of the given bucket.
|
Updates configuration of the given bucket.
|
||||||
|
|
||||||
|
|
@ -688,16 +671,38 @@ In `quotas`: new values of `maxSize` and `maxObjects` must both be specified, or
|
||||||
to remove the quotas. An absent value will be considered the same as a `null`. It is not possible
|
to remove the quotas. An absent value will be considered the same as a `null`. It is not possible
|
||||||
to change only one of the two quotas.
|
to change only one of the two quotas.
|
||||||
|
|
||||||
#### DeleteBucket `DELETE /v1/bucket?id=<bucket id>`
|
#### DeleteBucket `POST /v2/DeleteBucket?id=<bucket id>`
|
||||||
|
|
||||||
Deletes a storage bucket. A bucket cannot be deleted if it is not empty.
|
Deletes a storage bucket. A bucket cannot be deleted if it is not empty.
|
||||||
|
|
||||||
Warning: this will delete all aliases associated with the bucket!
|
Warning: this will delete all aliases associated with the bucket!
|
||||||
|
|
||||||
|
#### CleanupIncompleteUploads `POST /v2/CleanupIncompleteUploads`
|
||||||
|
|
||||||
|
Cleanup all incomplete uploads in a bucket that are older than a specified number
|
||||||
|
of seconds.
|
||||||
|
|
||||||
|
Request body format:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"bucketId": "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b",
|
||||||
|
"olderThanSecs": 3600
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Response format
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"uploadsDeleted": 12
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### Operations on permissions for keys on buckets
|
### Operations on permissions for keys on buckets
|
||||||
|
|
||||||
#### BucketAllowKey `POST /v1/bucket/allow`
|
#### AllowBucketKey `POST /v2/AllowBucketKey`
|
||||||
|
|
||||||
Allows a key to do read/write/owner operations on a bucket.
|
Allows a key to do read/write/owner operations on a bucket.
|
||||||
|
|
||||||
|
|
@ -718,7 +723,7 @@ Request body format:
|
||||||
Flags in `permissions` which have the value `true` will be activated.
|
Flags in `permissions` which have the value `true` will be activated.
|
||||||
Other flags will remain unchanged.
|
Other flags will remain unchanged.
|
||||||
|
|
||||||
#### BucketDenyKey `POST /v1/bucket/deny`
|
#### DenyBucketKey `POST /v2/DenyBucketKey`
|
||||||
|
|
||||||
Denies a key from doing read/write/owner operations on a bucket.
|
Denies a key from doing read/write/owner operations on a bucket.
|
||||||
|
|
||||||
|
|
@ -742,19 +747,35 @@ Other flags will remain unchanged.
|
||||||
|
|
||||||
### Operations on bucket aliases
|
### Operations on bucket aliases
|
||||||
|
|
||||||
#### GlobalAliasBucket `PUT /v1/bucket/alias/global?id=<bucket id>&alias=<global alias>`
|
#### AddBucketAlias `POST /v2/AddBucketAlias`
|
||||||
|
|
||||||
Empty body. Creates a global alias for a bucket.
|
Creates an alias for a bucket in the namespace of a specific access key.
|
||||||
|
To create a global alias, specify the `globalAlias` field.
|
||||||
|
To create a local alias, specify the `localAlias` and `accessKeyId` fields.
|
||||||
|
|
||||||
#### GlobalUnaliasBucket `DELETE /v1/bucket/alias/global?id=<bucket id>&alias=<global alias>`
|
Request body format:
|
||||||
|
|
||||||
Removes a global alias for a bucket.
|
```json
|
||||||
|
{
|
||||||
|
"bucketId": "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b",
|
||||||
|
"globalAlias": "my-bucket"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
#### LocalAliasBucket `PUT /v1/bucket/alias/local?id=<bucket id>&accessKeyId=<access key ID>&alias=<local alias>`
|
or:
|
||||||
|
|
||||||
Empty body. Creates a local alias for a bucket in the namespace of a specific access key.
|
```json
|
||||||
|
{
|
||||||
|
"bucketId": "e6a14cd6a27f48684579ec6b381c078ab11697e6bc8513b72b2f5307e25fff9b",
|
||||||
|
"accessKeyId": "GK31c2f218a2e44f485b94239e",
|
||||||
|
"localAlias": "my-bucket"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
#### LocalUnaliasBucket `DELETE /v1/bucket/alias/local?id=<bucket id>&accessKeyId<access key ID>&alias=<local alias>`
|
#### RemoveBucketAlias `POST /v2/RemoveBucketAlias`
|
||||||
|
|
||||||
Removes a local alias for a bucket in the namespace of a specific access key.
|
Removes an alias for a bucket in the namespace of a specific access key.
|
||||||
|
To remove a global alias, specify the `globalAlias` field.
|
||||||
|
To remove a local alias, specify the `localAlias` and `accessKeyId` fields.
|
||||||
|
|
||||||
|
Request body format: same as AddBucketAlias.
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue