dualtec open stack meeting: agilidade + cloud

102
Agilidade + Cloud Ciclo de Trabalho para Aplicações Escaláveis

Upload: fabio-akita

Post on 04-Dec-2014

519 views

Category:

Technology


0 download

DESCRIPTION

Mover seus projetos pra "cloud" não é só copiar e colar o código das suas aplicações numa máquina na Amazon EC2. Isso além de não escalar é uma estupidez. Na comunidade Rails, para aplicações pequenas e médias (e até algumas grandes) isso já é um problema "resolvido", no sentido de que estamos consciente do processo e práticas envolvidas em criar um aplicação escalável. O Heroku resumiu as principais no 12factor.net. E a realidade é que a indústria de TI como um todo ainda ignora tudo isso. Esta palestra não é para mostrar o futuro, mas sim para mostrar o passado: como nós já usamos isso rotineiramente sem nem pensar mais a respeito enquanto a maioria está 5 anos atrasado em relação a nós.

TRANSCRIPT

Page 1: Dualtec Open Stack Meeting:  Agilidade + Cloud

Agilidade + CloudCiclo de Trabalho para Aplicações Escaláveis

Page 2: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 3: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 4: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 5: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 6: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 7: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 8: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 9: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 10: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 11: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 12: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 13: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 14: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 15: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 16: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 17: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 18: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 19: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 20: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 21: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 22: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 23: Dualtec Open Stack Meeting:  Agilidade + Cloud

THE FOLLOWING HAS BEEN APPROVED FOR HORROR-MINDED AUDIENCES

EXPLICIT LANGUAGE, GRAPHIC VIOLENCE, GORE, SUFFERING, (BUT NO NUDITY)

Page 24: Dualtec Open Stack Meeting:  Agilidade + Cloud

The Twelve-Factor Apphttp://12factor.net/

Page 25: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 26: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 27: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 28: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 29: Dualtec Open Stack Meeting:  Agilidade + Cloud

Codebase in GIT Build, release, run Disposability

Explicit and Isolated Dependencies

Stateless Processes

Dev/prod Parity

Config in ENV Port Binding Log Streams

Backing Services as Attached Resources

Scale-Out Concurrency

One-off Admin Processes

Page 30: Dualtec Open Stack Meeting:  Agilidade + Cloud

Codebase in GIT Build, release, run Disposability

Explicit and Isolated Dependencies

Stateless Processes

Dev/prod Parity

Config in ENV Port Binding Log Streams

Backing Services as Attached Resources

Scale-Out Concurrency

One-off Admin Processes

Page 31: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 32: Dualtec Open Stack Meeting:  Agilidade + Cloud

production

staging

developer 1

developer 2

Codebase Deploys

Page 33: Dualtec Open Stack Meeting:  Agilidade + Cloud

Codebase in GIT Build, release, run Disposability

Explicit and Isolated Dependencies

Stateless Processes

Dev/prod Parity

Config in ENV Port Binding Log Streams

Backing Services as Attached Resources

Scale-Out Concurrency

One-off Admin Processes

Page 34: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 35: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 36: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 37: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 38: Dualtec Open Stack Meeting:  Agilidade + Cloud

Codebase in GIT Build, release, run Disposability

Explicit and Isolated Dependencies

Stateless Processes

Dev/prod Parity

Config in ENV Port Binding Log Streams

Backing Services as Attached Resources

Scale-Out Concurrency

One-off Admin Processes

Page 39: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 40: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 41: Dualtec Open Stack Meeting:  Agilidade + Cloud

Codebase in GIT Build, release, run Disposability

Explicit and Isolated Dependencies

Stateless Processes

Dev/prod Parity

Config in ENV Port Binding Log Streams

Backing Services as Attached Resources

Scale-Out Concurrency

One-off Admin Processes

Page 42: Dualtec Open Stack Meeting:  Agilidade + Cloud

Production!Deploy

Postgresql

Sendgrid AWS S3

Twitterpostgres://auth@host/db

smtp://auth@host

postgres://[email protected]

postgres://[email protected]/bucket

Attached Resources

Page 43: Dualtec Open Stack Meeting:  Agilidade + Cloud

Codebase in GIT Build, release, run Disposability

Explicit and Isolated Dependencies

Stateless Processes

Dev/prod Parity

Config in ENV Port Binding Log Streams

Backing Services as Attached Resources

Scale-Out Concurrency

One-off Admin Processes

Page 44: Dualtec Open Stack Meeting:  Agilidade + Cloud

Codebase

Release

Build

Config!{}

Page 45: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 46: Dualtec Open Stack Meeting:  Agilidade + Cloud

git push heroku master

Page 47: Dualtec Open Stack Meeting:  Agilidade + Cloud

Codebase in GIT Build, release, run Disposability

Explicit and Isolated Dependencies

Stateless Processes

Dev/prod Parity

Config in ENV Port Binding Log Streams

Backing Services as Attached Resources

Scale-Out Concurrency

One-off Admin Processes

Page 48: Dualtec Open Stack Meeting:  Agilidade + Cloud

Application!(Box 1)

Application!(Box 2)

Application!(Box 3)

AWS S3 Memcachier

User Browser

Page 49: Dualtec Open Stack Meeting:  Agilidade + Cloud

Application!(Box 1)

Application!(Box 2)

Application!(Box 3)

AWS S3 Memcachier

User Browser

Page 50: Dualtec Open Stack Meeting:  Agilidade + Cloud

Application!(Box 1)

Application!(Box 2)

Application!(Box 3)

AWS S3 Memcachier

User Browser

Page 51: Dualtec Open Stack Meeting:  Agilidade + Cloud

Application!(Box 1)

Application!(Box 2)

Application!(Box 3)

AWS S3 Memcachier

User Browser

