SlideShare una empresa de Scribd logo
1 de 19
Descargar para leer sin conexión
DBA darbu organizēšana
WebLogic Scripting
basics
Andrey Chervonets (Андрей Червонец)
● working with Oracle products since 2001
● Senior technical expert, DBA (Oracle, DB2, MySQL, ...)
● Certified on:
● Oracle Database Administrator (8i-11g)
● Oracle Application Server Administrator (9i/10g)
● Oracle WebLogic Administrator
● IBM DB2 Database Administrator
LinkedIn: http://www.linkedin.com/in/andreychervonets
MeetUp #11
24 of July 2014
Riga, Latvia
Copyright © 2014, SIA CoMinder, http://www.cominder.eu
Agenda
• WebLogic administration tools - overview
• What is WLST ?!
• What can I do with WLST ?!
• WLST scripting step by step.
• Q + A
Copyright © 2014, SIA CoMinder, http://www.cominder.eu
DBA darbu organizēšanaWebLogic administrator tools
overview
Copyright © 2014, SIA CoMinder, http://www.cominder.eu
WL admin. tools
• WL Console
• http://wlhost:7001/console/
• WL EM portal
• http://wlhost:7001/em/
• WL autodeployment (in non-PROD mode)
• WL admin java packages
– java weblogic.Admin HELP
– java weblogic.Admin help ALL
• WLST
– java weblogic.WLST
• console application
• scripts processing
Copyright © 2013 CoMinder Ltd., http://www.cominder.euCopyright © 2014, SIA CoMinder, http://www.cominder.eu
What is WLST?!
• WL MBeans Tree browsing and manipulating tool
• http://gerardnico.com/wiki/wlst/navigation
•
Copyright © 2013 CoMinder Ltd., http://www.cominder.euCopyright © 2014, SIA CoMinder, http://www.cominder.eu
WLST – What can I do?!
• Browse and discover:
• WL and Domain objects tree
• WL objects properties
• Start/Stop
• Backup, clone, configuration (domain templates, etc.)
• Depoly/Undeploy/other actions with VM and applications
• Monitoring
• VM (health) status
• Applications (health) status
• Statistic
• Anything else
Copyright © 2013 CoMinder Ltd., http://www.cominder.euCopyright © 2014, SIA CoMinder, http://www.cominder.eu
DBA darbu organizēšanaLinks and Notes
Copyright © 2014, SIA CoMinder, http://www.cominder.eu
Links: learn more about WLST
• Oracle documentation:
http://docs.oracle.com/cd/E17904_01/web.1111/e13728/understandwls.htm
http://docs.oracle.com/cd/E28280_01/web.1111/e13715/monitoring.htm
• WLST - Mbean Tree Navigation: http://gerardnico.com/wiki/wlst/navigation
• http://wlstbyexamples.blogspot.com/
• http://weblogic-wonders.com/weblogic/
• http://weblogiccommunity.com/
• https://pineapple.java.net/index.html
Copyright © 2014, SIA CoMinder, http://www.cominder.eu
DBA darbu organizēšanaWL Scripting
step by step examples
Copyright © 2014, SIA CoMinder, http://www.cominder.eu
Start WLST
• Setup environment first:
. /u01/Middleware/wlserver_10.3/server/bin/setWLSEnv.sh
! make sure to load variables into current shell session!
• Start WLST in required mode:
a) Console mode:
java weblogic.WLST
b) Script mode:
java weblogic.WLST my_wlst_script.py 1>/tmp/wlst_script.out 2>&1
c) Importing WLST as a Jython Module:
http://docs.oracle.com/cd/E13222_01/wls/docs90/config_scripting/using_WLST.html#1081491
Copyright © 2014, SIA CoMinder, http://www.cominder.eu
First steps
• Connect to server (2 options to specify user/pwd + 1 – WLST will ask):
connect([username, password],[url],[adminServerName], [timeout])
connect([userConfigFile,userKeyFile],[adminServerName], [timeout])
connect(url='t3://localhost:7001')
• Usefull command after connected / before exit:
startRecording(recordFilePath,[recordAll])
stopRecording()
redirect('my_wlst_protocol.log', 'false')
stopRedirect()
exit()
Copyright © 2014, SIA CoMinder, http://www.cominder.eu
Basic commands:
• Get help on any command or list of methods:
help()
• Usefull command after connected / before exit:
startRecording(recordFilePath,[recordAll])
stopRecording()
redirect(outputFile,[toStdOut])
stopRedirect()
Copyright © 2014, SIA CoMinder, http://www.cominder.eu
Getting help:
• Get help on any command or list of methods:
help()
wls:/offline> help('online')
wls:/offline> help('offline')
• What help show:
– Description of the action, references
– Syntax
– Usage Example
• Detailed java call stack on error: dumpStack()
• Print variables, expressions for debug: print
Copyright © 2014, SIA CoMinder, http://www.cominder.eu
Browsing:
• Set WL objects tree context before browse
serverConfig()
domainRuntime()
….
• Navigate and show context info like in files system:
cd('/')
cd('AppRuntimeStateRuntime/AppRuntimeStateRuntime')
ls()
or use context specific methods like:
listApplications()
Copyright © 2014, SIA CoMinder, http://www.cominder.eu
Do scripting:
• Save required set of commands in file:
redirect('owl_mon_serversapp_1.log', 'false')
connect(url='t3://localhost:7001')
domainRuntime()
cd('AppRuntimeStateRuntime/AppRuntimeStateRuntime')
ls()
disconnect()
stopRedirect()
exit()
• Execute the script:
java weblogic.WLST wlst_list_appruntime.py
Copyright © 2014, SIA CoMinder, http://www.cominder.eu
Use subroutines:
WLST – is really Python adopted for WL. So, use it's constructions:
Copyright © 2014, SIA CoMinder, http://www.cominder.eu
Use loops and collections:
Copyright © 2014, SIA CoMinder, http://www.cominder.eu
DBA darbu organizēšanaQ + A
Vai tas ir svārīgi?!
Copyright © 2014, SIA CoMinder, http://www.cominder.eu
DBA darbu organizēšana
Спасибо за внимание!
Paldies par uzmanību!
Thanks for attention!
Andrey Chervonets
e-mail: a.chervonets@cominder.eu
LinkedIn: http://www.linkedin.com/in/andreychervonets
web: http://www.cominder.eu
MeetUp #11
24 of July 2014
Riga, Latvia
Copyright © 2014, SIA CoMinder, http://www.cominder.eu

