开发者

AWS Deployment of non web applications

I am looking into the best to deploy a 开发者_JS百科console app and possibly a windows service app to AWS. Everything I've read about CloudFormation makes it sound like the way to go, but all the examples I'm seeing are for web apps. Does anyone know if its possible to use CloudFormation for non-web apps? If so does any know of an example template that shows how it is done?


I recently had a similar issue. I was actually trying to install a wrapper MSDeploy package which contained multiple child packages and a runCommand to install them.

What I discovered is that AWSDeploy would fail unless the MSDeploy package passed to CloudFormation was itself an iisApp package. After investigation it turns out it's because AWSDeploy executes the MSDeploy script with -setParam:"IIS Web Application Name"="value set in config", and this is why it was failing.

To avoid this error and successfully install a non-website with AWSDeploy and CloudFormation you just need to pack a parameters file into the MSDeploy package which that contains this parameter.

Here's an example file.

<parameters>
  <parameter name="IIS Web Application Name" defaultValue="Default Web Site/" tags="isIisApp" />
</parameters>

You can then create an MSDeploy package with manifest or contentPath as follows passing in the file.

msdeploy -verb:sync -source:contentPath=C:\ConsoleApp\ -dest:package=deploy.zip -declareParamFile=parameters.xml

You can then use this with your CloudFormation template successfully. Don't forget to disable health monitoring for the instance if not running a site.


Why not use a Windows Server EC2 intance? CloudFormation is just a way to manage cloud resources, but you are still using the good ol' EC2 instance (which is one of the resources available).

In a single instance you can deploy both the console app and the Windows service.

UPDATE: you could use the information on THIS article to generate a CloudFormation template from the resources in your current account. This way you can manually set it up and then generate the template.

Hope this helps


Yes, you can use CloudFormation for any sort of app. You can create instances based on any AMI and (if you use Linux instances, use cloud-init to get software installed and running at boot time).

It's also easy to create your own AMI with your software pre-installed and use CloudFormation to start up instances based on that AMI.

There's nothing particularly web-app specific to CloudFormation; it's just a way to describe a set of AWS resources.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