#vmworld
Run Stateful Appson Kubernetes with PKS:
Highlight WebLogic ServerRahul Srivastava, VMware, Inc.
Simone Morellato, VMware, Inc.
CNA2009BU
#CNA2009BUVMworld 2018 Content: Not for publication or distribution
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
3©2018 VMware, Inc.
Can I containerize and run Traditional StatefulApps on PKS?
YES
VMworld 2018 Content: Not for publication or distribution
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
5©2018 VMware, Inc.
Who Are We
Morellato Simone@morellatosimone
VMware
Rahul Srivastava@srivar07869
VMwareVMworld 2018 Content: Not for publication or distribution
6©2018 VMware, Inc.
PKS Overview
VMworld 2018 Content: Not for publication or distribution
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
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 Master
VMworld 2018 Content: Not for publication or distribution
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 Master
VMworld 2018 Content: Not for publication or distribution
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
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
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
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
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
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
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
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
18©2018 VMware, Inc.
Instance identity & state must be preservedacross 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
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
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
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
22©2018 VMware, Inc.
Stable, Unique Network IdentifiersIdentity primitives in Kubernetes StatefulSets
VMworld 2018 Content: Not for publication or distribution
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
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
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
26©2018 VMware, Inc.
DemoOracle WebLogic Server on PKS
VMworld 2018 Content: Not for publication or distribution
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 SDDCVMworld 2018 Content: Not for publication or distribution
28©2018 VMware, Inc.
Stable, Persistent StoragePersistence primitives in Kubernetes StatefulSets
VMworld 2018 Content: Not for publication or distribution
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
30©2018 VMware, Inc.
DemoOracle WebLogic Server on PKS
VMworld 2018 Content: Not for publication or distribution
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 SDDCVMworld 2018 Content: Not for publication or distribution
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
33©2018 VMware, Inc.
Why vSAN for Kubernetes Persistent StoragePersistence primitives in Kubernetes
VMworld 2018 Content: Not for publication or distribution
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/hatchway
VMworld 2018 Content: Not for publication or distribution
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
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 PKSVMworld 2018 Content: Not for publication or distribution
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
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
39©2018 VMware, Inc.
VMworld 2018 Content: Not for publication or distribution
PLEASE FILL OUTYOUR SURVEY.Take a survey and enter a drawingfor a VMware company store gift card.
#vmworld #CNA2009BUVMworld 2018 Content: Not for publication or distribution
THANK YOU!
#vmworld #CNA2009BUVMworld 2018 Content: Not for publication or distribution