Más contenido relacionado

La actualidad más candente

Web sockets in java EE 7 - JavaOne 2013
Web sockets in java EE 7 - JavaOne 2013Web sockets in java EE 7 - JavaOne 2013
Web sockets in java EE 7 - JavaOne 2013
Siva Arunachalam
 
Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010
sullis
 
MongoDB on Azure - Tips, Tricks and Examples
MongoDB on Azure - Tips, Tricks and ExamplesMongoDB on Azure - Tips, Tricks and Examples
MongoDB on Azure - Tips, Tricks and Examples
MongoDB
 
Pushing the web — WebSockets
Pushing the web — WebSocketsPushing the web — WebSockets
Pushing the web — WebSockets
Roland M
 
VMware compute driver for OpenStack
VMware compute driver for OpenStackVMware compute driver for OpenStack
VMware compute driver for OpenStack
openstackindia
 
232 deview2013 oss를활용한분산아키텍처구현
232 deview2013 oss를활용한분산아키텍처구현232 deview2013 oss를활용한분산아키텍처구현
232 deview2013 oss를활용한분산아키텍처구현
NAVER D2
 

La actualidad más candente (20)

Web sockets in java EE 7 - JavaOne 2013
Web sockets in java EE 7 - JavaOne 2013Web sockets in java EE 7 - JavaOne 2013
Web sockets in java EE 7 - JavaOne 2013
 
Web Sockets in Java EE 7
Web Sockets in Java EE 7Web Sockets in Java EE 7
Web Sockets in Java EE 7
 
Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010Programming WebSockets - OSCON 2010
Programming WebSockets - OSCON 2010
 
MongoDB on Azure - Tips, Tricks and Examples
MongoDB on Azure - Tips, Tricks and ExamplesMongoDB on Azure - Tips, Tricks and Examples
MongoDB on Azure - Tips, Tricks and Examples
 
