Commit Graph

17 Commits

Author SHA1 Message Date
Mendes 7f3249a237 New version of the algorithm that calculate the layout.
It takes as paramters the replication factor and the zone redundancy, computes the
largest partition size reachable with these constraints, and among the possible
assignation with this partition size, it computes the one that moves the least number
of partitions compared to the previous assignation.
This computation uses graph algorithms defined in graph_algo.rs
2022-09-21 14:39:59 +02:00
Alex 9d0ed78887 Add feature flag for Kubernetes discovery 2022-03-24 16:57:43 +01:00
Alex 8c2fb0c066
Add tracing integration with opentelemetry 2022-03-14 10:52:13 +01:00
Alex 2cab84b1fe
Add many metrics in table/ and rpc/ 2022-03-14 10:51:50 +01:00
Max Audron 9d44127245
add support for kubernetes service discovery
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
This commit adds support to discover garage instances running in
kubernetes.

Once enabled by setting `kubernetes_namespace` and
`kubernetes_service_name` garage will create a Custom Resources
`garagenodes.deuxfleurs.fr` with nodes public key as the resource name.
and IP and Port information as spec in the namespace configured by
`kubernetes_namespace`.

For discovering nodes the resources are filtered with the optionally set
`kubernetes_service_name` which sets a label
`garage.deuxfleurs.fr/service` on the resources.

This allows to separate multiple garage deployments in a single
namespace.

the `kubernetes_skip_crd` variable allows to disable the creation of the
CRD by garage itself. The user must deploy this manually.
2022-03-12 13:05:52 +01:00
Alex c94406f428
Improve how node roles are assigned in Garage
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/tag Build is passing Details
continuous-integration/drone/push Build is passing Details
continuous-integration/drone Build is passing Details
- change the terminology: the network configuration becomes the role
  table, the configuration of a nodes becomes a node's role
- the modification of the role table takes place in two steps: first,
  changes are staged in a CRDT data structure. Then, once the user is
  happy with the changes, they can commit them all at once (or revert
  them).
- update documentation
- fix tests
- implement smarter partition assignation algorithm

This patch breaks the format of the network configuration: when
migrating, the cluster will be in a state where no roles are assigned.
All roles must be re-assigned and commited at once. This migration
should not pose an issue.
2021-11-16 16:05:53 +01:00
Alex 4067797d01
First port of Garage to Netapp 2021-10-22 15:55:18 +02:00
Trinity Pointard e4b9e4e24d
rename types to CamelCase
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
2021-05-03 22:15:09 +02:00
Trinity Pointard f05bb111c2
fix clippy warnings on util and rpc 2021-05-03 22:11:41 +02:00
Trinity Pointard 74373aebcf
make most requested changes 2021-04-27 16:47:08 +02:00
Trinity Pointard f871689571
run cargo fmt on util and make missing doc warning 2021-04-27 16:37:10 +02:00
Trinity Pointard 8e0524ae15
document rpc crate 2021-04-27 16:37:10 +02:00
Alex 40763fd749 Cargo fmt 2021-02-23 18:46:25 +01:00
Alex 80892df8cc Some refactoring
continuous-integration/drone/push Build is passing Details
2021-02-21 13:11:10 +01:00
Alex 8956db2a81 Make less things public 2020-12-12 17:58:19 +01:00
Alex fbe8fe81f2 Add automatic peer discovery from Consul 2020-06-30 18:33:14 +02:00
Alex d8f5e643bc Split code for modular compilation 2020-04-24 10:10:01 +00:00
Renamed from src/rpc/mod.rs (Browse further)