Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

103
#DEFINE IMMUTABLE INFRASTRUCTURE @ WAXZCE QUENTIN ADAM AT

Transcript of Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

Page 1: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

#DEFINE

IMMUTABLE

INFRASTRUCTURE

@WAXZCE

QUENTIN ADAM AT

Page 2: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

Quentin ADAM from the Clever Cloud

@waxzce on twitter – github- soundcloud – instagram ….

WHO AM I ?

Page 3: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

MY DAY TO DAY WORK :

CLEVER CLOUD,

THE IT AUTOMATION COMPANY

Page 4: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

KEEP YOUR APPS ONLINE. MADE WITH

NODE.JS, SCALA, JAVA, RUBY, PHP,

PYTHON, GO…

Cloud & on premise ;-)

Page 5: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

AND LEARN A LOT OF THINGS ABOUT

YOUR CODE, APPS, AND GOOD/BAD

DESIGN…

Page 6: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

GIVE BACK TO THE COMMUNITY

NEVER

GONNA

LET YOU

DOWN

clever-cloud.com

Page 7: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

LET’S TALK ABOUT

INFRASTRUCTURE

Page 8: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

40 times in 5 years price drop of AWS

SERVERS COSTS ARE GOING DOWN

Page 9: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

Google I/O 2015

“RACE TO ZERO”

I.E THE SERVER IS FREE

Page 10: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

In fact, all you have is…

COOL.

YOU HAVE A SERVER.

Page 11: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

HOSTING

Backup Updates Certification

Agreement Process Provisioning

SecurityHardware

maintenance

Page 12: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

VALUE

= SERVER

MANAGEMENT

Page 13: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

ONCE UPON A TIME, MY BELOVED

SERVERS

Page 14: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

THEN, VIRTUALIZED ONES

Page 15: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

CREATE HISTORY

Page 16: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

DOCUMENTATION

Page 17: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

SPECIFIC

Page 18: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

TAYLOR MADE

Page 19: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

NOT ABLE TO SCALE

Page 20: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

KNOWLEDGE

!=

AUTOMATION

Page 21: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

Automate

SPLIT COMPLEX PROBLEMS INTO A

COLLECTION OF SMALL ONES

Page 22: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

POSSIBLE SERVERS

STATES

Updated to V43

New configuration

files

Install new service

History …

Page 23: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

AVOID HISTORY

Page 24: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

FIX STATE OF

THE DATA TO

ENSURE

ACCESSIBILITY

Page 25: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

POSSIBLE STATE IN

AN IMMUTABLE STATE

working

Not working

Very simple to predicate

Page 26: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

FIX THE

HISTORY IN A

IMMUTABLE

STATE

Page 27: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

BTW,

REAL WORLD

INSIGHT

“WE LIVE IN A MUTABLE WORLD, DEAL WITH IT”

Page 28: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

WORLD IS

SUCCESSION

OF

IMMUTABLE

INSTANT

Page 29: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

EPHEMERAL

IMMUTABLE

INSTANCES

Page 30: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

PET

!=

CATTLE

Page 31: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

SERVICE

UPTIME

!=

SERVER

UPTIME

Page 32: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

NO MORE OLYMPIC CONTEST ON

UPTIME

Page 33: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

And why it’s a problem to manage technical product and decision with book keepers point of view https://www.youtube.com/watch?v=0ip1FoBsLB4

(AWS PRICING HYPOCRISY LEAD TO

BAD PRACTICE)

Summon Yog-Sothoth

Page 34: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

HUMANLESS

POWERTOOLS

Page 35: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

PRODUCTION HAS TO BE PERFECT

Page 36: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

PEOPLE ARE NOT PERFECT

Page 37: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

PEOPLE HAVE NOTHING TO DO ON

PRODUCTION STUFF

Page 38: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

AT CLEVER CLOUD SSH CONNECTION

IS A RED ALERT

Page 39: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

CAPACITY PLANNING

Page 40: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

SPLIT PROCESS AND

STORAGE

Storage

• Databases

• Files

• Sessions

• Events

• …

Code

• Can be replicated

• Stateless

• Process

Page 41: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

RUNTIME INSTANCES

Page 42: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

VM, docker, kubernetes, puppet, ansible, vmware… This is not the problem

TECHNOLOGIES?

Page 43: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

Containers, VMs... Comment ces technologies fonctionnent et comment les différencier?

(Quentin Adam)

https://www.youtube.com/watch?v=wG4_JQXvZIc

DOCKER

Page 44: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

THERE IS ONE PROCESS:

BUILD

Page 45: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

THEN, REGISTER

Page 46: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

AND LIVE WITHOUT DATA

Page 47: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

AND DIE WHEN MORE

UPDATED VERSION IS THERE

Page 48: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

TRASH OLD VERSION

Page 49: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

FULLY AUTOMATED HOSTING FACTORY

Page 50: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

AN INSTANCE IS DEAD OR ALIVE AND

THAT’S ALL

Page 51: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

APP FAIL?

REDEPLOY

NEW

INSTANCE

Page 52: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

OPERATION

SYSTEM

UPDATE ?

REDEPLOY

NEW

INSTANCE

Page 53: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

REBALANCE

HARDWARE

ALLOCATION?

REDEPLOY

NEW

INSTANCE

Page 54: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

PREDICABLE