Pushing the web — WebSockets
Pushing the web — WebSocketsPushing the web — WebSockets
Pushing the web — WebSockets
 
Ansible
AnsibleAnsible
Ansible
 
VMware compute driver for OpenStack
VMware compute driver for OpenStackVMware compute driver for OpenStack
VMware compute driver for OpenStack
 
Turn you Java EE Monoliths into Microservices with WildFly Swarm
Turn you Java EE Monoliths into Microservices with WildFly SwarmTurn you Java EE Monoliths into Microservices with WildFly Swarm
Turn you Java EE Monoliths into Microservices with WildFly Swarm
 
Infrastructure development on windows ldn cd meetup
Infrastructure development on windows   ldn cd meetup Infrastructure development on windows   ldn cd meetup
Infrastructure development on windows ldn cd meetup
 
Play framework productivity formula
Play framework   productivity formula Play framework   productivity formula
Play framework productivity formula
 
232 deview2013 oss를활용한분산아키텍처구현
232 deview2013 oss를활용한분산아키텍처구현232 deview2013 oss를활용한분산아키텍처구현
232 deview2013 oss를활용한분산아키텍처구현
 
Build a Docker Swarm cluster on Azure
Build a Docker Swarm cluster on Azure Build a Docker Swarm cluster on Azure
Build a Docker Swarm cluster on Azure
 
Node.js
Node.jsNode.js
Node.js
 
lock, block & two smoking barrels
lock, block & two smoking barrelslock, block & two smoking barrels
lock, block & two smoking barrels
 
MySQL NDB 8.0 clusters in your laptop with dbdeployer
MySQL NDB 8.0 clusters in your laptop with dbdeployerMySQL NDB 8.0 clusters in your laptop with dbdeployer
MySQL NDB 8.0 clusters in your laptop with dbdeployer
 
Tales from the OSGi trenches
Tales from the OSGi trenchesTales from the OSGi trenches
Tales from the OSGi trenches
 
Test like a_boss
Test like a_bossTest like a_boss
Test like a_boss
 
Building Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using WebsocketsBuilding Next Generation Real-Time Web Applications using Websockets
Building Next Generation Real-Time Web Applications using Websockets
 
Java on Azure JJUG Night Seminar 2016 0322
Java on Azure JJUG Night Seminar 2016 0322Java on Azure JJUG Night Seminar 2016 0322
Java on Azure JJUG Night Seminar 2016 0322
 
Nginx Essential
Nginx EssentialNginx Essential
Nginx Essential
 

Similar a Weblogic scripting LVOUG meetup #11

Similar a Weblogic scripting LVOUG meetup #11 (20)

Middleware upgrade to Oracle Fusion Middleware(FMW) 12c.Real Case stories.
Middleware upgrade to Oracle Fusion Middleware(FMW) 12c.Real Case stories. Middleware upgrade to Oracle Fusion Middleware(FMW) 12c.Real Case stories.
Middleware upgrade to Oracle Fusion Middleware(FMW) 12c.Real Case stories.
 
WebLogic Scripting Tool made Cool!
WebLogic Scripting Tool made Cool!WebLogic Scripting Tool made Cool!
WebLogic Scripting Tool made Cool!
 
Detailed Introduction To Docker
Detailed Introduction To DockerDetailed Introduction To Docker
Detailed Introduction To Docker
 
Weblogic
WeblogicWeblogic
Weblogic
 
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...What You Should Know About WebLogic Server 12c (12.2.1.2)  #oow2015 #otntour2...
What You Should Know About WebLogic Server 12c (12.2.1.2) #oow2015 #otntour2...
 
WebLogic FAQs
WebLogic FAQsWebLogic FAQs
WebLogic FAQs
 
12 Things About WebLogic 12.1.3 #oow2014 #otnla15
12 Things About WebLogic 12.1.3 #oow2014 #otnla1512 Things About WebLogic 12.1.3 #oow2014 #otnla15
12 Things About WebLogic 12.1.3 #oow2014 #otnla15
 
