SlideShare una empresa de Scribd logo
1 de 13
Descargar para leer sin conexión
Andy Dingsor – IBM Advisory Software Engineer
25 January 2010




Welcome to wsadminlib.py

Simplifying configuration of IBM WebSphere Application Server




                                                 WebSphere


                                                      © 2010 IBM Corporation
Configuring the IBM WebSphere Application Server



 Definition:  Wide variety of 'configuration tasks' for IBM WebSphere Application Server
   – Create and delete clusters, servers, proxies
   – Install applications, map virtual host, set autostart
   – Set tracing, replication, caching, shared libraries, security
   – Start and stop processes and applications
   – etc.


 Two traditional ways to 'configure'
   – GUI:  Browse to administrative console, manually view and click
      • Good for one­time tasks, but slow
   – Command­line:  Run automation scripts
      • Good repeatability, accurate, and fast, but complicated syntax




2                                                                                   © 2010 IBM Corporation
Challenges and opportunities:  Scripting syntax



 Opinion:  AdminConfig, AdminControl, AdminApp, and AdminTask commands are complex
   – Syntax
       • Input parameters
            – Often encapsulation of JACL
        • Output results and return codes
    – Documentation
    – Error messages


 Wish­List:  Simplification
   – Library with python methods to call directly
       • Simple names, simple parameters, simple return values
       • Hide AdminConfig, AdminControl, and AdminTask
   – Methods to copy/paste to your own scripts
   – Command 'reference' embodied in working examples



3                                                                          © 2010 IBM Corporation
Solution:  
 Introducing wsadminlib.py

 Free sample script package from IBM developerWorks
    – http://www.ibm.com/developerworks/websphere/library/samples/SampleScripts.html
    – Search for 'wsadminlib'
 Explicitly designed to simplify configuring the IBM WebSphere Application Server
 wsadminlib.py is one huge single python file
   – More than 500 methods
   – Intuitive method names
   – Intuitive parameter names
   – Easy­to­parse results
 Easily used:
   – Directly: call methods from your scripts
   – Sample: copy­paste methods
   – Reference: easy to search single file
 Caveat:  Not supported.  Sample script packages are not supported by IBM.


 4                                                                                   © 2010 IBM Corporation
History of wsadminlib.py



 Originally created in 2006
   – Two IBM product developers wrote and shared a few methods 
   – Goal was to share research and hide Admin syntax
 Shared and grew in popularity as IBM­internal community­contribution project
   – More than 30 contributors from diverse product component groups worldwide
   – Totally contributor­driven
 Now used in wide range of IBM­internal environments
   – Automated continuous­test frameworks
   – Individual developers running single commands
 Officially released on IBM developerWorks in April 2010
   – Free, unsupported, sample sample script package
 Steady growth continues




 5                                                                               © 2010 IBM Corporation
How to use wsadminlib.py 'manually'



 Connect wsadmin to your running Application Server or Deployment Manager
    root@ding6:/opt/WAS70# bin/wsadmin.sh ­lang jython ­host ding4 ­port 8880
    WASX7209I: Connected to process "server1" on node ding4V8DefaultNode1 using SOAP connector;  
    The type of process is: UnManagedProcess
    WASX7031I: For help, enter: "print Help.help()"
    wsadmin>



 Access wsadminlib.py by execfile or import
    wsadmin>execfile('/home/ding/tmp/wsadminlib.py')
    $Id: test.wsadminlib.py 104 2010­02­15 19:06:18Z dingsor $
    wsadmin>



 Call a method
    wsadmin>getCellName()
    'ding4DefaultCell1'
    wsadmin>




6                                                                                                   © 2010 IBM Corporation
More simple wsadminlib.py methods



wsadmin>listNodes()
    ['ding4V8DefaultNode1']

     Note: Result is returned in a python list of strings.  Easy to parse and iterate.

