Skip to content

Commit

Permalink
add support for multi-node khepri
Browse files Browse the repository at this point in the history
fixes #160
  • Loading branch information
verbit committed Jul 17, 2024
1 parent 730e54e commit 53590d6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/virtuerl/src/virtuerl_ipam.erl
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@ start_link() ->

init([]) ->
io:format("starting IPAM service~n"),
StoreId = khepri_cluster:get_default_store_id(),
{ok, StoreId} = khepri:start(filename:join(virtuerl_mgt:home_path(), "khepri")),
case application:get_env(khepri_bootstrap) of
{ok, Node} -> ok = khepri_cluster:join({StoreId, Node});
undefined -> ok
end,
init([StoreId]);
init([StoreId]) ->
{ok, StoreId}.
Expand Down

0 comments on commit 53590d6

Please sign in to comment.