Chapter 10. Cloud Deployments
10.0 Introduction
The advent of cloud providers has changed the landscape of web application hosting. A process such as provisioning a new machine used to take anywhere from hours to months; now, you can create one with as little as a click or an API call. These cloud providers lease their virtual machines, called infrastructure as a service (IaaS), or managed software solutions such as databases, through a pay-per-usage model, which means you pay only for what you use. This enables engineers to build up entire environments for testing and tear them down when they’re no longer needed. These cloud providers also enable applications to scale horizontally based on performance need at a moment’s notice. This chapter covers basic NGINX and NGINX Plus deployments on a couple of the major cloud-provider platforms.
10.1 Auto-Provisioning on AWS
Problem
You need to automate the configuration of NGINX servers on Amazon Web Services (AWS) for machines to be able to automatically provision themselves.
Solution
Utilize EC2 UserData as well as a prebaked Amazon Machine Image (AMI). Create an Amazon Machine Image with NGINX and any supporting software packages installed. Utilize Amazon Elastic Compute Cloud (EC2) UserData to configure any environment-specific configurations at runtime.
Discussion
There are three patterns of thought when provisioning on AWS:
- Provision at boot
- Start from a common Linux image, then run configuration management or shell scripts ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access