Post on 16-Apr-2017
Immutable Infrastructure果凍
簡介
● 任職於 inwinstack○ 過去的迎廣科技雲端應用研發中
心
● python, django, linux, openstack, docker
● kjellytw at gmail dot com● http://www.blackwhite.
tw/
What’s Immutable Infrastructure
● Infrastructure is divided into "data" and "other".
● "Other" components are replaced at every deployment.
● "Other" components are modifed with version controll.
● "Other" components include “config”, “program”, “environment”.
Why do we need Immutable Infrastructure
● Atomic deployments○ Easy to upgrade○ Easy to downgrade○ Fault recovery
● Operator/technical support will feel happily because nothing will be changed.
How to Achieve Immutable Infrastructure
● Deploy tools● Package your application, dependencies
and configurations together○ docker○ packer
Downside
● Small changes are cumbersome.○ Building images will take much time.
● Hard to debug.
● Pros:○ Without another layer
● Cons:○ Possibly stay the state you don’t
expect. For example, failed during upgrading.
Instance
OS
Library App server
App
apt: name=foo=1.00 state=present
apt: name=foo state=present
hard to downgrade
● Pros:○ Atomic deployments
● Cons:○ Another layer is needed.○ Need extra time to build container.
Instance
OS
Container
Library App server
App