FAIL OF THE

APPLICATION?

REDEPLOY

NEW

INSTANCE

Page 55: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT
Page 56: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

Picking one instance or another doesn’t matter

STATELESSNESS IS THE KEY

Page 57: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

BECAUSE YOU WILL NOT RELY

ON A SERVER ANYMORE

Page 58: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

CREATE A FACTORY OF INSTANCE

Page 59: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

PROXY

AND

ROUTING

Page 60: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

https://github.com/sozu-proxy

https://github.com/sozu-proxy/sozu-

demo/tree/master/kubernetes-using-tube-cheese

https://www.youtube.com/watch?v=y4NdVW9sHtU

https://www.youtube.com/watch?v=Cl_fqWZTYUA

Page 61: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

Consul, etcd, Clever Cloud service dependencies

SERVICE DISCOVERY

Page 62: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

SIMPLER

WAY,

NEVER

CHANGE ON

RUNTIME

Page 63: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

CONFIGURATION

=> ENVIRONMENT VARIABLE

Page 64: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

CLEVER CLOUD SERVICE

DEPENDENCIES

https://www.clever-cloud.com/blog/features/2016/06/23/introducing-service-dependencies/

Page 65: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

NO OVER

ENGINEERING ON

CONFIGURATION,

WHEN YOU NEED TO

CONFIGURE THE

CONFIGURATION

INJECTOR, YOU ARE

TOO FAR 🖇

Page 66: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

HOW TO MANAGE DATA?

Page 67: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

SPLIT DATA AND PROCESS:

FS COMPOSITION

Runtime

• local

• replicable

• updated

Data

• file system

• block storage

• replicated

• copy on write?

Page 68: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

DATA

STORAGE

WAYS

Page 69: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

Not part of this list

DATABASE (ACID OR NOT, SQL OR NOT)

Page 70: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

FILE SYSTEM

Page 71: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

BLOC STORAGE

Page 72: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

OBJECT STORAGE

Page 73: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

(COPY ON WRITE)

Page 74: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

(COPY ON WRITE)

Page 75: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

DATA MANAGEMENT IS BIND

TO DB NEEDS

Page 76: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

ACID :

DUPLICATE & DATA EVOLUTION

Page 77: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

INSTANCE FOR ONE

ORGANIZATION

ACID

• Atomicity

• Consistency

• Isolation

• Durability

Powerful data

management

• Transaction

• User management

• One above one

Take advantage of ACID

database

Page 78: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

BUT IT DESIGNS A

BOTTLENECK

Page 79: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

EXAMPLE : E-SHOP ON

CLASSIC MODE

Page 80: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

EXAMPLE : E-SHOP ON

CLASSIC MODE

User A buy a

hdd

Database Transaction :

• Stock management

• Order management

• Invoice generation

• Customer Account reward

• …

Transaction

user A is

processed

Stock &

Order are just

perfectly

synchronize

Page 81: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

EXAMPLE : E-SHOP ON

CLASSIC MODE

User A buy a

hdd

Database Transaction :

• Stock management

• Order management

• Invoice generation

• Customer Account reward

• …

Transaction

user A is

processed

Stock &

Order are just

perfectly

synchronize

User B buy a

hdd Transaction

user B is

processed

then

Page 82: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

EXAMPLE : E-SHOP ON

MULTI-TENANT MODE

i.e. : Multiple shop of various sellers on the same instance

Page 83: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

EXAMPLE : E-SHOP ON

MULTI-TENANT MODE

User A buy a

hdd on seller A

Database Transaction :

• Stock management

• Order management

• Invoice generation

• Customer Account reward

• …

Transaction

user A is

processed

Stock &

Order are just

perfectly

synchronize

User B buy a

book on seller B Transaction

user B is

processed

then

Page 84: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

HIGH AVAILABILITY:

DISTRIBUTED SYSTEM

Page 85: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

DISTRIBUTED

DB AND

HARDWARE

DAFUCKNESS

Page 86: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

FORGET THE SAN, GO FULL

DISTRIBUTED

Page 87: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

NO SILVER

BULLET

STORAGE

Page 88: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

BE CONSISTENT AND PREDICTABLE

Page 89: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

MONITORING

IS

MANDATORY

Page 90: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

EXPOSE METRICS

Page 91: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

BETA ALERT

Page 92: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

IMMUTABILITY

AS A PATTERN

ANOTHER TALK FROM ME ;-)

FR version : https://www.youtube.com/watch?v=y1BR7Rh7FSY&t=15s

Page 93: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

SECURITY

VOODOO

LIKE

Page 94: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

SECURITY IS EVOLVING

Page 96: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT
Page 98: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

FROM SERVER TO

SERVERLESS:

CODE

LOCKED?

Page 99: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

F*CK 12

FACTORS?

Page 100: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

TCP ?

Page 101: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

GO BACK ON

APPLICATION

SERVER?

Page 102: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

@waxzceTHANK YOU !

ANY QUESTIONS ?

Clever Cloud gift coupon:

devopsNIGHT17

[email protected]

Page 103: Understand immutable infrastructure, what? Why? How? - Meta-Meetup DEVOPS NIGHT

https://www.eventbrite.com/e/billets-jenkins-community-day-paris-2017-

33850605071?discount=jcdisclever5774

jcdisclever5774