The Hacking Games - A Road to Post Exploitation Meetup - 20240222.pptx
The Hacking Games - A Road to Post Exploitation Meetup - 20240222.pptxThe Hacking Games - A Road to Post Exploitation Meetup - 20240222.pptx
The Hacking Games - A Road to Post Exploitation Meetup - 20240222.pptx
 
WebLogic authentication debugging
WebLogic authentication debuggingWebLogic authentication debugging
WebLogic authentication debugging
 
Developing Micro-Services for Cloud using Java
Developing Micro-Services for Cloud using JavaDeveloping Micro-Services for Cloud using Java
Developing Micro-Services for Cloud using Java
 
V mware v center orchestrator 5.5 knowledge transfer kit
V mware v center orchestrator 5.5 knowledge transfer kitV mware v center orchestrator 5.5 knowledge transfer kit
V mware v center orchestrator 5.5 knowledge transfer kit
 
WEBLOGIC ADMINISTRATION 11g NEW BATCH STARTS FROM 16 DEC
WEBLOGIC ADMINISTRATION 11g NEW BATCH STARTS FROM 16 DECWEBLOGIC ADMINISTRATION 11g NEW BATCH STARTS FROM 16 DEC
WEBLOGIC ADMINISTRATION 11g NEW BATCH STARTS FROM 16 DEC
 
Building Bizweb Microservices with Docker
Building Bizweb Microservices with DockerBuilding Bizweb Microservices with Docker
Building Bizweb Microservices with Docker
 
Weblogic 101 for dba
Weblogic  101 for dbaWeblogic  101 for dba
Weblogic 101 for dba
 
Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC  Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC
 
Reactive summit 2020 microsoft orleans the easy way
Reactive summit 2020   microsoft orleans the easy wayReactive summit 2020   microsoft orleans the easy way
Reactive summit 2020 microsoft orleans the easy way
 
DevOPS training - Day 2/2
DevOPS training - Day 2/2DevOPS training - Day 2/2
DevOPS training - Day 2/2
 
Introduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and DockerIntroduction to Containers - SQL Server and Docker
Introduction to Containers - SQL Server and Docker
 
Building APIs with NodeJS on Microsoft Azure Websites - Redmond
Building APIs with NodeJS on Microsoft Azure Websites - RedmondBuilding APIs with NodeJS on Microsoft Azure Websites - Redmond
Building APIs with NodeJS on Microsoft Azure Websites - Redmond
 
WebLogic for DBAs
WebLogic for DBAsWebLogic for DBAs
WebLogic for DBAs
 

Más de Andrejs Vorobjovs

Más de Andrejs Vorobjovs (20)

Peteris Arajs - Where is my data
Peteris Arajs - Where is my dataPeteris Arajs - Where is my data
Peteris Arajs - Where is my data
 
Maksims Greckis - Trace File Analyzer
Maksims Greckis - Trace File Analyzer  Maksims Greckis - Trace File Analyzer
Maksims Greckis - Trace File Analyzer
 
Aleksejs Nemirovskis - Manage your data using oracle BDA
Aleksejs Nemirovskis - Manage your data using oracle BDAAleksejs Nemirovskis - Manage your data using oracle BDA
Aleksejs Nemirovskis - Manage your data using oracle BDA
 
LVOUG meetup #18
LVOUG meetup #18LVOUG meetup #18
LVOUG meetup #18
 
LVOUG meetup #17
LVOUG meetup #17LVOUG meetup #17
LVOUG meetup #17
 
My two cents about Mysql backup
My two cents about Mysql backupMy two cents about Mysql backup
My two cents about Mysql backup
 
LVOUG meetup #16
LVOUG meetup #16LVOUG meetup #16
LVOUG meetup #16
 
Top 15 MySQL parameters
Top 15 MySQL parameters Top 15 MySQL parameters
Top 15 MySQL parameters
 
Riga Dev Day vestule
Riga Dev Day vestuleRiga Dev Day vestule
Riga Dev Day vestule
 
Rdd2016 featured talks
Rdd2016 featured talksRdd2016 featured talks
Rdd2016 featured talks
 
Rdd2016 flyer
Rdd2016 flyerRdd2016 flyer
Rdd2016 flyer
 
meetup #15
meetup #15meetup #15
meetup #15
 
