Enabling Microservice @ Orbitz - GOTO Chicago 2016

135
Enabling Microservices @ Orbitz Steve Hoffman Senior Principal Engineer @bacoboy Rick Fast Principal Engineer @tortiepoint

Transcript of Enabling Microservice @ Orbitz - GOTO Chicago 2016

Page 1: Enabling Microservice @ Orbitz - GOTO Chicago 2016

Enabling Microservices@ Orbitz

Steve HoffmanSenior Principal Engineer @bacoboy

Rick FastPrincipal Engineer @tortiepoint

Page 2: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Page 3: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Agenda

• Brief Architecture Overview/History• From Monolithic to Services to Microservices with Docker• Automated Pipelines• Questions

Page 4: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Page 5: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

2000

Page 6: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

2000

Web Layer

Business Layer

Page 7: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

2000

Page 8: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

2000

Page 9: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

2000

Business Layer

Page 10: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

2000

Business Layer

Page 11: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Business Layer

2000

Page 12: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Business Layer

2003

Page 13: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Business Layer

2003

Page 14: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Business Layer

2003

Page 15: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

2003

Page 16: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

2004

Page 17: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

2004

Page 18: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

2004

Page 19: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

2012

Page 20: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

2012

Page 21: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

2012• Multiple Brands

• Websites

• Webservices

• Multiple Backends

• 500+ apps / thousands of instances

• Deployments Daily (sometimes more)

Page 22: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

2015• Multiple Brands

• Websites

• Webservices

• Multiple Backends

• 500+ apps / thousands of instances

• Deployments Daily (sometimes more)

Page 23: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

• Multiple Brands

• Websites

• Webservices

• Multiple Backends

• 500+ apps / thousands of instances

• Deployments Daily (sometimes more)

2015

Page 24: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

2016• Multiple Brands

• Websites

• Webservices

• Multiple Backends

• 500+ apps / thousands of instances

• Deployments Daily (sometimes more)

Page 25: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Process Overkill

Page 26: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Different Provisioning Tools

DEV OPS

Page 27: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Different Provisioning Tools

DEV OPS

Application Platform!=

Page 28: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

A New Experiment• Microservices?

• Decompose single “service” into the actual 40+ sub-services

• Any change to sub-service was a deployment of many

• Could it be a simple Spring Boot App in Docker (12 factor?)

• Backward compatible with existing service infrastructure.

• Code to Production w/o help from other Humans

Page 29: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

The Docker Slave aka “The Rickbot”

Page 30: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

The Docker Slave aka “The Rickbot”

App

App

App

Page 31: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

App

App

App

Page 32: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

App

App

App

Page 33: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

App

App

App Register & Lookup

Page 34: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

10.10.10.1010.10.10.10:31002

App

App

App Register & Lookup

Page 35: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

App

App

App

Page 36: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

App

App

App

Page 37: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

10.10.10.10

App

App

App

Page 38: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

10.10.10.10

10.10.10.10:51515

App

App

App

Page 39: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

App

App

App

Page 40: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

App

App

App

Page 41: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

App

App

App

Page 42: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

10.10.10.10

App

App

App

Page 43: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

10.10.10.1010.10.10.10:1337

App

App

App

Page 44: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Almost done…

App

App

App

Page 45: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Mesos Scheduler

http://mesos.apache.org/

Page 46: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Mesos SchedulerMarathon

Scheduler Slave xNMaster x3

ZK x3

Page 47: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

App

App

App

Page 48: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

App

App

App

Page 49: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

App

App

App

Page 50: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

App

App

App

Page 51: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

App

App

App

VIP

Page 52: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

App

App

App

VIP

Page 53: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

App

App

App

VIP

Page 54: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

App

App

App

Page 55: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

App

App

App

Page 56: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

AppApp

App

Page 57: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

AppApp

App

Page 58: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

A Little More Background…

Page 59: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Page 60: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Module

Module

Module Module