Page 52: Dualtec Open Stack Meeting:  Agilidade + Cloud

Application!(Box 1)

Application!(Box 2)

Application!(Box 3)

AWS S3 Memcachier

User Browser

Page 53: Dualtec Open Stack Meeting:  Agilidade + Cloud

Application!(Box 1)

Application!(Box 2)

Application!(Box 3)

AWS S3 Memcachier

User Browser

Page 54: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 55: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 56: Dualtec Open Stack Meeting:  Agilidade + Cloud

Codebase in GIT Build, release, run Disposability

Explicit and Isolated Dependencies

Stateless Processes

Dev/prod Parity

Config in ENV Port Binding Log Streams

Backing Services as Attached Resources

Scale-Out Concurrency

One-off Admin Processes

Page 57: Dualtec Open Stack Meeting:  Agilidade + Cloud

Codebase in GIT Build, release, run Disposability

Explicit and Isolated Dependencies

Stateless Processes

Dev/prod Parity

Config in ENV Port Binding Log Streams

Backing Services as Attached Resources

Scale-Out Concurrency

One-off Admin Processes

Page 58: Dualtec Open Stack Meeting:  Agilidade + Cloud

web.1 worker.1 scheduler.1

Workload Diversity (process types)

Scal

e (r

unni

ng p

roce

sses

)

Page 59: Dualtec Open Stack Meeting:  Agilidade + Cloud

web.1 worker.1 scheduler.1

Workload Diversity (process types)

Scal

e (r

unni

ng p

roce

sses

)

web.2

Page 60: Dualtec Open Stack Meeting:  Agilidade + Cloud

web.1 worker.1 scheduler.1

Workload Diversity (process types)

Scal

e (r

unni

ng p

roce

sses

)

web.2 worker.2

Page 61: Dualtec Open Stack Meeting:  Agilidade + Cloud

web.1 worker.1 scheduler.1

Workload Diversity (process types)

Scal

e (r

unni

ng p

roce

sses

)

web.2 worker.2

worker.3

worker.4

Page 62: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 63: Dualtec Open Stack Meeting:  Agilidade + Cloud

Codebase in GIT Build, release, run Disposability

Explicit and Isolated Dependencies

Stateless Processes

Dev/prod Parity

Config in ENV Port Binding Log Streams

Backing Services as Attached Resources

Scale-Out Concurrency

One-off Admin Processes

Page 64: Dualtec Open Stack Meeting:  Agilidade + Cloud

web.1 worker.1 scheduler.1

Workload Diversity (process types)

Scal

e (r

unni

ng p

roce

sses

)

web.2 worker.2

worker.3

worker.4

Page 65: Dualtec Open Stack Meeting:  Agilidade + Cloud

worker.1 scheduler.1

Workload Diversity (process types)

Scal

e (r

unni

ng p

roce

sses

)

web.2

worker.4

web.3

Page 66: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 67: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 68: Dualtec Open Stack Meeting:  Agilidade + Cloud

Codebase in GIT Build, release, run Disposability

Explicit and Isolated Dependencies

Stateless Processes

Dev/prod Parity

Config in ENV Port Binding Log Streams

Backing Services as Attached Resources

Scale-Out Concurrency

One-off Admin Processes

Page 69: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 70: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 71: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 72: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 73: Dualtec Open Stack Meeting:  Agilidade + Cloud

Codebase in GIT Build, release, run Disposability

Explicit and Isolated Dependencies

Stateless Processes

Dev/prod Parity

Config in ENV Port Binding Log Streams

Backing Services as Attached Resources

Scale-Out Concurrency

One-off Admin Processes

Page 74: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 75: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 76: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 77: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 78: Dualtec Open Stack Meeting:  Agilidade + Cloud

Codebase in GIT Build, release, run Disposability

Explicit and Isolated Dependencies

Stateless Processes

Dev/prod Parity

Config in ENV Port Binding Log Streams

Backing Services as Attached Resources

Scale-Out Concurrency

One-off Admin Processes

Page 79: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 80: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 81: Dualtec Open Stack Meeting:  Agilidade + Cloud

web.1 worker.1

Workload Diversity (process types)

Scal

e (r

unni

ng p

roce

sses

)

web.2 worker.2

worker.3

worker.4

web.3

Page 82: Dualtec Open Stack Meeting:  Agilidade + Cloud

web.1 worker.1 console.6893

Workload Diversity (process types)

Scal

e (r

unni

ng p

roce

sses

)

web.2 worker.2

worker.3

worker.4

web.3

Page 83: Dualtec Open Stack Meeting:  Agilidade + Cloud

web.1 worker.1

Workload Diversity (process types)

Scal

e (r

unni

ng p

roce

sses

)

web.2 worker.2

worker.3

worker.4

web.3

Page 84: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 85: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 86: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 87: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 88: Dualtec Open Stack Meeting:  Agilidade + Cloud

3 anos (set/11 - jul/13)

Page 89: Dualtec Open Stack Meeting:  Agilidade + Cloud

3 anos (set/11 - jul/13)

72 repos (97 total)

Page 90: Dualtec Open Stack Meeting:  Agilidade + Cloud

3 anos (set/11 - jul/13)

72 repos (97 total)

432k LOC (157k LOC Ruby)

Page 91: Dualtec Open Stack Meeting:  Agilidade + Cloud

3 anos (set/11 - jul/13)

72 repos (97 total)

432k LOC (157k LOC Ruby)

+60 apps Heroku

Page 92: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 93: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 94: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 95: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 96: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 97: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 98: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 99: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 100: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 101: Dualtec Open Stack Meeting:  Agilidade + Cloud
Page 102: Dualtec Open Stack Meeting:  Agilidade + Cloud

OBRIGADO!slideshare.net/akitaonrails

@akitaonrails