OTN tour 2015 press release in Russian
OTN tour 2015 press release in RussianOTN tour 2015 press release in Russian
OTN tour 2015 press release in Russian
 
OTN tour 2015, 100miles
OTN tour 2015, 100milesOTN tour 2015, 100miles
OTN tour 2015, 100miles
 
OTN tour 2015 benchmarking oracle io performance with Orion by Alex Gorbachev
OTN tour 2015 benchmarking oracle io performance with Orion by Alex GorbachevOTN tour 2015 benchmarking oracle io performance with Orion by Alex Gorbachev
OTN tour 2015 benchmarking oracle io performance with Orion by Alex Gorbachev
 
OTN tour 2015 Oracle Enterprise Manager 12c – Proof of Concept
OTN tour 2015 Oracle Enterprise Manager 12c – Proof of ConceptOTN tour 2015 Oracle Enterprise Manager 12c – Proof of Concept
OTN tour 2015 Oracle Enterprise Manager 12c – Proof of Concept
 
OTN tour Oracle db Cloud by Alex Gorbachev
OTN tour Oracle db Cloud by Alex GorbachevOTN tour Oracle db Cloud by Alex Gorbachev
OTN tour Oracle db Cloud by Alex Gorbachev
 
OTN tour 2015 Experience in implementing SSL between oracle db and oracle cli...
OTN tour 2015 Experience in implementing SSL between oracle db and oracle cli...OTN tour 2015 Experience in implementing SSL between oracle db and oracle cli...
OTN tour 2015 Experience in implementing SSL between oracle db and oracle cli...
 
OTN tour 2015 AWR data mining
OTN tour 2015 AWR data miningOTN tour 2015 AWR data mining
OTN tour 2015 AWR data mining
 
OTN tour 2015 opening speech
OTN tour 2015 opening speechOTN tour 2015 opening speech
OTN tour 2015 opening speech
 

Último

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Krashi Coaching
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 

Último (20)

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 

