README does not mention using other regions
oliverlloyd opened this issue · 8 comments
Talk about:
- security groups
- AMIs
- key files
- zone
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.
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.
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}'
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).
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.
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.
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: #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: c6a12f0 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.
Are there any disadvantages from using your example AMIs over private copies of them?