Consistent deployment for ejabberd cluster in cloud

I'm considering a "set it and forget it" cloud instance that can gracefully reconnect or form a cluster upon startup and when it goes down / rebooted. Would the following make sense?

1) Each instance gets a static ip

2) List a collection of all these static node ips in each instance's ejabberd.yml config (or it could maybe be made a little more convenient to simply announce itself to a shared database first, then check the list there... but let's leave that aside for now)

3) Upon startup, sequentially check if each ip is online. If one is found, join it as a cluster.

4) If none are found to be online, startup without joining a cluster

The only thing this requires is pre-defining the cluster at first, and maybe just to avoid nasty race conditions- initial deployment should first start one instance, then wait a bit before firing up the others

I've read somewhere though that joining a cluster can only be one node at a time- is that true? If so, then this is no good and a just sending myself an email upon instance start might be the way to go (to then assess and deploy manually, if I'm not asleep!) IF that's not a problem- then I guess my next questions are- 1) is there something like this but better already out there? 2) what would be the most efficient way to check if another server is online?

Thanks!

Nevermind, evidently ejabberd

Nevermind, evidently ejabberd remembers the configuration after it's joined once, and will then automatically rejoin the cluster when restarted! See: http://stackoverflow.com/questions/31537244/consistent-deployment-for-ej...

Syndicate content