Weblogic scripting LVOUG meetup #11

  • 1. DBA darbu organizēšana WebLogic Scripting basics Andrey Chervonets (Андрей Червонец) ● working with Oracle products since 2001 ● Senior technical expert, DBA (Oracle, DB2, MySQL, ...) ● Certified on: ● Oracle Database Administrator (8i-11g) ● Oracle Application Server Administrator (9i/10g) ● Oracle WebLogic Administrator ● IBM DB2 Database Administrator LinkedIn: http://www.linkedin.com/in/andreychervonets MeetUp #11 24 of July 2014 Riga, Latvia Copyright © 2014, SIA CoMinder, http://www.cominder.eu
  • 2. Agenda • WebLogic administration tools - overview • What is WLST ?! • What can I do with WLST ?! • WLST scripting step by step. • Q + A Copyright © 2014, SIA CoMinder, http://www.cominder.eu
  • 3. DBA darbu organizēšanaWebLogic administrator tools overview Copyright © 2014, SIA CoMinder, http://www.cominder.eu
  • 4. WL admin. tools • WL Console • http://wlhost:7001/console/ • WL EM portal • http://wlhost:7001/em/ • WL autodeployment (in non-PROD mode) • WL admin java packages – java weblogic.Admin HELP – java weblogic.Admin help ALL • WLST – java weblogic.WLST • console application • scripts processing Copyright © 2013 CoMinder Ltd., http://www.cominder.euCopyright © 2014, SIA CoMinder, http://www.cominder.eu
  • 5. What is WLST?! • WL MBeans Tree browsing and manipulating tool • http://gerardnico.com/wiki/wlst/navigation • Copyright © 2013 CoMinder Ltd., http://www.cominder.euCopyright © 2014, SIA CoMinder, http://www.cominder.eu
  • 6. WLST – What can I do?! • Browse and discover: • WL and Domain objects tree • WL objects properties • Start/Stop • Backup, clone, configuration (domain templates, etc.) • Depoly/Undeploy/other actions with VM and applications • Monitoring • VM (health) status • Applications (health) status • Statistic • Anything else Copyright © 2013 CoMinder Ltd., http://www.cominder.euCopyright © 2014, SIA CoMinder, http://www.cominder.eu
  • 7. DBA darbu organizēšanaLinks and Notes Copyright © 2014, SIA CoMinder, http://www.cominder.eu
  • 8. Links: learn more about WLST • Oracle documentation: http://docs.oracle.com/cd/E17904_01/web.1111/e13728/understandwls.htm http://docs.oracle.com/cd/E28280_01/web.1111/e13715/monitoring.htm • WLST - Mbean Tree Navigation: http://gerardnico.com/wiki/wlst/navigation • http://wlstbyexamples.blogspot.com/ • http://weblogic-wonders.com/weblogic/ • http://weblogiccommunity.com/ • https://pineapple.java.net/index.html Copyright © 2014, SIA CoMinder, http://www.cominder.eu
  • 9. DBA darbu organizēšanaWL Scripting step by step examples Copyright © 2014, SIA CoMinder, http://www.cominder.eu
  • 10. Start WLST • Setup environment first: . /u01/Middleware/wlserver_10.3/server/bin/setWLSEnv.sh ! make sure to load variables into current shell session! • Start WLST in required mode: a) Console mode: java weblogic.WLST b) Script mode: java weblogic.WLST my_wlst_script.py 1>/tmp/wlst_script.out 2>&1 c) Importing WLST as a Jython Module: http://docs.oracle.com/cd/E13222_01/wls/docs90/config_scripting/using_WLST.html#1081491 Copyright © 2014, SIA CoMinder, http://www.cominder.eu
  • 11. First steps • Connect to server (2 options to specify user/pwd + 1 – WLST will ask): connect([username, password],[url],[adminServerName], [timeout]) connect([userConfigFile,userKeyFile],[adminServerName], [timeout]) connect(url='t3://localhost:7001') • Usefull command after connected / before exit: startRecording(recordFilePath,[recordAll]) stopRecording() redirect('my_wlst_protocol.log', 'false') stopRedirect() exit() Copyright © 2014, SIA CoMinder, http://www.cominder.eu
  • 12. Basic commands: • Get help on any command or list of methods: help() • Usefull command after connected / before exit: startRecording(recordFilePath,[recordAll]) stopRecording() redirect(outputFile,[toStdOut]) stopRedirect() Copyright © 2014, SIA CoMinder, http://www.cominder.eu
  • 13. Getting help: • Get help on any command or list of methods: help() wls:/offline> help('online') wls:/offline> help('offline') • What help show: – Description of the action, references – Syntax – Usage Example • Detailed java call stack on error: dumpStack() • Print variables, expressions for debug: print Copyright © 2014, SIA CoMinder, http://www.cominder.eu
  • 14. Browsing: • Set WL objects tree context before browse serverConfig() domainRuntime() …. • Navigate and show context info like in files system: cd('/') cd('AppRuntimeStateRuntime/AppRuntimeStateRuntime') ls() or use context specific methods like: listApplications() Copyright © 2014, SIA CoMinder, http://www.cominder.eu
  • 15. Do scripting: • Save required set of commands in file: redirect('owl_mon_serversapp_1.log', 'false') connect(url='t3://localhost:7001') domainRuntime() cd('AppRuntimeStateRuntime/AppRuntimeStateRuntime') ls() disconnect() stopRedirect() exit() • Execute the script: java weblogic.WLST wlst_list_appruntime.py Copyright © 2014, SIA CoMinder, http://www.cominder.eu
  • 16. Use subroutines: WLST – is really Python adopted for WL. So, use it's constructions: Copyright © 2014, SIA CoMinder, http://www.cominder.eu
  • 17. Use loops and collections: Copyright © 2014, SIA CoMinder, http://www.cominder.eu
  • 18. DBA darbu organizēšanaQ + A Vai tas ir svārīgi?! Copyright © 2014, SIA CoMinder, http://www.cominder.eu
  • 19. DBA darbu organizēšana Спасибо за внимание! Paldies par uzmanību! Thanks for attention! Andrey Chervonets e-mail: a.chervonets@cominder.eu LinkedIn: http://www.linkedin.com/in/andreychervonets web: http://www.cominder.eu MeetUp #11 24 of July 2014 Riga, Latvia Copyright © 2014, SIA CoMinder, http://www.cominder.eu