on kubernetes with pks: for publication run stateful …...#vmworld run stateful apps on kubernetes...

41
#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato, VMware, Inc. CNA2009BE #CNA2009BE VMworld 2018 Content: Not for publication or distribution

Upload: others

Post on 20-May-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

#vmworld

Run Stateful Appson Kubernetes with PKS:

Highlight WebLogic ServerRahul Srivastava, VMware, Inc.

Simone Morellato, VMware, Inc.

CNA2009BE

#CNA2009BE

VMworld 2018 Content: Not for publication or distribution

Page 2: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

Disclaimer

2©2018 VMware, Inc.

This presentation may contain product features orfunctionality that are currently under development.

This overview of new technology represents no commitment from VMware to deliver these features in any generally available product.

Features are subject to change, and must not be included in contracts, purchase orders, or sales agreements of any kind.

Technical feasibility and market demand will affect final delivery.

Pricing and packaging for any new features/functionality/technology discussed or presented, have not been determined.

VMworld 2018 Content: Not for publication or distribution

Page 3: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

3©2018 VMware, Inc.

Can I containerize and run Traditional StatefulApps on PKS?

YES

VMworld 2018 Content: Not for publication or distribution

Page 4: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

Agenda

4©2018 VMware, Inc.

PKS overview

Oracle WebLogic Server

Why and how to containerize

Why PKS and vSAN for Traditional Apps

Demo

VMworld 2018 Content: Not for publication or distribution

Page 5: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

5©2018 VMware, Inc.

Who Are We

Morellato Simone@morellatosimone

VMware

Rahul Srivastava@srivar07869

VMware

VMworld 2018 Content: Not for publication or distribution

Page 6: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

6©2018 VMware, Inc.

PKS Overview

VMworld 2018 Content: Not for publication or distribution

Page 7: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

7©2018 VMware, Inc.

What is Kubernetes?

OS

App 1

Bins/Libs

App 2

Bins/Libs

App 3

Bins/Libs

Container Engine

Docker Host

VMworld 2018 Content: Not for publication or distribution

Page 8: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

8©2018 VMware, Inc.

What is Kubernetes?

OS

App 1

Bins/Libs

App 2

Bins/Libs

App 3

Bins/Libs

Container Engine

Docker Host

Kubernetes Node

OS

App 1

Bins/Libs

App 2

Bins/Libs

App 3

Bins/Libs

Container Engine

Docker Host

Kubernetes Node

OS

App 1

Bins/Libs

App 2

Bins/Libs

App 3

Bins/Libs

Container Engine

Docker Host

Kubernetes Node

Kubernetes MasterVMworld 2018 Content: Not for publication or distribution

Page 9: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

9©2018 VMware, Inc.

What is PKS?

OS

App 1

Bins/Libs

App 2

Bins/Libs

App 3

Bins/Libs

Container Engine

VM

Docker Host

Kubernetes Node

OS

App 1

Bins/Libs

App 2

Bins/Libs

App 3

Bins/Libs

Container Engine

VM

Docker Host

Kubernetes Node

OS

App 1

Bins/Libs

App 2

Bins/Libs

App 3

Bins/Libs

Container Engine

VM

Docker Host

Kubernetes Node

Kubernetes MasterVMworld 2018 Content: Not for publication or distribution

Page 10: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

10©2018 VMware, Inc.

What is PKS?

Node

Node

Node

Kubernetes Master

Node

Node

Node

Kubernetes Master

Node

Node

Node

Kubernetes Master

VMworld 2018 Content: Not for publication or distribution

Page 11: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

11©2018 VMware, Inc.

What is PKS?

Node

Node

Node

Kubernetes Master

Node

Node

Node

Kubernetes Master

Node

Node

Node

Kubernetes Master

VMworld 2018 Content: Not for publication or distribution

Page 12: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

12©2018 VMware, Inc.

Desired state of Application

PKS and Kubernetes are complementary technologies

12

Containers scheduling, scale, resiliency, and Day 2

Desired state of Kubernetes

Kubernetes clusters scheduling, scale, resiliency, and Day 2

VMworld 2018 Content: Not for publication or distribution

Page 13: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

13©2018 VMware, Inc.

• Provides networkingwith NSX-T

• Provides container registry with Harbor

• Provides advance storage integration with vSAN

• Provides monitoring, logging and Day 2 operations with advanced integration with vRealize

PKS Does a Lot More when Running on VMware SDDC

VMworld 2018 Content: Not for publication or distribution

Page 14: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

14©2018 VMware, Inc.

Majority of Enterprise Java apps built since 1990s run on Oracle WebLogic (“WLS”) or IBM WebSphere (“WAS”)

Higher-level apps (Middleware, COTS, etc.) often run on top of WLS/WAS

Enterprises looking to containerize and “Lift & Shift” existing WLS/WAS-based apps

Risk/Resource factors prevent refactor to cloud native microservices

Why Oracle WebLogic as a test workload?Excellent example of a traditional application

VMworld 2018 Content: Not for publication or distribution

