You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
grabeni is an operation-friendly tool to grab an EC2 Network Interface (ENI) from an other EC2 instance.
Detaching and attaching (grabbing) ENI is a common way to realize VIP (Virtual IP address) in EC2 with Heartbeat, Keepalived, MHA, etc.
grabeni provides command line interface for handling ENI.
The list of grabeni's features below.
Listing ENI information.
Attacing the specified ENI to the specified instance.
Detaching the specified ENI.
Grabbing (Attaching and Detaching) the specified ENI to the specified instance.
$ export AWS_ACCESS_KEY_ID='...'
$ export AWS_SECRET_ACCESS_KEY='...'
$ export AWS_REGION='us-east-1'
$ grabeni grab eni-xxxxxx --instanceid i-xxxxxxd # attach eni-xxxxxx to EC2 instance where grabeni runs if instanceid option is skipped
See also grabeni --help.
Example
$ grabeni ls
ID NAME STATUS PRIVATE DNS NAME PRIVATE IP AZ DEVICE INDEX INSTANCE ID INSTANCE NAME
eni-00000000 eni01 in-use ip-10-0-0-100.ap-northeast-1.compute.internal 10.0.0.100 ap-northeast-1b 0 i-00000000 instance01
eni-11111111 eni02 available ip-10-0-0-10.ap-northeast-1.compute.internal 10.0.0.10 ap-northeast-1c -1
eni-22222222 eni03 avaolable ip-10-0-0-11.ap-northeast-1.compute.internal 10.0.0.11 ap-northeast-1c 1
$ grabeni status eni-2222222
ID NAME STATUS PRIVATE DNS NAME PRIVATE IP AZ DEVICE INDEX INSTANCE ID INSTANCE NAME
eni-22222222 eni03 avaolable ip-10-0-0-11.ap-northeast-1.compute.internal 10.0.0.11 ap-northeast-1c 1
$ grabeni grab eni-2222222
--> Detaching: eni-2222222
--> Attaching: eni-2222222
eni eni-2222222 attached to instance i-xxxxxx