Mimic Azure Staging on a custom server

In SiteAzure, we have a Staging feature. This way we can deploy it to one staging site, test it, populate all the caches, and then change the stage in the stage.

Now, how can I do this on a regular Windows server running IIS?

Possible Solution One sentinel I was thinking of has a script that copies content from one folder to another. But there may be file locks. Also, since it's not transactional, there is some kind of invalid state on the websites.

First problem: I have an external loadbalancer, but it is externally hosted and unfortunately not currently able to handle this scenario.

Second problem . Since I want my scripts to always be deployed in stages, I want to have the patch name in IIS for the staging site that I use in the buildserver scripts. So I would also have to rename the sites.

Third problem . Sites are synchronized across multiple servers for load balancing. Now when I rebuild the bindings on the site (to ensure a consistent staging server), I might get some sync issues because not all servers are installed in the same folder.

Are there any extensions / best practices on how to do this?

+3


source to share


2 answers


You have multiple servers, so you are using a distributed system. For fundamental reasons, it is impossible to get an atomic version of the latest version of the code. Even if you've done load balancing with atomic direct traffic to new sites, some old requests are still in flight. You should be able to run both versions of your code at the same time within a short amount of time. This capability is a requirement for your application. This is also useful when you can rollback bad versions.

With this requirement in mind, you can implement it like this:



  • Create a staging site in IIS.
  • Heat it up.
  • Variable bindings and site names on all servers. It doesn't have to be atomic because, as I explained, it's impossible to be atomic.
+1


source


as explained via Skype, you might like "reverse proxy". The next article looks very promising.

http://weblogs.asp.net/owscott/creating-a-reverse-proxy-with-url-rewrite-for-iis



This way you can set up a site with a frontend that can be easily switched between two (or more) private / secure sites - even they can be on the same machine. Plus, it will also allow you to actually have two public URLs that are simply swapped out depending on your requirements and deployment.

Just an idea ... I haven't tested it in this scenario, but I am running a reverse proxy on Apache in public and serving a private IIS website over VPN as content.

+1


source







All Articles