4

I'm creating a CloudFormation Stack that will install and start a service on a Windows Instance. I've figured out how to install the service, but how do I start the service using cfn-init?

The examples seem to all use linux, as there is a reference to "sysvinit" How do I structure AWS::CloudFormation::Init so that cfn-init will start windows services after installing them? Do I leave in the sysvinit, replace it with something else, take it out?

ps: I'm referring to how to start services by providing information to AWS::CloudFormation::Init.services. Also, It would be nice to know how "packages" work for windows. AWS's announcemnet says that packages are supported on Windows but there is no Windows specific documentation

1 Answer 1

2

I got the following response to my respective post on the AWS CloudFormation Forum:

Posted by: Adam@AWS Posted on: Nov 7, 2012 9:05 AM in response to: Edwin G. Landy Reply Helpful Edwin,

You can install an MSI package in much the same way as a yum package. For instance:

"packages" : {
   "msi" : { 
      "mysql" : "URL or path to file on disk",
      "package2" : "path to another MSI"
   }
}

Note that the names do not matter - cfn-init will extract the ProductCode from the MSI in order to determine if the package is already installed or not. MSIs are also installed for all users with reboots suppressed.

I'm afraid we do not actually support services on Windows yet, but it is a feature that is definitely on our roadmap. Until then you can use the "net" command from within the command section to start services from cfn-init.

Thanks, Adam

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .