Immutable Infrastructure and Image Factories for Fun and Profit

Immutable Infrastructure and Image Factories for Fun and Profit

Immutable infrastructure is like booting a machine from a virtual CD every time. When a piece of software or configuration changes, the CD gets thrown away and an updated disk loaded.

How much time do your teams spend patching vulnerabilities on servers, or puzzling why something failed in production, when it worked just fine in lower environments?

These are classes of problems which are solved without compromise by institutionalizing a pipeline approach called an Image Factory.

First of all… you know all that Chef or Puppet configuration you keep around, and how it nearly always works? Get ready to throw it away. Please.

Every line of configuration you write is a liability and will become technical debt. The less stuff you have, the easier it will be to maintain.

If you have ten services each running on ten instances, then perhaps you will have 100 configurations. Scaling up to 100 instances for each service, you will need 1,000 configurations. With immutable infrastructure, the number of configurations remains ten, whether you have one instance or a thousand.

This is a fundamental part of cattle not pets, because it allows infrastructure to be managed by class rather than by instance.

An Introduction

What’s Immutable Infrastructure?

Immutable infrastructure is like booting a machine from a virtual CD every time. When a piece of software or configuration changes, the CD gets thrown away and an updated disk loaded.

In the ephemeral world of cloud computing, it’s even better: when a piece of software or configuration changes, the whole computer is thrown away and replaced. The same magic holds true when the underlying hardware of a virtual machine is suspect: just terminate it, and another on a healthy host will replace it.

Today convergent (e.g. Chef, Puppet, Ansible, etc.) configuration systems is the mainstream approach to configuration management. It is only somewhat more repeatable than divergent configuration systems because they often rely on non-deterministic package managers. This means that compared to divergent configuration systems (not good) there are fewer holes to create problems, however, it cannot eliminate the potential for divergence, and at scale, these holes amass many perturbations yielding higher probabilities of race conditions and non-deterministic builds. — Susan Potter

This is important, since managing a set of individual servers at scale becomes an exponentially difficult problem to contain.

What’s an Image Factory?

Image for post

Simply put, it’s a piece of software that creates machine images to run on your servers. It works whether the servers are persistent (they run a long time), or ephemeral (they run for an indefinite period of time, and then they are thrown away).

The mechanics of this are simple: create a well-defined image that is tailored specifically for a given class of work, and use it consistently across all environments.

Although image factories don’t have to be used in conjunction with the principle of immutable infrastructure, the two work hand-in-hand and will have a profound effect on trivializing operations.

ansible devops continuous-delivery aws

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Measuring DevOps Metrics: A How-To Guide

DevOps is supposed to help streamline the process of taking code changes and getting them to production for users to enjoy. But what exactly does it mean for the process to be "streamlined"? One way to answer this is to start measuring metrics.

AWS DevOps Tutorial For Beginners | AWS DevOps Training | AWS DevOps Integration

AWS DevOps Tutorial will help you understand what is Continuous Integration and Continuous Deployment through the various tools & services of the AWS suite. This tutorial also explains how to achieve Continuous Integration & Deployment through AWS CodePipeline & EC2 through the means of a Hands-On session by the end of which you will learn how to deploy a demo application using AWS.

Ansible with AWS and EC2 - DZone DevOps

Let's get our hands dirty with Ansible and tasks using AWS EC2. We'll go over how to install and remove a package using Ansible.

Jenkins for DevOps and Continuous Delivery Pipeline

How to build and deploy Continuous Integration, Delivery with Jenkins for microservices application on Kubernetes and serverless

AWS DevOps vs Azure DevOps | Difference Between AWS Devops And Azure Devops

This Edureka "AWS DevOps vs Azure DevOps" video will give a detailed comparison of how AWS and Azure fare in handling and supporting DevOps approach on the respective cloud platforms along with latest trends and numbers in the domain.