Page 61: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Editorial Module

A Continuously Deployed Microservice

www.orbitz.com (scroll down)

Page 62: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

OrbitzContent

OrchestrationService

Content(Solr)

EditorialModule

SearchModule

HotelModule

Page 63: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

OrbitzContent

OrchestrationService

Content(Solr)

EditorialModule

SearchModule

HotelModule

Hotel Team Search Team Content Team

Page 64: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

OrbitzContent

OrchestrationService

Content(Solr)

EditorialModule

SearchModule

HotelModule

Page 65: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

OrbitzContent

OrchestrationService

Content(Solr)

EditorialModule

SearchModule

HotelModule

Hotel Team

Search Team

Content Team

Page 66: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Pre-Continuous Delivery1.2-BETA-20150401-113002

Test Discard

Test Discard1.2-BETA-20150402-093002

Build

Build

And so on…

Page 67: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Pre-Continuous Delivery1.2-BETA-20150401-113002

Test Discard

Test Discard1.2-BETA-20150402-093002

Build

Build

Test Deploy1.2

Build

Page 68: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Continuous Delivery with Jenkins, Docker, Ansible

and Marathon

Page 69: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Yorfast-mbp:git rfast$ yo microservice

_-----_ | | .--------------------------. |--(o)--| | Welcome to the kickass | `---------´ | Microservice | ( _´U`_ ) | generator! | /___A___\ '--------------------------' | ~ | __'.___.'__ ´ ` |° ´ Y `

? Enter the name of your service. (E.G. "my-service")

Page 70: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Committer

Pull Request

Page 71: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Committer

Reviewer

Pull Request

Page 72: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Committer

Reviewer

Pull Request

Page 73: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Committer

Reviewer

Pull Request

Page 74: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Jenkins Pipeline

Page 75: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

if(…) { x ++; }

Merge

Page 76: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Pipeline (Simplified)build

unit testpublish

deploydev

acceptancetests

deployqa

deploystaging open RFC deploy

prod close RFC

Page 77: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Build

if(…) { x ++; }

1.2

Merge

Page 78: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Build

if(…) { x ++; }

1.2

Merge

1.2.

editorial-module.jar

./gradlew build

{BUILD_NUMBER}

Page 79: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Build

1.2

Merge

editorial-module.jar

if(…) { x ++; }

171.2.

Page 80: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Build

1.2

Merge

editorial-module.jar

FROM orbitz/java-8 COPY build/editorial-module.jar /opt/orbitz WORKDIR /opt/orbitz ENTRYPOINT [“java”,”-jar”,”editorial-module.jar”]

if(…) { x ++; }

171.2.

Page 81: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Build

1.2

Merge

editorial-module.jar orbitz/editorial-module:1.2.17

if(…) { x ++; }

171.2.

Page 82: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Build

orbitz/editorial-module:1.2.17

Page 83: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Deploy- hosts: dev - tasks: - name: find previous images docker_facts: image=orbitz/{{application}} register: previous - name: deploy new image docker: image=orbitz/{{application}}:{{version}} … - name: wait for service wait_for: port={{port}} … - name: check health endpoint uri: url="http://{{fqdn}}:{{port}}/health" … - name: kill old image docker: {{previous}}

git pull

playbook.yml (abridged)

Page 84: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

- hosts: dev

host-001 host-002 host-003 host-004

Page 85: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

- hosts: dev

host-001 host-002 host-003 host-004

Page 86: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

- hosts: dev

host-001 host-002 host-003 host-004

Page 87: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Downsides

• How to handle failure with YAML files?

• What happens when a VM is moved (destroyed/created)?

• What if I need to add capacity?

Page 88: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Deploy (Second Attempt)- hosts: dev - tasks: - name: find previous images docker_facts: image=orbitz/{{application}} register: previous - name: deploy new image docker: image=orbitz/{{application}}:{{version}} … - name: wait for service wait_for: port={{port}} … - name: check health endpoint uri: url="http://{{fqdn}}:{{port}}/health" … - name: kill old image docker: {{previous}}

