Weave Net

Uniform Fixed Clusters

This scenario describes a production deployment of a fixed number of N nodes (N=1 in the simplest case).

A uniform fixed cluster has the following characteristics:

Bootstrapping

On each initial peer, at boot, via systemd:

weave launch --no-restart $PEERS

Where,

Then on any peer run the following to force consensus:

weave prime

Note: You can run this safely on more than one or even all peers, but it’s only strictly necessary to run it on one of them.

Once this command completes successfully, IP address allocations can proceed under partition and it is safe to add new peers. If this command waits without exiting, it means that there is an issue (such as a network partition or failed peers) that is preventing a quorum from being reached – you will need to address that before moving on.

Adding a Peer

On the new peer, at boot, via systemd run:

weave launch --no-restart $PEERS

Where,

For maximum robustness, distribute an updated /etc/sysconfig/weave file including the new peer to all existing peers.

Removing a Peer

On the peer to be removed:

weave reset

Then distribute an updated /etc/sysconfig/weave to the remaining peers, omitting the removed peer from $PEERS.

On each remaining peer:

weave forget <removed peer>

This final step is not mandatory, but it will eliminate log noise and spurious network traffic by stopping any reconnection attempts.