AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

39
AMIS 25 - Beyond the Horizon Jaap Poot, juni 3rd 2016 High density deployments using Weblogic Multitenancy

Transcript of AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

Page 1: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

AMIS 25 - Beyond the Horizon

Jaap Poot, juni 3rd 2016

High density deployments using Weblogic Multitenancy

Page 2: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

2

Jaap PootPrincipal Oracle ConsultantSince feb 2013 @

Fusion MiddlewareExalogicODAOVMLinuxDBA

Introduction

[email protected]

https://nl.linkedin.com/in/jpoot

https://technology.amis.nl/http://www.fmwadmin.com/

Page 3: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

3

Weblogic Multitenancy

Page 4: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

4

Weblogic MultitenancyKey concepts

• Tenants

• Domain partition

• Resource Groups

• Resource Group Template

• Virtual Targets

• Deployment Scope

Oracle Traffic Director

Virtual Server 1

Managed Server/Cluster

Partition 1

VirtualTarget 1

Resource Group

App

App

JMS

DataSource

JNDI

Partition 2

VirtualTarget 2

Resource Group

App

App

JMS

DataSource

JNDI

Container Database

PDB 1 PDB 2

Virtual Server 2

Page 5: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

5

Weblogic MultitenancyComponents

Oracle Weblogic ServerOracleTraffic Director

OracleCoherence

OracleDatabase

Partition 1

VirtualTarget 1

App App JMS Data Source

Partition 1 Pluggable database 1Resource Group JNDI

Partition 2

VirtualTarget 2

App App JMS Data Source

Partition 2 Pluggable database 2

Resource Group JNDI

Page 6: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

6

Weblogic MultitenancyComponents Specified

• Oracle Traffic Director– Optional– Provides Load balancing– Installed in separate or with WebLogic in single domain– Creating a WebLogic MT Partition automatically creates a OTD Partition

• Virtual Target– A virtual target can be used by only one partition or domain– One or more virtual targets per resource group– A virtual target can be used by many resource groups within a partition– Route by host name and/or URI prefix and/or port number

• Domain Partition– Portion of a WebLogic domain– Dedicated to running application instances and resources– Can be separately managed

Page 7: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

7

Weblogic MultitenancyComponents Specified

• Resource Groups– Separate group of deployable applications, libraries, jms servers and queues, data sources– Can be derived from a Resource Group Template (See below)– Override resource settings as needed when derived– Create at Domain or Partition level

• Resource Group Templates– Provides a collection of deployable resources– Don’t have targets– Can be referenced by multiple Resource Groups

Page 8: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

8

Weblogic Multitenancy

Page 9: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

9

Weblogic MultitenancyConsolidation

Page 10: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

10

Weblogic MultitenancyConsolidation

• Move from dedicated domains to Multitenant domains

• Less management of– Hardware/VM’s– OS– JVM– Domains

• Optimal use of resources

• No increase in response times (According to Oracle)

DomainAdmin Server

MS1

MS2

MSxx

App

DomainAdmin Server

MS1

MS2

MSxx

App

DomainAdmin Server

MS1

MS2

MSxx

App

DomainAdmin Server

MS1

MS2

MSxx

Partition

App

Partition

App

Partition

App

Page 11: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

11

DomainAdmin Server

MS1

MS2

MSxx

App

DomainAdmin Server

MS1

MS2

MSxx

App

DomainAdmin Server

MS1

MS2

MSxx

App

Weblogic MultitenancyConsolidation

DomainAdmin Server

MS1

MS2

MSxx

App

DomainAdmin Server

MS1

MS2

MSxx

App

DomainAdmin Server

MS1

MS2

MSxx

App

DomainAdmin Server

MS1

MS2

MSxx

App

DomainAdmin Server

MS1

MS2

MSxx

App

DomainAdmin Server

MS1

MS2

MSxx

App

DomainAdmin Server

MS1

MS2

MSxx

App

DomainAdmin Server

MS1

MS2

MSxx

App

DomainAdmin Server

MS1

MS2

MSxx

App

DomainAdmin Server

MS1

MS2

MSxx

Partition

App

Partition

App

Partition

App

DomainAdmin Server

MS1

MS2

MSxx

