The jgroups-aws project from meltmedia "provides auto discovery for other cluster members on AWS using both tag matching and filters. It is a drop in replacement for TCPPING, allowing you to remove the definition of your initial members from your configuration file."
- That project doesn't seem to provide a convenient JAR or other packaging, but there's only a single source file required. Get Include jgroups-aws in your project.
If you're using Maven, include the following dependency in your POM:
<dependency> <groupId>com.meltmedia.jgroups</groupId> <artifactId>jgroups-aws</artifactId> <version>1.4.1</version> </dependency>
- If you're using the Fluffy Bunny project layout, you can download the JAR directly from Maven Central and put it in
- Otherwise you can just grab
- and include it somewhere appropriate.
AWS_PINGsections in your JGroups XML configuration file.
Include these properties:
er.extensions.ERXObjectStoreCoordinatorPool.maxCoordinators=1 er.extensions.remoteSynchronizer.enabled=true er.extensions.remoteSynchronizer=er.jgroups.ERJGroupsSynchronizer
- Follow the instructions in the Setting Up EC2 section of the jgroups-aws project page.
- Although the jgroups-aws documentation seems to suggest it's not mandatory, I was unable to get initial discovery to occur without using the "tags" feature of the
AWS_PINGconfiguration. That is, it would seem to be the case that you need to apply at least one arbitrary tag to your instances, and
AWS_PINGthen picks up all instances where the nominated tag has the same value.