Octopus Deploy has great add on template steps. Using the
- AWS – Register ELB Instance
- AWS – Deregister ELB Instance
You can then leverage Environments to create Web Server Groups and thus automate deploying your web server instances.
- The first step is for Development and Staging, which do not use an ELB
- The next 4 steps is for Web Servers in Group 1
- The last 4 steps is for Web Servers in Group 2
A Powershell script is used to poll the web server, after the NUGET package is used to deploy the website. It will poll the Web Servers in the group until the homepage returns an HTTP 200 code for all of them. The homepage does various calls to the database, so this page is great to use. You could also create a custom up-time endpoint to query. A really cool way, is to have an API endpoint that returns which servers are up and use this to validate the step for polling.