Immutable Server Generation
The New App Deployment
AXEL FONTAINE
@axelfontaine
axel@boxfuse.com
flywaydb.org
boxfuse.com
about
questions
POLL:
which level of automation are you at?
• Build
• Unit Tests
• Continuous Integration
• Acceptance Tests
• Continuous Deployment (Code)
• Continuous Deployment (Code + DB + Configuration)
• Infrastructure
Build Test
Build Test
• One immutable unit
• Regenerated after every change
• Promoted from Environment to Environment
Classic Mistake: Build per Environment
OS Kernel
Libraries
Language
App Server
App
OS Kernel
Libraries
Language
App Server
App
why aren’t we doing the same
for the server this is running on ???
what could possibly go wrong
in the other layers ???
missing software
wrong name
bad version
incorrect permissions
http://www.flickr.com/photos/travelinlibrarian/2409633653/sizes/l/
critical resource in use
what aren’t we holding our servers to the
same standards as our applications ???
how did we get into this mess ???
sometime in the 20th century …
http://en.wikipedia.org/wiki/File:Tdkc60cassette.jpg
OS Kernel
Libraries
Language
App Server
App
Build Test
OS Kernel
Libraries
Language
App Server
App
Build Test
App
OS Kernel
Libraries
Language
App Server
App
OS Kernel
Libraries
Language
App Server
App
OS Kernel
Libraries
Language
App Server
App
Updates UpdatesUpdates
Sysadmin
If I had asked my
customers what they
wanted they would have
said a faster horse.
Henry Ford
OS Kernel
Libraries
Language
App Server
App
OS Kernel
Libraries
Language
App Server
App
OS Kernel
Libraries
Language
App Server
App
Updates UpdatesUpdates
Sysadmin
OS Kernel
Libraries
Language
App Server
App
OS Kernel
Libraries
Language
App Server
App
OS Kernel
Libraries
Language
App Server
App
Updates UpdatesUpdates
Automated
Sysadmin
fast forward to 2015 …
Every day, AWS adds
enough server capacity
to power the whole $5B
enterprise Amazon.com
was in 2003.
Weekends included.
it is time to rethink the faster horse
App
OS Kernel
Libraries
Language
App Server
Build Test
App
OS Kernel
Libraries
Language
App Server
Build Test
App
Machine
Image
OS Kernel
Libraries
Language
App Server
Build Test
Machine
Image
OS Kernel
Libraries
Language
App Server
App
OS Kernel
Libraries
Language
App Server
App
OS Kernel
Libraries
Language
App Server
App
Machine
Image
Machine
Image
Machine
Image
Machine
Image
Machine
Image
Machine
Image
Updates
but there is one big problem left …
Machine
Image
Network Cable
Machine
Image
Network Cable
Multiple
GB
Running servers in
production should be like
going backpacking. You
take the bare minimum
with you. Anything else
is going to hurt.
A Wise Man
what is really adding business value ???
Machine
Image
Network Cable
Editors
Daemons OS Kernel
Libraries
Utilities
Drivers
App
App Server
Package Mgr
Compilers
SSH
Firewall
Compatibility
Man Pages
Language
Log Files
Users
Shells
Machine
Image
Network Cable
OS Kernel
Libraries
App
App Server
Language
Bootable
App
40 – 80
MB
Multiple
GB
40 – 80
MB
Network Cable
Bootable
App
who is this for ???
OS Kernel
Libraries
Language
App Server
App
12-factor app
demo
what is the big change ???
Focus shift
Individual servers become disposable
Server Service
Treat servers like cattle instead of pets
Treat servers like cattle instead of pets
what about the database ???
Bootable
App
what about the logs ???
Bootable
App
what about sessions ???
Session in cookie
what about the new versions ???
Load
Balancer
App
v1
App
v1
Logs
Availability Zone 1
Availability Zone 2
Load
Balancer
App
v1
App
v1
Logs
Availability Zone 1
Availability Zone 2
Load
Balancer
App
v2
App
v1
App
v2
App
v1
Logs
Availability Zone 1
Availability Zone 2
Load
Balancer
App
v2
App
v1
App
v2
App
v1
Logs
Availability Zone 1
Availability Zone 2
summary
• One immutable unit
• Regenerated after every change
• Promoted from Environment to Environment
Classic Mistake: Build per Environment
Bootable
App
• One immutable unit
• Regenerated after every change
• Promoted from Environment to Environment
Classic Mistake: Build per Environment
boxfuse.com
Thanks !
AXEL FONTAINE
@axelfontaine
axel@boxfuse.com
boxfuse.com

Jfokus 2015 - Immutable Server generation: the new App Deployment