zalando’s open source infrastructure - goto blog · pdf filezalando’s open source...

35

Upload: trinhnga

Post on 11-Mar-2018

219 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k
Page 2: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

Zalando’s Open Source Infrastructure on AWS with Docker

[email protected] Con Berlin 2015, 2015-12-04

@01k

Page 3: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

15 countries

3 fulfillment centers

17+ million active customers

2.2+ billion € revenue 2014

135+ million visits per month

10.000+ employees in DE

One of Europe’s largest online Fashion Retailers

Page 4: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

A BRIEF HISTORY ON ZALANDO TECHNOLOGY

Page 5: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k
Page 6: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k
Page 7: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k
Page 8: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

Platform

Deployment; ancient

Platform Team

request serversdeploy

Page 9: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

Platform

70+ Dev Teams

Platform Team

deploy request servers

request storage

Deployment; recent

Page 10: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

Platform

70+ Dev Teams

Platform Team

deploy request servers

request storage

Deployment; the Truth

Page 11: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

AUTONOMYMASTERYPURPOSE

RADICAL AGILITY

TRUST

Page 12: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

Compliance Innovation

Page 13: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

STUPSTo Unleash Penguin Swarms

Page 14: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

AWS

STUPS

DOCKERDEPLOY

SSH ACCESS

AUDIT REPORTS

FULL AWS ACCESS

A Platform on Top of Amazon Web Services

Page 15: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

Public Internet

*.a.example.org

*.b.example.orgTeam A

Team B

ELB

ELB

Isolated AWS Accounts & OAUTH 2.0 & Security

Data CenterLB

AWS

Page 16: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

DEPLOYMENT

Page 17: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

Immutable Stacks

ELB myapp-v1

EC2 + Docker

myapp.example.org

100%

EC2 + Docker

EC2 + Docker

Page 18: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

Immutable Stacks

ELB myapp-v1

EC2 + Docker

ELB myapp-v2

myapp.example.org

90% 10%

$ senza traffic myapp v2 10

EC2 + Docker

EC2 + Docker

EC2 + Docker

EC2 + Docker

Page 19: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

Immutable Stacks

ELB myapp-v1

EC2 + Docker

ELB myapp-v2

myapp.example.org

0% 100%

$ senza traffic myapp v2 100

EC2 + Docker

EC2 + Docker

EC2 + Docker

EC2 + Docker

Page 20: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

AWS

Deployment with Senza

Senza CLI

Pier One

docker pull

docker push

Taupage

Page 21: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

SENZA: DEFINITION YAMLSenzaInfo:

StackName: hello-world

Parameters:

- ImageVersion:

Description: "Docker image version of Hello World."

SenzaComponents:

- Configuration:

Type: Senza::StupsAutoConfiguration # auto-detect network setup

- AppServer: # will create a launch configuration and ASG with scaling triggers

Type: Senza::TaupageAutoScalingGroup

InstanceType: t2.micro

SecurityGroups: [app-hello-world]

ElasticLoadBalancer: AppLoadBalancer

TaupageConfig:

runtime: Docker

source: "stups/hello-world:{{Arguments.ImageVersion}}"

ports:

8080: 8080

Page 22: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

The STUPS.io Stack

AWS EC2

Taupage AMI

Docker Container

Application

✓ Isolated team accounts

✓ Created by senza through Cloud Formation

✓ Immutable AMI✓ Docker Runtime✓ Managed SSH access✓ Audit Logging✓ Log Collection✓ Monitoring Metrics✓ KMS encrypted vars✓ Reviewed security

additions

✓ Immutable Image

✓ Ubuntu✓ OpenJDK✓ Zalando CA

certificate✓ scm-source

Page 23: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

LOGGING

Page 24: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k
Page 25: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

REMOTE ACCESS

Page 26: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

● Mostly for Debugging

● Audit Logging

● più granting Access

Remote SSH Access

Page 27: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

MONITORING

Page 28: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

TODO: Screenshot

ZMON - our monitoring Solution

Page 29: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

ZMON Appliance

*.foo.example.org

Team “Foo”

EC2InstanceEC2

Instance

ZMON Appliance

KairosDB

EC2Instance

ZMONController

ELB

*.bar.example.org

Team “Bar”

EC2InstanceEC2

Instance

ZMON Appliance EC2

Instance

ELB

Page 30: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

SECURITY

Page 31: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

DISTRIBUTION OF CREDENTIALS OVER S3 BUCKETS

AWS

WEB UI

requestOAuth2 token

Taupage

Mint Rotator

OAuthProvider

savepasswords

read passwordS3

rotatepasswords

Page 32: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

➊ Isolated AWS account per Team

➋ Deployment with Docker

➌ Managed SSH Access

➍ REST/OAuth 2.0 mandatory

➎ Traceability of changes

STUPS in a Nutshell

STUPS

Page 33: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

● Taupage AMI with Docker runtime

● Senza to manage Cloud Formation

● Pier One Docker Registry with S3

http://docs.stups.io/en/latest/user-guide/standalone-deployment.html

What you might find valuable

Page 34: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k

Questions?

STUPS Homepagestups.ioGitHub Repositoriesgithub.com/zalando-stups

[email protected]

Page 35: Zalando’s Open Source Infrastructure - GOTO Blog · PDF fileZalando’s Open Source Infrastructure on AWS with Docker bernd.herding@zalando.de GOTO Con Berlin 2015, 2015-12-04 @01k