Partition

App

Partition

App

Partition

App

DomainAdmin Server

MS1

MS2

MSxx

Partition

App

Partition

App

Partition

App

DomainAdmin Server

MS1

MS2

MSxx

Partition

App

Partition

App

Partition

App

Page 12: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

12

Weblogic MultitenancyIsolation

Page 13: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

13

Weblogic MultitenancyIsolation

• Memory and CPU isolation at the JVM level

– Resource Consumption Management (RCM)

– Oracle JDK 8u40

• Virtual Target per partition for application access

• Dedicated JNDI tree for resource isolation

• Workmanager per partition for thread management

• Security realm per partition possible

• Data can be segregated with PDB’s

– PDB’s are not required!

• Per-partition management

Oracle Traffic Director

Virtual Server 1

Managed Server/Cluster

Partition 1

VirtualTarget 1

Resource Group

App

App

JMS

DataSource

JNDI

Partition 2

VirtualTarget 2

Resource Group

App

App

JMS

DataSource

JNDI

Container Database

PDB 1 PDB 2

Virtual Server 2

Page 14: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

14

Weblogic MultitenancyIsolation

JVM (JDK 8u40+)

Partition 1

App App JMS Data Source

Resource Group JNDI

Partition 2

App App JMS Data Source

Resource Group JNDI

Partition 3

App App JMS Data Source

Resource Group JNDI

Partition 4

App App JMS Data Source

Resource Group JNDI

Page 15: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

15

Resource Consumption Management

• Resource Consumption Management is introduced in JDK 8u40– Only with G1 Garbage collector

• Enable Resource Consumption Management– $DOMAIN_HOME/bin/startWeblogic.sh– #JAVA_OPTIONS="-XX:+UnlockCommercialFeatures -XX:+ResourceManagement -XX:+UseG1GC $

{SAVE_JAVA_OPTIONS}"

• Supported resources– FileOpen: The number of open file descriptors in use by a partition– HeapRetained: The amount of heap (in MB) retained/in use by a partition– CpuUtilization: The percentage of CPU time utilized by a partition with respect to the available CPU time of the

WebLogic process

Page 16: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

16

Resource Consumption Management – Policy Types

• Triggers– Notify

• Notify system administrator that a threshold has been reached

– Slow• Reducing the thread-usage time for the partition

– Fail• Fails resource consumption requests – Only applicable for Open Files

– Shutdown• Inititate shutdown of a partition

• Fair Share– Allocate a percentage of the available resource for the partition– All resources available when there is no contention

Page 17: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

17

Resource Consumption Management - example

Page 18: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

18

Weblogic MultitenancyPortability for DevOps

Page 19: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

19

Weblogic MultitenancyPortability for DevOps

• Transition apps from Dev to Production environments

• No application changes needed

• Fast startup/shutdown

• Container like packaging

• Load balancer integration

DomainAdmin Server

MS1

MS2

MSxx

Partition

App

Partition

App

Partition

App

Production

DomainAdmin Server

MS1

MS2

MSxx

Partition

App

Partition

App

Partition

App

Dev

Page 20: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

20

Weblogic MultitenancyPortability for DevOps

• Export and Import Partitions

• Via FMW Control, Console, WLST or REST

• Sample WLST command

– exportPartition(partitionName, expArchPath, [includeAppsNLibs], [keyFile])

– Provide replacement attributes• <partitionName>-attributes.json in the same directory as Partition Archive file• Replace partition properties, JDBC, JMS, and other resources in resource groups

– importPartition(archiveFileName, [partitionName], [createNew], [keyFile])

Page 21: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

21

DomainAdmin Server

MS1

MS2

MSxx

Partition

App

Partition

App

Partition

App

Dev

• Transition apps from Dev to Production environments

• Without any application change or redeployment

Weblogic MultitenancyPortability for DevOps

DomainAdmin Server

MS1

MS2

MSxx

Partition

App

Partition

App

Partition

App

DomainAdmin Server

MS1

MS2

MSxx

Partition

App

Partition

App

Partition

App

DomainAdmin Server

MS1

MS2

MSxx

Partition

App

Partition

App

Partition

App

Export Import

Export Import

Export Import

Test

Acceptance

Production

