Skip to main content
Introduction to Devops

Configuration Management, Infrastructure as Code, and On-Demand Infrastructure

Published: 2026-08-14
Level: postgraduate
Audience: Postgraduate students of software engineering and delivery

Prerequisite Knowledge

This lecture builds on the following concepts from earlier lectures. If any feel unfamiliar, review the linked notes before proceeding.

Previously Covered in This Subject

  • Manual configuration management as an anti-pattern - 3.4.4 Manual Configuration Management (Lecture 3)
  • Developing infrastructure as code - 3.6.5 Develop Infrastructure as Code (Lecture 3)
  • Everything in version control - 3.5.3 Everything in Version Control (Lecture 3)
  • Configuration management and version control - 5.1.4 Configuration Management and Version Control (Lecture 5)
  • The cloud as a catalyst and its service models - 7.1 Cloud as a Catalyst for DevOps and 7.2 Cloud Service Models: SaaS, PaaS, and IaaS (Lecture 7)
  • Artifacts and artifact repositories - 12.7 Artifact Management (Lecture 12)
  • Configuration as code in the pipeline - 13.6.2 Acceptance Staging and Configuration as Code (Lecture 13)

Configuration Management, Infrastructure as Code, and On-Demand Infrastructure

This session covers configuration management end to end: what it is and why organizations need it, how to manage application configuration and environment configuration, what infrastructure as code means, how server provisioning used to happen and how it happens with automation, the difference between configuration management and change management, the tools that support both, and finally on-demand infrastructure with auto scaling. The discussion moves in that order, so each piece builds on the one before: configuration needs an environment, an environment needs provisioning, provisioning needs automation, and automation is exactly what infrastructure as code delivers.

17.1 Configuration Management — What It Is and Where It Comes From

17.1.1 Definition and Origins

Hook: If a new employee joined your team tomorrow, could they rebuild your staging environment exactly as it stands today — every patch, every setting, every version — without asking anyone? Most organizations cannot answer yes. Configuration management exists to make that answer yes.

Configuration management is not a new idea. It started in the 1950s, introduced by the United States Department of Defense, which described it as a technical management discipline. A discipline is a process, and that is the first thing to internalize: configuration management is a process, not a tool or a single practice. Tools support it, but the process is the thing.

Definition: Configuration management is the process by which an organization establishes and maintains the consistency of an application — or of a particular function of that application — along with the physical attributes and the performance of that application, throughout its life cycle.

The Department of Defense's second phrasing is equally important: configuration management is the process by which all artifacts related to a project or application, and the relations between those artifacts, are stored, retrieved, uniquely identified, and uniquely modified whenever needed.

Think of an artifact as anything the project touches or produces that could ever need to be changed in a controlled way. The word artifacts is broad on purpose. Artifacts include the policies related to some resources, the processes, the documentation, and the tools required to implement the system of consistent performance, functionality, and attributes. So when you audit whether an organization practices configuration management, you are looking for the whole collection: policies, processes, documentation, and tools — and the relationships among them — all kept identified and changeable in a controlled way.

Worked example — what counts as an artifact: Imagine the e-grocery application used later in this session. Its artifacts are not just the source code:

  • The policies: "every deployment to production must be approved by a release manager."
  • The processes: the exact sequence of steps a deployment script follows.
  • The documentation: the runbook describing how to restart the payment service.
  • The tools: the build server, the configuration files it reads, and the versions of those files.
  • The relationships: "application version 1.2 requires JRE 8" — a relation between two artifacts.

A configuration management audit checks that each of these exists, is uniquely identified (a name and version), is stored somewhere recoverable, and can be modified in a way that is recorded. Missing any one of these makes the strategy incomplete.

Why "uniquely identified"? If two files both claim to be "the production configuration" and nobody can say which is which, then an environment rebuild could pick the wrong one. Uniquely identified artifacts mean every artifact has one identity — a name, a version, a location — so the collection has no ambiguity.

17.1.2 The Four-Question Test for a Strong Strategy

How do you know whether an organization — or a project — actually has a strong configuration management strategy? The practical answer is a set of four questions. If you answer yes to all of them, you can conclude the organization or project has a great configuration management strategy.

The four-question test for a strong configuration management strategy:

  1. Can I exactly reproduce any of my environments?
  2. Can I easily make an incremental change to any individual item?
  3. Can I easily see each of these changes? (traceability)
  4. Is it easy for every member of the team to get information whenever they need it — and, if they have the authority, to make changes?

Question 1 — Can I exactly reproduce any of my environments? If you point at the staging environment, the user acceptance testing environment, the capacity environment, or the development environment, can you rebuild it exactly? Reproducing means the version of the operating system, its patch level, the network configuration settings, the software stack needed for that project (for example, "I need Visual Studio, I need MongoDB"), the application deployed into it, and the configuration of that application. If the answer is yes, that is one mark for a strong strategy.

Worked example — question 2 applied: the JRE upgrade. Say you run JRE 7 (Java Runtime Environment 7) in your application and you want to upgrade it to JRE 8. Question 2 asks: can you make that one change smoothly, and does it get reflected across all the other environments?

  • With a strong strategy: you change one definition — "the application needs JRE 8" — in one place. Every environment that should carry the upgrade picks it up: development, UAT, staging, production. One single-point change, propagated everywhere.
  • Without a strategy: an admin upgrades JRE on the production servers by hand, forgets the staging servers, and weeks later a test in staging fails mysteriously while production behaves differently. The "one change" silently became two changes, applied to only some environments.

The second scenario is exactly the failure mode good configuration management prevents: a smooth, single-point, all-environment upgrade is what the question is really testing.

Question 3 — Can I easily see each of these changes? This is traceability. You should be able to trace back what changes happened, who made those changes, why they were made, and when they were made. If you have that traceability, the strategy is again justified. Traceability is what turns a configuration history from guesswork into evidence: when production breaks at 2 a.m., the first question is "what changed?" — and a strong strategy answers it from a log, not from memory.

Question 4 — Is it easy for every member of the team to get information whenever they need it? And if they have the authority to make changes, does the process actually let them make those changes easily? The process should not block authorized people. Notice the boundary this question draws: information must be easy to get, but change requires authority. The strategy fails if it is so locked down that authorized people fight the process — or so open that anyone can change anything.

If all four answers are yes, the organization or project has a great configuration management strategy.

Pitfall: Treating the four questions as a one-time checklist performed at project start. They describe a continuous property: environments change, applications get new versions, teams gain and lose members. The strategy must keep answering yes over the whole life cycle, not just on the day it was written down.

17.1.3 Configuration Management Reaches Beyond Your Own Code

One caution before moving on: configuration management is not restricted to your own application. Sometimes your application depends on third-party tools and technology — some other application provided by an outside vendor. A strong configuration management strategy has to cover the whole project, including your own code base (which your industry maintains and develops) and the other code or applications your project depends on. That means you should ask all four questions to the third-party vendors who supply the sub-applications you rely on. It is easy to restrict your strategy to the in-house project and forget that it is dependent on someone else's application; confirming that vendors run a similar configuration management process is part of a complete strategy.

Worked example — the vendor blind spot: Your e-grocery application uses a third-party payment gateway to process card payments. You practice flawless configuration management internally: every version, every environment, every change is tracked. But the payment gateway's vendor applies patches to its service without telling you, and one day the payment flow breaks in production.

A complete strategy would have asked the vendor the four questions upfront: can they reproduce their environment exactly? Can they make incremental changes smoothly? Can they show you what changed, when, and why? Is information easy for their team — and for you, their customer — to get? If the vendor cannot answer yes, that dependency is a risk your own good habits cannot fix.

Recap: Configuration management is a 1950s Department of Defense idea: a technical management process that keeps every artifact of a project — and the relations between artifacts — stored, retrieved, uniquely identified, and uniquely modified across the life cycle. A strategy is strong when all four questions get a yes: exact reproduction of environments, smooth incremental changes, visible/traceable changes, and easy access for authorized team members. And the coverage must extend to third-party dependencies, not just your own code.

Bridge: Knowing what configuration management is leaves one question open: why does it matter enough to build a whole strategy around it? The next section answers with the reason configuration exists at all — it controls how your software behaves at build, deploy, and run time — and challenges a widespread myth about how risky configuration changes really are.

Where this matters in the real world: Configuration management has been a formal discipline since the 1950s, when the United States Department of Defense needed weapon systems whose parts, documentation, and changes could be verified consistently across contractors. The same idea powers every modern practice in this course: version control, continuous integration, deployment pipelines, and environment automation all depend on artifacts being stored, identified, and changeable in a controlled way.

17.2 Why Configuration Management Matters

17.2.1 Configuration Controls Behavior at Build, Deploy, and Run Time

Hook: Your application's code decides what it can do; its configuration decides what it will do in your organization. Which one do you think carries more risk when changed?

Why do these configurations exist at all, and why do you need a strong strategy around them? The core reason: configuration information is used to change the behavior of your software at build time, deploy time, and run time. If you want your software to behave a certain way, you change the configuration information.

The guiding rule of this session: treat your configuration information the same way you treat your source code.

Configuration is a third ingredient alongside code and data: an application is really three parts — the binaries (code), the data, and the configuration that tells the code how to behave. The delivery team then has to consider a few facts when it comes to software configuration. First: what configuration options should be available? Most of the practices described in this session are just the guiding rule applied: if you would not change source code by hand on a production server, you should not change configuration by hand either; if you would version, review, and test your code, do the same for configuration.

Three points in the life cycle give configuration its power:

  • Build time — configuration decides what gets baked into the binaries, for example which libraries and which versions of them are compiled in.
  • Deploy time — configuration decides where the deployed application points: which database, which messaging server, which external services.
  • Run time — configuration decides how the running application behaves, for example which feature flags are on or off.

The same application with different configuration is, in effect, a different behaving system — which is why uncontrolled configuration changes are so dangerous.

17.2.2 Flexibility Comes at the Price of Configurability

Everybody wants flexibility. Imagine implementing an e-grocery application. If a user opens your application on a mobile phone, it should work. If the user opens it in a web browser, it should work — and not only on Firefox, also on Google Chrome. It should not be a Windows-only application; if someone accesses it from a Mac, it should work. If it is a tablet, an iPad — it should not depend on the device. The application must be flexible enough that any user can reach it from any of their devices. That is what the end customer is looking for; customers do not want to be restricted to a single solution, they want everything easily available and easily accessible.

The catch: flexibility usually comes at a cost. To achieve flexibility you need ultimate configurability. Your configuration settings have to cover all of this — a setup ready for that device, that operating system, those browsers. So strong configuration management is the mechanism that makes software flexible.

Worked example — the e-grocery flexibility requirement: The product owner wants one application that works everywhere:

Access path What must be configured
Android phone Mobile layout, touch-optimized UI, mobile notifications
iPhone / iPad Same mobile experience on Apple's platform
Windows laptop (Chrome, Firefox, Edge) Full browser layout per browser engine
Mac laptop Same browser layout, macOS-specific file handling
Tablet Responsive breakpoints between phone and desktop

Each of these is not a different program — it is the same program with configuration telling it how to behave on that device, operating system, and browser. Count the settings: five device classes × multiple browsers × version differences quickly become dozens of configuration values. Flexibility is delivered by configurability, and configurability is only trustworthy with configuration management behind it. Without the strategy, each new device class means one more fragile hand-edit; with it, each device class is just another set of tested values.

