RaftEx.ClusterSetup
(raft_ex v0.1.0)
View Source
Convenience helpers for bootstrapping distributed RaftEx clusters across multiple Elixir nodes.
Use setup/3 or setup/4 to initialise distribution, start the RaftEx
system, and form a cluster in a single call.
Summary
Functions
Connect to a remote node and verify it is reachable.
Full cluster bootstrap on the current node.
Start distributed Erlang with the given cookie.
Start the RaftEx system with the given data directory.
Verify that all given nodes are reachable and running RaftEx.
Functions
Connect to a remote node and verify it is reachable.
@spec setup( cluster_name :: term(), machine :: RaftEx.Machine.machine(), node_configs :: [map()], opts :: keyword() ) :: {:ok, [RaftEx.Types.server_id()], [RaftEx.Types.server_id()]} | {:error, term()}
Full cluster bootstrap on the current node.
Parameters
cluster_name— atom identifying the Raft clustermachine— state machine config{:machine, Module, args}node_configs— list of%{node: node(), data_dir: binary()}maps, one per participating node. The caller determines the data-dir for each node.opts— keyword overrides (seeRaftEx.Cluster.form_cluster/4).
Returns {:ok, local_server_ids, all_server_ids}.
Start distributed Erlang with the given cookie.
Start the RaftEx system with the given data directory.
Verify that all given nodes are reachable and running RaftEx.