Chapter 11. Scripting Infrastructure

I talked about baking in Chapter 1 when reasoning about your systems. Let’s use another baking metaphor because baking is a really useful way to explain systems. Cookies are a delightful small, sweet treat generally composed of some ratio of sugar, fat, and flour. You might buy ready-made cookies, bake them from prepackaged cookie dough, or assemble them from scratch from the ingredients you have in your kitchen.

Likewise, with your infrastructure, you can use services, buy prepackaged resources, or pull your own from what you have available. All the problems that can occur with your infrastructure (the process, resource state, or environmental conditions) can be remediated by scripting your infrastructure with infracode and creating the necessary recipes for your infrastructure. In this chapter, I will explain why you need to script your infrastructure regardless of your infrastructure choices and the different infrastructure lens to plan your infrastructure project.

Note

This chapter will focus on infracode, the literal Ruby, YAML, or other language used to describe your infrastructure. In Chapter 12, I’ll discuss the Infrastructure as Code model and the practices applied to your infracode.

Why Script Your Infrastructure?

I’ve seen organizations where the pace of change in practices was stagnant because there was always so much urgent and interrupting work that there was no time to invest in scripting. Sometimes there is fear that ...

Get Modern System Administration now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.