The same principle appears in the standard literature: the more flexibility you intend to offer users, the more configuration options your system must expose, and the more carefully those options must be managed and tested — because every one of them is a place where the system can be pointed at the wrong thing.

17.2.3 The Myth That Configuration Is Less Risky Than Source Code

Here is a general belief — the myth — that most people hold about configuration information: it feels somehow less risky to change than source code. It deserves a challenge, because the common assumption is backwards.

Q: Is configuration information less risky to change than source code? One answer came back that it can sometimes lead to downtime as well — it is risky, it is equally risky.

A: Exactly right — and more than equally. Configuration is actually riskier than source code. Look at the gatekeepers that source code passes through. If someone writes nonsense code that would break the application, the compiler catches it first. If it is a code-level bug, continuous code inspection catches it. Automated tests automatically return a failed status when buggy code has been written. Now what guards configuration information? Nothing comparable. Say you change only the URL or the IP address of a database or some server — one value — and everything stops. Configuration information is free-form and it is untested.

Worked example — one value brings everything down: Consider a production database server at IP address 192.168.10.42, stored in a configuration file. A developer with access changes the value to 192.168.10.24 — a single character differs from the correct value. Nothing checks this change: no compiler, no code inspection, no automated test. The application starts, tries to reach the database at the wrong address, and fails. Every user of the service is affected. That one value, untested and free-form, did what a buggy code change could not do without being caught somewhere.

Even worse, with manual changes, anyone who has the authority can change it: a frustrated employee who has resigned and wants to get away from the organization can, before leaving, change some configuration information and bring the application down. Your application status goes down, and the company pays a huge penalty until someone finds the root cause and identifies where the problem was. So configuration information is tricky — it is riskier than source code.

The lesson that follows: changes to configuration deserve the same discipline, review, and testing as changes to code — more, if anything.

Pitfall: Believing "it's just a config change" is harmless. The exact opposite is a safer starting point: every configuration change is a candidate for production downtime, so it should be reviewed, tested, and logged like a code change — because unlike code, nobody will catch a mistake for you.

17.2.4 Where to Inject Configuration Information

Configuration information can be injected into the application at several points. At build time you inject things like libraries and their particular versions. You can also inject during deploy time, during testing time, and during your release into the production environment, where it becomes available to the end customer.

The general advice: it is considered a bad practice to inject all the configuration information at build time or packaging time. It is always better to configure your application at deployment time — that is when you can tell it where the services it depends on live, such as the database, messaging servers, or external systems. All of that information is available at deployment time, and the application is then pointed at the right services when it starts.

Why deployment-time injection beats build-time injection: if configuration is baked into the binaries at build time, then every environment that needs different settings requires a different build — the artifact you test in staging is not the artifact you deploy to production. Deployment-time injection lets the same tested artifact be pointed at different services in each environment, so the thing you release is the same thing you tested.

The last framing point: configuration lives at two levels. An application is not an island — it needs something to be resided on, and that something is the environment. So there is configuration information related to the application and configuration information related to the environment, and you manage both.

Recap: Configuration is one of the three parts of an application (with code and data), and it controls behavior at build, deploy, and run time. Flexibility — like an e-grocery app working on every device and browser — is bought with configurability, and configurability is only safe under configuration management. The common belief that configuration is less risky than code is a myth: code has gatekeepers (compiler, inspection, automated tests), configuration has none, so it deserves equal discipline, review, and testing. Prefer deployment-time injection over build-time, and remember configuration spans both the application level and the environment level.

Bridge: "Manage both levels" leads straight to the next question — how exactly do you manage the application-level configuration? The next section turns the principles into a concrete model: name–value tuples, where to store them, how deployment fetches them, and how to test the whole process.

Where this matters in the real world: Every production outage investigation begins with "what changed?" — and configuration changes are a top answer. The DevOps community's answer is the same discipline as code: version-controlled configuration, reviewed like a pull request, tested like a build, and applied automatically. Tools like Puppet, Chef, and Ansible (covered later in this session) exist largely to make configuration changes pass through controlled channels instead of being typed by hand.

17.3 Managing Application Configuration

17.3.1 The Considerations

When it comes to managing application configuration, three considerations frame everything:

  1. How do you represent your configuration information? — what structure do the settings take (for example, name–value pairs)?
  2. How do your deployment scripts access those configurations? — what mechanism fetches the right values at deploy time?
  3. How does the configuration vary between environments? — which values differ between development, test, and production, and for different versions of the application?

The variation is real. In the development environment you have the build binaries and libraries — the stuff needed for building the software. In the deployment environment you do not need those; you need only the binaries and libraries on which the application runtime depends. In the test environment you probably need more testing tools — Selenium and similar tools. In a production-like environment you just need the user acceptance testing tools, not the other testing tools. Your configuration settings change as per the environment, as per the application, and as per the version of the application:

Worked example — variation by version: the e-grocery application 1.1 depends on JRE 7, whereas e-grocery 1.2 needs JRE 8.

Application version Java runtime requirement Notes
e-grocery 1.1 JRE 7 Current production version
e-grocery 1.2 JRE 8 Next release, in testing

This one fact changes configuration in two ways. First, the available configuration options differ: version 1.2 may introduce new settings (for example a payment gateway URL) that version 1.1 never had. Second, the values differ: the JRE setting for the same environment changes from 7 to 8 across versions. Any configuration system that only knows "the e-grocery app needs JRE 7" is already wrong for half the environments it serves. The configuration must be keyed by application, by version, and by environment simultaneously.

17.3.2 Modeling Configuration as Name–Value Tuples

The first solution for representing configuration: model each configuration setting as a name and value pair. If there is a name, there is a value: for the setting "JRE", the value might be 7 or 8; for "Tomcat", the value describes the version; and you can also carry a status such as "always running". Model them as a tuple — the name and the value of that particular configuration.

Worked example — configuration as tuples: The e-grocery application's configuration is a set of tuples:

Name Value
java.runtime 8
app.tomcat.version 9.0.65
app.tomcat.status always running
db.host db-prod-01.internal
db.port 5432

Each row is a tuple: the name identifies what is being configured, the value fixes how it is configured right now. The whole configuration of an application is simply the set of all its tuples.

Once you have tuples, where do you store them? Three options: a database, a version control system, or a directory or registry from which you access them. The best solution is the version control system. Why? As your configuration information grows and you manage it in a database or a directory, you lose the ability to track who made what changes over time and what kind of changes happened — you lose traceability. With a version control system you get great traceability almost for free: just check in the configuration file and you have the history of your configuration over time. It is also worth keeping a list of the available configuration options for the application in the same repository where you keep your source code — though, and this is a recurring theme, your values can be kept somewhere else.

Pitfall: Storing configuration in a database or registry without any history. Both are convenient to access remotely, but neither records "who changed what, when, and why" on its own. The moment something breaks, you are back to guessing. If you must use a database or registry, keep version control as the system of reference and load the appropriate version into it — or ensure the store itself logs every change for audit and rollback.

17.3.3 How Deployment Fetches Configuration

How does this work at deploy time? Your deployment environment passes the deployment environment name to your script. The script then fetches the appropriate configuration from the configuration services and makes the application available — perhaps by placing the configuration as a file on the file system.

The deploy-time fetch sequence:

  1. The deployment process knows which environment it is deploying into (development, UAT, staging, production) — this is passed in as a property, command-line switch, or environment variable.
  2. The deployment accesses a script from the version control system.
  3. The script fetches the appropriate configuration services and information for that environment name.
  4. The script makes that information available to the particular application — for example, by writing a configuration file into the file system, or by passing connection parameters to the application at startup.

The same script, given a different environment name, fetches a different value set — the mechanism stays identical, and only the inputs change.

17.3.4 When Configuration Values Change

Each configuration setting can be modeled as a tuple, so the configuration of any application is a set of tuples. A tuple's value typically depends on three things: what application it is, what version of the application it is, and what kind of environment it is — development, UAT, performance testing, staging, or production.

Given that model, when do you change the configuration information?

  • Whenever you add a new environment, you should change the configurations — a new environment needs a new set of values for the applications deployed into it.
  • Whenever you create a new version of the application, you need to add this new version — new versions introduce new settings and retire old ones.
  • Whenever you promote a new version of the application from one environment to another, changes are likely needed — the new settings must exist in the new environment with that environment's values.
  • If you are relocating your database server, you definitely need to change the database server IP address in the configuration information — every setting that references the old database must point at the new one.

These are the use cases where configuration changes typically happen.

Worked example — relocating the database server: The e-grocery database moves from db-prod-01.internal (192.168.10.42) to db-prod-02.internal (192.168.10.84). Three configuration tuples reference the old server: db.host, db.backup.host, and reporting.db.host. With a configuration system, one controlled update changes all three to the new address, is reviewed, and is deployed by the script to every environment that needs it. Without one, an engineer edits one file at a time by hand, misses reporting.db.host, and the reporting feature silently breaks a month later.

17.3.5 Principles of Application Configuration Management

The principles come straight out of the considerations above:

  • Keep the available configuration options in the same repository as your source code, but store the values somewhere else. Why store values elsewhere? Because the life cycle of code is different from the life cycle of a configuration setting. Configuration settings sometimes carry passwords, and passwords and sensitive information are really sensitive: they should be managed with a different life cycle, given access only to authorized people, and restricted from all team members. If somebody changes a password or sensitive information, it directly impacts the application. So the values never go into version control — they live in some other file or location, and your script accesses the values from that location.

Assumption & Scope: "Values elsewhere" applies to sensitive and environment-specific values. The separation is justified when the value's life cycle differs from code — for example a password that rotates quarterly while the code changes daily. What does not follow is hiding ordinary non-sensitive defaults; over-separating every value creates a scattered configuration that is impossible to trace. The goal is one place for values, another for the descriptive list of options, and a scripted path between them.

  • Configuration should always be performed by an automated process, using values taken from a configuration repository. Then you can always identify the configuration of every application in every environment. Because it is an automated process you can trace it and you can have logs of the configuration changes. Replication becomes easy: executing the script once and re-running it gives the same output.
  • Configuration scripts should be tested the way source code is tested. Since you are writing a script, the script itself must be tested.
  • Follow clear naming conventions. Just as there are good practices for writing source code, there are good practices for writing scripts; the naming convention should make the purpose of each configuration clear. A name like db.host needs no manual; a name like x does.
  • Keep configuration information modular and encapsulated. Modularity matters because if you change something at one place, it should not impact other, subsequent places; modifications should stay easy to make.

Real-world: this is the pattern industry follows — configuration information kept in the same repository as the source code, sensitive values kept in a separate, access-controlled location, and automated retrieval at deploy time.

17.3.6 Testing Configuration Scripts

Testing a configuration script is not the same as testing source code; the testing happens in two parts.

Part 1 — verify references to external services. The first stage is to ensure that the references to external services inside the configuration settings are good. For example, as part of the deployment script you should verify that the messaging bus your environment uses to access configuration information is actually up and running at the address configured — you must be in a position to access that information. At the very least, ping all external services.

Part 1 (continued) — the script should fail fast on missing dependencies. The deployment or installation script should fail if any of its dependent applications is not available. Say the e-grocery application requires a Tomcat instance to be up and running; the configuration must be written so that if the Tomcat instance is not running, the script fails. This is a great way of performing smoke testing for your configuration settings.

