26

Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

  • Upload
    others

  • View
    18

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling
Page 2: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Microservices on OpenShift: Where We’ve Been; Where We’re Going

Michael Rice, ConsultantRed Hat Consulting

@michaelrice linkedin.com/in/michaelrice michaelrice.com

Page 3: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Hello

• Michael Rice– Consultant with Red Hat Consulting

• Middleware practice• West Coast

– based in Sunny Los Angeles

Page 4: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Hello (again)

• > 15 years experience with big enterprises– Integration– App developer

• Approach: consultant’s view

Page 5: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

More Interesting: You… ?

• Architect or developer• Familiar with microservices• Familiar with OpenShift• Likely enterprise Java background, but

could be any stack

Page 6: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

You Are Here, Right?

MOST IMPORTANTLY: you want to explore intersection of OpenShift (or PaaS, generally) and microservices

Page 7: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Agenda• Context: microservices, OpenShift, and you• DEMO: basic microservice on OpenShift v2• Discussion: Microservices on OpenShift• DEMO: REST-based automation with OpenShift and Jenkins• Discussion: Compare/contrast v2 and v3 for microservices• DEMO: Wired up microservices on v3 with Kubernetes• Summary, Q+A

Page 8: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Context: What Are Microservices?

• Just context: holy war free zone• Basic definition

– Small– Autonomous

Page 9: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Context: What Are Microservices?

• A good way to organize development teams

Page 10: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Context: What is OpenShift

• PaaS, but you already knew that• On the brink of a major version turnover• Three types

– Origin– Online– Enterprise (OSE)

Page 11: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Agenda• Context: microservices, OpenShift, and you• DEMO: basic microservice on OpenShift v2• Discussion: Microservices on OpenShift• DEMO: REST-based automation with OpenShift and Jenkins• Discussion: Compare/contrast v2 and v3 for microservices• DEMO: Wired up microservices on v3 • Summary, Q+A

Page 12: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Demo: Baseline• Pizza delivery drivers on node• Code: https://github.com/mrice/openshift-

microservices

Page 13: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Agenda• Context: microservices, OpenShift, and you• DEMO: basic microservice on OpenShift v2• Discussion: Microservices on OpenShift• DEMO: REST-based automation with OpenShift and Jenkins• Discussion: Compare/contrast v2 and v3 for microservices• DEMO: Wired up microservices on v3 • Summary, Q+A

Page 14: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Microservices + OpenShift: Overview

(1) Self provisioning(2) Container / service natural boundaries(3) Auto scaling(4) Platform automation

Page 15: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Microservices + OpenShift: Self Provisioning

• Pattern: team owns the service top to bottom

Page 16: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Microservices + OpenShift: Natural Boundaries

• V3: One pod per container– OpenShift v3 gets the abstraction right…?– Actually, could think of it as one Kubernetes

pod per instance

Page 17: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Microservices + OpenShift: Auto Scaling

• Pattern: smart, natural scaling in the application at the service-level

• Auto scaling has always been there• V2: no clear path to orchestrate services• V3: better because Kubernetes

Page 18: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Microservices + OpenShift: Automation

• Pattern: one service per container means we need lots of automation

• V2: REST-based automation has always been available (DEMO coming)

• V3: Kubernetes, again

Page 19: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Agenda• Context: microservices, OpenShift, and you• DEMO: basic microservice on OpenShift v2• Discussion: Microservices on OpenShift• DEMO: REST-based automation with OpenShift and

Jenkins• Discussion: Compare/contrast v2 and v3 for microservices• DEMO: Wired up microservices on v3 • Summary, Q+A

Page 20: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Demo: REST-based automation

• Show REST-based API to manage gears from a Jenkins job

• Code: https://github.com/mrice/openshift-microservices

Page 21: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Agenda• Context: microservices, OpenShift, and you• DEMO: basic microservice on OpenShift v2• Discussion: Microservices on OpenShift• DEMO: REST-based automation with OpenShift and Jenkins• Discussion: Compare/contrast v2 and v3 for

microservices• DEMO: Wired up microservices on v3 • Summary, Q+A

Page 22: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Where We Were: V2• One application per gear• Gears are comprised of cartridges• Good automation support• Polyglot from day one: lots of cartridges for

microservice development• Critics: PaaS gets abstraction wrong

Page 23: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Where We’re Going: V3

• Forget gears, Docker images (pods) are the new deployment unit

• Broker is dead: Kubernetes• However, developer experience doesn’t

have to change

Page 24: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Agenda• Context: microservices, OpenShift, and you• DEMO: basic microservice on OpenShift v2• Discussion: Microservices on OpenShift• DEMO: REST-based automation with OpenShift and Jenkins• Discussion: Compare/contrast v2 and v3 for microservices• DEMO: Wired up microservices on v3• Summary, Q+A

Page 25: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Demo: Wire Up Services on V3

• Build on our node.js demo with an additional python pizza service

• More interestingly, let’s wire the services up with Kubernetes

Page 26: Microservices on OpenShift: Where We’ve Been; · Microservices + OpenShift: Auto Scaling • Pattern: smart, natural scaling in the application at the service-level • Auto scaling

Thank You!

For recap and follow ups, check my blog: michaelrice.com