Change attributes as needed

Page 22: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

22

Weblogic MultitenancyPortability for DevOps

DomainAdmin Server

MS1

MS2

MSxx

Partition

App

Partition

App

Partition

App

On premise

DomainAdmin Server

MS1

MS2

MSxx

Partition

App

Partition

App

Partition

App

Cloud

Export -> Import to the Cloud

Page 23: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

23

Weblogic MultitenancyJava Cloud Service

Page 24: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

24

Java Cloud ServiceWeblogic Multitenancy

• Weblogic 12.2.1 now available in the Java Cloud Service

Page 25: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

25

Java Cloud ServiceWeblogic Multitenancy

• Weblogic Multitenancy needs minimal Enterprise Edition

Page 26: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

26

Java Cloud ServiceWeblogic Multitenancy

Page 27: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

27

Java Cloud ServiceWeblogic Multitenancy

Page 28: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

28

Java Cloud ServiceWeblogic Multitenancy

Page 29: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

29

Weblogic MultitenancyJava Cloud Service

• Single node cluster

• OTD is not available for 12.2.1

• Lifecycle manager not enabled by default

• Create and delete Domain Partition via Weblogic console – NOT em

• Migrate On-premise -> Cloud

• Advanced migration possibilities using on-premises OTD or own loadbalancer

• VPN possible to JCS through GRE tunnel

Page 30: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

30

Domain to Partition Conversion Tool – DPCT

• Migrates a WebLogic Server Domain to a Domain Partition

• Supports version 10.3.6, 12.1.2, 12.1.3 or 12.2.1

• Archive containing the resources can be used as input for importPartition

• Create your own overrides file to adjust attributes

• DPCT is available for download from OTN

• Video demonstration by Steve Button– https://youtu.be/D1vQJrFfz9Q

Page 31: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

31

Weblogic MultitenancyLive Migration

• Part of Continuous availability (separate license required)

• Move running partition Resource Groups

• Eliminates application downtime for planned events

• Targets are automatically transferred by OTD

Page 32: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

32

Weblogic MultitenancyLive Migration

OracleTraffic Director

Partition 1

Cluster 1

Partition 1

App App JMS Data Source

Resource Group JNDI

Cluster 2

Partition 1

App App JMS Data Source

Resource Group JNDI

1. Migrate API is called

2. Partition/Resource Group starts on new hosts

3. Sessions are replicated to new hosts

4. New origin server pool added to OTD configuration

– Old pool used for sticky requests to old pool only– New pool used for all new requests

5. Graceful shutdown called on partition/resource group on original hosts

6. Virtual Target configuration updated with new cluster only

Page 33: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

33

Weblogic MultitenancyLicense information

• Oracle WebLogic Server Enterprise Edition and WebLogic Suite Options

– Oracle WebLogic Server Multitenant includes the following components:• Oracle Traffic Director• Oracle WebLogic Server Multitenant Domain Partitions and integrated constructs including Virtual Targets, Resource Groups, Resource Consumption

Managers• Oracle WebLogic Coherence Grid Edition Option

– Oracle WebLogic Server Continuous Availability includes the following components:• Oracle Traffic Director• Oracle WebLogic Server Zero Downtime Patching• Oracle WebLogic Server Cross Domain XA Transaction Recovery• Oracle WebLogic Server Domain Partition Live Migration• Oracle WebLogic Coherence Grid Edition Option• Oracle Enterprise Manager Site Guard

• Oracle Traffic Director is NOT a separate licensed product!

http://docs.oracle.com/cd/E55108_01/doc.1213/e56762/wlsuite_options.htm#CJAIADEI

Page 34: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

34

WebLogic MultitenancyLimitations

• WebLogic Multitenancy does not support

– Oracle Web Service Manager

– SOA Suite

– Application Development Framework (ADF)

– WebCenter

– Oracle Service Bus

– Oracle Enterprise Scheduler

– WebLogic SCA

Page 35: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

35

Roadmap

Page 36: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

36

Weblogic MultitenancyDemo

(If time permits)

Page 37: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

37

Questions

?

Page 38: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

38

Thank you for being here

Page 39: AMIS Beyond the Horizon - High density deployments using weblogic multitenancy

39