mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-27 07:27:40 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 432131f5b8 | |||
| af2b2f26b4 | |||
| a3758dc4c4 | |||
| fc85508648 | |||
| 782630fc27 |
@@ -15,18 +15,24 @@ Garage [,
|
||||||
|
an experimental small-scale self hosted service provider,
|
||||||
|
which has been using it in production since its first release in 2020.
|
||||||
|
|
||||||
- Extremely high performance
|
Learn more on our dedicated documentation pages:
|
||||||
- Complete implementation of the S3 API
|
|
||||||
- Erasure coding (our replication model is simply to copy the data as is on several nodes, in different datacenters if possible)
|
|
||||||
|
|
||||||
Our main use case is to provide a distributed storage layer for small-scale self hosted services such as [Deuxfleurs](https://deuxfleurs.fr).
|
- [Goals and use cases](https://garagehq.deuxfleurs.fr/documentation/design/goals/)
|
||||||
|
- [Features](https://garagehq.deuxfleurs.fr/documentation/reference-manual/features/)
|
||||||
|
- [Quick start](https://garagehq.deuxfleurs.fr/documentation/quick-start/)
|
||||||
|
|
||||||
|
Garage is entirely free software released under the terms of the AGPLv3.
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ website.
|
|||||||
|
|
||||||
Garage is an opinionated object storage solutoin, we focus on the following **desirable properties**:
|
Garage is an opinionated object storage solutoin, we focus on the following **desirable properties**:
|
||||||
|
|
||||||
|
- **Internet enabled**: made for multi-sites (eg. datacenters, offices, households, etc.) interconnected through regular Internet connections.
|
||||||
- **Self-contained & lightweight**: works everywhere and integrates well in existing environments to target [hyperconverged infrastructures](https://en.wikipedia.org/wiki/Hyper-converged_infrastructure).
|
- **Self-contained & lightweight**: works everywhere and integrates well in existing environments to target [hyperconverged infrastructures](https://en.wikipedia.org/wiki/Hyper-converged_infrastructure).
|
||||||
- **Highly resilient**: highly resilient to network failures, network latency, disk failures, sysadmin failures.
|
- **Highly resilient**: highly resilient to network failures, network latency, disk failures, sysadmin failures.
|
||||||
- **Simple**: simple to understand, simple to operate, simple to debug.
|
- **Simple**: simple to understand, simple to operate, simple to debug.
|
||||||
- **Internet enabled**: made for multi-sites (eg. datacenters, offices, households, etc.) interconnected through regular Internet connections.
|
|
||||||
|
|
||||||
We also noted that the pursuit of some other goals are detrimental to our initial goals.
|
We also noted that the pursuit of some other goals are detrimental to our initial goals.
|
||||||
The following has been identified as **non-goals** (if these points matter to you, you should not use Garage):
|
The following has been identified as **non-goals** (if these points matter to you, you should not use Garage):
|
||||||
|
|||||||
+2
-2
@@ -137,8 +137,8 @@ let
|
|||||||
/* [2] */ hardeningDisable = [ "pie" ];
|
/* [2] */ hardeningDisable = [ "pie" ];
|
||||||
};
|
};
|
||||||
overrideArgs = old: {
|
overrideArgs = old: {
|
||||||
/* [4] */ features = [ "bundled-libs" "sled" ]
|
/* [4] */ features = [ "bundled-libs" "sled" "metrics" ]
|
||||||
++ (if release then [ "kubernetes-discovery" "telemetry-otlp" "metrics" "lmdb" "sqlite" ] else []);
|
++ (if release then [ "kubernetes-discovery" "telemetry-otlp" "lmdb" "sqlite" ] else []);
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,10 @@ pub struct AdminApiServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl AdminApiServer {
|
impl AdminApiServer {
|
||||||
pub fn new(garage: Arc<Garage>) -> Self {
|
pub fn new(
|
||||||
|
garage: Arc<Garage>,
|
||||||
|
#[cfg(feature = "metrics")] exporter: PrometheusExporter,
|
||||||
|
) -> Self {
|
||||||
let cfg = &garage.config.admin;
|
let cfg = &garage.config.admin;
|
||||||
let metrics_token = cfg
|
let metrics_token = cfg
|
||||||
.metrics_token
|
.metrics_token
|
||||||
@@ -47,7 +50,7 @@ impl AdminApiServer {
|
|||||||
Self {
|
Self {
|
||||||
garage,
|
garage,
|
||||||
#[cfg(feature = "metrics")]
|
#[cfg(feature = "metrics")]
|
||||||
exporter: opentelemetry_prometheus::exporter().init(),
|
exporter,
|
||||||
metrics_token,
|
metrics_token,
|
||||||
admin_token,
|
admin_token,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -607,7 +607,7 @@ impl BlockManagerLocked {
|
|||||||
path2.set_extension("tmp");
|
path2.set_extension("tmp");
|
||||||
let mut f = fs::File::create(&path2).await?;
|
let mut f = fs::File::create(&path2).await?;
|
||||||
f.write_all(data).await?;
|
f.write_all(data).await?;
|
||||||
f.sync_all().await?;
|
//f.sync_all().await?;
|
||||||
drop(f);
|
drop(f);
|
||||||
|
|
||||||
fs::rename(path2, path).await?;
|
fs::rename(path2, path).await?;
|
||||||
@@ -620,13 +620,13 @@ impl BlockManagerLocked {
|
|||||||
// Now, we do an fsync on the containing directory, to ensure that the rename
|
// Now, we do an fsync on the containing directory, to ensure that the rename
|
||||||
// is persisted properly. See:
|
// is persisted properly. See:
|
||||||
// http://thedjbway.b0llix.net/qmail/syncdir.html
|
// http://thedjbway.b0llix.net/qmail/syncdir.html
|
||||||
let dir = fs::OpenOptions::new()
|
/*let dir = fs::OpenOptions::new()
|
||||||
.read(true)
|
.read(true)
|
||||||
.mode(0)
|
.mode(0)
|
||||||
.open(directory)
|
.open(directory)
|
||||||
.await?;
|
.await?;
|
||||||
dir.sync_all().await?;
|
dir.sync_all().await?;
|
||||||
drop(dir);
|
drop(dir);*/
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ pub async fn run_server(config_file: PathBuf) -> Result<(), Error> {
|
|||||||
|
|
||||||
// ---- Initialize Garage internals ----
|
// ---- Initialize Garage internals ----
|
||||||
|
|
||||||
|
#[cfg(feature = "metrics")]
|
||||||
|
let metrics_exporter = opentelemetry_prometheus::exporter().init();
|
||||||
|
|
||||||
info!("Initializing background runner...");
|
info!("Initializing background runner...");
|
||||||
let watch_cancel = netapp::util::watch_ctrl_c();
|
let watch_cancel = netapp::util::watch_ctrl_c();
|
||||||
let (background, await_background_done) = BackgroundRunner::new(16, watch_cancel.clone());
|
let (background, await_background_done) = BackgroundRunner::new(16, watch_cancel.clone());
|
||||||
@@ -50,7 +53,11 @@ pub async fn run_server(config_file: PathBuf) -> Result<(), Error> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
info!("Initialize Admin API server and metrics collector...");
|
info!("Initialize Admin API server and metrics collector...");
|
||||||
let admin_server = AdminApiServer::new(garage.clone());
|
let admin_server = AdminApiServer::new(
|
||||||
|
garage.clone(),
|
||||||
|
#[cfg(feature = "metrics")]
|
||||||
|
metrics_exporter,
|
||||||
|
);
|
||||||
|
|
||||||
info!("Launching internal Garage cluster communications...");
|
info!("Launching internal Garage cluster communications...");
|
||||||
let run_system = tokio::spawn(garage.system.clone().run(watch_cancel.clone()));
|
let run_system = tokio::spawn(garage.system.clone().run(watch_cancel.clone()));
|
||||||
|
|||||||
Reference in New Issue
Block a user