Chapter Seven · Part 2: The Toolchain

Infrastructure as Code

Pageturn needs servers to run on, and someone has to set them up. The old way was to click through a cloud provider's website by hand. This chapter is about replacing that clicking with a file — a written description of the infrastructure you want — and the two halves of doing so: creating the machines, and making them ready.

3 topics

Up to now we've talked about code, builds, containers, and the software that runs them. But that software has to live somewhere — on servers, with networks and storage around them. For a long time, setting all that up meant a person clicking through a web interface, by hand, one box at a time. It worked, but nobody could repeat it exactly, and nobody could tell you afterward what had been clicked.

Infrastructure as code — usually shortened to IaC — is the practice of describing that infrastructure in a file instead. Three topics build the idea. First, why a written file beats clicking around a console. Then the first half of IaC, provisioning: creating the servers themselves from that file. And finally the second half, configuration management: taking a freshly created, empty server and making it ready to actually run Pageturn.

The shift this chapter makes: from clicking to a file, and the two halves of the work
Console clicksby hand, drifts
A file (IaC)describe it once
Provisioncreate the machines
Configuremake it ready

Topics in This Chapter