git pull

playbook.yml (abridged)

Page 89: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Deploy (Second Attempt)- hosts: dev - tasks: - name: find previous images docker_facts: image=orbitz/{{application}} register: previous - name: deploy new image docker: image=orbitz/{{application}}:{{version}} … - name: wait for service wait_for: port={{port}} … - name: check health endpoint uri: url="http://{{fqdn}}:{{port}}/health" … - name: kill old image

git pull

playbook.yml (abridged)

- hosts: localhost - tasks: - name: marathon deploy marathon: image=orbitz/{{application}}:{{version}} instances=3

Page 90: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Deploy (Second Attempt)

git pull

playbook.yml (abridged)

- hosts: localhost - tasks: - name: marathon deploy marathon: image=orbitz/{{application}}:{{version}} instances=3

Page 91: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Deploy (Second Attempt)

New host setup

Page 92: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Deploy (Second Attempt)

Mesos Agent

New host setup

1.2.16

Page 93: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

- tasks: marathon: …

playbook.yml

1.2.16 1.2.16

1.2.16

Page 94: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

- tasks: marathon: …

1.2.16 1.2.16

1.2.16

Page 95: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

- tasks: marathon: …

1.2.16 1.2.16

1.2.16

Page 96: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

- tasks: marathon: …

1.2.16 1.2.16

1.2.16

PUT /apps/editorial-module { “image”: “orbitz/editorial-module:1.2.17” … }

Page 97: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

PUT /apps/editorial-module { “image”: “orbitz/editorial-module:1.2.17” … }

- tasks: marathon: …

1.2.16 1.2.16

1.2.16

app = GET /v2/apps/editorial-module

if not app then deploy_id = POST /v2/apps { “image”: “orbitz/editorial-module:1.2.17”, “id”: “editorial-module” } else deploy_id = PUT /v2/apps/editorial-module { “image”: “orbitz/editorial-module:1.2.17” } end if

while GET /v2/deployments contains deploy_id // still deploying end

// deploy complete

Page 98: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

- tasks: marathon: …

1.2.16 1.2.16

1.2.16

