Immutable infrastructure

8

Click here to load reader

Transcript of Immutable infrastructure

Page 1: Immutable infrastructure

Immutable Infrastructure果凍

Page 2: Immutable infrastructure

簡介

● 任職於 inwinstack○ 過去的迎廣科技雲端應用研發中

● python, django, linux, openstack, docker

● kjellytw at gmail dot com● http://www.blackwhite.

tw/

Page 3: Immutable infrastructure

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”.

Page 4: Immutable infrastructure

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.

Page 5: Immutable infrastructure

How to Achieve Immutable Infrastructure

● Deploy tools● Package your application, dependencies

and configurations together○ docker○ packer

Page 6: Immutable infrastructure

Downside

● Small changes are cumbersome.○ Building images will take much time.

● Hard to debug.

Page 7: Immutable infrastructure

● 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

Page 8: Immutable infrastructure

● Pros:○ Atomic deployments

● Cons:○ Another layer is needed.○ Need extra time to build container.

Instance

OS

Container

Library App server

App