wsadmin>serverStatus()
    Server status
    =============
    NODE ding4CellManager01 on ding4.raleigh.ibm.com (windows) ­ Deployment manager    <== Connected to a dmgr
    NODE ding4Node01 on ding4.raleigh.ibm.com (windows)
            APPLICATION_SERVER fritzserver     running
            NODE_AGENT         nodeagent       running
            APPLICATION_SERVER server1         stopped
            APPLICATION_SERVER sippbx1         stopped
    APPLICATIONS:
            commsvc.pbx
            fritzlet_ear
            pxyapps

     Note:  serverStatus() is one of few commands intended for human consumption.  Great when starting manual operations.




 7                                                                                                         © 2010 IBM Corporation
How to use wsadminlib.py from a script
­ using execfile

    #­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
    # enableTracing.py
    # Sets the trace specification on all existing application servers.
    #­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
    execfile('wsadminlib.py')

    # Enable verbose messages from wsadminlib.py
    enableDebugMessages()

    # Define the desired trace specification
    sipTraceSpec = "*=info:com.ibm.ws.sip.*=all"

    # Set the trace spec on each application server.
    appServerList = listAllAppServers()       <== Returns list of lists: [ ['node1','server1'], ['node2','server2'], etc]
    for appServer in appServerList:
        nodename = appServer[0]
        servername = appServer[1]
        setServerTrace( nodename, servername, traceSpec = sipTraceSpec )        <== Plus many optional parameters

    # Save and sync
    save()


8                                                                                                                © 2010 IBM Corporation
How to use wsadminlib.py from a script
­ using import

    #­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
    # enableTracing.import.py
    # Sets the trace specification on all existing application servers.
    #­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­
    import wsadminlib

    # Enable verbose messages from wsadminlib.py
    wsadminlib.enableDebugMessages()

    # Define the desired trace specification
    sipTraceSpec = "*=info:com.ibm.ws.sip.*=all"

    # Set the trace spec on each application server.
    appServerList = wsadminlib.listAllAppServers()
    for appServer in appServerList:
        nodename = appServer[0]
        servername = appServer[1]
        wsadminlib.setServerTrace( nodename, servername, traceSpec = sipTraceSpec )

    # Save and sync
    wsadminlib.save()


9                                                                                     © 2010 IBM Corporation
Dozens of powerhouse methods in wsadminlib.py



 Set custom properties
 Define core groups and bridges
 Create SIBuses
 Configure shared libraries
 Define virtual host aliases
 Make an application start automatically.   Or not.
 Configure security
 Configure BLA
 Create/start/stop/delete clusters and servers
 etc.
 etc.


 10                                                    © 2010 IBM Corporation
Ramping­up with wsadminlib.py


 Configuration size limits: None
 Documentation: Method prologues (pydoc) and self­documenting parameters
 Searching for functions:
   – Grep for likely method names
   – Grep for underlying Admin command syntax
 Save and Sync: Always syncs
 Version Compatibility:  
   – WAS V8 and V7 well­proven.  WAS V6 used less.
   – Also works with Extreme Scale (nee XD), Process Server, Cloud Editions
 Modifications:
   – You may modify wsadminlib freely
   – Balance changes against diffing future updates
 Language: English only
 Support:  None.  Unsupported sample script.

 11                                                                           © 2010 IBM Corporation
Conclusions and recommendations for wsadminlib.py



 Read an 'unbiased' review
      – https://www.ibm.com/developerworks/mydeveloperworks/blogs/cloudview/entry/tools_from_the_experts85


 Subscribe to wsadminlib blog.
      – http://wsadminlib.blogspot.com/


 Get wsadminlib.py
   – http://www.ibm.com/developerworks/websphere/library/samples/SampleScripts.html
       • Search for 'wsadminlib'
 Try it
    – Vast and incredible resource




 12                                                                                                     © 2010 IBM Corporation
