bbaugher/serf — pull request #24 by maratoid (2014-06-07 00:13:00+00:00)
Title: Add support for running multiple clusters on one machine 

This PR will allow for running multiple serf agents of different bind/rpc addresses. I've updated the README with explanation of changes.

This will not require any changes from users of the cookbook who are not running multiple clusters on one box.
Init.d script is mostly the same - I've had some trouble with how it currently figures out whether serf agent is already running, but eventually got around it by creating symlinks to serf binary for each agent (only if multiple agents are specified)

You can verify by:
```
kitchen converge multiagent-ubuntu-1204
kitchen login multiagent-ubuntu-1204
```

then:

```
vagrant@multiagent-ubuntu-1204:~$ serf members -rpc-addr="127.0.0.1:7373"
first_agent 10.0.2.15:7946 alive
vagrant@multiagent-ubuntu-1204:~$ serf members -rpc-addr="127.0.0.1:7372"
second_agent 10.0.2.15:7945 alive
vagrant@multiagent-ubuntu-1204:~$ serf members -rpc-addr="127.0.0.1:7371"
third_agent 10.0.2.15:7944 alive
```

joining two agents:

```
vagrant@multiagent-ubuntu-1204:~$ serf join "0.0.0.0:7945" -rpc-addr="127.0.0.1:7373"
Successfully joined cluster by contacting 1 nodes.
vagrant@multiagent-ubuntu-1204:~$ serf members -rpc-addr="127.0.0.1:7373"
first_agent 10.0.2.15:7946 alive
second_agent 10.0.2.15:7945 alive
```

Thanks for writing the cookbook!