{"id":19010818,"url":"https://github.com/meltmedia/jgroups-aws","last_synced_at":"2025-09-05T06:39:33.737Z","repository":{"id":3716568,"uuid":"4788769","full_name":"meltmedia/jgroups-aws","owner":"meltmedia","description":"An AWS Discovery Component for JGroups","archived":false,"fork":false,"pushed_at":"2023-11-09T08:26:18.000Z","size":984,"stargazers_count":45,"open_issues_count":10,"forks_count":26,"subscribers_count":68,"default_branch":"develop","last_synced_at":"2025-08-02T04:55:56.432Z","etag":null,"topics":["auto-discovery","ec2","java","jgroups"],"latest_commit_sha":null,"homepage":"http://meltmedia.github.com/jgroups-aws","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meltmedia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-06-25T23:23:55.000Z","updated_at":"2025-05-26T08:16:38.000Z","dependencies_parsed_at":"2024-11-08T19:12:46.869Z","dependency_job_id":"416c4cc4-9564-4ba5-a988-2e1d3773136e","html_url":"https://github.com/meltmedia/jgroups-aws","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/meltmedia/jgroups-aws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meltmedia%2Fjgroups-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meltmedia%2Fjgroups-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meltmedia%2Fjgroups-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meltmedia%2Fjgroups-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meltmedia","download_url":"https://codeload.github.com/meltmedia/jgroups-aws/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meltmedia%2Fjgroups-aws/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273723195,"owners_count":25156302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auto-discovery","ec2","java","jgroups"],"created_at":"2024-11-08T19:12:34.882Z","updated_at":"2025-09-05T06:39:33.714Z","avatar_url":"https://github.com/meltmedia.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"AWS Auto Discovery for JGroups\n==============================\nOverview\n--------\nThis package provides auto discovery for other cluster members on AWS using both tag matching and filters.  It is\na drop in replacement for TCPPING, allowing you to remove the definition of your initial members from your configuration\nfile.\n\nUsage\n-----\nTo use AWS auto discovery, you need to add a dependency to this package in your pom:\n\n```\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.meltmedia.jgroups\u003c/groupId\u003e\n      \u003cartifactId\u003ejgroups-aws\u003c/artifactId\u003e\n      \u003cversion\u003e1.6.1\u003c/version\u003e\n    \u003c/dependency\u003e\n```\n\nand then replace TCPPING in your stack with com.meltmedia.jgroups.aws.AWS_PING:\n\n```\n    \u003ccom.meltmedia.jgroups.aws.AWS_PING\n         port_number=\"7800\"\n         tags=\"TAG1,TAG2\"\n         filters=\"NAME1=VALUE1,VALUE2;NAME2=VALUE3\"\n         access_key=\"AWS_ACCESS_KEY\"\n         secret_key=\"AWS_SECRET_KEY\"/\u003e\n```\n\nsee the configuration section for information.  You can find an example stack in conf/aws_ping.xml.\n\nThis implementation will only work from inside EC2, since it uses environment information to auto wire itself.  See the\nSetting Up EC2 section for more information.\n\nSNAPSHOTs of the project are located in the Sonatype Nexus Snapshots repository.  You can use SNAPSHOTs by adding the following repository to your project:\n\n```\n    \u003crepository\u003e\n      \u003creleases\u003e\n        \u003cenabled\u003efalse\u003c/enabled\u003e\n      \u003c/releases\u003e\n      \u003csnapshots\u003e\n        \u003cenabled\u003etrue\u003c/enabled\u003e\n      \u003c/snapshots\u003e\n      \u003cid\u003esonatype-nexus-snapshots\u003c/id\u003e\n      \u003cname\u003eSonatype Nexus Snapshots\u003c/name\u003e\n      \u003curl\u003ehttps://oss.sonatype.org/content/repositories/snapshots\u003c/url\u003e\n    \u003c/repository\u003e\n```\n\nAnd then update your dependency to the current SNAPSHOT version.\n\nConfiguration Options\n---------------------\n* port_number - the port number that the nodes will communicate over.  This needs to be the same on all nodes.  The default is 7800.\n* port_range - the number of additional ports to be probed for membership. A port_range of 0 does not probe additional ports. Example: initial_hosts=A[7800] port_range=0 probes A:7800, port_range=1 probes A:7800 and A:7801.  The default is 50.\n* tags - A comma delimited list of EC2 node tag names.  The current nodes values are matched against other nodes to find\ncluster members.\n* filters - A colon delimited list of filters.  Each filter defines a name and a comma delimited list of possible values.\nAll filters must match a node for it to be a cluster member.\n* access_key and secret_key - the access key and secret key for an AWS user with permission to the \"ec2:Describe*\" action.  If both\nof these attributes are not specified, then the instance profile for the EC2 instance will be used (Since version 1.1).\n* credentials_provider_class - the fully qualified name of the com.amazonaws.auth.AWSCredentialsProvider to use (Since version 1.3).  This option can\nonly be used when the access_key and secret_key options are not provided.\n\nSetting Up EC2\n--------------\nYou will need to setup the following in EC2, before using this package:\n* The EC2 instances will need permission to the \"ec2:Describe*\" action.  You can either create an IAM user with this permission\nand pass the users credentials with the access_key and secret_key attributes or associate an instance profile with that permission\nto the instances and not specify the access_key and secret_key attributes.\n* In the EC2 console, you will need to create a security group for your instances.  This security group will need a TCP_ALL rule,\nwith itself as the source (put the security group's name in the source field.)  This will allow all of the nodes in that security\ngroup to communicate with each other.\n* Create two EC2 nodes, making sure to include the security group granting TCP communication.\n* If you are going to use the tag matching feature, then define a few tags on the nodes with matching values.\n\nSetting up JGroups Chat Demo\n----------------------------\nThe JGroups project provides a chat application that is great for testing your configuration.  To set up the chat application,\nfirst create two EC2 nodes, following the Setting Up EC2 instructions.  Once the nodes are created, SSH into each machine and\ninstall the java 6 JDK, Maven 3, and Git.\n\n```\nsudo apt-get install openjdk-6-jdk\nwget http://www.carfab.com/apachesoftware/maven/binaries/apache-maven-3.0.4-bin.tar.gz\nsudo tar xzf apache-maven-3.0.4-bin.tar.gz /opt\nln -s /opt/maven /opt/apache-maven-3.0.4\necho \"export PATH=/opt/maven/bin:$PATH\" \u003e\u003e .profile\n. ~/.profile\nsudo apt-get install git\nmkdir ~/git\n```\n\nNow your machine is ready to compile maven projects.\n\nNext, clone and build this project.\n\n```\ncd ~/git\ngit clone git://github.com/meltmedia/jgroups-aws.git\ncd jgroups-aws\nmvn clean install\n```\n\nFinally, it is time to run the project.  You will need to edit the configuration in conf/aws_ping.xml.  Add values for the\ntags, access_key and secret_key attributes.  Remove the filters attribute.  Then execute the following:\n\n```\nmvn exec:java -Dexec.mainClass=\"org.jgroups.demos.Chat\" -Dexec.args=\"-props conf/aws_ping.xml\" -Djava.net.preferIPv4Stack=true\n```\n\nRequest timeout bug\n-------------------\nIf you are seeing the following error in you logs. You may wish to upgrade to the 1.2.0 version, as this seems to fix the problem:\n\n```\nStatus Code: 400, AWS Service: AmazonEC2, AWS Request ID: 6ec551f5-7f56-493f-a213-b8c5cb3e856d, AWS Error Code: RequestExpired, AWS Error Message: Request has expired.\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeltmedia%2Fjgroups-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeltmedia%2Fjgroups-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeltmedia%2Fjgroups-aws/lists"}