Trademarks, copyrights, and disclaimers
     IBM, the IBM logo, ibm.com, and the following terms are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both:

     WebSphere

     If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol (® or TM), these symbols indicate U.S. registered or common law 
     trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of other IBM
     trademarks is available on the Web at "Copyright and trademark information" at http://www.ibm.com/legal/copytrade.shtml

     Java, and all Java­based trademarks and logos are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.

     Other company, product, or service names may be trademarks or service marks of others. 

     Product data has been reviewed for accuracy as of the date of initial publication. Product data is subject to change without notice. This document could include technical inaccuracies or 
     typographical errors. IBM may make improvements or changes in the products or programs described herein at any time without notice. 

     THE INFORMATION PROVIDED IN THIS DOCUMENT IS DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY, EITHER EXPRESS OR IMPLIED. IBM EXPRESSLY DISCLAIMS ANY 
     WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. IBM shall have no responsibility to update this information. IBM products 
     are warranted, if at all, according to the terms and conditions of the agreements (for example, IBM Customer Agreement, Statement of Limited Warranty, International Program License 
     Agreement, etc.) under which they are provided. Information concerning non­IBM products was obtained from the suppliers of those products, their published announcements or other 
     publicly available sources. IBM has not tested those products in connection with this publication and cannot confirm the accuracy of performance, compatibility or any other claims related 
     to non­IBM products.

     IBM makes no representations or warranties, express or implied, regarding non­IBM products and services.

     The provision of the information contained herein is not intended to, and does not, grant any right or license under any IBM patents or copyrights. Inquiries regarding patent or copyright 
     licenses should be made, in writing, to:

     IBM Director of Licensing
     IBM Corporation
     North Castle Drive
     Armonk, NY  10504­1785
     U.S.A.

     Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. All customer examples described are presented as illustrations of 
     how those customers have used IBM products and the results they may have achieved. The actual throughput or performance that any user will experience will vary depending upon 
     considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance 
     can be given that an individual user will achieve throughput or performance improvements equivalent to the ratios stated here.

     © Copyright International Business Machines Corporation 2011. All rights reserved.

     Note to U.S. Government Users ­ Documentation related to restricted rights­Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract and IBM Corp.




13                                                                                                                                                                                                  © 2010 IBM Corporation

Más contenido relacionado

La actualidad más candente

Automatic systems installations and change management wit FAI - Talk for Netw...
Automatic systems installations and change management wit FAI - Talk for Netw...Automatic systems installations and change management wit FAI - Talk for Netw...
Automatic systems installations and change management wit FAI - Talk for Netw...
Henning Sprang
 
IBM Health Center Details
IBM Health Center DetailsIBM Health Center Details
IBM Health Center Details
Rohit Kelapure
 
Supporting Hyper-V 3.0 on Apache CloudStack
Supporting Hyper-V 3.0 on Apache CloudStackSupporting Hyper-V 3.0 on Apache CloudStack
Supporting Hyper-V 3.0 on Apache CloudStack
Donal Lafferty
 

La actualidad más candente (20)

Automatic systems installations and change management wit FAI - Talk for Netw...
Automatic systems installations and change management wit FAI - Talk for Netw...Automatic systems installations and change management wit FAI - Talk for Netw...
Automatic systems installations and change management wit FAI - Talk for Netw...
 
06 network automationwithansible
06 network automationwithansible06 network automationwithansible
06 network automationwithansible
 
IBM InterConnect: Java vs JavaScript for Enterprise WebApps
IBM InterConnect: Java vs JavaScript for Enterprise WebAppsIBM InterConnect: Java vs JavaScript for Enterprise WebApps
IBM InterConnect: Java vs JavaScript for Enterprise WebApps
 
DB2 and PHP in Depth on IBM i
DB2 and PHP in Depth on IBM iDB2 and PHP in Depth on IBM i
DB2 and PHP in Depth on IBM i
 
IBM Health Center Details
IBM Health Center DetailsIBM Health Center Details
IBM Health Center Details
 
J boss
J bossJ boss
J boss
 
Supporting Hyper-V 3.0 on Apache CloudStack
Supporting Hyper-V 3.0 on Apache CloudStackSupporting Hyper-V 3.0 on Apache CloudStack
Supporting Hyper-V 3.0 on Apache CloudStack
 
