Configuration Drift • Manual ad-hoc changes and updates to servers that are not recorded • Servers in your infrastructure became more and more different from each others @_dcsg #PixelsCamp
Snowflake Server • Long running servers • Difficult to reproduce • No consistency between servers • Lack of confidence in your systems • Hard to spin up another instance in the same state @_dcsg https://martinfowler.com/bliki/SnowflakeServer.html
Configuration Management Spin up Base Image Run Config Management Server in desired state Changes Edit config file Upgrade/install package … Running Server
Built Process Spin up Base Image Run Config Management Server in desire state Install packages Create folders Create user Upload app etc Run Config Management Repositories unavailable
"An Immutable Server is a server, that once deployed, is never modified, merely replaced with a new updated instance." - Kief Morris in ImmutableServer @_dcsg #PixelsCamp
Immutable Servers • Final state image with everything baked in. • No changes after it’s built. • Include scripts to start the application at boot. • Easy to scale out, deploy and rollback. • Trustable and testable. • Easy to adopt A/B testing, Canary releases or Blue/Green deployments. @_dcsg #PixelsCamp
Immutable Server Build Process Bake In the App App Final Image Server in desire state configure application environment Spin up Base Image Run Config Management (puppet, chef, ansible)
Build Image Stages Flow Example Base Image OS Hardening Common tools (vim, htop, etc) etc Application Base Image Install necessary software to run the App Create user/folders Application Final Image Upload App Script to run App at boot System upgrades & Security updates Application security, package, configuration updates
• SnowFlake Servers • Inconsistent states between machine (Config Drifts) • Phoenix Servers • Avoids Config Drifts using CM Automation Tools • Can be built from scratch • Immutable Servers • Final image with everything baked in • After built cannot be modified • Can only be replaced with an updated instance Recap