{"id":20189926,"url":"https://github.com/tjm/resource-agent-ec2ip","last_synced_at":"2025-10-24T21:05:05.401Z","repository":{"id":146007716,"uuid":"89719805","full_name":"TJM/resource-agent-ec2ip","owner":"TJM","description":"Heartbeat resource agent for EC2 Private IP address ec2 assign-private-ip-address","archived":false,"fork":false,"pushed_at":"2017-04-28T15:57:13.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-13T18:50:36.443Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TJM.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":"2017-04-28T15:33:12.000Z","updated_at":"2017-04-28T15:57:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"a7b869b9-be10-45ba-b103-649670403136","html_url":"https://github.com/TJM/resource-agent-ec2ip","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TJM%2Fresource-agent-ec2ip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TJM%2Fresource-agent-ec2ip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TJM%2Fresource-agent-ec2ip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TJM%2Fresource-agent-ec2ip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TJM","download_url":"https://codeload.github.com/TJM/resource-agent-ec2ip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241624738,"owners_count":19992938,"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","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":[],"created_at":"2024-11-14T03:39:42.016Z","updated_at":"2025-10-24T21:05:05.330Z","avatar_url":"https://github.com/TJM.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Heartbeat Cluster - Resource Agent - EC2PrivateIP\n\nNO WARRANTY - Use at your own risk!\n\n## Introduction\nThis is how we manage our heartbeat clusters in EC2. This was based loosely on several scripts available on google. This has only ever been tested on CentOS 6.8+. \n\n## What does this script do?\nThis acts as a resource agent for a hearbeat (haresources) cluster. It will \"assign\" an additional private IP address to the primary network interface (ENI) of an EC2 Instance. It has the ability to \"unassign\" during a \"stop\" operation, butthat is disabled because that causes the Elastic IP to become disassociated from the private IP.\n\n## Requirements\n\n   * bash (well its written in bash)\n   * jq: `yum install jq` (EPEL)\n   * awscli: http://docs.aws.amazon.com/cli/latest/userguide/awscli-install-bundle.html\n      * NOTE: I used /opt/awscli\n\n\n## Usage\n\n   * Place EC2PrivateIP script into `/etc/ha.d/resource.d`\n   * EDIT EC2PrivateIP script to define the region (if you are not in us-east-1)\n   * Add `EC2PrivateIP::10.1.2.10` to /etc/ha.d/haresources\n   * Add `IPAddr::10.1.2.10/24` as well to /etc/ha.d/haresources\n\n\nNOTE: This script also has a setting for proxy, as long as your hostname doesn't include proxy. It sources `/usr/local/etc/proxy.sh` to get the proxy servers.\n\nNOTE2: This is about the 4th version of this script, and it may have some old cruft laying about in it (sorry). It does have the capability of managing a \"Public\" IP address, so long as you associate the Elastic IP to a secondary IP address. See https://aws.amazon.com/articles/2127188135977316 for details. This is very messy, but functional (works for me). It has lots of room for improvement!\n\nLet me know if this is useful, and PRs are appreciated.\n\n~tommy\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftjm%2Fresource-agent-ec2ip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftjm%2Fresource-agent-ec2ip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftjm%2Fresource-agent-ec2ip/lists"}