3

If you look at the Linux ecosystem (especially the Ubuntu and Alestic EC2 images) there is a common technique where the VMs are pre-configured to look at the EC2 user-data and use it as a boot script. The nice thing about this approach is that you can write a boot script that further provisions your machine, allowing you to avoid making a new image every time your software that runs on the machine changes.

I want to do the same thing for Windows, but given that I'm an Mac and Linux guy, I'm a bit lost on where to start. My requirements are:

  • This must run on Windows Server 2008
  • A bootstrap script needs to start when the machine boots up, read the user-data file by pulling down the contents http://169.254.169.254/1.0/user-data
  • The bootstap script then needs to run the contents of that file as if it were a script
  • The script embedded in the user-data needs to run in such a way that it has access to the desktop environment (ie: it can launch a browser, etc).

I'm not quite sure how services work in Windows or if I need to enable auto-login, so any advice here would be appreciated. The ultimate goal is to run a Java program that launches some custom software that in turn launches a web browser (IE, Firefox, etc) and is capable of taking screenshots.

The screenshot part is interesting, because in the past when I've tried this the only way I could get something other than a black screen was to have UltraVNC or RealVNC boot up as a service, though I don't know why that helped.

I'm looking for answers to three specific questions, as well as any general advice:

  1. Should I be focussing on a Windows service or auto-login + bat file in the "Startup" folder?
  2. If I use a Windows service, is there anything special that I need to do to make sure desktop access and/or screenshots are available?
  3. Do you recommend any tools for common Linux commands, like curl or wget? Last time I used Windows I used Cygwin a lot, but is there something more appropriate to use here?
  • Same question over stackoverflow.com has some answers http://stackoverflow.com/questions/4844084/how-would-i-created-a-flexible-ec2-windows-2008-boot-script – number5 Aug 24 '12 at 01:24

0 Answers0