Page 15: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

15©2018 VMware, Inc.

Current State versus Desired StateContainerize WebLogic as-is and deploy atop Kubernetes

Physical OS or VM

VM

Customer Datacenter

DevOps

VMworld 2018 Content: Not for publication or distribution

Page 16: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

16©2018 VMware, Inc.

Why is Oracle WebLogic Hard to containerize?Complex requirements around state management

Each instance has unique and fixed identity that must persist across restarts• Instance Name: wls1• Instance URI: wls1.prod.appxzy.com

Each instance has configuration and runtime state on filesystem/database hardwired to its unique identity• Configuration XML• Transaction & JMS logs

VMworld 2018 Content: Not for publication or distribution

Page 17: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

17©2018 VMware, Inc.

Instance identity & state must be preserved across container restarts

wls1.prod.appxyz.com

transaction log 1 (owner = wls1)

transaction log 2 (owner = wls2)

wls2.prod.appxyz.com

Shared Filesystem

“WLS Cluster”WLS 1 WLS 2

VMworld 2018 Content: Not for publication or distribution

Page 18: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

18©2018 VMware, Inc.

Instance identity & state must be preserved across container restarts

wls1.prod.appxyz.com

transaction log 1 (owner = wls1)

transaction log 2 (owner = wls2)

wls2.prod.appxyz.com

Shared Filesystem

“WLS Cluster”WLS 1 WLS 2Failure!

VMworld 2018 Content: Not for publication or distribution

Page 19: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

19©2018 VMware, Inc.

Instance identity & state must be preserved across container restarts

wls1.prod.appxyz.com

transaction log 1 (owner = wls1)

transaction log 2 (owner = wls2)

Shared Filesystem

“WLS Cluster”WLS 1 WLS X

wlsX.prod.appxyz.com

VMworld 2018 Content: Not for publication or distribution

Page 20: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

20©2018 VMware, Inc.

Instance identity & state must be preserved across container restarts

wls1.prod.appxyz.com

transaction log 1 (owner = wls1)

transaction log 2 (owner = wls2)

Shared Filesystem

“WLS Cluster”WLS 1 WLS X

wlsX.prod.appxyz.com

VMworld 2018 Content: Not for publication or distribution

Page 21: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

21©2018 VMware, Inc.

Kubernetes StatefulSets to the RescueAddresses WebLogic needs around fixed identities and state

Source: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/VMworld 2018 Content: Not for publication or distribution

Page 22: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

22©2018 VMware, Inc.

Stable, Unique Network IdentifiersIdentity primitives in Kubernetes StatefulSets

VMworld 2018 Content: Not for publication or distribution

Page 23: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

23©2018 VMware, Inc.

Kubernetes StatefulSets to the rescue

wls1.prod.appxyz.com

transaction log 1 (owner = wls1)

transaction log 2 (owner = wls2)

wls2.prod.appxyz.com

Shared Filesystem

“WLS Cluster”WLS 1 WLS 2

VMworld 2018 Content: Not for publication or distribution

Page 24: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

24©2018 VMware, Inc.

Instance identity & state must be preserved across container restarts

wls1.prod.appxyz.com

transaction log 1 (owner = wls1)

transaction log 2 (owner = wls2)

wls2.prod.appxyz.com

Shared Filesystem

“WLS Cluster”WLS 1 WLS 2Failure!

VMworld 2018 Content: Not for publication or distribution

Page 25: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

25©2018 VMware, Inc.

Instance identity & state maintained across container restarts

wls1.prod.appxyz.com

transaction log 1 (owner = wls1)

transaction log 2 (owner = wls2)

Shared Filesystem

“WLS Cluster”WLS 1 WLS 2

wls2.prod.appxyz.com

VMworld 2018 Content: Not for publication or distribution

Page 26: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

26©2018 VMware, Inc.

DemoOracle WebLogic Server on PKS

VMworld 2018 Content: Not for publication or distribution

Page 27: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

27©2018 VMware, Inc.

WebLogic instances deployed as Kubernetes StatefulSets

wls1.prod.appxyz.comWLS1

wls2.prod.appxyz.comWLS2

StatefulSet “ms”

as.prod.appxyz.comWLS “Admin Server”

StatefulSet “as”

“WLS Admin Server” manages global

configuration & state

Java app deployed to ”Cluster” of ”WLS Managed Servers”

VMware SDDC

VMworld 2018 Content: Not for publication or distribution

Page 28: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

28©2018 VMware, Inc.

Stable, Persistent StoragePersistence primitives in Kubernetes StatefulSets

VMworld 2018 Content: Not for publication or distribution

Page 29: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

29©2018 VMware, Inc.

Storage classes and dynamic provisioning

Developer

Configures Classes

Claim for Classes

Claim request specifies a class

References claim in pod

Pod

GOLDJMS logs

SILVERXMLs

1

2

3

29

claim

10G 10GOperator

VMworld 2018 Content: Not for publication or distribution

Page 30: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

30©2018 VMware, Inc.

DemoOracle WebLogic Server on PKS

