oliverlloyd / jmeter-ec2

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

README does not mention using other regions #51

Open oliverlloyd opened 8 years ago

oliverlloyd commented 8 years ago

Talk about:

andrewlorien commented 8 years ago

This would help, although when i followed the instruction to edit the jmeter-ec2.properties file I realised I needed these things. However, the list of AMIs at the top of the file is out of date. It took me a long time to debug that the "pre-installed AMI" from the .properties file was out of date, then search for the current AMI for my region. It would be hard to maintain that list, so maybe an instruction telling how to find the correct one would be better.

gswallow commented 8 years ago

Tagging your AMIs would be nice, too. I found copies by using thecloudmarket.com but this is certainly automatable by querying AWS for AMIs owned by your account, with jmeter-ec2-slave tags, by region.

gswallow commented 8 years ago

A quick command to isolate the latest AMI in your region (I want hvm AMIs) is:

aws ec2 describe-images --owners 847074485005 --filters Name=virtualization-type,Values=hvm --query 'Images[].{"created": CreationDate,"id": ImageId}' --output text | sort -k1 | tail -1 | awk '{print $2}'

benztest commented 7 years ago

I found that using the AMI returned from

aws ec2 describe-images --owners 847074485005 --filters Name=virtualization-type,Values=hvm --query 'Images[].{"created": CreationDate,"id": ImageId}' --output text | sort -k1 | tail -1 | awk '{print $2}'

Causes the Generate Summary Results to not display results in console or in the .out(?) file. Similar issue described in #8. However changing the AMI to a correct instance resolved my issue.

(Please note I'm still newish to jmeter-ec2).

gswallow commented 7 years ago

You're using the AMIs in https://github.com/oliverlloyd/jmeter-ec2/blob/master/jmeter-ec2.properties, then?

Yeah, it appears that there have been newer AMI builds since the recommended AMI's in that file. ami-90d2c4fa was built on 4/7/2016, while the command I specified, above, grabs the latest AMI by timestamp.

benztest commented 7 years ago

I now use an image of my master server as my AMI. Just so I'm not so reliant of public AMIs. Looking into this further though. Thanks for the reply.

oliverlloyd commented 7 years ago

That aws ec2 describe-images command above actually returns all AMIs listed under that account but most of them are for other projects which is, probably, why they didn't work with this script. I'm guessing here but perhaps because you landed on a box that had JMeter 3.0 installed which uses Generate Summary Results differently - see: https://github.com/oliverlloyd/jmeter-ec2/issues/66

But there's nothing fancy about the AMIs. The script needs JMeter and Java installed before it can run any test so it checks for these before starting and tries to install them if they're not present. See: https://github.com/oliverlloyd/jmeter-ec2/blob/master/verify.sh. The example AMIs are just Ubuntu boxes with this software pre-installed to make the script faster (it's slow to install Java and also a royal pain to make it work in an unattended script).

I did refresh some of the AMIs in the example file a little while back in this commit: https://github.com/oliverlloyd/jmeter-ec2/commit/c6a12f006e119981c2cd229c339aa39e80d6532a so it's a good place to start but if you want your own copy then you can either create your own AMI (based on one of the examples) or build one from scratch. You can copy AMIs over regions now so it's pretty simple to clone things.

benztest commented 7 years ago

Are there any disadvantages from using your example AMIs over private copies of them?