High density deployments using Weblogic Multitenancy · – a2c-export will generate a warning if...
Transcript of High density deployments using Weblogic Multitenancy · – a2c-export will generate a warning if...
DOAG 2016
Jaap Poot, 16 nov 2016
High density deployments using Weblogic Multitenancy
2
Mission
We help our customers get the most out of the their Oracle investments
• 1 ACE Director, 2 ACEs and 1 ACE associate
• 2 Agile Masters
• Oracle Platinum partner
• (EMEA) Middleware Partner of the Year 2015, 2014, 2013 & 2011
• ADF Performance monitor
• House of Knowledge: masterclasses & AMIS community events
• AMIS Technology blog
• Yearly speakers at Oracle OpenWorld
• Technological expertise
Jaap Poot
Principal Oracle Consultant
Since feb 2013 @
Fusion Middleware
Exalogic
ODA
OVM
Linux
DBA
3
Introduction
https://nl.linkedin.com/in/jpoot
https://technology.amis.nl/
http://www.fmwadmin.com/
4
Weblogic Multitenancy
5
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
Virtual
Target 1
Resource Group
App
App
JMS
Data
Source
JNDI
Partition 2
Virtual
Target 2
Resource Group
App
App
JMS
Data
Source
JNDI
Container Database
PDB 1 PDB 2
Virtual Server 2
6
Weblogic MultitenancyComponents
Oracle Weblogic ServerOracle
Traffic Director
Oracle
Coherence
Oracle
Database
Partition 1
Virtual
Target 1App App JMS
Data
Source
Partition 1 Pluggable
database 1Resource Group JNDI
Partition 2
Virtual
Target 2App App JMS
Data
Source
Partition 2 Pluggable
database 2Resource Group JNDI
7
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
8
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
9
Weblogic Multitenancy
10
Weblogic Multitenancy
Consolidation
11
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)
Domain
Admin
Server
MS1
MS2
MSxx
App
Domain
Admin
Server
MS1
MS2
MSxx
App
Domain
Admin
Server
MS1
MS2
MSxx
App
DomainAdmin
Server
MS1
MS2
MSxx
Partition
App
Partition
App
Partition
App
Domain
Admin
Server
MS1
MS2
MSxx
App
Domain
Admin
Server
MS1
MS2
MSxx
App
Domain
Admin
Server
MS1
MS2
MSxx
App
12
Weblogic MultitenancyConsolidation
Domain
Admin
Server
MS1
MS2
MSxx
App
Domain
Admin
Server
MS1
MS2
MSxx
App
Domain
Admin
Server
MS1
MS2
MSxx
App
Domain
Admin
Server
MS1
MS2
MSxx
App
Domain
Admin
Server
MS1
MS2
MSxx
App
Domain
Admin
Server
MS1
MS2
MSxx
App
Domain
Admin
Server
MS1
MS2
MSxx
App
Domain
Admin
Server
MS1
MS2
MSxx
App
Domain
Admin
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
13
Weblogic Multitenancy
Isolation
14
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
Virtual
Target 1
Resource Group
App
App
JMS
Data
Source
JNDI
Partition 2
Virtual
Target 2
Resource Group
App
App
JMS
Data
Source
JNDI
Container Database
PDB 1 PDB 2
Virtual Server 2
15
Weblogic MultitenancyIsolation
JVM (JDK 8u40+)
Partition 1
App App JMSData
Source
Resource Group JNDI
Partition 2
App App JMSData
Source
Resource Group JNDI
Partition 3
App App JMSData
Source
Resource Group JNDI
Partition 4
App App JMSData
Source
Resource Group JNDI
16
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}"
– Or put this line in setUserOverrides.sh in $DOMAIN_HOME/bin/
• 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
17
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
– Restart (Since WLS12.2.1.1)
• Restart a partition
• Fair Share
– Allocate a percentage of the available resource for the partition
– All resources available when there is no contention
18
Resource Consumption Management -example
19
Weblogic Multitenancy
Portability for DevOps
20
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
21
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])
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
22
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
23
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
24
WebLogic Server 12.2.1Patch Set Releases
• New releases of FMW
– 12.2.1.1 – June 2016
– 12.2.1.2 – CY2016
– 12.2.1.3 – CY2017
– 12.2.1.4 ….
• Continuous improvement
– PS1 includes feature completion
– PS2 – bug fixes
• WLS feature completion in 12.2.1.1
– Domain to Partition Conversion Tool Updates
– Partition Admin Roles in FMW Control
– Resource Consuption Manager Auto-Restart
– Configuration Template MT Support
– Partition Admin Security Management (restricted)
– JMS SAF Partition support
– ZDT Application Rollout for Partitions
– Document multi-site best practices
25
WLS 12.2.1.1 – config.sh
26
WLS 12.2.1.1 – config.sh
27
WLS 12.2.1.1 – config.sh
28
WLS 12.2.1.1 – config.sh
29
Weblogic Multitenancy
Java Cloud Service
30
Java Cloud ServiceWeblogic Multitenancy
• Weblogic 12.2.1.0.0 available in the Java Cloud Service
31
Java Cloud ServiceWeblogic Multitenancy
• Weblogic Multitenancy needs minimal Enterprise Edition
32
Java Cloud ServiceWeblogic Multitenancy
• Select 0 or 1 partitions
• One partition
– included in WebLogic License
– No Multitenancy license in the OPC
33
Java Cloud ServiceWeblogic Multitenancy
34
Java Cloud ServiceWeblogic Multitenancy
35
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
• Video demonstration by Steve Button
– https://youtu.be/D1vQJrFfz9Q
36
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
38
Java Cloud ServiceAppToCloud
AppDev Cloud
AppToCloud
39
Java Cloud ServiceAppToCloud
• Migrate your on-premise WebLogic Server Domain to Java
• Supports version 10.3.6, 12.1.2, 12.1.3 or 12.2.1 -> JCS 12.x
• Move archive file directly to the Storage Cloud available for JCS
• Create your own overrides file to adjust attributes
• Available on OTN
40
Java Cloud ServiceAppToCloud - How does it work?
• Set JAVA_HOME – Java version >= 7
• Perform Healthcheck
– ./a2c-healthcheck.sh -oh /u01/app/oracle/product/wls1036 -adminUrl t3://wls11.domain.local:7001 -outputDir
/tmp/oracle_jcs_app2cloud/output -adminUser weblogic
41
Java Cloud ServiceAppToCloud - How does it work?
• Export domain to archive file
– Shutdown domain (recommended)
• local filesystem -> upload to Storage Cloud manually
– ./a2c-export.sh -oh /u01/app/oracle/product/wls1036 -domainDir
/u01/app/oracle/config/domains/wls_domain_tst10 -archiveFile
/tmp/oracle_jcs_app2cloud/output/wls_domain_tst10.zip -clusterToExport Cluster_1
• Directly to the Storage Cloud
– Add parameters
-cloudStorageUser [email protected] -cloudStorageContainer Storage-amis/JCSContainer
42
Java Cloud ServiceAppToCloud - How does it work?
43
Java Cloud ServiceAppToCloud
44
Java Cloud ServiceAppToCloud
45
Java Cloud ServiceAppToCloud
46
Java Cloud ServiceAppToCloud
• Where is my domain/application?
– It’s not yet in the JCS
• Wait!!!
• Have to perform AppToCloud
Import after JCS Creation
• https://141.144.33.210/whichServer/whichServer.jsp
– Just a simple jsp that shows you what managed server you landed on.
47
Java Cloud ServiceAppToCloud
• One Click Migration??
• Limitations
– Exporting JRF domains is not currently supported.
– Domain Partitions not yet supported
– Unsupported features will not be exported
– a2c-export will generate a warning if it detects JMS,WLDF,Coherence,Security
• However, AppTo(SOA/PS)Cloud is coming soon!
– So many features will be supported pretty soon.
49
Questions
?
50