Worked example — the Tomcat fail-fast test: The e-grocery deployment script is written so that it refuses to proceed unless a Tomcat instance answers at the configured address.

  • A configuration typo points the script at port 8081 instead of the real Tomcat on port 8080 → the script cannot reach Tomcat → the deployment fails immediately, before the application is touched. The failure is fast, loud, and cheap.
  • Compare the alternative: the script proceeds, the application starts without its application server, and the outage is discovered by customers.

Part 2 — smoke testing itself. How do you perform that smoke test? Go and shut down the dependent instances or dependent applications, then run the functionality of your project and see whether it fails. If it fails, it is working as expected. The second half of the smoke test: verify whether your configuration management tool brings the state to the desired state — that is, whether the tool fetches the Tomcat instance and automatically runs that instance on the environment. If that convergence happens with your configuration management script, you have tested the configuration end to end.

Exam note: the two-part structure for testing configuration — (1) verify external references and fail fast on missing dependencies, (2) smoke test including desired-state convergence — is exactly the kind of process detail to remember. The full test cycle is: verify references → fail fast on missing dependencies → shut down dependencies and confirm the application fails (expected failure) → confirm the tool converges back to the desired state and restarts the dependency.

Pitfall: Skipping the smoke-test half. Passing "the references are reachable" does not prove the application works with that configuration. The smoke test runs real functionality that depends on the settings, so a value that is syntactically fine but semantically wrong (right address, wrong service) still gets caught.

Recap: Application configuration is managed through three considerations — representation, script access, and variation by environment and version. Model each setting as a name–value tuple, store the option list with the source code and the values elsewhere (sensitive values access-controlled), fetch values at deploy time through a script keyed by environment, and update configuration when environments, versions, promotions, or infrastructure moves demand it. Test configuration scripts in two parts: verify external references and fail fast, then smoke test including desired-state convergence.

Bridge: This section handled the application's own configuration — but remember the two levels from 17.2: the application and the environment it runs on. The next section moves to the second level: managing environment configuration, where the problems multiply and the strategy shifts from repair to recreation.

Where this matters in the real world: This is the everyday reality of deployment engineers: environment-specific value files, secrets managers (which exist precisely because passwords must never sit in version control), and deployment scripts that fetch the right values by environment name. When a production incident is traced to a wrong db.host, it is almost always a failure of one of these principles — values in the wrong place, scripts not tested, or changes made by hand.

17.4 Managing Environment Configuration

17.4.1 No Application Is an Island

Hook: Your application code is only a fraction of what must work — the machine, the operating system, the middleware, the network, and the external services all have to be right too, and each of those has configuration of its own.

Every application depends on hardware, software, infrastructure, and external systems in order to work — no application is an island. It needs something to run on, and that something is the environment. Any application also depends on configuration like your port number, your messaging bus, and what kind of operating system configurations are in place. These are the facts that every application needs, so managing the environment's configuration is unavoidable.

