Current time: 12-16-2017, 09:33 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linux EC2 AMI test agents
10-20-2017, 04:28 AM
Post: #1
Linux EC2 AMI test agents
I've been using the Windows EC2 AMI test agents just fine for some time. Now I'm trying out the Linux version ( specifically ami-c4a968be in us-east-1, Virginia ). Oddly, I'm not seeing any attempt from the agent to connect to our private WPT server.

I confirmed that the instance can reach the WPT server. Pings come back fine, as well as a curl request to the WPT server. The WPT agent appears to be running ok:

python wptagent.py -vvvv --ec2 --xvfb --throttle --fps 30 --exit 60 --alive /tmp/wptagent

I've been poking around the image looking for agent logs some where that could give me a clue on what is happening ( or not happening ). Does it write logs out some where?

Any other suggestions on what to look at?

Ultimately I'm looking to have the WPT server manage spinning up / down the EC2 test agents, but one step at a time :-)
Visit this user's website Find all posts by this user
Quote this message in a reply
10-20-2017, 06:27 AM
Post: #2
RE: Linux EC2 AMI test agents
Possibly a difference in user data for the location string? The new agents only support wpt_loc and not the wpt_location field that had some baggage with it.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-20-2017, 06:41 AM (This post was last modified: 10-20-2017 07:31 AM by josephscott.)
Post: #3
RE: Linux EC2 AMI test agents
The user data string I have looks like this:

wpt_server=https://wpt.example.com/ wpt_loc=EC2-US-EAST-N-VIRGINIA

I used the real WPT server URL instead of example.com. I confirmed the EC2 instance has this same data in /var/lib/cloud/instance/user-data.txt.

Fortunately I noticed that in www/ec2/ec2.inc.php.

Perhaps the agent doesn't support a full URL value for wpt_server?

Hunting around, I came across - https://github.com/WPO-Foundation/wptage...st.py#L201
Visit this user's website Find all posts by this user
Quote this message in a reply
10-20-2017, 08:46 AM
Post: #4
RE: Linux EC2 AMI test agents
Confirmed, I replaced the wpt_server line with:

self.url = '{0}work/'.format(value)

I happened to include the trailing slash in the wpt_server value. After making that change I was able to get the agent to connect and run a test.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-24-2017, 03:35 AM
Post: #5
RE: Linux EC2 AMI test agents
I've created a pull request for wptagent to support full URLs and HTTPS in the wpt_server option.

As noted in the request, my Python is still very basic, so I'm happy to have this done differently if there is a better option.

https://github.com/WPO-Foundation/wptagent/pull/63
Visit this user's website Find all posts by this user
Quote this message in a reply
10-24-2017, 08:01 AM
Post: #6
RE: Linux EC2 AMI test agents
PR merged. To be fair, the agent is my first real python project so it's probably not a role model for python but it works :-)

The AMI's auto-update the OS and agent code before launching the agents so they should be evergreen and automatically "just work".

FWIW, I may not have documented it yet but there is also wpt_url as a param that takes the full url.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-24-2017, 09:06 AM
Post: #7
RE: Linux EC2 AMI test agents
Thank you for getting that merged! My private WPT server has been spinning EC2 Linux agents up and down and I've confirmed that things are working as expected.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-25-2017, 01:18 AM
Post: #8
RE: Linux EC2 AMI test agents
Awesome. Let me know if you bump into any issues or missing features. It should be pretty complete but there are a couple of settings that I'm still working on supporting (like fullSizeVideo) and some of the request manipulation options may not work in Firefox yet (adding headers, blocking requests, etc).
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)