1

So we've been running a single server, and all has been well (in development). But now its time to setup some auto-scaling, and I'm a bit lost. We currently have publish profiles setup. When we build on our buildserver, we have a publish profile to publish to our Amazon EC2 IIS Instance. Great.

But how do you handle auto-scaling? A second instance will be setup automagically based on my parameters, with most likely some initial scripts to setup users, install roles, create sites, etc.... but what is the best practice for actually "publishing" the site to the newly created, stuck behind a load balancer, EC2 IIS instance?

I miss Azure ...

5

You have two main options:

  1. Pre-bake your application and configuration into an AMI, which the ASG uses to launch new instances.
  2. Use the user-data launch configuration field to have the instance itself download your application and configure it as part of the boot process.

I generally prefer #1 as it gets the instance up and running faster. #2 is more flexible, though, and there are less steps required to get newly-released code running on your ASG.

  • What about a combination of the two? Pre-baked application with IIS + Any servers / users setup, with user-data to get fresh code upon launch from some place my build system outputs to? – Jack Oct 28 '15 at 22:54
  • @Jack Sure - whatever you'd like to do. The tools are available - use them to fulfill your requirements. – EEAA Oct 28 '15 at 23:25
2

Take a look at using AWS Elastic Beanstalk.

If you use AWS Elastic Beanstalk, you wouldn't deploy directly to your EC2 instances. Instead, you would:

  1. Publish your site from Visual Studio as a deployment package (ZIP),
  2. Upload that ZIP file to AWS EB, then
  3. Let AWS EB deploy that ZIP package to your EC2 instances (behind an ELB or not)

The AWS Tools for Visual Studio can also allow you to deploy your deployment package directly out of Visual Studio to AWS EB.

AWS Elastic Beanstalk for .NET information: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_NET.html

  • I wish, we are using gov cloud which does not have Elastic Beanstalk yet :( – Jack Oct 29 '15 at 3:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.