Question about configuring AMI instance

This will probably sound a bit noobish, but having issues connecting to an AMI Instance.

I was able to setup a local pc with the client and agent, so decided to try the AMI instance.

My coworker spun up the instance and I used the sample locations.ini file for EC2.

I am testing with a US-East Instance and looking at the location.ini there are two commented lines in

; AMI: ami-0f7eae66
; user-data: wpt_server=www.yourserver.com wpt_key=SecretKey

  1. do both lines need to be uncommented?
    2 AMI setting does this actually have to refer to the ami use (ami-4f202626) or does this refer to something else?
    3 wpt_server : I assumed this refers to the client. And can this be an ip address?

Then right below the [US_East] location the [US_East_wptdriver] says uses same instance as US_EAST.

  1. does that mean I need to copy the AMI and user_data lines from [US_EAST] to [US_East_wptdriver]?

So the next thing is when I went to review the wptdriver.ini file on the agent, it looked like this.

[WebPagetest]
ec2=1s
browser=Chrome
Time Limit=120
software=http://www.webpagetest.org/installers/software.dat

This seems odd. I would have thought I need (url could also be dns for my client)

[WebPagetest]
url=http://10.10.x.x/
ec2=1
location=US_East_wptdriver
key=xxxxxxx
browser=Chrome
Time Limit=120
software=http://www.webpagetest.org/installers/software.dat

So nothing is working at the moment.

Thanks

None of those lines need to be uncommented, they are just giving you an example of what you need to spin up on the Amazon side to talk to that location.

You shouldn’t have to touch the AMI itself. They get all of their config from user data. The ec2=1 setting tells the agent that it is running on ec2 and that it should go look for the user data that was used to spin up the instance (and your server URL will be passed in through user data).

One thing you have to watch out for is that your server is actually reachable from the AMI. If it’s your desktop and in 10.10.x.x space you are running on a private net behind a firewall and the AMI’s won’t be able to talk directly to your server. In that case you can run a relay server that the agents talk to (and that your local server talks to).

Patrick,

Thanks. I did get it up an running, as part of the issue was where the instance was spun up. So once I switched to private IPs I could see the machines. I’ll ask my teammate about the user data settings as I gave the wrong information for wpt_server (DNS not reachable and forgot port). So I ended up adding to wptdriver.ini ‘url=’ and location params and that worked.

Also, this may seem unecessary, but in the documentation would recommend when referring to a server that it state either client or agent. For example on the AMI setup at first thought wpt_server meant “agent” server. I am thinking in the documentation for AMI that fill out the example more and show full examples end to end and comparison to hand built location/wptdriver ini files.

Oh and did you get my email about access to wiki to update documents.

Thanks and appreciate the response.