weblogic jmx for devops
DESCRIPTION
TRANSCRIPT
Oracle WebLogic Devcast Series: JMX for DevOps
ORACLE
PRODUCT
LOGO
Dr. Frank Munz Oracle Technologist of the Year, Cloud
The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
Who is this guy?
• Frank Munz • Founded munz & more in 2007 • 12+ years WebLogic Server and
Oracle Fusion Middleware • Consulting and High-End Training • NEW book:
“WebLogic 12c: Advanced Recipes”
WebLogic 12c: JMX For DevOps
• Download NetBeans projects and additional links at the end
• “JMX for DevOps” ?
Frank Munz / www.munzandmore.com / Oracle DevCast Slide #5
Agenda
1. Basics 2. Tools / Clients 3. Programming 4. Wrap-up
Frank Munz / www.munzandmore.com / Oracle DevCast Slide #6
JMX BASICS
JMX
• Java Management Extensions (JSR-003)
+ JMX Remote API (JSR-160)
• Supported from Java 5 • JMX 1.2 supported since WLS 9.x • WebLogic 12c: RESTful access
Frank Munz / www.munzandmore.com / Oracle DevCast Slide #8
MBeans
MBeans have attributes, operations, use notifications WebLogic MBeans encapsulate
– Configuration Data – Runtime Values
Frank Munz / www.munzandmore.com / Oracle DevCast Slide #9
MBean Servers Oracle WebLogic JVM JMX
Frank Munz / www.munzandmore.com / Oracle DevCast
JSR 160 RMI Connector
JVM Pla<orm MBean Server
Edit MBean Server
RunCme MBean Server
DomainRunCme MBean Server
RESTful Connector
MBean
MBean
MBean
Admin
Admin
RMI Client JVM
hIp
MBean Object Name
domainPart:listOfProperties
com.bea used for Name=…,Type=… WebLogic MBeans [,ParentType1=Parent1Name]
[,ParentType2=Parent2Name] [,…]
[,Location=serverName] Example: com.bea:Name=AdminServer,Type=Server
Frank Munz / www.munzandmore.com / Oracle DevCast
JMX TOOLS / CLIENTS Admin console, JConsole, WLST, RESTful Management Services, Jolokia.
WebLogic Admin Console
WebLogic Scripting Tool
WebLogic 12c RESTful Management Services
JConsole
Open Source JMX Shell, RESTful API, Monitoring Plugins
WebLogic 12c Admin Console
• Comfortable and feature-rich graphical JMX client • All changes from console are done via JMX • Sometimes scripting is preferred -> WLST scripts can be recorded
Frank Munz / www.munzandmore.com / Oracle DevCast Slide #18
DEMO Admin Console
WebLogic Scripting Tool (WLST)
• Efficient and versatile. It can replace: - Configuration wizard - Template builder - Command line deployment:
weblogic.Deployer - Admin console
• Online / offline mode Frank Munz / www.munzandmore.com / Oracle DevCast Slide #20
WLST
MW_HOME/wlserver_12.1/common/bin contains start script for WLST: wlst.sh Or run command-line with WL_HOME set and weblogic.jar in classpath: java weblogic.WLST [Script.py]
Frank Munz / www.munzandmore.com / Oracle DevCast Slide #21
DEMO WLST
WLST Quick Reference ls() ls('a') shows aIributes , 'c' child MBeans, 'o' operaCons cd() navigaCon domainConfig() change to domain configuraCon tree serverConfig() change to server config MBeans domainRuntime() change to domain runCme tree serverRuntime() change to server runCme MBeans custom() change to custom tree jndi() change to JNDI tree edit() change to writable edit tree startEdit() start an edit session, then use set('aIribute','value') save() persist changes activate() / undo() acCvate / undo changes configToScript() export domain configuraCon to WLST script find() find aIributes easeSyntax() switch off python syntax (do not use for scripCng!)
WebLogic 12c RESTful Management Service • Enable from admin console • Retrieves cluster, server, deployment and JDBC http://host:port/management/tenant-monitoring/servers?format=full
• Built-in AJAX client for testing: http://host:port/management/ajaxtest.html
Frank Munz / www.munzandmore.com / Oracle DevCast Slide #24
DEMO RESTful
Management Service
Jolokia
• HTTP/JSON bridge for remote JMX access • -> Avoids JVM overhead on client side • Uses j4p.war or JVM agent on WebLogic • Supports many JEE servers • j4psh JMX shell with tab-completion and
syntax highlighting • Understanding of MBean names required
Frank Munz / www.munzandmore.com / Oracle DevCast
DEMO Jolokia
JMX PROGRAMMING Spring / Standard Java EE JMX Development
DEMO Spring
DEMO JConsole
DEMO JMX + Java EE
WRAP-UP Conclusion and Links
WebLogic 12c Advanced Recipes
http://www.amazon.com/dp/0980798019/
Available NOW
Frank Munz / www.munzandmore.com / Oracle DevCast Slide #33
Links
DevOps http://radar.oreilly.com/2012/06/what-is-devops.html
Oracle WebLogic 12c JMX Documentation http://docs.oracle.com/cd/E24329_01/web.1211/e24416/toc.htm
RESTful Management Services http://www.oracle.com/technetwork/articles/soa/oliveira-wls-rest-javafx-1723982.html
Frank Munz / www.munzandmore.com / Oracle DevCast Slide #34
Links
Spring Reference, Chapter 22, JMX http://static.springsource.org/spring/docs/3.0.0.RELEASE/reference/html/jmx.html#jmx-exporting Oracle JMX Tutorial http://docs.oracle.com/javase/tutorial/jmx/mbeans/standard.html Oracle MXBeans explained: http://docs.oracle.com/javase/6/docs/api/javax/management/MXBean.html
Frank Munz / www.munzandmore.com / Oracle DevCast Slide #35
Links
Jolokia Web Site: http://jolokia.org
munz & more
http://www.munzandmore.com/blog
http://www.munzandmore.com/newsletter
Frank Munz / www.munzandmore.com / Oracle DevCast Slide #36
Let’s connect
Frank Munz / www.munzandmore.com / Oracle DevCast
Join the WebLogic Community
Twitter twitter.com/oracleweblogic
Facebook facebook.com/oracleweblogic
Oracle’s WebLogic blog blogs.oracle.com/weblogicserver
Youtube
Youtube.com/oracleweblogic
Oracle.com/technetwork/weblogic