webservice_scaleset

Description

This example creates a load balanced https web farm using a scaleset to dynamically resize the number of virtual machines running nginx. The front end of the balancer listens to ports 80 and 443, and creates the necessary structures to store and use a certificate (it can be self-signed).

Due to the fundamental differences in networking between AWS (which uses subnets that are in availability zones) and Azure (which uses subnets that are region-wide), a portable blueprint creates one subnet per availability zone for the virtual machine traffic. On AWS all of the subnets may be used, however on Azure only one of the subnets will be used.

To make the example portable, use a 2048-bit length private key. If you use a larger length private key on AWS you will receive a "certificate not found" error, which is due to an AWS configuration limitation of ELBv2 load balancers against ACM.

Concepts

The following concepts are present in this example:

  • Certificates

  • HTTPS

  • Linux

  • Load Balancing

  • Nginx

  • Scalesets

  • Secrets

  • Userdata

  • Variables

  • Virtual Machines

Venues

This example is regularly tested against:

azure

Release Notes

1.0

  • Initial release.

2.0

  • Added variables for controlling vm, zone counts.

  • Added https support for existing certificates.

3.0

  • Removed the prerequisite for certificates (and on Azure, a managed identity) to be created manually before applying this example.

  • Added support for importing certificates into the venue.

  • Removed azure-specific variables.

4.0

  • Converted to using a scaleset.

Blueprint

Last updated

Was this helpful?