VMworld 2018 Content: Not for publication or distribution

Page 31: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

31©2018 VMware, Inc.

Kubernetes StatefulSets ensure persistent map to stable storage

wls-jms-0.prod.appxyz.comWLS Instance

StatefulSet “wls-jms”

WLS JMS log

VMDK

VMware SDDC

VMworld 2018 Content: Not for publication or distribution

Page 32: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

32©2018 VMware, Inc.

Operational Task Business As Usual WLS on PKS

Developer ProductivityProvisioning of net new WLS

environments

Multi-step human workflow across systems, networking, storage and

middleware teams

One K8s command (“kubectl apply -f <YML-file>”). K8s will automatically

provision desired stack and instances across (pre-allocated) resource pool

Application monitoring and remediation(is App running ok on every WLS

instance?)

WLS operations team monitoring individual server and app instance health

K8s automaticallytracks/(re)starts/stops desired # replicas

Application elasticity (spin up additional WLS cluster members on demand)

Multi-step human workflow across systems, networking, storage and

middleware teams

One K8s command to increase # Replicas. K8s Headless Service

automatically manages DNS mapping

Multi Cloud IaaS support Homegrown (Chef/Puppet/Ansible/..) scripts customized for various clouds

Out-of-the-box support for vSphere,GCP, AWS.

Patch / UpgradesMulti-step human workflow across systems, networking, storage and

middleware teams

Out-of-the-box automation with Concourse, PKS(BOSH) and K8s

Why is running WebLogic (WLS) on PKS better than BAU?”

VMworld 2018 Content: Not for publication or distribution

Page 33: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

33©2018 VMware, Inc.

Why vSAN for Kubernetes Persistent StoragePersistence primitives in Kubernetes

VMworld 2018 Content: Not for publication or distribution

Page 34: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

34©2018 VMware, Inc.

1. Entire HCL of storage products under vSphere supported with Kubernetes

2. Operational consistency - Existing storage operations, tooling, and SPBM

3. Self service storage provisioning through storage class mapping to SPBM policies

4. PKS delivers the consistent, repeatable configuration & maintenance of Hatchway

Why vSphere for Kubernetes persistent storage

Kubernetes Consumption• Storage Class = Regular• Storage Class = Fast• Storage Class = Encrypted• Storage Class = Dedup• Storage Class = …

K8s APISPBM• Thin• SSD• Encrypted• Dedup• …

vSphere

Any Supported Storage on HCL

vSAN|VMFS|NAS

Datastore

ProjectHatchway https://github.com/vmware/hatchwayVMworld 2018 Content: Not for publication or distribution

Page 35: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

35©2018 VMware, Inc.

Bringing policy based provisioning to Kubernetes

Storage Policy Based Management

vSAN

Performance SSD Datastore

(Tier 1)

Performance DataStore(Tier 2)

Capacity Datastore(Tier 3)VMworld 2018 Content: Not for publication or distribution

Page 36: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

36©2018 VMware, Inc.

Why vSAN for Kubernetes persistent storage

• Provides much greater flexibility & control in supporting diverse mix of traditional & cloud native apps deployed atop PKS

• diskFormat, datastore, storagePolicyName, cacheReservation, diskStripes, forceProvisioning, hostFailuresToTolerate, iopsLimit, objectSpaceReservation

• Supports the full capabilities of SPBM• Other storage backends only support the tag-based

placement capability of SPBM

• Single HCI platform, same operational model• Provides unified volume monitoring & reporting

console within PKS

VMworld 2018 Content: Not for publication or distribution

Page 37: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

37©2018 VMware, Inc.

Yes! I can containerize and run Traditional Stateful Apps on PKS• Example: Oracle WebLogic Server

PKS equally capable of hosting both Traditional and Cloud Native Apps

vSAN provide persistence capabilities to enable both types of apps atop PKS

To Summarize…VMware value prop for application modernization

VMworld 2018 Content: Not for publication or distribution

Page 38: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

38©2018 VMware, Inc.

See PKS product page on VMware.comhttps://cloud.vmware.com/pivotal-container-service

Read posts and tutorials about PKS on Cloud-Native Apps Bloghttps://blogs.vmware.com/cloudnative/

Try it outHOL-1930-02-CNA – Pivotal Container Serivice– Getting Started

Follow us on Twitterhttps://twitter.com/cloudnativeapps

Resources

VMworld 2018 Content: Not for publication or distribution

Page 39: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

39©2018 VMware, Inc.

VMworld 2018 Content: Not for publication or distribution

Page 40: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

DON’T FORGET TO FILL OUT YOUR SURVEY.

#vmworld #CNA2009BE

VMworld 2018 Content: Not for publication or distribution

Page 41: on Kubernetes with PKS: for publication Run Stateful …...#vmworld Run Stateful Apps on Kubernetes with PKS: Highlight WebLogic Server Rahul Srivastava, VMware, Inc. Simone Morellato,

THANK YOU!

#vmworld #CNA2009BE

VMworld 2018 Content: Not for publication or distribution