Compare commits

..

7 Commits

24 changed files with 974 additions and 929 deletions
Generated
+907 -886
View File
File diff suppressed because it is too large Load Diff
+18 -13
View File
@@ -25,18 +25,18 @@ default-members = ["src/garage"]
# Internal Garage crates
format_table = { version = "0.1.1", path = "src/format-table" }
garage_api_common = { version = "2.4.0", path = "src/api/common" }
garage_api_admin = { version = "2.4.0", path = "src/api/admin" }
garage_api_s3 = { version = "2.4.0", path = "src/api/s3" }
garage_api_k2v = { version = "2.4.0", path = "src/api/k2v" }
garage_block = { version = "2.4.0", path = "src/block" }
garage_db = { version = "2.4.0", path = "src/db", default-features = false }
garage_model = { version = "2.4.0", path = "src/model", default-features = false }
garage_net = { version = "2.4.0", path = "src/net" }
garage_rpc = { version = "2.4.0", path = "src/rpc" }
garage_table = { version = "2.4.0", path = "src/table" }
garage_util = { version = "2.4.0", path = "src/util" }
garage_web = { version = "2.4.0", path = "src/web" }
garage_api_common = { version = "2.4.1", path = "src/api/common" }
garage_api_admin = { version = "2.4.1", path = "src/api/admin" }
garage_api_s3 = { version = "2.4.1", path = "src/api/s3" }
garage_api_k2v = { version = "2.4.1", path = "src/api/k2v" }
garage_block = { version = "2.4.1", path = "src/block" }
garage_db = { version = "2.4.1", path = "src/db", default-features = false }
garage_model = { version = "2.4.1", path = "src/model", default-features = false }
garage_net = { version = "2.4.1", path = "src/net" }
garage_rpc = { version = "2.4.1", path = "src/rpc" }
garage_table = { version = "2.4.1", path = "src/table" }
garage_util = { version = "2.4.1", path = "src/util" }
garage_web = { version = "2.4.1", path = "src/web" }
k2v-client = { version = "0.0.4", path = "src/k2v-client" }
# External crates from crates.io
@@ -117,7 +117,12 @@ kube = { version = "3.0", default-features = false, features = [
"rustls-tls",
] }
schemars = "1.2"
reqwest = { version = "0.13", default-features = false }
reqwest = { version = "0.13", default-features = false, features = [
"rustls-no-provider",
"json",
] }
rustls = { version = "0.23", default-features = false, features = ["std", "ring"] }
form_urlencoded = "1.2"
http = "1.4"
httpdate = "1.0"
+5 -5
View File
@@ -96,14 +96,14 @@ to store 2 TB of data in total.
## 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).
We encourage you to use a fixed tag (eg. `v2.4.0`) and not the `latest` tag.
For this example, we will use the latest published version at the time of the writing which is `v2.4.0` but it's up to you
We encourage you to use a fixed tag (eg. `v2.4.1`) and not the `latest` tag.
For this example, we will use the latest published version at the time of the writing which is `v2.4.1` 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).
For example:
```
docker pull dxflrs/garage:v2.4.0
docker pull dxflrs/garage:v2.4.1
```
## Deploying and configuring Garage
@@ -171,7 +171,7 @@ docker run \
-v /etc/garage.toml:/etc/garage.toml \
-v /var/lib/garage/meta:/var/lib/garage/meta \
-v /var/lib/garage/data:/var/lib/garage/data \
dxflrs/garage:v2.4.0
dxflrs/garage:v2.4.1
```
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"
services:
garage:
image: dxflrs/garage:v2.4.0
image: dxflrs/garage:v2.4.1
network_mode: "host"
restart: unless-stopped
volumes:
+2 -2
View File
@@ -157,7 +157,7 @@ docker run \
-e GARAGE_DEFAULT_ACCESS_KEY \
-e GARAGE_DEFAULT_SECRET_KEY \
-e GARAGE_DEFAULT_BUCKET \
dxflrs/garage:v2.4.0
dxflrs/garage:v2.4.1
/garage server --single-node --default-bucket
```
@@ -337,7 +337,7 @@ When you first start a cluster without automatic configuration, the output of `g
```
==== HEALTHY NODES ====
ID Hostname Address Tags Zone Capacity DataAvail Version
563e1ac825ee3323 linuxbox 127.0.0.1:3901 NO ROLE ASSIGNED v2.4.0
563e1ac825ee3323 linuxbox 127.0.0.1:3901 NO ROLE ASSIGNED v2.4.1
```
Creating a cluster layout for a Garage deployment means informing Garage of the
+4
View File
@@ -47,6 +47,10 @@ bootstrap_peers = []
$REPLICATION_MODE
rpc_secret = "$NETWORK_SECRET"
[consul_discovery]
service_name = "panic-catcher"
consul_http_addr = "http://localhost:9876"
[s3_api]
api_bind_addr = "0.0.0.0:$((3910+$count))" # the S3 API port, HTTP without TLS. Add a reverse proxy for the TLS part.
s3_region = "garage" # set this to anything. S3 API calls will fail if they are not made against the region set here.
+2 -2
View File
@@ -2,8 +2,8 @@ apiVersion: v2
name: garage
description: S3-compatible object store for small self-hosted geo-distributed deployments
type: application
version: 0.10.1
appVersion: "v2.4.0"
version: 0.10.2
appVersion: "v2.4.1"
home: https://garagehq.deuxfleurs.fr/
icon: https://garagehq.deuxfleurs.fr/images/garage-logo.svg
+1 -1
View File
@@ -1,6 +1,6 @@
# garage
![Version: 0.10.1](https://img.shields.io/badge/Version-0.10.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.4.0](https://img.shields.io/badge/AppVersion-v2.4.0-informational?style=flat-square)
![Version: 0.10.2](https://img.shields.io/badge/Version-0.10.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.4.1](https://img.shields.io/badge/AppVersion-v2.4.1-informational?style=flat-square)
S3-compatible object store for small self-hosted geo-distributed deployments
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "garage_api_admin"
version = "2.4.0"
version = "2.4.1"
authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018"
license = "AGPL-3.0"
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "garage_api_common"
version = "2.4.0"
version = "2.4.1"
authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018"
license = "AGPL-3.0"
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "garage_api_k2v"
version = "2.4.0"
version = "2.4.1"
authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018"
license = "AGPL-3.0"
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "garage_api_s3"
version = "2.4.0"
version = "2.4.1"
authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018"
license = "AGPL-3.0"
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "garage_block"
version = "2.4.0"
version = "2.4.1"
authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018"
license = "AGPL-3.0"
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "garage_db"
version = "2.4.0"
version = "2.4.1"
authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018"
license = "AGPL-3.0"
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "garage"
version = "2.4.0"
version = "2.4.1"
authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018"
license = "AGPL-3.0"
+1 -1
View File
@@ -24,7 +24,7 @@ percent-encoding.workspace = true
hyper = { workspace = true, default-features = false, features = ["http1", "http2"] }
hyper-util.workspace = true
hyper-rustls.workspace = true
reqwest = { workspace = true, default-features = false, features = ["json", "rustls-no-provider"] }
rustls.workspace = true
serde = { workspace = true, default-features = false, features = ["derive", "std"] }
serde_json.workspace = true
thiserror.workspace = true
+1 -1
View File
@@ -72,7 +72,7 @@ impl K2vClient {
/// Create a new K2V client.
pub fn new(config: K2vClientConfig) -> Result<Self, Error> {
let connector = hyper_rustls::HttpsConnectorBuilder::new()
.with_native_roots()?
.with_provider_and_native_roots(rustls::crypto::ring::default_provider())?
.https_or_http()
.enable_http1()
.enable_http2()
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "garage_model"
version = "2.4.0"
version = "2.4.1"
authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018"
license = "AGPL-3.0"
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "garage_net"
version = "2.4.0"
version = "2.4.1"
authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018"
license = "AGPL-3.0"
+7 -3
View File
@@ -1,6 +1,6 @@
[package]
name = "garage_rpc"
version = "2.4.0"
version = "2.4.1"
authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018"
license = "AGPL-3.0"
@@ -40,7 +40,11 @@ thiserror = { workspace = true, optional = true }
kube = { workspace = true, optional = true }
k8s-openapi = { workspace = true, optional = true }
schemars = { workspace = true, optional = true }
reqwest = { workspace = true, optional = true, features = ["json", "rustls"] }
reqwest = { workspace = true, optional = true }
hyper = { workspace = true, optional = true }
hyper-rustls = { workspace = true, optional = true }
hyper-util = { workspace = true, optional = true }
rustls = { workspace = true, optional = true }
pnet_datalink.workspace = true
@@ -50,7 +54,7 @@ opentelemetry.workspace = true
[features]
kubernetes-discovery = ["kube", "k8s-openapi", "schemars"]
consul-discovery = ["reqwest", "thiserror"]
consul-discovery = ["hyper", "hyper-rustls", "hyper-util", "reqwest", "rustls", "thiserror"]
system-libs = ["sodiumoxide/use-pkg-config"]
[lints]
+4
View File
@@ -80,6 +80,10 @@ pub struct ConsulDiscovery {
impl ConsulDiscovery {
pub fn new(config: ConsulDiscoveryConfig) -> Result<Self, ConsulError> {
if rustls::crypto::CryptoProvider::get_default().is_none() {
_ = rustls::crypto::ring::default_provider().install_default();
}
let mut builder: reqwest::ClientBuilder = reqwest::Client::builder().use_rustls_tls();
if config.tls_skip_verify {
builder = builder.danger_accept_invalid_certs(true);
+10 -3
View File
@@ -29,8 +29,15 @@ pub struct Node {
port: u16,
}
pub async fn get_client() -> Result<Client, kube::Error> {
if rustls::crypto::CryptoProvider::get_default().is_none() {
_ = rustls::crypto::ring::default_provider().install_default();
}
Client::try_default().await
}
pub async fn create_kubernetes_crd() -> Result<(), kube::Error> {
let client = Client::try_default().await?;
let client = get_client().await?;
let crds: Api<CustomResourceDefinition> = Api::all(client.clone());
let params = PatchParams::apply(&format!("garage.{}", K8S_GROUP));
@@ -45,7 +52,7 @@ pub async fn create_kubernetes_crd() -> Result<(), kube::Error> {
pub async fn get_kubernetes_nodes(
kubernetes_config: &KubernetesDiscoveryConfig,
) -> Result<Vec<(NodeID, SocketAddr)>, kube::Error> {
let client = Client::try_default().await?;
let client = get_client().await?;
let nodes: Api<GarageNode> = Api::namespaced(client.clone(), &kubernetes_config.namespace);
let lp = ListParams::default().labels(&format!(
@@ -98,7 +105,7 @@ pub async fn publish_kubernetes_node(
debug!("Node object to be applied: {:#?}", node);
let client = Client::try_default().await?;
let client = get_client().await?;
let nodes: Api<GarageNode> = Api::namespaced(client.clone(), &kubernetes_config.namespace);
if let Ok(old_node) = nodes.get(&node_pubkey).await {
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "garage_table"
version = "2.4.0"
version = "2.4.1"
authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018"
license = "AGPL-3.0"
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "garage_util"
version = "2.4.0"
version = "2.4.1"
authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018"
license = "AGPL-3.0"
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "garage_web"
version = "2.4.0"
version = "2.4.1"
authors = ["Alex Auvolat <alex@adnab.me>", "Quentin Dufour <quentin@dufour.io>"]
edition = "2018"
license = "AGPL-3.0"