Current time: 08-13-2020, 01:25 PM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Feature Request: Urlblast auto registration
06-04-2010, 07:30 AM (This post was last modified: 06-04-2010 08:02 AM by asperkins.)
Post: #6
RE: Feature Request: Urlblast auto registration
Ok. I have auto registration working. It needs some more tweaking, but so far it works quite nicely.

The server settings no longer have to be updated for each remote agent. That process is handled automagically now. Smile


I discovered that you can have several params in the location= param in urlblast.ini.

My example...

urlblast.ini
---
...
location=Keller_TX&connectivity=FIOS&down=25000000&up=15000000&latency=5&browser=IE+8
...
---

I added some settings to settings.ini

// Used to enable agent auto registration
enableAutoRegister=1
// The key expected from the agent
autoRegisterKey=akey
// The base location for the jobs
autoRegisterLocalDir=/var/www/webpagetest/work/jobs/

So, in getwork, if autoregister is on, I grab all the params and create a file like...

locations_Keller_TX.ini
---
[Keller_TX]
browser=IE 8
down=25000000
up=15000000
connectivity=FIOS
latency=5
label=Keller_TX
localDir=/var/www/webpagetest/work/jobs/Keller_TX
---

I moved the retrieval of locations to a function in common.inc

function GetLocations()

This function will find all files that match locations_*.ini and process them. It builds and returns the expected array.

Also, on the "New Test" tab/page, I check to see if the agent has checked in in the last 5 minutes. If not, the ini file gets deleted and it won't show up. As soon as the agent hits getwork again the file is recreated and he shows up.

If two agents come in with the same location, they will collide. With a little more work I could add support for multiple agents from the same location, but I'm not sure yet if that's needed. I'll just have my users confirm that they didn't use an already used location name.

I hope to get this code back into the main repo. Do you prefer that I send a patch file for your review when I'm done?

btw. Is latency just an estimate, or is it calculated by some means?

Thanks,

Tony
If you'd like to test it, do the following...

In you urlblast.ini

Url Files Url=http://71.170.186.242/work/

Set the location param to something like.
*** Replace the items like Keller_TX, FIOS, etc. with your info.

Location=Keller_TX&connectivity=FIOS&down=25000000&up=15000000&latency=5&browser=IE+8
Location Key=br549

Fire it up and go to http://71.170.186.242 and try it.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Feature Request: Urlblast auto registration - asperkins - 06-04-2010 07:30 AM

Forum Jump:


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