Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for running agents on Azure #23

Open
pmeenan opened this issue Jul 4, 2013 · 21 comments
Open

Add support for running agents on Azure #23

pmeenan opened this issue Jul 4, 2013 · 21 comments
Labels

Comments

@pmeenan
Copy link
Contributor

@pmeenan pmeenan commented Jul 4, 2013

Azure provides locations that largely do not overlap with EC2 so adding support for running on Azure will open up more geographic locations for testing. The main thing to investigate is if Azure has a similar concept for user data so the agents can self-configure.

https://code.google.com/p/webpagetest/issues/detail?id=35

@drewwells

This comment has been minimized.

Copy link

@drewwells drewwells commented Jun 10, 2014

Any progress on this?

@pmeenan

This comment has been minimized.

Copy link
Contributor Author

@pmeenan pmeenan commented Jun 10, 2014

No, sorry, haven't had time to look into it. The agents themselves should run just fine - it's the spinning up from pre-configured images that needs to be looked at.

@adamwintle

This comment has been minimized.

Copy link

@adamwintle adamwintle commented Jan 16, 2015

+1 for this. I have an Azure account in Mainland China if you need it for testing.

@pmeenan

This comment has been minimized.

Copy link
Contributor Author

@pmeenan pmeenan commented Jan 19, 2015