“env”: { “SOME_DATABASE_URL”: “jdbc://whatever”, “SOME_DATABASE_USER”: “rickfast”, “SOME_OTHER_VALUE”: “whatever” }

PUT /apps/editorial-module { “image”: “orbitz/editorial-module:1.2.17” … }

Page 99: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

- tasks: marathon: …

PUT /apps/editorial-module { “image”: “orbitz/editorial-module:1.2.17” … }

1.2.16 1.2.16

1.2.16

Page 100: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

- tasks: marathon: …

1.2.16 1.2.16

1.2.16

Page 101: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

- tasks: marathon: …

1.2.16 1.2.16

1.2.16

1.2.17 1.2.17

1.2.17

Page 102: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

- tasks: marathon: …

/health

1.2.16 1.2.16

1.2.16

1.2.17 1.2.17

1.2.17

Page 103: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

- tasks: marathon: …

/health

200 OK 200 OK

200 OK

1.2.16 1.2.16

1.2.16

1.2.17 1.2.17

1.2.17

Page 104: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

- tasks: marathon: …

1.2.17 1.2.17

1.2.17

Page 105: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

And off to the next environment…

1.2.17 1.2.17

1.2.17

Page 106: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

1.2.17 1.2.17

1.2.17

What if?

Page 107: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

1.2.17 1.2.17

Page 108: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

1.2.17 1.2.17

Page 109: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

1.2.17 1.2.17 1.2.17

Page 110: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

/health

200 OK

1.2.17 1.2.17 1.2.17

Page 111: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

1.2.17 1.2.17 1.2.17

Page 112: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Smoke/Acceptance Testing

1.2.17

1.2.17

1.2.17

Page 113: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Paper Trail

create

tickets

commit(s)

Page 114: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Paper Trail

fail!

close/fail

Page 115: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Paper Trail

ok

close

Page 116: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Build Unit Test

Deploy Dev

Deploy Prod

Deploy Staging

Acceptance TestCode

Review & Push

Production

Pre-Production

Open RFC

Close RFC

Page 117: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Pipeline as code!node { git ‘https://stash.orbitz.com/editorial-module.git‘ sh ‘./gradlew clean build’ def image = docker.build “editorial-module:${env.BUILD_TAG}" image() }

Page 118: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Pipeline as code!

node { git ‘http://stash.orbitz.com/deploy-playbook.git' sh ‘./ansible-playbook … editorial-module:${env.BUILD_TAG} test’ }

node { git ‘https://stash.orbitz.com/editorial-module.git‘ sh ‘./gradlew clean build’ def image = docker.build “editorial-module:${env.BUILD_TAG}" image.push() }

Page 119: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Pipeline as code!pipeline.json { “steps”: [ { “type”: “gradle-build” }, { “type”: “marathon-deploy”, “environment”: “test” } ] }

Page 120: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Pipeline as code!def pipeline = new JsonSluper().parse(‘pipeline.json’)

pipeline.steps.each { step -> if (step.type == ‘gradle-build’) { node(‘java’) { git ‘https://stash.orbitz.com/${service}.git’ sh ‘./gradlew clean build’ def image = docker.build “${service}:${env.BUILD_TAG}” image.push() } } … }

Page 121: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Jenkins CI/CD - on Mesos?• Existing Solution

• Dedicated Jenkins Slaves

• Hand created

• Snapshotted & Rolled Back to “Clean” state after each Job

• Hard to Manage Build Environment for 300+ apps across many OSes, Java versions, Ruby versions, perl versions, python versions, protocol buffer compiler versions, etc…

Page 122: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Master

Slave

Commit/Push or Pull Request/Merge

Before

Page 123: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Master

Slave

Poll or Push Trigger

Commit/Push or Pull Request/Merge

Clone & Build Push Artifacts

Before

Page 124: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Master

SlaveBefore

Page 125: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Jenkins mesos-plugin

Page 126: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Master

Master

Commit/Push or Pull Request/Merge

After Slave

env:jenkins

Page 127: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Master

Master

Slave

Poll or Push Trigger

Commit/Push or Pull Request/Merge

Clone & Build Push Artifacts

After Slave

env:jenkins

Page 128: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Master

MasterAfter Slave

env:jenkins

Page 129: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Master

Master

SlaveSlave

env:jenkins

env:ci

Page 130: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Master

Master

Slave

Slave

Deploy

App

Clone & Run

Slave

env:jenkins

env:cidocker pull

Page 131: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Master

Master

Slave

App

Slave

env:jenkins

env:ci

Page 132: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Prod NetworkPre-Prod Network

env:ci env:qa env:staging

env:jenkins

Master

env:prod

Page 133: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

DC: EastDC: West

env:cidc:west

env:qadc:west

env:stagingdc:west

env:jenkinsdc:west

Master

env:proddc:east

env:proddc:west

Page 134: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016

Learnings• Create a shared platform for docker deployments using shared and app-specific “localhost”

helpers — this was ours, yours SHOULD look different — adapt to change, don’t fight it.

• Take people out of the release process

• Docker & Packer AMIs - repeatable applications/servers

• Chef - repeatable infrastructure & configuration — Environment aware

• Jenkins - repeatable releases

• Delineate configuration concerns:

• Known at Compile time — Bake into Docker image

• Known at Boot time — Pass from Playbook/Launcher/Jenkins - parameter to Docker run/AMI

• Changes Anytime — Externalize (consul K/V, etcd, zookeeper)

Page 135: Enabling Microservice @ Orbitz - GOTO Chicago 2016

#GOTOChgo 2016