CIRCUIT 2015 - Monitoring AEM
CIRCUIT 2015 - Monitoring AEMCIRCUIT 2015 - Monitoring AEM
CIRCUIT 2015 - Monitoring AEM
 
Introduction to Wildfly 8 - Marchioni
Introduction to Wildfly 8 -  MarchioniIntroduction to Wildfly 8 -  Marchioni
Introduction to Wildfly 8 - Marchioni
 
Apache CloudStack's Plugin Model: Balancing the Cathedral with a Bazaar
Apache CloudStack's Plugin Model:Balancing the Cathedral with a BazaarApache CloudStack's Plugin Model:Balancing the Cathedral with a Bazaar
Apache CloudStack's Plugin Model: Balancing the Cathedral with a Bazaar
 
Windows Server "10": что нового в виртуализации
Windows Server "10": что нового в виртуализацииWindows Server "10": что нового в виртуализации
Windows Server "10": что нового в виртуализации
 
Evolutionary Database Design
Evolutionary Database DesignEvolutionary Database Design
Evolutionary Database Design
 
XS Japan 2008 Services English
XS Japan 2008 Services EnglishXS Japan 2008 Services English
XS Japan 2008 Services English
 
Adobe AEM Maintenance - Customer Care Office Hours
Adobe AEM Maintenance - Customer Care Office HoursAdobe AEM Maintenance - Customer Care Office Hours
Adobe AEM Maintenance - Customer Care Office Hours
 
A Lap Around PowerShell 3.0
A Lap Around PowerShell 3.0A Lap Around PowerShell 3.0
A Lap Around PowerShell 3.0
 
Create a welcoming development environment on IBM i
Create a welcoming development environment on IBM iCreate a welcoming development environment on IBM i
Create a welcoming development environment on IBM i
 
Jboss App Server
Jboss App ServerJboss App Server
Jboss App Server
 
JBoss Enterprise Application Platform 6 Troubleshooting
JBoss Enterprise Application Platform 6 TroubleshootingJBoss Enterprise Application Platform 6 Troubleshooting
JBoss Enterprise Application Platform 6 Troubleshooting
 
You don't want to do it like that
You don't want to do it like thatYou don't want to do it like that
You don't want to do it like that
 
Windows Server 2012 R2! Что нового в Hyper-V?
Windows Server 2012 R2! Что нового в Hyper-V?Windows Server 2012 R2! Что нового в Hyper-V?
Windows Server 2012 R2! Что нового в Hyper-V?
 

Similar a Wsadminlib.wasug.2011 0125-0726

Sa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administratorsSa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administrators
Sharon James
 
Command central 9.6 - Features Overview
Command central 9.6 - Features OverviewCommand central 9.6 - Features Overview
Command central 9.6 - Features Overview
Software AG
 

Similar a Wsadminlib.wasug.2011 0125-0726 (20)

Bp307 Practical Solutions for Connections Administrators, tips and scrips for...
Bp307 Practical Solutions for Connections Administrators, tips and scrips for...Bp307 Practical Solutions for Connections Administrators, tips and scrips for...
Bp307 Practical Solutions for Connections Administrators, tips and scrips for...
 
Sa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administratorsSa106 – practical solutions for connections administrators
Sa106 – practical solutions for connections administrators
 
Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administrators
 
Id101 what's new in ibm lotus® domino® 8.5.3 and beyond final
Id101 what's new in ibm lotus® domino® 8.5.3 and beyond finalId101 what's new in ibm lotus® domino® 8.5.3 and beyond final
Id101 what's new in ibm lotus® domino® 8.5.3 and beyond final
 
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
AD109 - Using the IBM Sametime Proxy SDK: WebSphere Portal, IBM Connections -...
 
Practical solutions for connections administrators lite
Practical solutions for connections administrators litePractical solutions for connections administrators lite
Practical solutions for connections administrators lite
 
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
 
Automating That "Other" OS
Automating That "Other" OSAutomating That "Other" OS
Automating That "Other" OS
 