Analogy (the professor's): "No application is an island" — an application is like an island that only works because of the sea around it. The island cannot move its port, its ferry schedule, or its supply routes by itself; those are its environment. In the same way, an application depends on its environment: the port number it listens on, the messaging bus it connects to, the operating system settings underneath it. Manage the environment or the island starves — however good the code is.

The environment's configuration matters as much as the application's. An application that depends on a messaging bus fails if the bus is misconfigured, even though the application's own configuration is perfect. An application that needs many file descriptors fails if the operating system default limit is lower than the application needs. Both failures look like application bugs — but neither is fixable by changing the application.

17.4.2 The Problems with Environment Configuration

Managing environment-related configurations comes with a familiar set of problems:

  • Large collections are hard to maintain. If the collection of configuration information is very large, maintaining and managing the environment's configuration settings becomes really difficult.
  • Small changes can break everything. A small change to the environment can break the whole application or severely degrade its performance. As discussed earlier, this is riskier than changing source code.
  • Diagnosis is slow and expensive. Once the environment breaks down, it is really difficult to find out why that particular thing failed. Fixing it takes an unknown amount of time and requires senior personnel — you involve your level-three experts, and you escalate the issue from level one to level two to level three before a senior person solves it.
  • Manual reproduction is nearly impossible. It is extremely difficult to precisely reproduce a manually configured environment for testing purposes. It takes a long time to manually reproduce the same kind of testing environment or the same pre-production (also called mid-art production) environment.
  • Environments drift apart. Without configuration, it is difficult to maintain environments, and so the behavior of different nodes drifts apart.

Worked example — the two nodes that drifted apart: Take two nodes for the same kind of testing environment. Because setup is manual, you sometimes see the two nodes behave completely differently.

  • Node A was configured in January by one engineer, who installed the application manually, applied a Java patch by hand, and edited a config file directly on the machine.
  • Node B was configured in March by another engineer, who followed the same checklist from memory, skipped the Java patch (the checklist was missing a line), and never touched the config file.

Now a report generation feature works fine on Node A but shows a performance difference on Node B — the report takes three times longer. Is it the patch? The config file? Nobody can say, because nobody can point at the exact differences between the two nodes. The two nodes are the same environment in name only; in behavior they are strangers. This is the typical instance you encounter when managing environments manually: you find compatibility issues, where in one environment a particular functionality works absolutely fine, while in the other environment you see a performance difference — for example, a difference in report generation between one environment and another.

Pitfall: Escalating environment problems as if they were application bugs. When a "works on one node, fails on another" report arrives, the investigation frequently burns days going through code before someone checks that the environments differ. The symptom lives in the environment; the cause is missing configuration management, not missing code.

17.4.3 The Best Way: Automate, and Recreate Rather Than Repair

The best way to create a new environment is a fully automated process. And the key principle that follows: it should always be cheaper to create a new environment than to repair an old one. If an environment got broken, finding the problem and fixing it takes time — so why not have a process that makes creating a new environment cheaper? You can simply shut down that instance of the environment, create a new environment using the script, and perform the testing on it. That is the best way, and you achieve it with a fully automated process.

Analogy — pets versus cattle: In the traditional world, servers were treated like pets: each one had a name, a personality, and a manual history — when a pet got sick, you nursed it back to health. The automated world treats servers like cattle: they have numbers, not names — when one gets sick, you do not repair it, you replace it with a fresh one raised from the same template. The recreate-don't-repair principle is exactly this: a broken environment is cheaper to replace from the script than to nurse back to a trustworthy state.

The recreate-not-repair principle has a cascade of benefits: environment creation is repeatable (same script, same result every time), predictable in time (minutes instead of days), and auditable (the script itself records what the environment contains). Repairing, by contrast, depends on whoever happens to investigate, on what they remember, and on what they changed by hand along the way.

17.4.4 What Environment Configuration Must Cover

When you capture environment configuration, the kinds of information you should be concerned about are:

  • The operating systems in an environment, including their versions (minor and major), patch levels, and configuration settings.
  • The extra software packages that need to be installed on each environment to support the application, including their version and configuration. For the development environment, a developer might need Notepad++ and various development-related tools and development kits — but those are not required for the testing environment. So you must record which package, which version, and which configuration settings apply per environment.
  • The networking topology required for your application to work.
  • The external services your application depends upon, including their versions and configurations.
  • Any data or other state that should be present — for example, the production database, and what values those particular data sets should have.

Two principles deliver an effective configuration management strategy here.

  1. Keep your binary files independent from your configuration information. Binaries change slowly and are large; configuration changes often and is small. Mixing them means every configuration change forces new binaries (or vice versa), breaking the "same artifact everywhere" rule.
  2. Keep all configuration information in one place — the values in one place, and the relevant descriptive information about the configuration in another place. That is what industry does: configuration information lives in the same repository as your source code, and the values are kept somewhere else.

Recap: Every application depends on its environment — hardware, software, infrastructure, external systems — so environment configuration is unavoidable and as important as application configuration. Manual environment management fails in five predictable ways: large collections are hard to maintain, small changes break everything, diagnosis is slow and needs level-three experts, manual reproduction is nearly impossible, and nodes drift apart (the two-nodes example). The best strategy is automation with the recreate-don't-repair principle: it should always be cheaper to create a new environment than to repair an old one. Environment configuration must cover OS (versions, patches, settings), extra software packages, networking topology, external services, and data/state — with binaries kept independent of configuration, and configuration kept in one place.

Bridge: Environment management sounds good in principle — but how do you actually create an environment automatically, with the right OS and the right packages, by running a script? That is exactly the problem infrastructure as code solves, and it is the next topic.

Where this matters in the real world: Every cloud-based team practices recreate-don't-repair daily: when a build agent or test server misbehaves, the standard move is to terminate the instance and spin a fresh one from the image or provisioning script rather than SSH in and repair it. Organizations that keep "works of art" servers — each one lovingly hand-configured — are precisely the ones where the five problems above become daily firefighting.

17.5 Infrastructure as Code

17.5.1 What Infrastructure as Code Means

You need an environment before you can maintain its configuration. How do you create that environment — with the right operating system, the right software packages — in an automated way? That is what infrastructure as code (IaC) is.

Definition: Infrastructure as code is the method of writing and deploying machine-readable definition files that generate the service components. It helps the IT operations team to manage and provision IT infrastructure automatically by writing code, without relying on a manual process.

Because everything is expressed as code, infrastructure as code is often described as programmable infrastructure: the infrastructure is not something you build by hand; it is something a program creates for you whenever you run it.

Nobody wants to go to the command prompt and place commands every time, following a checklist — do this, do this, do this — and then keep the environment ready. Everybody is looking for a solution where you have written a script, and whenever you want the environment you just run that script (fetching it first if needed), and the environment is ready.

Analogy — the recipe versus the chef: Think of the old way as calling a chef and describing a dish from memory: the chef decides the amounts, the steps, and the order — and the dish comes out slightly different every time. Infrastructure as code is the written recipe: exact ingredients, exact quantities, exact steps, stored on a card. Anyone — or any automated kitchen — following the recipe produces the same dish every time. The recipe is the code; the kitchen is the tool that runs it. The analogy breaks in one place: a recipe still needs a skilled cook, while IaC aims for the script to do the entire job with no manual skill at all.

17.5.2 Why Infrastructure as Code Fits the DevOps Culture

Infrastructure as code is what DevOps looks like in practice. Operation teams now know how to write a script — they know the logic and the code because they write scripts for the infrastructure. Software developers, meanwhile, manage the configuration information related to the application during source code writing, so they understand the configuration part as well. The result: it is not two different teams anymore; they are collaborated teams who understand each other's pain points. The wall from earlier sessions comes down because both sides now speak code.

There is also a fundamental constraint that IaC removes. In generic software development you need an environment to implement software — even to write code, you need a development environment ready. Once your code is written, you need a testing or staging environment that mirrors your live or production environment as closely as possible. Creating that mirror image of the production environment is a fundamental constraint for every organization, and infrastructure as code is the only way that assures the exact mirror image. Once you have a staging environment equivalent to production, you can be confident that new code — the changes made to the application — will not crash with the existing code definitions, because you tested it in a production-like place. That boosts the team's confidence that the new change will work fine in production.

Why "exact mirror" is the whole point: The value of a staging environment is proportional to how closely it matches production. A staging environment that differs from production in OS patch level, middleware version, or network settings can pass every test and still fail in production. IaC guarantees the mirror is exact because both environments are generated from the same definition files — there is no way for them to drift apart at creation time.

17.5.3 How Environments Were Created Before Infrastructure as Code

Before IaC (and before DevOps), infrastructure creation was a manual, ticket-driven chain. When the test team wanted a testing environment, they raised a ticket to the system admin team saying so-and-so environment is needed. The system admin team created and set up the environment, trying to mirror the live environment by manual steps — trying their level best to make it production-like. Once the environment was created, the ticket went to the DB admin team, which set up and created the database environment and then handed it over to the development team, because the development team would deliver the code into that environment. Then it was handed over to the testing team, which performed several operational and compliance tests. After all that succeeded — if everything was green — the code hit the production environment. Every handoff and every step was manual, the delivery teams had no control, and it consumed time. With DevOps the goal is to do this as fast as possible so you hit the market early — reducing the time to market — and that is where infrastructure as code comes in.

Worked example — the ticket chain in full:

  1. Test team raises a ticket: "We need a UAT environment for e-grocery 1.2."
  2. System admin team creates a server, installs the OS, and manually configures it "as production-like as we could manage."
  3. DB admin team sets up the database on the server, configures it, and hands over to development.
  4. Development team deploys the e-grocery application into the environment.
  5. Testing team runs operational and compliance tests. If green, the code is released to production.

Every step is manual, each handoff waits on someone else's schedule, and nobody can prove the environment matches production — they "tried their level best." Environments took weeks; every request consumed multiple teams' time; and the delivery team had no control over their own schedule. IaC collapses the chain: one script produces the environment, database included, in the time the old chain took to produce the first ticket response.

17.5.4 The Infrastructure as Code Workflow

Here is how the process looks with IaC. The developer writes the code and writes down the configuration dependency information for that application — a note of it. Everything is checked into a version control system. Then, for the tool that performs infrastructure as code, you write a script describing what you need: what kind of database, what appliances should be there, what kind of testing tools are required, what delivery tools need to be there, and many more resources along with their configuration values. This script is fed to the configuration management tool. The tool runs the script and creates a new virtual machine with the application, fetching that application and its configuration information from the source code version control system. Everything else mentioned in the script is done by the configuration management tool. The mirror live environment is readily available for the tester. The script is probably written by a team that is expert in writing scripts, but the tester just fetches the script and runs it — and by themselves they have the mirror live environment where the team can perform automated testing.

The IaC workflow in steps:

  1. Developer writes code and records the configuration dependency information for the application.
  2. Everything is checked into version control — the application code and its configuration.
  3. An expert team writes an IaC script describing the target environment: database type, appliances, testing tools, delivery tools, and their configuration values.
  4. The configuration management tool runs the script, creates a new virtual machine, and fetches the application and its configuration from the version control system.
  5. The tester fetches and runs the script themselves — no ticket, no admin team — and gets a mirror live environment on demand.

The separation of roles is important: the script authors are infrastructure experts, but the consumers never need to be. Expertise is written once into the script, then reused by everyone.

17.5.5 Benefits of Infrastructure as Code

The benefits of IaC, point by point:

  • Reduced shadow IT. You no longer have to manually observe the process; IT activity is visible through code. When infrastructure is defined in scripts in version control, there is nowhere to hide a shadow server or an undocumented change.
  • Improved customer satisfaction. You reduce the timeline, so customers get what they want sooner.
  • Reduced OPEX (operating expenses).

Worked example — the 100-server team that manages 1000: Suppose you have 100 servers to manage; you hire 10 members of an admin team to manage them. Now suppose the fleet grows to 1000 servers. With infrastructure as code, the same 10 people can manage all 1000 servers. With a manual process, you would need to increase the team size. Scaling the fleet tenfold changes the operating expense story completely: in the manual world, staff costs grow with the fleet; in the IaC world, the fixed cost of writing good scripts amortizes over every server.

  • Reduced CapEx (capital expenditure). Capital expenditure is a long-term goal for any industry. In the same example of a hundred servers, you need not only the 10 people; you may need third-party vendors for network management, network components, and other services — capital expenditure going out to third parties. With automation, the network topologies get managed by your script, and those 10 people become skilled enough — after training — to write code and understand network topology. In the future, managing those 1000 servers may not require depending on the third-party vendor at all, so capital expenditure also gets reduced.
  • Standardization. With a script, the process is standard. The manual approach was not: one person would create a folder, copy a particular application into it, and fetch the values through a file system in the production or production-like environment. It varied person to person — the folder names, the norms, the checklist documents. If a person refers to that document and performs the steps manually, there is a high chance of human mistakes: missing a step, or a spelling mistake. Infrastructure as code standardizes the rules everyone follows.
  • Safer change management. Change management becomes safer because changes are made through reviewed, versioned code.

The jobs fear (the professor's reassurance): Note the fear that every employee feels when automation arrives — that their job is insecure. That is not the case: those 10 people will not be replaced by new hires; they get the opportunity to upgrade their skill set. Think of the operations market: four or five years back, the status of the SRE role was rising fast, and the market looks for SREs very highly. The pay structure for operations people who know infrastructure management, know configuration management, and are aware of the tools and technology that support infrastructure as code — from provisioning to configuration management — and who can write scripts and manage automation, is vastly higher. The label may be SRE or DevOps, but the pay difference is huge. That is the OPEX story for industry.

17.5.6 Risks of Infrastructure as Code

No benefit comes freely — as the saying goes, nothing can be achieved without efforts. You have to train yourself to achieve these benefits. The risks of IaC:

  • No proper planning. If the organization does not plan properly before implementing infrastructure as code, you will not see fruitful results — rather, you will see a high amount of penalty for your applications and their support. Planning must consider that infrastructure as code requires a new kind of skill: hiring people with that skill set, and giving proper training so they actually use the concept correctly.
  • Error replication. Even though IaC is automated, you are writing a script, and no tool writes the script for you — you write it manually. If you write something wrong in the script itself, that error replicates everywhere, in all your environments. Training matters precisely because of this. A one-line mistake in a script is no longer a one-machine mistake; it is a fleet-wide mistake.
  • Configuration drift. Drift in the script itself: say you wanted JRE 7, but by mistake the script says 8. In the desired state you declared JRE 7, but the actual configuration reads JRE 8. Your configuration tool will then be in a configuration drift — it will do 7, then 8, then 7, then 8, flipping back and forth between desired and actual state.

Exam note — configuration drift mechanics: configuration drift is a fight between desired state (what you declared) and actual state (what the machine reads). Desired = JRE 7, script = JRE 8, actual = JRE 8. The tool wants to converge to desired state, so it changes the machine to 7 — and then the script (or a later run) reapplies 8, and the tool flips back again: 7, 8, 7, 8. The machine never settles, and each flip risks breaking the running application. This is a signature IaC failure mode and a high-value exam topic.

  • Accidental destruction. Because the whole environment is defined by a script, if somebody deletes a line in that script — accidentally or not — there is an accidental destruction of infrastructure as well. The next run of the script removes the resource that line described.

These are the risks, and the industry should be ready to understand them when adopting infrastructure as code.

Recap: Infrastructure as code writes machine-readable definition files that generate service components — programmable infrastructure. It fits DevOps because both teams now share code and understand each other's pain, and it is the only way to guarantee an exact production mirror for staging. The pre-IaC world was a manual ticket chain (test team → system admin → DB admin → development → testing), while the IaC workflow checks everything into version control and lets a script build the whole environment on demand. Benefits: less shadow IT, happier customers, lower OPEX and CapEx, standardization, safer change management — and skill upgrades rather than job losses. Risks: poor planning, error replication, configuration drift (desired vs actual state flipping), and accidental destruction.

Bridge: Infrastructure as code creates environments from scripts — but at the bottom of every environment sits a server that must be provisioned: identified, given an operating system, and made usable. The next section zooms into that bottom layer, from the manual provisioning steps to the automated DHCP → PXE → TFTP boot path.

Where this matters in the real world: IaC is the everyday language of cloud operations: Terraform and CloudFormation define cloud resources as code, while Puppet, Chef, and Ansible keep servers in their desired state. The Puppet State of DevOps reports repeatedly link infrastructure-as-code adoption with IT performance; the 2021 report quoted an infrastructure-as-code adoption score of 83.5, the statistics referenced later in this session.

17.6 Server Provisioning

17.6.1 The Traditional Provisioning Steps

Provisioning a server, at its heart, is a small number of steps. First you have to set up the hardware. Then you have to install and configure the particular application — or the prerequisite tools. For example: the setup is ready, now you need Java, so you install Java; then you need to set the system variable path, so you go and set that path — that step itself is configuration. Then you install and configure the application you want on that environment. All of these are the steps of provisioning a server. Anyone from an infrastructure background will tell you the same sequence: hardware, tooling, configuration, application.

The provisioning sequence:

  1. Set up the hardware — the physical machine is assembled, cabled, powered, and available on the network.
  2. Install and configure the prerequisite tools — the software the application needs to run. For a Java application: install Java, then set the system variable path so the operating system can find the Java runtime.
  3. Install and configure the application — deploy the application itself onto the prepared environment.

Note that step 2 contains its own mini-configuration: setting the system variable path is not "installing" — it is configuration, and it is exactly the kind of step that is easy to get wrong by hand.

Worked example — provisioning a Java application server:

  1. Hardware: a new server is racked, connected to power and the network, and switched on.
  2. Tooling: the administrator installs Java on the server — for example JRE 8 — and then edits the system environment variables so that the PATH includes the Java installation directory (for example C:\Program Files\Java\jre8\bin). Without this configuration step, the command java would not be found by the operating system even though Java is installed — an installed-but-unusable state that confuses beginners and costs hours to spot.
  3. Application: the e-grocery application is deployed onto the server, configured to talk to its database, and started.

If a step is missed — say the PATH is not set — the application starts but cannot launch Java and fails immediately. Every manual provisioning is vulnerable to exactly this class of skipped-step error, which is why the same sequence automated later removes the risk.

17.6.2 The Automated Provisioning Path: DHCP, PXE, and TFTP

Now think about the automated approach to provisioning — how it used to happen even before IaC. When we say "setup the hardware", how did a new server get recognized? With the help of the Dynamic Host Configuration Protocol (DHCP): the server requests an IP address so it can be recognized in the network, and it receives a response to that particular request. Once the IP address is given, with the help of PXE — the Pre-boot Execution Environment — the server requests a boot image: which boot image it needs, by file name. Then, with TFTP — the Trivial File Transfer Protocol — the requested file of the boot image is provided to the server. The server runs that boot image and becomes up and usable as a server where you can install your application and other stuff. Once the server is ready, the admin used to download and install the particular applications and related dependent applications, and set up the configuration information on that server. That is how provisioning used to happen.

The automated boot chain — step by step:

Step Protocol What happens
1 DHCP (Dynamic Host Configuration Protocol) The new server requests an IP address; the DHCP server responds, so the machine is now identified on the network.
2 PXE (Pre-boot Execution Environment) The server requests a boot image by file name — it asks "which boot image should I load?"
3 TFTP (Trivial File Transfer Protocol) The requested boot image file is transferred to the server.
4 The server runs the boot image, comes up usable, and is ready for software installation.
5 The administrator downloads and installs the application and dependent applications, and sets the configuration information on the server.

Worked example — a bare-metal server's first boot:

  1. A new server is connected to the data center network for the first time. It has no operating system, no name, nothing.
  2. The machine broadcasts a DHCP request: "give me an IP address." The DHCP server replies with an address — say 10.0.3.27 — plus network settings. The server is now reachable.
  3. Because the machine is configured to network-boot, its firmware runs PXE, which asks the network boot server: "which boot image should I use?" The answer identifies a file — for example the standardized baseline OS image.
  4. TFTP transfers that boot image file to the server. The server boots from it.
  5. The server is now up with a baseline operating system, ready for the administrator to install the application stack — no USB stick, no CD, no manual OS installation.

The chain is the classic boot path of bare-metal servers in data centers: the server is identified on the network (DHCP), pulls a boot image (PXE + TFTP), and comes up ready for software installation without any physical media.

Why each protocol exists separately: DHCP handles identity (an address so the network knows the machine), PXE handles selection (which boot image the machine should load — it is a pre-boot environment that runs before any operating system exists on the disk), and TFTP handles transfer (a deliberately simple protocol good at moving one boot file quickly, without the complexity of a full file server). The division of labor is what lets a completely empty machine become a booted server without human intervention.

17.6.3 Provisioning as Part of Infrastructure as Code

Everything described above — installation, configuration, even the provisioning itself — can be managed with infrastructure as code. You can provision the infrastructure with the help of IaC. The benefits: you reduce the maneuvers for installation and configuration, you reduce operational cost, you reduce errors, and it is better for quality assurance. Those are the benefits one can think of for infrastructure as code, alongside the risks already discussed.

Recap: Provisioning a server follows the sequence hardware → tooling → configuration → application; the manual version is vulnerable to skipped steps such as forgetting to set the Java PATH after installing Java. The automated pre-IaC boot path uses DHCP for the IP address, PXE to request the boot image by name, and TFTP to transfer the boot image, so a bare machine comes up ready for software without physical media. And provisioning itself — like everything else in the environment — can be managed as infrastructure as code, giving fewer manual maneuvers, lower cost, fewer errors, and better quality assurance.

Bridge: Provisioning gives you a working server; configuration management keeps it in the desired state. These two words — configuration and change — sound almost the same, and confusing them is common enough that the professor stopped to settle it: the next section draws the precise line between configuration management and change management.

Where this matters in the real world: DHCP + PXE + TFTP is still how bare-metal data centers, HPC clusters, and on-premise fleets bootstrap machines at scale. Cloud platforms hide the chain (an EC2 instance starts from a stored image instead), but the same logic survives: identity → image selection → transfer → boot. Understanding the chain explains how an "empty" machine can join a network and become usable with zero human steps.

17.7 Configuration Management vs Change Management

17.7.1 The Classroom Debate

Are configuration management and change management the same thing? They sound close, and the confusion is common — so it is worth resolving precisely.

Q: Do you feel configuration management and change management are the same, or are they different terms? If different, what is the difference?

The first answers came from the class: they are different — "one process is for what, the other process is for what." Change management is about application change; it mainly changes configuration; it maintains existing software; it is more about data. One student admitted being doubtful.

A: Good — but let's sharpen it. Change management is not only about the application; it covers changes to the configurations as well. It is for both. Configuration management, on the other hand, deals with the state of any given infrastructure or software system at any given time. What is the desired state? If there is any change, configuration management brings the system to the desired state. In plain words, configuration management maintains your software application — and your infrastructure — in the way it should work. Change management is the process that deals with the changes made to those configurations and to your application, both.

The clean division:

  • Configuration management is about the state — the desired state of the infrastructure or software system, and the work of keeping the system there. Ask: "is the system in the way it should be?"
  • Change management is about the process of changing — governing the changes themselves, whether those changes touch the application or its configuration. Ask: "is this change approved and controlled?"

The distinction is not "application versus configuration." That is the student misconception the professor corrected: change management is for both — it governs changes to configurations and changes to the application. Configuration management, separately, is about maintaining the desired state no matter what the system consists of.

Worked example — both terms on one working day: The e-grocery team decides to upgrade the application from version 1.1 to 1.2 (which, from 17.3, also means JRE 8 instead of JRE 7).

  • Change management governs the change itself: the change request is submitted, the change advisory board weighs benefit against risk, the change is approved, scheduled, and its rollout is coordinated.
  • Configuration management maintains the state: the configuration tool ensures every environment ends up in the desired state — JRE 8 installed, the new version deployed, the old settings replaced. If an environment drifts back to JRE 7, configuration management brings it back.

Same event, two processes doing different jobs: one controls whether and how the change happens; the other keeps the system in its defined end state.

17.7.2 Change Management: The Approval Process

Change management carries its own process machinery. There is a change board authority that makes the decision of whether a particular change has to be implemented or not, and there are further processes for getting the change approved if it is fruitful. Even for a feature — if you are changing something in a feature — it needs a change advisory board to make the decision. So changes do not just happen; they pass through an approval body that weighs the benefit and the risk.

The approval machinery:

  • Change board authority — the body that decides whether a particular change gets implemented at all. Its job is to weigh the benefit of the change against its risk to the service.
  • Change advisory board — the body that reviews changes even at the feature level; any meaningful change to the application or its configuration needs this review before it proceeds.

The point of the machinery: changes are governed, not spontaneous. A developer cannot unilaterally put a change into production; the change passes through an approval body that weighs the benefit and the risk.

Pitfall: Treating the change board as a rubber stamp. The approval process only adds value when the board genuinely weighs benefit against risk — including the risk of not making the change. A board that approves everything on autopilot (or blocks everything out of caution) turns the process into bureaucracy without protection.

17.7.3 From Documents to Code: Configuration as Code

How was it traditionally? Your infrastructure was a document: you followed a checklist for creating a server, installing everything, and making sure all those commands ran successfully. Your configuration was also a document: you did configuration management manually by referring to a document that recorded, for this application, what kind of software libraries and binaries are needed, what other resources are needed, and what the versions of those resources are.

The new approach changes both. We want infrastructure as code, and we also want configuration as code — defining all the configuration of your server or any other resources as code or as a script, and checking it into version control. Now your infrastructure as code and your configuration as code are scripts maintained in the version control system. And if you remember the earlier question of what all things can be version controlled: every activity of your software development life cycle that involves code can be kept in version control — designs, documents (for example with Confluence), test scripts, source code, and configuration management code.

Traditional versus modern:

Aspect Traditional (documents) Modern (code)
Infrastructure A checklist document for creating a server and running commands Infrastructure as code — scripts that build the environment
Configuration A document recording libraries, binaries, resources, and versions Configuration as code — server/resource configuration defined as scripts in version control
Change control Manual reading and following of documents Reviewed, versioned, automated application of code

The documents did not disappear — they became executable. A document tells you what to do; code does it. That shift is the essence of configuration as code.

17.7.4 Tools for Configuration Management and Infrastructure as Code

What tools and technology in the market support configuration management and infrastructure as code, both? The list includes Chef, Puppet, Ansible, Terraform, CloudFormation, and many more. The discussion here focuses on Puppet, Chef, and Ansible, because those are what most people opt for. Terraform is the choice when you already use tools and technology from the same provider; otherwise Puppet, Chef, and Ansible are the most widely chosen. Ansible got very hyped when it was launched, and many industries moved from Chef to Ansible; still, Puppet and Ansible are actively competing in the market. One key distinction among these tools: agent-based versus agent-less approaches — Puppet and Chef are agent-based, whereas Ansible is agent-less. The next session digs into how Puppet works, what the components of Chef are, how Ansible works, and why Ansible received the most response in industry.

The tool landscape:

Tool Type One-line characterization
Puppet Agent-based configuration management A desired-state engine where nodes run an agent that pulls configuration from a master
Chef Agent-based configuration management An agent-based tool whose configurations are written as "recipes"
Ansible Agent-less configuration management No agent installed on targets; it connects (typically over SSH) and applies instructions — the reason it became widely adopted
Terraform Provisioning tool Creates cloud resources as code; the choice when you already use the same provider's ecosystem
CloudFormation Provisioning tool AWS's own infrastructure-as-code service for defining cloud resources

The agent-based versus agent-less distinction matters operationally: agent-based tools require a small program (the agent) installed and running on every managed machine, whereas agent-less tools need nothing installed on the target — a major simplification for environments where installing agents is hard or undesirable.

Recap: Configuration management and change management are different: configuration management deals with the state of the infrastructure or software system — bringing it to and keeping it at the desired state — while change management is the process governing changes to both configurations and applications, approved through a change board authority and a change advisory board. The modern shift replaces infrastructure and configuration documents with infrastructure as code and configuration as code, both in version control, supported by tools such as Puppet, Chef, Ansible (the agent-based/agent-less trio), Terraform, and CloudFormation.

Bridge: With configuration under code and environments buildable from scripts, the remaining question is where the scripts run — and that is where the cloud changed everything: infrastructure no longer needs to be ordered and delivered; it is ordered on demand from a service catalog, which the next section covers.

Where this matters in the real world: Change advisory boards are a formal reality in regulated industries (banking, healthcare, government), where change tickets must show approval before production touches. Meanwhile the tool ecosystem this section names is the daily toolkit of DevOps teams: configuration management tools keep servers in a desired state, and provisioning tools like Terraform and CloudFormation create cloud resources — the two families solving the two halves of the state-versus-change picture.

17.8 Managing On-Demand Infrastructure

17.8.1 The On-Demand Mindset

Do we still need to order a server and then perform server provisioning with infrastructure as code? Do we still think we need to order hardware? The answer is no — because everything is on-demand now.

Analogy (the professor's): Your newspaper arrives at your doorstep on demand from your smartphone; nobody wants to visit a physical store to pick up a smartphone when you can order online and get it at your doorstep; groceries are delivered to your doorstep; you can hire anything — from cleaning your house to getting a cab from one place to another. Everything is on demand: you place an order. So why can't we think about infrastructure the same way? Why keep infrastructure different from everything else in life?

The point of the analogy is a mindset shift, not a metaphor: the consumer of computing infrastructure should have the same experience as a shopper — browse, pick, order, receive — instead of the buyer of capital equipment — request, purchase order, wait for delivery. Infrastructure is the one thing that used to be treated differently from every other purchase in life, and the cloud removed that exception.

17.8.2 The Cloud Ordering Flow

On-demand infrastructure is provided by the cloud provider. You do not purchase hardware, make a purchase order, and wait for delivery. As a service consumer, you look at the cloud provider's service catalog, opt for the particular service you need, place an order, and the infrastructure is available to use. Then you perform your infrastructure as code provisioning — what kind of OS you want, what other applications you want. Once the infrastructure is ready, you deploy your application and maintain its configuration information throughout the lifecycle of the application. Cloud got this attractive because it makes life easy, and that is what everybody is looking for in the market.

The cloud ordering flow:

  1. Browse the service catalog — the cloud provider's list of services: virtual machines of various sizes, storage, databases, load balancers, and so on.
  2. Choose the service you need — for example, a virtual machine with a chosen operating system and hardware size.
  3. Place the order — no purchase order, no procurement cycle, no delivery wait; the infrastructure is available to use.
  4. Provision with infrastructure as code — run your IaC scripts to set up the OS and applications you want inside the ordered infrastructure.
  5. Deploy the application and maintain its configuration throughout the application's life cycle.

The order step replaced procurement, and the IaC step replaced manual setup — together they shrink what used to take weeks to minutes.

17.8.3 New Topics Powered by the Cloud

The cloud gave birth to a couple of new areas people invest time in learning. DevOps for cloud platforms — how can you achieve DevOps in cloud computing — is one topic currently going on. MLOps is another: if we do software development with a DevOps culture, why can't we do machine learning development with a DevOps culture? There was already the topic of software engineering for machine learning — what kind of software engineering one should have to implement machine learning related applications. MLOps is the DevOps culture applied to machine learning development software, and for MLOps you can ask which cloud platform you have and what kind of DevOps pipeline you can think of for that platform. All these topics emerged because the cloud is used hugely in the market. Many cloud providers offer SaaS, IaaS, and PaaS — already discussed — and one more: function as a service (FaaS), also called serverless computing. Serverless or function as a service will be covered in the final session when discussing current trends and concluding the course.

The service model family:

Service model What you get Who manages the underlying infrastructure
SaaS (Software as a Service) A ready application (web-based e-mail, office suites) The provider, entirely
PaaS (Platform as a Service) A platform to deploy your applications on The provider manages servers, OS, storage
IaaS (Infrastructure as a Service) Raw compute, storage, and network resources You manage OS and above; provider manages physical layer
FaaS (Function as a Service / serverless) Individual functions that run on demand The provider, including scaling — you do not see servers at all

The pattern to notice: each step up the stack hides more of the environment — which is why serverless architectures (from the knowledge check later in this session) count as a driving force changing the job of operations: even when the servers vanish, the configuration of your application still has to be kept in the desired state.

17.8.4 Cloud Adoption Numbers

Look at the statistics of on-demand infrastructure consumption: every domain is accessing cloud platforms. The graphs for software as a service, and the other service models, are steadily increasing. Infrastructure as a code reached 83.5 by 2021 — and the updated graph is in the Puppet report, which was shared for the DevOps topic and covers cloud as well; you can find those stats in the Puppet report.

The consumption of particular cloud providers: 41.5% of industries use Amazon Web Services; Microsoft Azure is at 29%; Google Cloud at 3% — a percentage that has increased because of the new features Google launches in its cloud platform; IBM at 2.6%; Rackspace at 2.9%. The rest, about 20.7%, use other cloud providers, including private clouds — a few organizations create their own cloud, a private cloud network, inside their industry. That is the market picture.

Cloud provider market shares (per the Puppet report):

Provider Share
Amazon Web Services 41.5%
Microsoft Azure 29%
Google Cloud 3% (rising with new features)
Rackspace 2.9%
IBM 2.6%
Others (including private clouds) 20.7%

17.8.5 Benefits of On-Demand Infrastructure

The benefits of on-demand infrastructure:

  • Cost saving. You pay for what you use rather than purchasing and maintaining hardware. Capital expense becomes operating expense, and the bill scales with actual use.
  • Scalability and flexibility. Both are achieved easily with on-demand infrastructure — scalability was already touched on when discussing capacity management. Resources grow and shrink as demand changes.
  • Faster time to market. You remove the time of purchasing hardware and waiting for delivery. It becomes clicking on a particular service and clicking the next button, and you have that server.

Worked example — the EC2 instance: with an EC2 instance of AWS it is really easy: pick what kind of EC2 instance you want (Unix/Ubuntu, Windows, whichever instance type), click on that service, run the instance, and the server is up that fast. The whole procurement-to-running sequence that used to take weeks — purchase order, delivery, racking, cabling, OS install — collapses to a few clicks plus whatever IaC provisioning you choose to run. Time from decision to running server: minutes, not weeks.

  • Support for DR and high availability. Because environments are defined and reproducible, disaster recovery means spinning up again somewhere else — not rebuilding from memory.
  • Focus on business growth. If you are a startup, you want to achieve business rather than spending on hardware and software. You order the infrastructure, deliver your application, start earning revenue, and then upgrade the infrastructure as your need grows.

Pitfall — the bill trap (cloud's own risk): on-demand makes infrastructure so easy to create that teams forget to delete it. Idle instances keep running and keep billing — the classic "student who left a machine running over the summer" story, and the reason every cloud team needs policies for shutting down and cleaning up unused resources. On-demand is cheap only when demand, and deletion, are both managed.

Recap: On-demand infrastructure applies the everyday consumer mindset — order from a catalog, get it at your doorstep — to computing: browse the service catalog, choose, order, provision with IaC, deploy, and maintain configuration. The cloud powered new fields (DevOps for cloud platforms, MLOps) and added FaaS/serverless to the SaaS/IaaS/PaaS family. The Puppet report numbers show AWS (41.5%) and Azure (29%) leading the market. Benefits: cost saving, scalability and flexibility, faster time to market, DR and high availability support, and focus on business growth.

Bridge: "Scalability and flexibility" is easy to claim — the next section shows the mechanism behind it: auto scaling, the cloud feature that grows and shrinks your capacity automatically, and the two ways to drive it: schedule and prediction.

Where this matters in the real world: On-demand infrastructure is the economic base of modern software: startups launch with rented capacity instead of data center capital, enterprises burst into the cloud for peak loads, and the same catalog ordering that spins up a VM in minutes powers disaster recovery — a whole second site can be created from scripts rather than from hardware.

17.9 Auto Scaling

17.9.1 What Auto Scaling Does

One fantastic feature of cloud providers is auto scaling. Auto scaling typically means not only increasing capacity — you can also decrease capacity by shutting down instances of your virtual machines. That scaling down offers savings on power and energy, which ultimately results in cost saving: for companies hosted on the cloud, auto scaling can mean lower bills.

Definition: Auto scaling is the automatic adjustment of computing capacity — adding or removing virtual machine instances (or container instances) in response to traffic or a schedule.

Two directions matter equally:

  • Scale up (out): when the number of users accessing your application increases, you create one more virtual machine — or for a containerized solution, one more container instance — the traffic gets rerouted, and you achieve more availability. Performance is not degraded, uptime is maintained, and availability is greater.
  • Scale down (in): shutting down instances that are no longer needed, which saves power and energy and lowers the bill.

Why scaling down saves real money (the billing insight): the key reason is that most cloud providers charge based on the total use rather than the maximum capacity. If you are billed for capacity, an idle machine still costs you; if you are billed for use, every idle machine you shut down removes cost directly. Auto scaling helps by letting a company run less time-sensitive workloads on the machines that get freed up by auto scaling during times of low traffic — the capacity is not wasted, it is reassigned.

17.9.2 Schedule Auto Scaling

There are two approaches. Schedule auto scaling is nothing but short-term capacity planning that is automated — here you do not need manual intervention.

Worked example — Flipkart Big Billion Day and the Amazon Great Indian Sale: On that particular time period there will be huge traffic on your site. You create a script or a request — through Kubernetes or any other solution managing your containerized solution, or through the virtual machine solution where you deploy your application — to increase the virtual machine instances by 500 times, or 50 times, or 4 times on that day, depending on your prediction of the increasing load on your site. You make the request in advance and the scaling happens on schedule.

  • The sale starts at 12:00 AM on a known date. You schedule the scaling action for 11:30 PM the night before: capacity increases to meet the expected spike.
  • The sale ends at midnight. You schedule the reverse action: capacity returns to normal the following morning.

The prediction is about when (the calendar tells you the spike is coming); the scaling is automated (no one sits at a console clicking). That is short-term capacity planning, automated.

17.9.3 Predictive Auto Scaling

Predictive auto scaling is long-term capacity planning. The idea is to combine recent usage. You cross-check what your recent usage is against what your historical usage was. If you see a huge difference and traffic on your application is increasing, you predict the future usage and accordingly order extra infrastructure and resources from the cloud provider. So: schedule auto scaling handles known, short-term spikes; predictive auto scaling plans for growth based on trend data.

The two approaches compared:

Dimension Schedule auto scaling Predictive auto scaling
Time horizon Short term Long term
Driver A known calendar event (a sale, a launch, a promotion) Trend data: recent usage versus historical usage
Prediction Predicted when the load comes (date and time) Predicted how much load will come (growth trend)
Example Flipkart Big Billion Day, Amazon Great Indian Sale An application whose monthly users keep growing, so capacity is ordered ahead of the trend
Manual intervention None — it is automated None — the provider acts on the trend signal

The two approaches answer different questions. Schedule asks "when is the spike?" Predictive asks "where is usage heading?" A mature setup uses both: scheduled scaling for known events and predictive scaling for the underlying growth trend.

17.9.4 Who Offers Auto Scaling

Every cloud provider now offers auto scaling. The history:

  • Amazon Web Services was the first pioneer to launch the auto scaling feature. AWS has elastic load balancing, which helps achieve auto scaling.

Worked example — Netflix on AWS: Netflix is a well-known consumer of auto scaling on AWS — it consumes elastic load balancing and uses it for its rolling upgrades as well. During a rolling upgrade, instances are replaced in waves rather than all at once: the load balancer routes traffic away from an instance being upgraded, a new instance is started and validated, and traffic returns — instance by instance, with auto scaling keeping the total capacity steady throughout. The result: no downtime during an upgrade, and capacity that tracks demand automatically.

  • Microsoft Azure — around 2013, Microsoft announced auto scaling support for its Windows Azure cloud computing platform.
  • Oracle — the Oracle cloud platform allows server instances to automatically scale a cluster in or out by defining auto scaling rules.
  • Google Cloud Platform — in 2015, Google announced the public beta of the auto scaling feature of its Cloud Computing Engine. It is free for use. Google Cloud is a bit complex when compared with AWS and Azure, but many of its features are freely available. If you want to learn all these features without spending any money — spending your time instead on understanding and configuring them — then Google Cloud is a good choice for getting your hands dirty with the different features of cloud providers.

The provider timeline (exam-friendly):

Provider Auto scaling milestone
AWS The pioneer — launched auto scaling first; uses elastic load balancing
Microsoft Azure Auto scaling support announced around 2013 for Windows Azure
Oracle Rule-based automatic scaling of server clusters in or out
Google Cloud Platform Public beta of auto scaling announced in 2015, free for use

Recap: Auto scaling adjusts capacity in both directions — adding instances when users increase (availability up) and shutting instances down when demand falls (power and bill savings), which works because cloud providers charge on total use, not maximum capacity. Schedule auto scaling is automated short-term capacity planning for known events (Flipkart Big Billion Day, Amazon Great Indian Sale — scale up 4×, 50×, or even 500× on the day), while predictive auto scaling is long-term planning from recent versus historical usage. AWS pioneered auto scaling (Netflix uses it with elastic load balancing for rolling upgrades), Azure followed around 2013, Oracle scales clusters by rules, and Google's free beta arrived in 2015.

Bridge: Auto scaling closes this session's arc: configuration needs an environment, environments need provisioning, provisioning needs automation, and automation (IaC) runs on infrastructure you order on demand and scale automatically. The session closes by testing what you kept — the knowledge check review, which points straight at the fourth quiz.

Where this matters in the real world: Auto scaling is what makes "the site didn't go down during the sale" possible — e-commerce giants schedule capacity for shopping festivals, streaming services ride daily traffic curves, and startups survive viral spikes they could never have provisioned by hand. The billing insight (pay per use, not per capacity) is why auto scaling is not just an availability feature but a cost-control feature.

17.10 Knowledge Check Review

The session closed with a quick knowledge check — three questions that review the themes of the whole discussion.

17.10.1 Question 1: Ops Needs Documentation for Deployment

Q: Ops feels they don't get enough documentation from Dev to deploy a new version of the team's application. Which of the following is a DevOps-friendly solution that might help?

(a) The teams collaborate with a configuration management tool. (b) Kick off a more systematic documentation project. (c) Require documentation before each release. (d) Make sure a developer is on call for each release.

A: The answer is (a) — the teams collaborate with a configuration management tool. Look at why the others fail. The whole point of this session is to get rid of configuration as documents, so options (b) and (c) are still asking for documents — that is not a solution, it is the old problem. And making a developer continuously on call is not effective people management at all. So the configuration management tool is the answer.

Why (a) is the DevOps-friendly answer: the complaint is not "we need more paper" — it is "we need the environment's configuration to be reliably available." A configuration management tool makes the environment defined (as code, in version control) instead of described (in documents that go stale). Ops does not need Dev to write documentation about the deployment; Ops needs the deployment itself to be executable, repeatable, and self-documenting. The tool turns the request into a solved problem instead of a new paperwork pipeline.

17.10.2 Question 2: Driving Forces Changing the Job of Operations

Q: What are the major driving forces that are changing the fundamental job of operations?

(a) Treating infrastructure as code. (b) Using your own physical infrastructure. (c) Using more manual processes. (d) Serverless architectures.

A: The correct options are (a) and (d) — treating infrastructure as code and serverless architectures are both driving forces. Using your own physical infrastructure and more manual processes are the opposite of the trend. And note why serverless changes operations: even with serverless, the configurations related to your application still have to be kept up and maintained in the desired state — that is the need of the hour, and it has changed the fundamental job of operations.

Why both (a) and (d) change the job: infrastructure as code moves operations work from manual server-handling to writing and maintaining code — the operations job becomes a software job. Serverless architectures remove servers from sight, but the configuration that tells the functions what to connect to, what limits to respect, and what to do still exists and still must be kept in the desired state. Both forces make "knowing and managing configuration" more central to operations than "physically touching machines."

17.10.3 Question 3: Factors for Troubleshooting and Isolation

Q: What factors contribute to effectively troubleshooting and isolating problems in the area of operations and development deployment? Select all that apply:

(a) automated configuration management, (b) strong test coverage, (c) automated load balancing and failover, (d) infrastructure as code.

A: All of the above — each of these factors helps isolate and troubleshoot problems. The discussion in this session covered them all: automated configuration management, strong test coverage, automated load balancing and failover, and infrastructure as code. (In class, one correction noted that the right option was the fifth, "all of the above", not the fourth option.)

Worked example — how each factor isolates a problem: A report generation bug appears in production.

  • Automated configuration management lets you answer "what changed?" immediately — the configuration history shows the exact setting that changed and when, so the report issue is traced to a wrong value instead of guessed at.
  • Strong test coverage means the deployment pipeline already proved the application's functionality against configuration changes, so a regression that slips through is narrowed to the delta between tested and untested paths.
  • Automated load balancing and failover means a single failing instance is removed from traffic automatically — the problem is contained (isolated) before it becomes an outage, and the failed instance can be examined in peace.
  • Infrastructure as code means you can spin up a reproduction environment identical to production and reproduce the bug there instead of debugging on the live system.

Each factor either prevents the problem, contains it, or makes it reproducible — all three are what "troubleshooting and isolating" requires. That is why the answer is all of the above.

Exam note: this knowledge check review points straight at the fourth quiz — after this session, that quiz should feel easy and you should be in a good position to solve it and achieve good marks. The three questions preview the quiz's themes: configuration management tools as the DevOps-friendly answer, infrastructure as code and serverless architectures as the driving forces changing operations, and the full set of troubleshooting factors (automated configuration management, strong test coverage, automated load balancing and failover, and infrastructure as code).

Recap: The knowledge check confirms the session's spine: configuration management tools (not documents) are the DevOps-friendly answer to Ops's deployment complaints; infrastructure as code and serverless architectures are the driving forces changing operations — because even serverless configurations must stay in the desired state; and troubleshooting and isolation come from the whole set: automated configuration management, strong test coverage, automated load balancing and failover, and infrastructure as code.

Exam Guidance Summary

  • Fourth quiz: The three knowledge-check questions above preview it. Expect questions on configuration management tools as the DevOps-friendly answer, infrastructure as code and serverless architectures as the driving forces changing operations, and the full set of factors for troubleshooting — automated configuration management, strong test coverage, automated load balancing and failover, and infrastructure as code.
  • Core definitional content to know: the definition of configuration management (1950s, United States Department of Defense, technical management discipline) and the four-question test for a strong configuration management strategy (reproduce environments exactly, make incremental changes smoothly, trace changes, and let authorized team members get information and make changes).
  • Application vs environment configuration: the considerations (representation, script access, variation by environment and version), the name–value tuple model, storing options in the source repository and values elsewhere, the principles (automated process, tested scripts, naming conventions, modularity), and the two-part configuration testing approach (verify external service references and fail fast on missing dependencies; then smoke test including desired-state convergence).

Exam note: review the definition and the four-question test as core content, plus the myth correction — configuration is riskier than source code because it has no gatekeepers.

  • Environment configuration: the five problems of manual management (large collections hard to maintain, small changes break everything, slow diagnosis with level-three experts, near-impossible manual reproduction, node drift) and the recreate-don't-repair principle — it should always be cheaper to create a new environment than to repair an old one.
  • Infrastructure as code: the definition (machine-readable definition files that generate service components, programmable infrastructure), the benefits (less shadow IT, customer satisfaction, lower OPEX and CapEx, standardization, safer change management), the risks (planning, skills and training, error replication, configuration drift, accidental destruction), and the traditional ticket-driven flow versus the modern script-driven workflow.
  • Server provisioning: the traditional steps (hardware, install and configure tools like Java plus the system variable path, install and configure the application) and the automated path — DHCP for the IP address, PXE for the boot image request, TFTP for delivering the boot image.
  • Change management vs configuration management: configuration management maintains the desired state of infrastructure and software; change management is the process governing changes to both configurations and applications, with a change board authority and a change advisory board approving changes.
  • Tools: Puppet, Chef, and Ansible (agent-based: Puppet and Chef; agent-less: Ansible), Terraform and CloudFormation; tools are examined in the next contact session.
  • On-demand infrastructure and auto scaling: cloud service catalog ordering, EC2-style instant provisioning, the two auto scaling approaches (schedule auto scaling for short-term planned spikes such as the Flipkart Big Billion Day or Amazon Great Indian Sale; predictive auto scaling for long-term capacity planning from recent and historical usage), and the provider timeline — AWS first, Azure 2013, Oracle, Google 2015.
  • Schedule and dates: the comprehensive exam is on the 25th and 26th of this month. Assignments are to be uploaded by the 13th; evaluation happens around the 21st–22nd, with results by the 22nd–23rd. Plan your preparation so the assignment is done before the exam window.
  • References: use the textbook mapping for this session's material, and for infrastructure as code refer to the blog on infrastructure as code, which was recommended for self-learning. The Puppet report covers DevOps and cloud statistics including the infrastructure as a code adoption numbers.

Key Industry Applications

  • Real-world: configuration management as a discipline traces to the United States Department of Defense in the 1950s.
  • Real-world: e-grocery applications must work across mobile, web browsers (Firefox, Chrome), operating systems (Windows, Mac), and devices (tablet, iPad) — flexibility through configurability.
  • Real-world: common environment software stacks such as Visual Studio and MongoDB, and tools like Selenium for test environments and Notepad++ plus development kits for developer environments.
  • Real-world: JRE and Tomcat dependency management — e-grocery 1.1 needs JRE 7 while 1.2 needs JRE 8; configuration drift shows up as a tool flipping between JRE 7 and JRE 8.
  • Real-world: the bare-metal boot chain of data centers — DHCP for IP assignment, PXE for boot image selection, TFTP for boot image transfer.
  • Real-world: configuration management and IaC tools — Chef, Puppet, Ansible (agent-based versus agent-less), Terraform, CloudFormation; Ansible drew many teams away from Chef, and Puppet and Ansible actively compete.
  • Real-world: version control of everything in the SDLC — source code, test scripts, designs, documents (Confluence), and configuration management code.
  • Real-world: SRE and DevOps are the highest-paying labels for operations people who combine infrastructure and configuration management skills with scripting and automation.
  • Real-world: on-demand infrastructure from cloud providers — AWS EC2 instances spin up in moments from a service catalog; the largest consumption shares are AWS (41.5%), Microsoft Azure (29%), Google Cloud (3%), IBM (2.6%), Rackspace (2.9%), and others/private clouds (20.7%), per the Puppet report.
  • Real-world: auto scaling consumers and platforms — Netflix on AWS with elastic load balancing and rolling upgrades, the Flipkart Big Billion Day and Amazon Great Indian Sale traffic spikes, AWS as the pioneer, Microsoft Azure 2013, Oracle's rule-based cluster scaling, and Google Cloud's free 2015 auto scaling beta.
  • Real-world: container orchestration with Kubernetes for scaling containerized workloads, and emerging fields — DevOps for cloud platforms, MLOps, software engineering for machine learning, and serverless computing (function as a service).

ITD Lecture 17 notes · Configuration Management, Infrastructure as Code, and On-Demand Infrastructure

Introduction to Devops· postgraduate· 2026-08-14

Sections Breakdown

1Configuration Management — What It Is and Where It Comes From

Configuration management as a 1950s Department of Defense technical management discipline: artifacts and their relations, the four-question test for a strong strategy, and coverage of third-party dependencies.

2Why Configuration Management Matters

Configuration information controls behavior at build, deploy, and run time; flexibility comes at the price of configurability; the myth that configuration is less risky than source code; where to inject configuration.

3Managing Application Configuration

Managing application configuration: the three considerations, name-value tuples, storing options and values, deploy-time fetching, when values change, principles, and the two-part testing of configuration scripts.

4Managing Environment Configuration

Managing environment configuration: no application is an island, the five problems of manual management, automate and recreate rather than repair, and what environment configuration must cover.

5Infrastructure as Code

Infrastructure as code: definition, why it fits DevOps culture, the pre-IaC ticket chain, the IaC workflow, benefits (OPEX, CapEx, standardization), and risks (error replication, configuration drift, accidental destruction).

6Server Provisioning

Server provisioning: the traditional hardware-to-application steps and the automated DHCP, PXE, and TFTP boot path, plus provisioning as infrastructure as code.

7Configuration Management vs Change Management

Configuration management vs change management: state versus process of change, the approval machinery, configuration as code, and the tool landscape (Puppet, Chef, Ansible, Terraform, CloudFormation).

8Managing On-Demand Infrastructure

On-demand infrastructure: the consumer mindset, the cloud ordering flow, new topics powered by the cloud (MLOps, FaaS), adoption numbers, and benefits.

9Auto Scaling

Auto scaling: scale up and scale down, schedule auto scaling for known events, predictive auto scaling for growth, and the provider timeline from AWS to Google.

10Knowledge Check Review

Knowledge check review: configuration management tools as the DevOps-friendly answer, driving forces changing operations, and the full set of troubleshooting factors.

11Exam Guidance Summary

Exam guidance for this session: fourth quiz preview, core definitional content, environment and application configuration details, IaC, provisioning, change management, tools, on-demand infrastructure, and exam schedule.

12Key Industry Applications

Real-world applications: DoD origins, e-grocery flexibility, JRE and Tomcat dependency management, the bare-metal boot chain, the tool landscape, cloud adoption shares, and auto scaling consumers.

Postgraduate students of software engineering and delivery

Exam Revision Notes

Below is the distilled, exam-ready core. Every entry comes from the full explanation above. Use this section for rapid review; return to the main notes when a point needs more context.

Configuration Management — What It Is and Where It Comes From

Must-know: Configuration management is a process (a technical management discipline, started by the US Department of Defense in the 1950s) by which all artifacts related to a project or application, and the relations between those artifacts, are stored, retrieved, uniquely identified, and uniquely modified whenever needed. A strong strategy passes the four-question test: exactly reproduce environments, easily make incremental changes, easily see/trace changes, and easily let authorized team members get information and make changes — applied to third-party dependencies too.

⚠️ Top pitfall: Restricting configuration management to your own code base while ignoring third-party vendor dependencies; treating the four-question test as a one-time checklist rather than a continuous property.

Self-check: What are the four questions of the strong configuration management strategy test, and which question is about traceability?

Connects to: Section 17.2, Section 17.3

Why Configuration Management Matters

Must-know: Configuration information is used to change the behavior of software at build time, deploy time, and run time, so treat it like source code. Flexibility comes at the price of configurability. Configuration is RISKIER than source code: source code passes through gatekeepers (compiler, code inspection, automated tests) while configuration is free-form and untested — one wrong URL or IP value can stop everything, and a departing employee with authority can deliberately bring the application down. Prefer injecting configuration at deployment time, and manage both application-level and environment-level configuration.

⚠️ Top pitfall: Believing 'it's just a config change' is harmless; configuration changes deserve the same (or more) review, testing, and logging as code changes because nothing guards them automatically.

Self-check: What gatekeepers protect source code but not configuration information, and why does that make configuration riskier?

Connects to: Section 17.1, Section 17.3

Managing Application Configuration

Must-know: Model each configuration setting as a name-value tuple; the set of tuples is the application's configuration. Values depend on application, version, and environment. Store the available configuration options in the same repository as source code but keep the VALUES somewhere else — passwords and sensitive information must never go into version control, and are access-restricted. Configuration must be applied by an automated process from a configuration repository, scripts must be tested like source code, naming conventions clear, and configuration modular. Testing configuration scripts has two parts: (1) verify external service references and fail fast on missing dependencies (e.g., Tomcat not running fails the deployment); (2) smoke test — shut down dependencies and confirm failure, then confirm the tool converges to the desired state.

⚠️ Top pitfall: Checking passwords or sensitive values into version control, or skipping the smoke-test half of configuration testing — a reachable reference does not prove the application works with those values.

Self-check: What are the two parts of testing a configuration script, and what role does desired-state convergence play in the second part?

Connects to: Section 17.2, Section 17.4

Managing Environment Configuration

Must-know: No application is an island: it depends on hardware, software, infrastructure, and external systems. The five problems of manual environment configuration: large collections hard to maintain; small changes can break everything; diagnosis is slow/expensive and requires level-three experts after escalation from level one to level two; manual reproduction of environments is nearly impossible; environments drift apart (two manually set up nodes behave differently, causing compatibility and performance differences). The best way is a fully automated process: it should always be cheaper to CREATE a new environment than to REPAIR an old one. Environment configuration must cover: operating systems (versions, patches, settings), extra software packages, networking topology, external services, and data/state. Keep binaries independent from configuration and keep configuration in one place.

⚠️ Top pitfall: Escalating environment problems as if they were application bugs — 'works on one node, fails on another' is usually environment drift, not code; and treating the repair of a broken environment as cheaper than recreating it.

Self-check: What are the five problems with manually managed environment configuration, and what principle replaces repair with recreation?

Connects to: Section 17.3, Section 17.5

Infrastructure as Code

Must-know: IaC = writing and deploying machine-readable definition files that generate service components; also called programmable infrastructure. It is the only way to assure an exact mirror image of production, and it makes DevOps real because operations writes scripts while developers understand configuration. Benefits: reduced shadow IT, improved customer satisfaction, reduced OPEX (10 people can manage 1000 servers with IaC), reduced CapEx (fewer third-party vendors), standardization, safer change management. Risks: no proper planning (needs new skills/training), error replication (script errors copy to every environment), configuration drift (desired state JRE 7 vs actual JRE 8 makes the tool flip 7-8-7-8), accidental destruction (deleting a line in the script destroys infrastructure).

⚠️ Top pitfall: Configuration drift: the desired state and the script disagree, so the configuration tool keeps flipping between the declared and actual values; also assuming automation eliminates jobs — staff get skill upgrades and SRE/DevOps roles pay much more.

Self-check: What does configuration drift mean, and how does a disagreement between desired state and actual state make a tool flip back and forth?

Connects to: Section 17.4, Section 17.6

Server Provisioning

Must-know: Provisioning steps: (1) set up hardware, (2) install and configure the prerequisite tools — e.g., install Java then set the system variable path (that step itself is configuration), (3) install and configure the application. Automated provisioning path: DHCP gives the server its IP address so it is recognized on the network; PXE (Pre-boot Execution Environment) requests the boot image by file name; TFTP (Trivial File Transfer Protocol) provides the boot image file; the server runs the boot image and becomes usable, then the admin installs applications and configuration. Provisioning itself can be managed with infrastructure as code: fewer maneuvers, lower operational cost, fewer errors, better quality assurance.

⚠️ Top pitfall: Forgetting a provisioning sub-step such as setting the system PATH after installing Java — the software is installed but unusable; manual provisioning chains are where skipped-step errors live.

Self-check: What role does each of DHCP, PXE, and TFTP play in bringing a bare server up on the network?

Connects to: Section 17.5, Section 17.7

Configuration Management vs Change Management

Must-know: Configuration management maintains the desired state of infrastructure and software (the state at any given time, with changes that bring it back to the desired state). Change management is the process governing changes to configurations AND applications — both, not just the application — approved through a change board authority and a change advisory board. Configuration as code defines server/resource configuration as scripts checked into version control. Tools: Puppet and Chef are agent-based, Ansible is agent-less; Terraform and CloudFormation are provisioning choices.

⚠️ Top pitfall: Believing change management is only about application changes while configuration management only about configuration — change management covers changes to configurations and applications both.

Self-check: What is the difference between configuration management (state) and change management (process of change), and who approves changes?

Connects to: Section 17.6, Section 17.8

Managing On-Demand Infrastructure

Must-know: On-demand infrastructure: no hardware purchase and delivery wait — browse the cloud provider's service catalog, opt for the service, place the order, and the infrastructure is available; then provision with IaC (OS and applications), deploy the application, and maintain configuration through the life cycle. Cloud gave birth to DevOps for cloud platforms, MLOps, and function as a service (FaaS/serverless computing). Puppet report numbers: infrastructure as code reached 83.5 by 2021; provider consumption: AWS 41.5%, Microsoft Azure 29%, Google Cloud 3% (increasing), IBM 2.6%, Rackspace 2.9%, others/private clouds 20.7%. Benefits: cost saving (pay for what you use), scalability and flexibility, faster time to market (EC2 instance up in minutes), DR and high availability support, focus on business growth.

⚠️ Top pitfall: The bill trap: on-demand makes infrastructure so easy to create that idle instances keep running and billing — deletion and shutdown policies are part of cost management.

Self-check: What is the cloud ordering flow from service catalog to running infrastructure, and what do the Puppet report adoption numbers say?

Connects to: Section 17.7, Section 17.9

Auto Scaling

Must-know: Auto scaling increases AND decreases capacity: add VMs/container instances when users increase (availability up, traffic rerouted) and shut down instances when demand falls (savings on power/energy — cloud providers charge on total use, not maximum capacity). Schedule auto scaling = short-term capacity planning that is automated (no manual intervention), e.g., Flipkart Big Billion Day / Amazon Great Indian Sale — scale up instances in advance by 4x, 50x, or 500x per prediction. Predictive auto scaling = long-term capacity planning: cross-check recent usage against historical usage, and if traffic is increasing, predict future usage and order extra infrastructure. Provider timeline: AWS first (pioneer, elastic load balancing; Netflix uses it for rolling upgrades), Microsoft Azure around 2013, Oracle (rules that scale clusters in/out), Google Cloud public beta in 2015 (free for use).

⚠️ Top pitfall: Forgetting that auto scaling also scales DOWN — the savings direction; and treating schedule auto scaling (known events) as if it predicted growth trends, which is predictive auto scaling's job.

Self-check: What is the difference between schedule auto scaling and predictive auto scaling, and which provider pioneered the feature?

Connects to: Section 17.8, Section 17.10

Knowledge Check Review

Must-know: Q1: Ops needing documentation is solved by (a) collaborating with a configuration management tool — documentation projects (b, c) keep configuration as documents, the old problem, and (d) on-call developers are not effective people management. Q2: the driving forces changing the job of operations are (a) treating infrastructure as code and (d) serverless architectures — even serverless keeps application configurations that must be maintained in the desired state. Q3: factors for effective troubleshooting and isolation are ALL: automated configuration management, strong test coverage, automated load balancing and failover, infrastructure as code (the in-class correction: it was the 'all of the above' option, not the fourth).

⚠️ Top pitfall: In Q3, picking only the fourth option instead of 'all of the above' — the in-class correction; and treating more documentation as a DevOps-friendly answer when the goal is configuration as code.

Self-check: Why is a configuration management tool the DevOps-friendly answer to Ops's documentation complaint, and why do serverless architectures change the job of operations?

Connects to: Section 17.5, Section 17.8

Exam Guidance Summary

Must-know: Fourth quiz preview: configuration management tools as the DevOps-friendly answer, infrastructure as code and serverless architectures as driving forces changing operations, and all four troubleshooting factors (automated configuration management, strong test coverage, automated load balancing and failover, infrastructure as code). Core content: configuration management definition (1950s, US Department of Defense, technical management discipline) and the four-question test. Exam dates: comprehensive exam on the 25th and 26th of this month; assignments due by the 13th; results by the 22nd–23rd.

⚠️ Top pitfall: Forgetting that configuration is riskier than source code — it has no compiler, inspection, or automated test gatekeepers.

Self-check: What are the exam dates and the assignment deadline, and what are the two auto scaling approaches to remember?

Connects to: Section 17.1, Section 17.9

Key Industry Applications

Must-know: Named industry anchors to remember: US Department of Defense (1950s origins); Netflix consumes AWS auto scaling and elastic load balancing for rolling upgrades; Flipkart Big Billion Day and Amazon Great Indian Sale drive schedule auto scaling; provider shares AWS 41.5%, Azure 29%, Google Cloud 3%, IBM 2.6%, Rackspace 2.9%, others/private 20.7% (Puppet report); AWS pioneered auto scaling, Azure 2013, Oracle rules, Google free beta 2015.

⚠️ Top pitfall: Confusing agent-based (Puppet, Chef) with agent-less (Ansible) tools, or the provider timeline milestones.

Self-check: Which company consumes AWS auto scaling for rolling upgrades, and what are the cloud provider market shares in the Puppet report?

Connects to: Section 17.9, Section 17.5

Was this lecture useful?

Loading comments…
🤖

BitsNotes AI Assistant

Subject Notes Assistant

Configure AI Chat

Choose how to access the chatbot
Have your own API key?

Switch to "Bring Your Own Key" tab above for unlimited access with any OpenAI-compatible provider.

🔑 Enter API key above to fetch live models from provider, or enter model name manually.
OpenAI-Compatible API Support

Choose any provider preset (Gemini, DeepSeek, Kimi, GLM, MiniMax, Qwen, OpenAI, Groq, Ollama, etc.) or enter a custom endpoint URL.

Security & Privacy First

Your API key is sent directly from your browser to your specified provider. BitsNotes servers never store or see your key.