20

Immutability is a term often used in computer science circles, which generally boils down to "not possible to change after creation". It is typically used in reference to parallelism, concurrency, and thread safety. The discussion of that topic is fascinating, but can generally be found elsewhere on Stack Overflow. I'm resisting the urge to dive into it ...


16

There are a few different ways to achieve goals of this sort, each with some different tradeoffs. I'm going to describe the most common ones below. The simplest approach is to use Terraform's create_before_destroy mechanism with autoscaling groups. An example of this pattern is included in the aws_launch_configuration documentation. In this scenario, ...


13

There are a few answers to that: Something needs to build those immutable images. It is certainly easier to use old-school-style procedural scripting to build something when starting from a known starting state but this can still get very unwieldy over time (e.g. Dockerfiles), especially when you end up wanting a big matrix of different images for things ...


10

Cloud technologies shifted the frontier between hardware and software so that many technical operations formerly exclusive citizen of the hardware world are also subjects of the software realm. Shared computing environments might be as old as computers themselves1 but cloud technologies could popularise them by offering convenient and familiar metaphors to ...


9

The two terms are very different. Let us start with immutability, which literally means "no mutations" or "no changes". In the DevOps sense, it means that once you created an artifact, be that a container image, or a VM image, or maybe a package from compiled code - you declare that you will never ever change it. Often if any changes are required, you ...


9

First of all, removing ssh on an immutable server doesn't guarantee there'll be no change, it's more that as there should be no need to change something you reduce the attack surface by removing a remote access channel. One way to keep a sort of post-mortem is log centralisation. There's a myriad of methods to achieve it, ELK stack, Splunk, syslog... ...


9

Immutable servers are servers on which no changes can be made (other than updates and security patches ideally). Instead of changing the software on the server, you spool up a new server with the desired software and then terminate the older one. This concept helps to ensure that your test, development, and QA server are all identical, which is important ...


7

The fact that you don't have SSH access doesn't mean there is no way to access the machine. Most likely you'll be running it on some cloud operator, where you can also do the following: take a snapshot of the machine. You could simply take a snapshot of the box before destroying it, for later analysis. access the machine through the console. You'll probably ...


6

The best explanation can be found (as always) on Martin Fowler's bliki article on Immutable Servers. A server, be it hardware or a virtual server in the cloud, usually has an operating system and application running on it. Often application, and components of the operating system, require configuration and require changes to be applied. For example ...


6

Part of adopting the Immutable Infrastructure Pattern is decomposing your system into small manageable pieces that can move through CI/CD Pipeline very quickly, this means that OS patches can be done quickly and in a controlled manner. I often see clients ending up with a halfway house where infrastructure is mostly immutable. However, there are a few ...


6

No. Immutable is exactly what it means, immutable, no change on configuration or code running or system library or whatever, if a change has to be made, create a new image and deploy it, never change it while running. Source code updates are the least thing to change on a running server, this should not happen on a running server, immutable or not. You ...


5

I've looked a bit at Consul and Prometheus and am thinking that that is the way forward? In short, yes. Consul is designed exactly for this - it will run health checks against all of your services that you define and can detect when things go down. However, what it does not do it alert when things do go down, it is more designed for automatically taking ...


3

You hint in the title about immutable infrastructure, so it sounds like you already know the solution: don't change existing servers, but bring up new ones with your changes, switch over to them, and switch back to the old ones if necessary. Theoretically any of the standard config management tools can roll back by simply checking out a previous commit and ...


2

Although I am willing to bet that this answer may not age well, I would suggest "Infrastructure as Code" by Kief Morris for the "theory" part. For the "application" part, I would suggest "Terraform up and Running" by By Yevgeniy Brikman.


2

Immutable infrastructure is, in my mind, a different pattern to Configuration Management. While they can be used together, they approach problems by nature in two different ways. The concept of Immutable Artifacts has a long history, Unix systems have been using them for decades to deploy software packages. But once they were deployed the configuration ...


1

You could do a vulnerability scan with AWS Inspector and look for CVE vulnerabilities. Inspector has a CloudWatch metric to cause an action when there are findings. Would be tricky to determine WHICH packages need to be updated, but you could just update everything. You don’t have to use Inspector, any vulnerability scanning tool you can hook into would ...


Only top voted, non community-wiki answers of a minimum length are eligible