This is next on my list to implement (probably 2-3 weeks out though since I'm working on some Chrome stuff this week).

There are basically 3 phases:

1 - Release a VHD for the agents in the VM gallery. I took a quick look and it looks like it is going to be easy. I just need to teach it to look for the instance data with the config information in a local file instead of http like EC2 does, set up an agent and image it. This will be done first and shouldn't take more than a couple of days.

2 - Teach the server how to talk to Azure's API and auto-scale the Azure VHD's. The server itself will still be run from wherever but this will allow for an arbitrary mix of EC2 and Azure agents. I don't expect it will be too hard but I haven't looked at the API yet.

3 - Set up a server VHD like the EC2 server AMI so a full instance can be on Azure. Should be trivial once 1 and 2 are done (and technically independent of either).

@adamwintle

This comment has been minimized.

Copy link

@adamwintle adamwintle commented Jan 21, 2015

Would it be possible to then add the endpoints to the locations.ini file to control both EC2 and Azure Agents from one central Private Instance?

@pmeenan

This comment has been minimized.

Copy link
Contributor Author

@pmeenan pmeenan commented Jan 21, 2015

Yep, that is the plan (in the second of the 3 parts specifically)
On Jan 21, 2015 10:48 AM, "Adam Wintle" notifications@github.com wrote:

Would it be possible to then add the endpoints to the locations.ini file
to control both EC2 and Azure Agents from one central Private Instance?


Reply to this email directly or view it on GitHub
#23 (comment)
.

@pmeenan

This comment has been minimized.

Copy link
Contributor Author

@pmeenan pmeenan commented Jan 26, 2015

Seriously? The only way to pass custom data to Azure instances is through the command-line or API? That's going to basically kill anyone's ability to launch WPT instances from the UI.

I'm making progress on the VM image - just need to hook up the custom data bit but not being able to do it through the UI really bites.

@drewwells

This comment has been minimized.

Copy link

@drewwells drewwells commented Jan 26, 2015

👎 👎 👎

@muralisr

This comment has been minimized.

Copy link

@muralisr muralisr commented Apr 5, 2016

Hi, if it is not too much to ask, could you please make what you have developed for this publicly available? It would be really helpful even if we only could launch an instance from the command line or API.

@pmeenan

This comment has been minimized.

Copy link
Contributor Author

@pmeenan pmeenan commented Apr 6, 2016

Sorry, to be clear, Azure runs agents perfectly fine. There just isn't a pre-configured image that you can pass user data to for configuration. If you set up an agent following the private instance docs and configure it manually you can clone the image all you want for a private instance.

The code for taking the configuration data for Azure is in the open source but the call to it is commented out until I can verify it works: https://github.com/WPO-Foundation/webpagetest/blob/master/agent/wptdriver/wpt_settings.cc#L201

@muralisr

This comment has been minimized.

Copy link

@muralisr muralisr commented Apr 7, 2016

Okay, thank you for the clarification.

@jarobey

This comment has been minimized.

Copy link

@jarobey jarobey commented Jan 23, 2017

@pmeenan How far along are we, here? Did you get through with Mat or want me to spin up some more support?

@pmeenan

This comment has been minimized.

Copy link
Contributor Author

@pmeenan pmeenan commented Jan 23, 2017

More support would be awesome. I got a VHD working and the support team was going to go off and figure out how to create a startup script that copied the config data to where it needed to be and they just disappeared (and there were also issues with the tooling for publishing the VHD to the store).

@AndrewCraswell

This comment has been minimized.

Copy link

@AndrewCraswell AndrewCraswell commented Sep 8, 2017

Definitely curious to see this happen!

@pmeenan

This comment has been minimized.

Copy link
Contributor Author

@pmeenan pmeenan commented Sep 8, 2017

Generic images in Azure keep bumping into the issue that it's a pain to pass custom metadata to instances so passing agent configuration details through hasn't been figured out yet.

It looks like Azure is taking helpful steps and now has an instance metadata service. If they add support for some form of custom data to that then it will be trivial.

One part-way possibility would be to allow the agents to automatically configure a location ID based on the region they are in. Users would still need to set up their own base image and configure it to point to the correct server but then the single image could be used across all regions.

At this point I'm not spinning any more cycles on it until better support for custom instance data is available (both EC2 and GCE support it through the web metadata service and make it trivial to deploy).

@ZaxLofful

This comment has been minimized.

Copy link

@ZaxLofful ZaxLofful commented Jun 29, 2018

Sorry to resurrect this topic, but I am very interested in this. I am currently using a Private instance and want an Azure agent.

I am well versed in Azure and have recent deployed custom data link you are talking about to the new Docker instances.

I would love to update the documentation, right now it was fairly difficult to setup following the current steps and help add the Azure part.

@pmeenan

This comment has been minimized.

Copy link
Contributor Author

@pmeenan pmeenan commented Jun 29, 2018

The 2 main issues are:

  1. Passing config data to the instance at runtime (WebPageTest server URL)
  2. Providing a public image that can be re-used by others

Do you know if progress has been made in either of those areas? I've been burned the 2-3 times in the past that I've tried to do it.

With the Linux agent we can now fully script the install so maybe that is an option as well.

That said, standing up your own instances should be easy. For the Linux agent you'd just start with a Ubuntu 18.04 image, run the install script, make sure it works and then clone the image. I could see adding something like GCE where the Azure regions are automatically detected from the metadata service so one image could be used across all regions.

@ZaxLofful

This comment has been minimized.

Copy link

@ZaxLofful ZaxLofful commented Jun 29, 2018

Awesome, thanks! I have an agent running right now in Azure. I was just hoping for a quicker import like AWS.

Related to your questions:

  1. I believe this is now possible, but if its not I know of an easy way to fix this with the new Azure SSH features
  2. I am working on making a public image, is there any recommendations you can give me about OS config? Or should we just try and use the docker image you have?
@pmeenan

This comment has been minimized.

Copy link
Contributor Author

@pmeenan pmeenan commented Jun 29, 2018

Does the docker image support traffic-shaping when run on Azure? That's usually the sticking point with the docker images and why I usually build them from scratch using the install script.

@anjoy92

This comment has been minimized.

Copy link

@anjoy92 anjoy92 commented Jul 5, 2018

@ZaxLofful Hey, Great to see this topic got revived recently!! Do you have the public image ready? Did you use the install script? And were there any additional steps you took to make it run on Azure? Thanks!

@joegroner

This comment has been minimized.

Copy link

@joegroner joegroner commented Jul 11, 2018

There is a "custom script extension" available now that might be useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.