Command central 9.6 - Features Overview
Command central 9.6 - Features OverviewCommand central 9.6 - Features Overview
Command central 9.6 - Features Overview
 
Broadcast Music Inc - Release Automation Rockstars!
Broadcast Music Inc - Release Automation Rockstars!Broadcast Music Inc - Release Automation Rockstars!
Broadcast Music Inc - Release Automation Rockstars!
 
Java Development on Bluemix
Java Development on BluemixJava Development on Bluemix
Java Development on Bluemix
 
Automation day red hat ansible
   Automation day red hat ansible    Automation day red hat ansible
Automation day red hat ansible
 
Tips for Developing and Testing IBM HATS Applications
Tips for Developing and Testing IBM HATS ApplicationsTips for Developing and Testing IBM HATS Applications
Tips for Developing and Testing IBM HATS Applications
 
What's new in designer
What's new in designerWhat's new in designer
What's new in designer
 
Ibm db2 10.5 for linux, unix, and windows developing perl, php, python, and...
Ibm db2 10.5 for linux, unix, and windows   developing perl, php, python, and...Ibm db2 10.5 for linux, unix, and windows   developing perl, php, python, and...
Ibm db2 10.5 for linux, unix, and windows developing perl, php, python, and...
 
How do I securely deploy Internet websites in PHP on my IBMi?
How do I securely deploy Internet websites in PHP on my IBMi?How do I securely deploy Internet websites in PHP on my IBMi?
How do I securely deploy Internet websites in PHP on my IBMi?
 
Automação do físico ao NetSecDevOps
Automação do físico ao NetSecDevOpsAutomação do físico ao NetSecDevOps
Automação do físico ao NetSecDevOps
 
Zero to Portlet in 20 minutes or less
Zero to Portlet in 20 minutes or lessZero to Portlet in 20 minutes or less
Zero to Portlet in 20 minutes or less
 
Revolutionize the API Economy with IBM WebSphere Connect
Revolutionize the API Economy with IBM WebSphere ConnectRevolutionize the API Economy with IBM WebSphere Connect
Revolutionize the API Economy with IBM WebSphere Connect
 
Christoph Stoettner - Save my time using scripts
Christoph Stoettner - Save my time using scriptsChristoph Stoettner - Save my time using scripts
Christoph Stoettner - Save my time using scripts
 

Más de Rohit Kelapure

Dynacache in WebSphere Portal Server
Dynacache in WebSphere Portal ServerDynacache in WebSphere Portal Server
Dynacache in WebSphere Portal Server
Rohit Kelapure
 
2012 04-09-v2-tdp-1167-cdi-bestpractices-final
2012 04-09-v2-tdp-1167-cdi-bestpractices-final2012 04-09-v2-tdp-1167-cdi-bestpractices-final
2012 04-09-v2-tdp-1167-cdi-bestpractices-final
Rohit Kelapure
 

Más de Rohit Kelapure (20)

API First or Events First: Is it a Binary Choice?
API First or Events First: Is it a Binary Choice?  API First or Events First: Is it a Binary Choice?
API First or Events First: Is it a Binary Choice?
 
External should that be a microservice
External should that be a microserviceExternal should that be a microservice
External should that be a microservice
 
Should That Be a Microservice ?
Should That Be a Microservice ?Should That Be a Microservice ?
Should That Be a Microservice ?
 
Travelers 360 degree health assessment of microservices on the pivotal platform
Travelers 360 degree health assessment of microservices on the pivotal platformTravelers 360 degree health assessment of microservices on the pivotal platform
Travelers 360 degree health assessment of microservices on the pivotal platform
 
SpringOne Platform 2018 Recap in 5 minutes
SpringOne Platform 2018 Recap in 5 minutesSpringOne Platform 2018 Recap in 5 minutes
SpringOne Platform 2018 Recap in 5 minutes
 
