Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save binarytemple/69159160c8a89777cdfcb6c13c8b77ef to your computer and use it in GitHub Desktop.
Save binarytemple/69159160c8a89777cdfcb6c13c8b77ef to your computer and use it in GitHub Desktop.
This will enable a ring to be created using riak_core_claim_sim. These rings could then be used to bootstrap a cluster without having to do the join steps.
RingSize = 32,
FirstNodeName = '[email protected]',
NewRing = riak_core_claim_sim:run([
{ring, riak_core_ring:fresh(RingSize, FirstNodeName)},
{target_n_val,4},
{wants,{riak_core_claim,wants_claim_v3}},
{choose,{riak_core_claim,choose_claim_v3}},
{cmds, [[
{join, '[email protected]'},
{join, '[email protected]'},
{join, '[email protected]'},
{join, '[email protected]'}
]]},
{print,false},
{return_ring, true}
]).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment