What is the Cloud-Init equivalent for Windows?

It seems that the process of loading the boot file is a bit missing on Windows.

Linux has cloud-init, which will install packages, store files and run a bash script from user data.

Windows has ec2config, but there is currently no support for running cmd or powershell script when the system is "ready" - this means that all initial reboots are complete.

There seem to be third-party options. For example, RightScale has a RightLink agent that performs this function.

Are there any open source options available? Are you planning to add this feature to Ec2Config? Should I build it myself?

Did I miss something?

+7
source share
6 answers

It seems that EC2Config for AMI provided by Amazon now supports "User Data Counters" compared to the April 11, 2012 updates.

The documentation has not yet been updated, so it’s difficult to determine if it supports PowerShell or just cmd.exe scripts. I posted a question on the AWS forums to try to get more details and will update here when I learn more.

UPDATE: It appears that the batch syntax cmd.exe is supported, which in turn can cause PowerShell. There is a new version of the EC2Config documentation included in the AMI. Quote from this:

[EC2Config] will read the user data specified for the instance, and then check whether it contains the <script> and </script> . If he finds both, he will receive information between these two tags and save it in a batch file located in the Settings folder of this application. Then it will execute the batch file during instance startup.

A batch file will only be created and executed when the instance is first started after sysprep. If you want the batch file created and executed to set the Ec2HandleUserdata plugin state to Enabled again.

UPDATE 2: My interpretation is confirmed by Sean from the AWS team

UPDATE 3: And since May 2012, PowerShell is supported using the <powershell/> .

+14
source

I had to build one, but it was very easy. Just made a service that reads user data at startup and executes the file as a powershell script.

To get around the problem without knowing when to start the service, I simply ran the startup type as "delayed-auto", and this seemed to fix the problem. Depending on what you need to do for a system that may or may not work for you, however, in my case, that was all I had to do.

+2
source

I added a new codeplex project that already has this tool for windows. Looking forward to some feedback.

http://cloudinitnet.codeplex.com/

+1
source

We had to build it ourselves; We did this using a special service and created our own AMI. There is currently no provision for EC2Config.

Even better, there is no easy way to determine when an instance is "ready." We had to do this by closing the EC2Config log file.

0
source

I recently found nssm (at nssm.cc) that easily wraps a simple batch file (or pretty much anything else) as a service. Then you can use sc config servic1 depend = service0 to force the batch file to run at a specific point in the service initialization sequence. I use it between ex2config and sql express to create a folder on d, for example. You will need to use the utility tool to run as network services and change the AppExit property to Ignore with regedit, but it works as soon as you get it all in place.

0
source

Cloudbase.it opened the python windows service, which they call cloudbase-init, which follows the configdrive and HTTP data sources. http://www.cloudbase.it/cloud-init-for-windows-instances/

github here https://github.com/stackforge/cloudbase-init/

0
source

All Articles