Migrate Heroku & OpenShift Applications to IBM BlueMix
Migrate Heroku & OpenShift Applications to IBM BlueMixMigrate Heroku & OpenShift Applications to IBM BlueMix
Migrate Heroku & OpenShift Applications to IBM BlueMix
 
Liberty Buildpack: Designed for Extension - Integrating your services in Blue...
Liberty Buildpack: Designed for Extension - Integrating your services in Blue...Liberty Buildpack: Designed for Extension - Integrating your services in Blue...
Liberty Buildpack: Designed for Extension - Integrating your services in Blue...
 
A Deep Dive into the Liberty Buildpack on IBM BlueMix
A Deep Dive into the Liberty Buildpack on IBM BlueMix A Deep Dive into the Liberty Buildpack on IBM BlueMix
A Deep Dive into the Liberty Buildpack on IBM BlueMix
 
Liberty dynacache ffw_iea_ste
Liberty dynacache ffw_iea_steLiberty dynacache ffw_iea_ste
Liberty dynacache ffw_iea_ste
 
1812 icap-v1.3 0430
1812 icap-v1.3 04301812 icap-v1.3 0430
1812 icap-v1.3 0430
 
Dynacache in WebSphere Portal Server
Dynacache in WebSphere Portal ServerDynacache in WebSphere Portal Server
Dynacache in WebSphere Portal Server
 
Classloader leak detection in websphere application server
Classloader leak detection in websphere application serverClassloader leak detection in websphere application server
Classloader leak detection in websphere application server
 
2012 04-09-v2-tdp-1167-cdi-bestpractices-final
2012 04-09-v2-tdp-1167-cdi-bestpractices-final2012 04-09-v2-tdp-1167-cdi-bestpractices-final
2012 04-09-v2-tdp-1167-cdi-bestpractices-final
 
2012 04-06-v2-tdp-1163-java e-evsspringshootout-final
2012 04-06-v2-tdp-1163-java e-evsspringshootout-final2012 04-06-v2-tdp-1163-java e-evsspringshootout-final
2012 04-06-v2-tdp-1163-java e-evsspringshootout-final
 
2012 04-09-v2-tdp-1167-cdi-bestpractices-final
2012 04-09-v2-tdp-1167-cdi-bestpractices-final2012 04-09-v2-tdp-1167-cdi-bestpractices-final
2012 04-09-v2-tdp-1167-cdi-bestpractices-final
 
Web sphere application server performance tuning workshop
Web sphere application server performance tuning workshopWeb sphere application server performance tuning workshop
Web sphere application server performance tuning workshop
 
Performance tuningtoolkitintroduction
Performance tuningtoolkitintroductionPerformance tuningtoolkitintroduction
Performance tuningtoolkitintroduction
 
Java EE vs Spring Framework
Java  EE vs Spring Framework Java  EE vs Spring Framework
Java EE vs Spring Framework
 
Debugging java deployments_2
Debugging java deployments_2Debugging java deployments_2
Debugging java deployments_2
 
Caching technology comparison
Caching technology comparisonCaching technology comparison
Caching technology comparison
 

Último

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 

