oliverlloyd / jmeter-ec2

Automates running Apache JMeter on Amazon EC2
GNU General Public License v3.0
464 stars 186 forks source link

Allocate elastic ip's at start and release at end of test #65

Closed pbellchambers closed 8 years ago

pbellchambers commented 8 years ago

This is a feature request rather than a bug. Currently when using this I'm allocating elastic ip's before a test run, then editing the jmeter-ec2.properties file with the ip's, running the test, then releasing them after (so we're not charged by amazon for unused elastic ip's).

Was wondering if it could be built into this somehow, like take the number of instances parameter at the start and allocate that many elastic ip's automatically (and throw an error if you've tried to allocate more than your account is allowed), and then release them automatically after the test finishes/instances are terminated.

oliverlloyd commented 8 years ago

Just so I understand better: why do you need the instances to have elastic ips and not the normal IP that each instance is given when it is created? The 'normal' way to run the script is without using elastic IPs.

I added the current feature in the script to allocate an elastic IP from a existing pool to allow for when you want to restrict access to the system you are testing. So you can create a firewall rule allowing traffic from your pool of elastic IPs and then, because the jmeter slaves are allocated one of these special IPs, they are not blocked. In your case, if a new elastic IP were created each time the test is run, then I'm not sure how this helps.

I ask because maybe you don't need to use elastic IPs at all?

oliverlloyd commented 8 years ago

Closing for now. Feel free to reopen if there is still an issue here.