Wsadminlib.wasug.2011 0125-0726

  • 2. Configuring the IBM WebSphere Application Server  Definition:  Wide variety of 'configuration tasks' for IBM WebSphere Application Server – Create and delete clusters, servers, proxies – Install applications, map virtual host, set autostart – Set tracing, replication, caching, shared libraries, security – Start and stop processes and applications – etc.  Two traditional ways to 'configure' – GUI:  Browse to administrative console, manually view and click • Good for one­time tasks, but slow – Command­line:  Run automation scripts • Good repeatability, accurate, and fast, but complicated syntax 2 © 2010 IBM Corporation
  • 3. Challenges and opportunities:  Scripting syntax  Opinion:  AdminConfig, AdminControl, AdminApp, and AdminTask commands are complex – Syntax • Input parameters – Often encapsulation of JACL • Output results and return codes – Documentation – Error messages  Wish­List:  Simplification – Library with python methods to call directly • Simple names, simple parameters, simple return values • Hide AdminConfig, AdminControl, and AdminTask – Methods to copy/paste to your own scripts – Command 'reference' embodied in working examples 3 © 2010 IBM Corporation
  • 4. Solution:   Introducing wsadminlib.py  Free sample script package from IBM developerWorks – http://www.ibm.com/developerworks/websphere/library/samples/SampleScripts.html – Search for 'wsadminlib'  Explicitly designed to simplify configuring the IBM WebSphere Application Server  wsadminlib.py is one huge single python file – More than 500 methods – Intuitive method names – Intuitive parameter names – Easy­to­parse results  Easily used: – Directly: call methods from your scripts – Sample: copy­paste methods – Reference: easy to search single file  Caveat:  Not supported.  Sample script packages are not supported by IBM. 4 © 2010 IBM Corporation
  • 5. History of wsadminlib.py  Originally created in 2006 – Two IBM product developers wrote and shared a few methods  – Goal was to share research and hide Admin syntax  Shared and grew in popularity as IBM­internal community­contribution project – More than 30 contributors from diverse product component groups worldwide – Totally contributor­driven  Now used in wide range of IBM­internal environments – Automated continuous­test frameworks – Individual developers running single commands  Officially released on IBM developerWorks in April 2010 – Free, unsupported, sample sample script package  Steady growth continues 5 © 2010 IBM Corporation
  • 6. How to use wsadminlib.py 'manually'  Connect wsadmin to your running Application Server or Deployment Manager root@ding6:/opt/WAS70# bin/wsadmin.sh ­lang jython ­host ding4 ­port 8880 WASX7209I: Connected to process "server1" on node ding4V8DefaultNode1 using SOAP connector;   The type of process is: UnManagedProcess WASX7031I: For help, enter: "print Help.help()" wsadmin>  Access wsadminlib.py by execfile or import wsadmin>execfile('/home/ding/tmp/wsadminlib.py') $Id: test.wsadminlib.py 104 2010­02­15 19:06:18Z dingsor $ wsadmin>  Call a method wsadmin>getCellName() 'ding4DefaultCell1' wsadmin> 6 © 2010 IBM Corporation
  • 7. More simple wsadminlib.py methods wsadmin>listNodes() ['ding4V8DefaultNode1'] Note: Result is returned in a python list of strings.  Easy to parse and iterate. wsadmin>serverStatus() Server status ============= NODE ding4CellManager01 on ding4.raleigh.ibm.com (windows) ­ Deployment manager    <== Connected to a dmgr NODE ding4Node01 on ding4.raleigh.ibm.com (windows)         APPLICATION_SERVER fritzserver     running         NODE_AGENT         nodeagent       running         APPLICATION_SERVER server1         stopped         APPLICATION_SERVER sippbx1         stopped APPLICATIONS:         commsvc.pbx         fritzlet_ear         pxyapps Note:  serverStatus() is one of few commands intended for human consumption.  Great when starting manual operations. 7 © 2010 IBM Corporation
  • 8. How to use wsadminlib.py from a script ­ using execfile #­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ # enableTracing.py # Sets the trace specification on all existing application servers. #­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ execfile('wsadminlib.py') # Enable verbose messages from wsadminlib.py enableDebugMessages() # Define the desired trace specification sipTraceSpec = "*=info:com.ibm.ws.sip.*=all" # Set the trace spec on each application server. appServerList = listAllAppServers()       <== Returns list of lists: [ ['node1','server1'], ['node2','server2'], etc] for appServer in appServerList:     nodename = appServer[0]     servername = appServer[1]     setServerTrace( nodename, servername, traceSpec = sipTraceSpec )        <== Plus many optional parameters # Save and sync save() 8 © 2010 IBM Corporation
  • 9. How to use wsadminlib.py from a script ­ using import #­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ # enableTracing.import.py # Sets the trace specification on all existing application servers. #­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ import wsadminlib # Enable verbose messages from wsadminlib.py wsadminlib.enableDebugMessages() # Define the desired trace specification sipTraceSpec = "*=info:com.ibm.ws.sip.*=all" # Set the trace spec on each application server. appServerList = wsadminlib.listAllAppServers() for appServer in appServerList:     nodename = appServer[0]     servername = appServer[1]     wsadminlib.setServerTrace( nodename, servername, traceSpec = sipTraceSpec ) # Save and sync wsadminlib.save() 9 © 2010 IBM Corporation
  • 10. Dozens of powerhouse methods in wsadminlib.py  Set custom properties  Define core groups and bridges  Create SIBuses  Configure shared libraries  Define virtual host aliases  Make an application start automatically.   Or not.  Configure security  Configure BLA  Create/start/stop/delete clusters and servers  etc.  etc. 10 © 2010 IBM Corporation
  • 11. Ramping­up with wsadminlib.py  Configuration size limits: None  Documentation: Method prologues (pydoc) and self­documenting parameters  Searching for functions: – Grep for likely method names – Grep for underlying Admin command syntax  Save and Sync: Always syncs  Version Compatibility:   – WAS V8 and V7 well­proven.  WAS V6 used less. – Also works with Extreme Scale (nee XD), Process Server, Cloud Editions  Modifications: – You may modify wsadminlib freely – Balance changes against diffing future updates  Language: English only  Support:  None.  Unsupported sample script. 11 © 2010 IBM Corporation
  • 12. Conclusions and recommendations for wsadminlib.py  Read an 'unbiased' review – https://www.ibm.com/developerworks/mydeveloperworks/blogs/cloudview/entry/tools_from_the_experts85  Subscribe to wsadminlib blog. – http://wsadminlib.blogspot.com/  Get wsadminlib.py – http://www.ibm.com/developerworks/websphere/library/samples/SampleScripts.html • Search for 'wsadminlib'  Try it – Vast and incredible resource 12 © 2010 IBM Corporation
  • 13. Trademarks, copyrights, and disclaimers IBM, the IBM logo, ibm.com, and the following terms are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both: WebSphere If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol (® or TM), these symbols indicate U.S. registered or common law  trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of other IBM trademarks is available on the Web at "Copyright and trademark information" at http://www.ibm.com/legal/copytrade.shtml Java, and all Java­based trademarks and logos are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Other company, product, or service names may be trademarks or service marks of others.  Product data has been reviewed for accuracy as of the date of initial publication. Product data is subject to change without notice. This document could include technical inaccuracies or  typographical errors. IBM may make improvements or changes in the products or programs described herein at any time without notice.  THE INFORMATION PROVIDED IN THIS DOCUMENT IS DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY, EITHER EXPRESS OR IMPLIED. IBM EXPRESSLY DISCLAIMS ANY  WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. IBM shall have no responsibility to update this information. IBM products  are warranted, if at all, according to the terms and conditions of the agreements (for example, IBM Customer Agreement, Statement of Limited Warranty, International Program License  Agreement, etc.) under which they are provided. Information concerning non­IBM products was obtained from the suppliers of those products, their published announcements or other  publicly available sources. IBM has not tested those products in connection with this publication and cannot confirm the accuracy of performance, compatibility or any other claims related  to non­IBM products. IBM makes no representations or warranties, express or implied, regarding non­IBM products and services. The provision of the information contained herein is not intended to, and does not, grant any right or license under any IBM patents or copyrights. Inquiries regarding patent or copyright  licenses should be made, in writing, to: IBM Director of Licensing IBM Corporation North Castle Drive Armonk, NY  10504­1785 U.S.A. Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. All customer examples described are presented as illustrations of  how those customers have used IBM products and the results they may have achieved. The actual throughput or performance that any user will experience will vary depending upon  considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance  can be given that an individual user will achieve throughput or performance improvements equivalent to the ratios stated here. © Copyright International Business Machines Corporation 2011. All rights reserved. Note to U.S. Government Users ­ Documentation related to restricted rights­Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract and IBM Corp. 13 © 2010 IBM Corporation