SlideShare una empresa de Scribd logo
1 de 57
Descargar para leer sin conexión
IBM Software Group




WebSphere Administration
A practical guide to WebSphere scripted administration
options


Andrew Simms, Consulting IT Specialist
IBM SWG WebSphere Services
simmsa@uk.ibm.com




                    WebSphere UK User Group - October 2004
                                                             © 2004 IBM Corporation
IBM Software Group | Server
       WebSphere ApplicationWebSphere software



WebSphere Administration: What we’ll cover




2                                                           © 2004 IBM Corporation
                   WebSphere UK User Group - October 2004
IBM Software Group | Server
          WebSphere ApplicationWebSphere software



What we’re going to do . . .
    Talk through and demonstrate configuration scripts that:
      o set the initial heap and maximum heap size
      o add or change environment entries
      o set the maximum requests per keep-alive value of a particular transport
      o display the changed values
    Talk through and demonstrate application deployment scripts.
    From these hope to see the relative merits of each tool




3                                                                       © 2004 IBM Corporation
                      WebSphere UK User Group - October 2004
IBM Software Group | Server
          WebSphere ApplicationWebSphere software



Tool 1: The Admin Console
    You could avoid writing scripts by using the Admin Console to perform
    configuration tasks and install applications
    If you like typing and don’t make mistakes, this is the tool for you
    Going to:
      o select server1
      o navigate to Process Definition + Java Virtual Machine and change heap sizes
      o navigate to Process Definition + Environment Entries and change envvars
      o navigate to Web Container + HTTP Transports, select the SSL-disabled
        transport, select Custom Properties and add a new property
      o install an application
    Similar navigation on v4
    http://ajsnode1:9090/admin




4                                                                       © 2004 IBM Corporation
                       WebSphere UK User Group - October 2004
IBM Software Group | Server
          WebSphere ApplicationWebSphere software



Admin Console: Comments
    Different look and feel in v4 and v5
    v5.1 & v6 have same look and feel as v5
    Use for ad hoc configuration and operational tasks, e.g.:
      o building a playpen environment
      o examining transactions
      o examining product information
      o controlling trace and examining logs
    Avoid for bulk and repetitive tasks
    Useful early in the test cycle
    Use when some task is just too difficult or expensive to script




5                                                                     © 2004 IBM Corporation
                      WebSphere UK User Group - October 2004
IBM Software Group | Server
          WebSphere ApplicationWebSphere software



So why not just use the Admin Console?
    Consider:
      o you have N1 domains/cells
      o N2 test environments
      o N3 application servers or server groups (clusters) in each domain/cell
      o N4 enterprise applications
      o N5 drops received from development for each app
    If Ni ≈ 1 for each i, then you could use the Admin Console
    When Ni >> 1 then using Admin Console becomes tedious and error prone
    Solution: script domain/cell builds and enterprise application
    installations
    Up front cost but in the long term you save administrator costs and
    provide a more reliable service.




6                                                                         © 2004 IBM Corporation
                      WebSphere UK User Group - October 2004
IBM Software Group | Server
          WebSphere ApplicationWebSphere software



Tool 2: wscp
    What is it?
      o v4’s configuration and runtime scripting language
    Main features:
      o Extension of Tcl, the Tool Command Language
         • Tcl is portable across many platforms
         • Tcl widely used for scripting tasks, not just WebSphere
         • Simple to learn, powerful to use
      o Interactive or scripted access
      o Typically used for bulk and repeatable tasks, e.g.:
         • Add a set of definitions in a repeatable manner
         • Change the value of a system property on all servers in all domains (but
            not easily)
      o Can do most things that can be done in the Admin Console




7                                                                        © 2004 IBM Corporation
                      WebSphere UK User Group - October 2004
IBM Software Group | Server
           WebSphere ApplicationWebSphere software



wscp: Style of usage
    Command line /script
    Three modes of operation:
      o   interactive
      o   single command (-c option)
      o   run a script (-f option)
    Access resources using <class> <verb> <object> <options>, e.g.:
      o   J2CResourceAdapter create       <name>     –attribute {{Name fred}
          {ArchiveFile freda}}
    Names look like this:
      o   /Node:ajsnode/Server:server1/
      o   /JDBCDriver:schumacher/DataSource:button/
    Lots of curly brackets!!, e.g.:
      o   ServerGroup show <name> –attribute EJBServerAttributes
      o   ServerGroup modify <name> -attribute {{EJBServerAttributes
          {WebContainerConfig {SessionManagerConfig {EnableUrlRewriting
          true}}}}}




8                                                                              © 2004 IBM Corporation
                         WebSphere UK User Group - October 2004
IBM Software Group | Server
            WebSphere ApplicationWebSphere software



wscp: Example Code
    Code:
      o sample_wscp.tcl (about 90 lines)
      o sample_wscp_install.tcl (about 20 lines)
    Reset before running:
      o sample_swan_reset_wscp.bat
    Run it:
      o sample_wscp.bat
      o sample_wscp_install.bat




9                                                                © 2004 IBM Corporation
                        WebSphere UK User Group - October 2004
IBM Software Group | Server
           WebSphere ApplicationWebSphere software



Tool 3: XMLConfig
     What is it?
       o v4’s XML configuration utility
     Main features:
       o Private to WebSphere, unlike Tcl
       o Exports full or partial repository to an XML file
       o Imports from XML file with arbitrary substitutions
       o Not interactive (but can be called interactively from wscp)
       o Can create, update or delete objects
       o Can start/stop objects
       o Typically used for repeatable tasks, e.g.:
          • Add a set of definitions in a repeatable manner
       o Can be invoked from Admin Console, shell or wscp




10                                                                     © 2004 IBM Corporation
                       WebSphere UK User Group - October 2004
IBM Software Group | Server
           WebSphere ApplicationWebSphere software



XMLConfig: Style of Usage
     Command
     Run xmlconfig –export to export the entire domain to an XML file
     Run xmlconfig –export –partial <file> to export part of a domain to
     an XML file, where <file> directs what is to be exported
     Edit the generated XML file:
       o remove unwanted bits
       o change values to variable names to allow substitution
     Run xmlconfig –import to import from the XML file to a new or the
     same domain, usually with substitutions
     Can also build the XML file by hand




11                                                               © 2004 IBM Corporation
                       WebSphere UK User Group - October 2004
IBM Software Group | Server
             WebSphere ApplicationWebSphere software



XMLConfig: Example Code
     Code:
       o sample_xmlconfig_partial_export.xml (7 lines)
       o sample_xmlconfig_partial_export_output.xml (c200 lines, generated)
       o sample_xmlconfig_import.xml (50 lines, edited)
       o sample_xmlconfig_partial_export_install.xml (5 lines)
       o sample_xmlconfig_partial_export_output_install.xml (c70 lines, generated
         & edited)
     Reset before running:
       o sample_swan_reset_wscp.bat
     Run it:
       o sample_xmlconfig.bat
       o sample_xmlconfig_install.bat




12                                                                     © 2004 IBM Corporation
                         WebSphere UK User Group - October 2004
IBM Software Group | Server
                WebSphere ApplicationWebSphere software



wscp is better than XMLConfig is better than wscp
                           wscp                                            XMLConfig
     Is a powerful procedural scripting language         Is a utility that allows simple substitutions
     with variables                                      and has limited actions
     Is based on a Java implementation of a popular      Its output is XML, but the utility is unique to
     scripting language (Tcl)                            WebSphere
     Represents WebSphere objects as commands            Places actions in XML attributes (rather like
     (e.g. ApplicationServer) with verbs (e.g.           ANT)
     “start”, “modify”)

     Is a natural choice for doing anything in bulk or   Is a good choice for repetitive tasks where
     repetitive                                          changes are simple substitutions
     Is not dependent on having something built          Is dependent on creating something first
     manually first                                      manually (unless you create the XML by hand)
     Can be used for ad hoc purposes interactively       Export+partial can do some ad hoc tasks
     (but not always easily)




13                                                                                          © 2004 IBM Corporation
                              WebSphere UK User Group - October 2004
IBM Software Group | Server
           WebSphere ApplicationWebSphere software



Scripted options in v5 & v5.1 & v6
     Gone!
     Replacement for wscp: wsadmin
       o But provides a completely different set of objects
       o wscp scripts are not migratable to wsadmin
     Replacement for XMLConfig: nothing
       o Repository now a set of XML files
       o Expectation that customers would copy/edit directories/files
       o Proved too hard
       o Some as-is scripts available on WebSphere Developer Domain for doing
         XMLConfig-like things (v5.1.2)
       o Some more XMLConfig-like things in v6 and beyond




14                                                                      © 2004 IBM Corporation
                       WebSphere UK User Group - October 2004
IBM Software Group | Server
           WebSphere ApplicationWebSphere software



Tool 4: wsadmin
     What is it?
       o v5’s scripting language
     Main features:
       o Uses the Bean Scripting Framework (BSF)
          • Provides access to Java objects and methods from supported scripting
            languages.
          • Architecture for easily incorporating scripting into Java applications
            and applets
          • Applications independent and not bound to a single scripting language
          • Different language scripts can access Java objects using wsadmin
       o Current supported languages for wsadmin:
          • Jacl - Java Command Language based on Tcl scripting
          • Jython – Java implementation of the OO language Python




15                                                                      © 2004 IBM Corporation
                       WebSphere UK User Group - October 2004
IBM Software Group | Server
           WebSphere ApplicationWebSphere software



Tool 4: wsadmin
     How is it different from wscp?
       o The WebSphere objects are completely different from wscp
       o Tcl is easy to learn, but wsadmin is complex
       o Separates static configuration from dynamic changes
     Typically used for bulk and repeatable tasks, e.g.:
       o Add a set of definitions in a repeatable manner
       o Change the value of an environment variable on all servers in all cells
     Can do everything in the Admin Console, but not in a necessarily intuitive
     manner




16                                                                          © 2004 IBM Corporation
                        WebSphere UK User Group - October 2004
IBM Software Group | Server
       WebSphere ApplicationWebSphere software



wsadmin: JMX MBeans
     wsadmin acts as an interface to Java objects for access by scripts
       o Objects communicate with MBeans (JMX management objects)
     Objects perform different operations. There are four built-in objects:
       o $AdminConfig (Jacl) or AdminConfig (Jython)
            • Create or change the WebSphere configuration
       o $AdminApp (Jacl) or AdminApp (Jython)
            • Install, modify, or administer applications
       o $AdminControl (Jacl) or AdminControl (Jython)
            • Work with live running objects and perform traces and data type conversion
       o $Help (Jacl) or Help (Jython)
            • Display general help information and details about which MBeans are running
     Separation between Configuration and Control

                                           pp
                                       minA
                                     Ad            MBean

                                          AdminConfig       MBean
                Script          wsadmin AdminContr
                                                   ol
                                      H
                                       el




                                                            MBean
                                         p




                                                 MBean


17                                                                                          © 2004 IBM Corporation
                         WebSphere UK User Group - October 2004
IBM Software Group | Server
            WebSphere ApplicationWebSphere software



wsadmin: Style of usage
     Command line / script
     Three modes of operation:
       o   interactive
       o   single command (-c option)
       o   run a script (-f option)
     Connect over SOAP or RMI
     Pass language identifier to wsadmin command – Jacl assumed
     Access configuration resources using AdminConfig. In Jacl:
       o   set id [$AdminConfig getid <name>]
       o   $AdminConfig modify $id {{name fred} {desc “fred bloggs”}}
     And in Jython:
       o   id = AdminConfig.getid(<name>)
       o   AdminConfig.modify(id, “[[name fred], [desc ““fred bloggs””]]”
     Configuration names look like this:
       o   /Cell:ajs_cell/Node:ajsnode/Server:server1/
       o   /JDBCProvider:schumacher/DataSource:button/




18                                                                      © 2004 IBM Corporation
                          WebSphere UK User Group - October 2004
IBM Software Group | Server
            WebSphere ApplicationWebSphere software



wsadmin: Style of usage (2)
     Access runtime resources using AdminControl. In Jacl:
       o   set mbeanId [$AdminConfig getObjectName $id]
       o   $AdminControl invoke $mbeanId getState
     And in Jython:
       o   mbeanId = AdminConfig.getObjectName($id)
       o   AdminControl.invoke(mbeanId, getState)
     Runtime names look like this:
       o   WebSphere:platform=common,cell=ajs_cell,version=5.0.1,name=NodeAgen
           t,mbeanIdentifier=NodeAgent,type=NodeAgent,node=ajsnode1,process=no
           deagent




19                                                                   © 2004 IBM Corporation
                        WebSphere UK User Group - October 2004
IBM Software Group | Server
                  WebSphere ApplicationWebSphere software



wsadmin: Some Operations and Functions
     $AdminConfig                   $AdminApp                          $AdminControl              $Help
       o   attributes                  o   deleteUserAndGroupEntries     o   completeObjectName     o   attributes
       o   convertToCluster            o   edit                          o   getAttribute           o   operations
       o   create                      o   editInteractive               o   getAttributes          o   constructors
                                       o   export                        o   getCell                o   description
       o   createClusterMember
                                       o   exportDDL                     o   getConfigId            o   classname
       o   createUsingTemplate
                                       o   install                       o   getHost                o   all
       o   defaults                    o   installInteractive            o   getMBeanCount          o   AdminControl
       o   getid                       o   list                          o   getNode                o   AdminApp
       o   getObjectName               o   listModules                   o   getPort                o   AdminConfig
       o   installResourceAdapter      o   options                       o   getType                o   wsadmin
       o   list                        o   publishWSDL                   o   invoke                 o   message
       o   listTemplates               o   taskInfo                      o   makeObjectName
       o   modify                      o   uninstall                     o   queryNames
       o   parents                                                       o   setAttribute
       o   reset                                                         o   setAttributes
                                                                         o   startServer
       o   save
                                                                         o   stopServer
       o   show
                                                                         o   testConnection
       o   showall                                                       o   trace
       o   showAttribute
       o   types




20                                                                                                         © 2004 IBM Corporation
                                    WebSphere UK User Group - October 2004
IBM Software Group | Server
       WebSphere ApplicationWebSphere software



wsadmin: Miscellaneous
      Commands are case-sensitive
      Configuration changes not persisted until "save" call
      If multiple scripts or clients (Administrative Console) are saving
      configuration changes at the same time, exception thrown on
      Save call
        o No changes will be persisted
      Upon "save" call, validation procedure verifies updates
        o Create two servers with the same name throws exception
      wsadmin -f "xxxxx" much faster than wsadmin -c "xxxxx"
        o Better to run multiple commands in a file than individual commands
        o Call "save" in file periodically to persist configurations updates
           • Avoids no changes being persisted should an exception occur




21                                                                    © 2004 IBM Corporation
                   WebSphere UK User Group - October 2004
IBM Software Group | Server
        WebSphere ApplicationWebSphere software



wsadmin: Installing an Application
       Use $AdminApp
       Can use interactively inside a command
       Can get the configurable options from an EAR file
         o   $AdminApp options myapp.ear
       Then can get the task information for each option:
         o   $AdminApp taskInfo myapp.ear MapWebModToVH
       Could then use this info to help build the relevant options for
       installation:
         o   $AdminApp install myapp.ear {-appname freda -MapWebModToVH
             {{{Default Application} default_app.war,WEB-INF/web.xml
             myvhost}} -<lots of other options . . .>}
       Just as difficult to construct this as in wscp




22                                                                       © 2004 IBM Corporation
                     WebSphere UK User Group - October 2004
IBM Software Group | Server
            WebSphere ApplicationWebSphere software



wsadmin: Example Code
     JACL Code:
       o   sample_wsadmin.tcl (about 90 lines)
       o   sample_wsadmin_install.tcl (about 25 lines)
     Jython Code:
       o   sample_wsadmin.py (about 90 lines)
     Reset before running:
       o   sample_swan_reset_wsadmin.bat
     Run JACL:
       o   sample_wsadmin_jacl.bat
       o   sample_wsadmin_install_jacl.bat
     Reset before running:
       o   sample_swan_reset_wsadmin.bat
     Run Jython:
       o   sample_wsadmin_py.bat




23                                                                 © 2004 IBM Corporation
                          WebSphere UK User Group - October 2004
IBM Software Group | Server
           WebSphere ApplicationWebSphere software



Jacl is better than Jython is better than Jacl
     Not that different
     If you can program in one you can probably program in the other
     Jacl may suit shell script programmers
     Jython may suit those with OO background
     Both take just as much as code as the other in our example




24                                                                © 2004 IBM Corporation
                       WebSphere UK User Group - October 2004
IBM Software Group | Server
           WebSphere ApplicationWebSphere software



Tool 5: ws_ant (ANT)
     What is it?
       o ANT – Java-based, platform-neutral, open source build tool
       o ws_ant: Copy of Apache ANT with task extensions to support WebSphere-
         specific capabilities
     Main Features:
       o Tasks provided include:
          • Install and uninstall applications
          • Start and stop servers
          • Run administration scripts or commands
       o But the admin task is just a call to wsadmin – you still have to write the
         wsadmin code to do the actual configuration
       o Main advantage is ability to build the EAR, run a configuration script and
         then install the EAR, all from a single ws_ant build.xml.




25                                                                          © 2004 IBM Corporation
                        WebSphere UK User Group - October 2004
IBM Software Group | Server
           WebSphere ApplicationWebSphere software



ws_ant: Style of Usage
     Command-oriented
     Specify tasks, targets and dependencies between targets
     Connect over SOAP or RMI
     Pass language identifier to wsadmin command – Jacl assumed




26                                                                © 2004 IBM Corporation
                       WebSphere UK User Group - October 2004
IBM Software Group | Server
             WebSphere ApplicationWebSphere software



ws_ant: Example Code
     Code:
       o build.xml (45 lines)
       o sample.props (20 lines)
     Reset:
       o sample_swan_reset_wsadmin.bat
     Run it:
       o sample_wsant_wsadmin.bat
       o sample_wsant_install.bat




27                                                                © 2004 IBM Corporation
                         WebSphere UK User Group - October 2004
IBM Software Group | Server
            WebSphere ApplicationWebSphere software



Tool 6: WsAdmin Automation Platform (WAP)
     What is it?
       o   Set of utility functions sitting over wsadmin
       o   Eases a lot of wsadmin hassle
     Main features:
       o   Available from IBM Techdocs, the Technical Sales Library
       o   Not supported by IBM: provided “as is”
       o   Greatly simplifies many wsadmin scripting tasks
       o   Provides a library of Tcl procedures for creating, modifying and deleting WebSphere
           objects (e.g. application servers, data sources)
       o   Runs on 5.0 and 5.1
       o   Syntax (on Windows):
            • set WAP_SOURCE=/installed/wap
            • set PATH=%PATH%;%WAP_SOURCE%
            • jwap.bat




28                                                                                 © 2004 IBM Corporation
                           WebSphere UK User Group - October 2004
IBM Software Group | Server
            WebSphere ApplicationWebSphere software



WAP: Style of usage
     Command line / script
     Runs over wsadmin, so:
       o Three modes of operation:
          • interactive
          • single command (-c option)
          • run a script (-f option)
       o Connect over SOAP or RMI
     Jacl only (not Jython)
     Set subsequent commands’ scope:
       o   setNode ajsnode1
       o   setServer server1
     Provides a number of Jacl procedures named:
       o   createXXX, removeXXX, modifyXXX
       o e.g. createCustomService, modifyJDBCProvider
     Pass parameters as dash-options, plus “you-name-it” options

29                                                                 © 2004 IBM Corporation
                        WebSphere UK User Group - October 2004
IBM Software Group | Server
            WebSphere ApplicationWebSphere software



WAP: Style of usage (2)
     Names become simpler (no need for /Cell:xxx/Node:xxx/Server:xxx/)
     Not all documented:
       o   getIDByListing & modifyConfigObject are not documented but very useful
     Mainly aimed at create/modify/delete
       o little support for display & list
       o “list” does not return as Tcl lists so you can’t do “foreach” style processing




30                                                                           © 2004 IBM Corporation
                        WebSphere UK User Group - October 2004
IBM Software Group | Server
             WebSphere ApplicationWebSphere software



WAP: Example Code
     Code:
       o sample_wap.tcl (c90 lines)
     Reset:
       o sample_swan_reset_wsadmin.bat
     Run it:
       o sample_wap.bat




31                                                                © 2004 IBM Corporation
                         WebSphere UK User Group - October 2004
IBM Software Group | Server
            WebSphere ApplicationWebSphere software



WAP: Installing an application

     Use the installApplication command
     Pass customisations in same way as wsadmin’s $AdminApp install:
       installApplication -appname fred -earfile
          /installed/websphere/appserver/base5.1/installableApps/ivtApp.ear 
          {-MapModulesToServers {{{IVT Application} ivt_app.war,WEB-
          INF/web.xml WebSphere:cell=ajs_cell,node=ajsnode1,server=server1}}}

     -interact option to customise by answering questions (couldn’t get this to work)
     Can install then customise afterwards using the editApplication command
     Not really any different from $AdminApp
     About 15 long statements in our example




32                                                                         © 2004 IBM Corporation
                        WebSphere UK User Group - October 2004
IBM Software Group | Server
            WebSphere ApplicationWebSphere software



Tool 7: JMX
     What is it?
       o   Java Management Extensions (JMX) is a framework oriented at managing applications
           and resources (like application servers)
             • Allows for exposing your application to remote or local management tools
             • JMX is a specification oriented to the application and network management
             • Part of J2SE
     Main Features:
       o   Some of the JMX functionality:
            • Allows you to query the configuration settings and change them at runtime
            • Provides services such as monitoring, event notification, timers, ....
            • Allows you to load, initialize, change, and monitor application components and
               resources
       o   Structured in three layers:
            • Instrumentation layer - MBeans
            • Agent layer - MBeanServer and agents
            • Distributed Services (this part is still out of the scope of the current level of the
               specs)
                  JSR-077




33                                                                                    © 2004 IBM Corporation
                           WebSphere UK User Group - October 2004
IBM Software Group | Server
            WebSphere ApplicationWebSphere software



About JMX: How does JMX work?
     Resources are managed by Managed Beans (MBeans)
       o These are simple JavaBeans that perform operational or configuration changes
       on resources
     MBeans provide APIs to the external world to manage its resources
       o Each JMX-enabled JVM contains a MBean Server (Managed Bean Server) that
       registers all the MBeans in the system
            • MBean Server provides access to all of its registered MBeans
       o External programs access MBeans registered on the MBean Server via
       Connectors/Adapters




                           JVM
                                                                     Resources
         External tools
                                 Connector                 MBeans
         and programs                          MBean
                                               Server
                                                            MBeans




34                                                                                © 2004 IBM Corporation
                          WebSphere UK User Group - October 2004
IBM Software Group | Server
            WebSphere ApplicationWebSphere software



JMX Benefits
     Enables Java applications to be managed without heavy investment
       o   Relies on a core managed object server that act as a ‘management agent’
       o   Java application simply needs to embed a managed object server and make some of its
           functionality available as one or several Manageable Beans registered in the object
           server
     Provides a scalable management architecture
       o   Every JMX agent service is an independent module that can be plugged into the
           management agent
     Integrates existing management solutions
       o   JMX smart agents are capable of being managed through HTML browsers or by
           various management protocols such as Web Services, JMS, SNMP, etc.
     Defines only the interfaces necessary for management




35                                                                                   © 2004 IBM Corporation
                          WebSphere UK User Group - October 2004
IBM Software Group | Server
       WebSphere ApplicationWebSphere software



JMX: Architectural Principles
                                  Management Application


                             Connector                Adapter

                                                                             Agent Layer

                                   MBean Server

                                                    Agent         Agent     Agent Services
                                                   Services      Services   (as MBeans)


              Resource 1          Resource 2                    Instrumentation
                MBean               MBean                       Layer
                   Manages               Manages


              Resource 1          Resource 2        Managed Resources
                                                                                     JVM

36                                                                               © 2004 IBM Corporation
                     WebSphere UK User Group - October 2004
IBM Software Group | Server
           WebSphere ApplicationWebSphere software



WebSphere JMX Architecture
        All WebSphere 5.0 processes run the JMX agent
        All WebSphere 5.0 runtime administration is done through JMX operations

             E xternal tools and prog ram s


                                                                                   W ebS phere A pplication
                                            H TTP                                  S e rv er P rocess
                           SNMP
                                             JM X
                             JM X
                                           A dapter       R M I/IIO P
                           A dapter
                                                             JM X
                     SOAP                                 C onnector                           internal
                      JM X                                                                     runtim e
                   C onnector          M B ea n                                                objects
                                       S erver
                                                                 M Beans
                                                                        M B eans
                                                      M B ean
                             M B ean
                                                      P roxy
                             P roxy



                                                                   In te rn al M B e an s reg iste r w ith loca l
      E xternal M B eanS erver                                     M B ea nS e rve r.
                                                                   E xte rn al M B e an s h ave lo ca l proxy to the ir
     Illustrates possibilities or future                           M B ea nS e rve r. P roxy registe rs w ith loca l
     plans                                                         M B ea nS e rve r.


37                                                                                                                        © 2004 IBM Corporation
                                 WebSphere UK User Group - October 2004
IBM Software Group | Server
       WebSphere ApplicationWebSphere software



WebSphere Distributed Administration
                                                                                                                                 Clients, Multi-cell
                                                                                                                                mgmt, & other EMS
                                                                                                                                   (Tivoli, BMC)
                                                               Deployment Mgr

                                                                                                    JMX
                                                                                   MBean          Connector
                                                                                   Server
                                                                                                         MBeans
                                                                                                               MBeans
                                                                                            MBean
                                                                          MBean
                                                                                            Proxy
                                                                          Proxy

                              Node Mgr
                                                                                                                                      Config Repository
                                                                                                                                           Service
                                                                JMX
                                                    MBean     Connector
                                                    Server                                                            To Other
                                                                                                                       Nodes               Master
                                                                     MBeans
                                                                                                                                            Master
                                                                                                                                            files
                                                                          MBeans                                                                Master
                                                                                                                                                files
          To Other App                                       MBean                                                                                 files
                                            MBean
             Servers                                         Proxy
                                            Proxy


                App Server                                                                                Config Distribution
                                                                                                               Service

                                         JMX
                         tmx4j         Connector                                       config
                         MBean                                                          files
                         MBean
                         Server
                         Server


                                  MBeans
                                                                                      EAR files
                                       MBeans




38                                                                                                                                                 © 2004 IBM Corporation
                          WebSphere UK User Group - October 2004
IBM Software Group | Server
          WebSphere ApplicationWebSphere software



JMX: Some MBeans
     Cell                                    J2CConnectionFactory
     Node                                    JavaMailProvider
     ManagedObject                           MailSession
     ApplicationServer                       URLProvider
     ServerCluster                           URL
     JMSServer                               JDBCProvider
     Application, EJBModuleConfig,           DataSource, WAS40DataSource
     WebModuleConfig                         ConnectionPool
     EJBContainer, WebContainer              ORBPlugin
     ListenerPort                            JavaVirtualMachine
     JMSProvider                             SecurityPermission
     JMSConnectionFactory                    NameServer
     JMSDestination                          LocalOSUserRegistry
     J2CResourceAdapter


                                                         These Mbeans are built
                                                         into WebSphere – 224
                                                             of them in v5.1

39                                                                      © 2004 IBM Corporation
                      WebSphere UK User Group - October 2004
IBM Software Group | Server
            WebSphere ApplicationWebSphere software



How Can Customers Use JMX?
     All WAS 5.0 Admin client programs use JMX
       o   Web Admin console
       o   wsadmin scripting
       o   Admin Client Java API
       o   Included in both Base App Server package and Advanced Deployment

     Use the APIs to control WebSphere runtime
     Extend the set of managed objects with custom JMX MBeans
     Attach Admin clients to Cell Manager in order to access entire Admin domain
     Node Agents start & monitor individual App Servers




40                                                                            © 2004 IBM Corporation
                          WebSphere UK User Group - October 2004
IBM Software Group | Server
             WebSphere ApplicationWebSphere software



JMX: Example Code
     Code:
       o sample_jmx.java (c160 lines)
     Reset:
       o sample_swan_reset_wsadmin.bat
     Run it:
       o sample_jmx.bat




41                                                                © 2004 IBM Corporation
                         WebSphere UK User Group - October 2004
IBM Software Group | Server
           WebSphere ApplicationWebSphere software



Tool 8: SWAN
     What is it?
       o Simplified WebSphere AdministratioN
       o Greatly eases wscp and wsadmin hassle
     Main features:
       o Runs in wscp and wsadmin
       o Obtainable from the author
       o Runs on WebSphere v4, v5, v5.1
       o Runs on Windows, AIX (probably all UNIXes) and z/OS
       o Simplifies writing wscp and wsadmin scripts
       o Simplifies interactive access
       o Provides a high degree of portability between WebSphere versions


                                      SWAN

                              wscp            wsadmin

42                                                                     © 2004 IBM Corporation
                       WebSphere UK User Group - October 2004
IBM Software Group | Server
          WebSphere ApplicationWebSphere software



SWAN Syntax
     <class> <verb> [<object>] [<options>] [<attributes>]
     Examples:
       o appserv list
       o dsource list –format -short
       o jcafact delete jack –ra jill
       o resadapt create ada –rarfile /usr/product/somefile.rar
       o cluster show clouseau +maxheap +minheap
       o appserv show jeeves +webhttpbacklog –constraint {Host * Port 9080}
       o appserv modify jeeves +webhttpbacklog 53 –constraint {Host * Port 9080}
       o appserv modify –constraint {Host * Port 9080} +webhttpbacklog 57 jeeves
       o jmsdest exists jack –jmsprov jill




43                                                                    © 2004 IBM Corporation
                        WebSphere UK User Group - October 2004
IBM Software Group | Server
          WebSphere ApplicationWebSphere software



SWAN is better than wscp/wsadmin is better than SWAN

     In wscp/wsadmin you have to know how to reach a particular attribute
       o Not a problem for many cases
           • e.g. JDBCProvider has no attribute hierarchy
       o Big problem for server groups and application servers
           • have to understand the hierarchy to navigate through it
       o SWAN solves this by hiding the hierarchy
     In wscp/wsadmin you have long names:
       o Long names for configuration and runtime objects
       o Much of which is probably constant in your script (e.g. cell name & node
         name)
       o SWAN solves this by setting a scope and providing the –short option
     In wscp/wsadmin you need long Tcl lists to set attributes:
       o SWAN solves this because it has flattened the attribute hierarchy
     wscp scripts cannot be migrated to wsadmin without complete rewriting:
       o But wscp scripts written to use the SWAN syntax will be migratable
       o Some changes will be needed though because of differences in v5

44                                                                       © 2004 IBM Corporation
                      WebSphere UK User Group - October 2004
IBM Software Group | Server
           WebSphere ApplicationWebSphere software



SWAN is better than wscp/wsadmin is better than SWAN

     SWAN does not implement all of the object types:
       o There are 224 in wsadmin in v5.1
       o SWAN implements the most commonly used object types
       o SWAN can be extended to implement the others – easily if they follow the
         patterns of the current SWAN types
       o You can always use the wsadmin types directly in your scripts
     SWAN is not supported by IBM:
       o SWAN is provided as-is
       o Whereas wscp and wsadmin are supported




45                                                                       © 2004 IBM Corporation
                       WebSphere UK User Group - October 2004
IBM Software Group | Server
         WebSphere ApplicationWebSphere software



SWAN: Further Examples

     Getting help:
       o help
       o dsource help
       o jdbcdrv help create
       o jcafact attributes
       o jcafact attributes -details
       o cluster create clouseau -member sellers –vertical 3
       o cluster showmembers clouseau
       o appserv makecluster jeeves –cluster wooster
       o cluster start wooster
       o cluster stop wooster -force




46                                                             © 2004 IBM Corporation
                     WebSphere UK User Group - October 2004
IBM Software Group | Server
      WebSphere ApplicationWebSphere software



SWAN: Coverage
         appserv       Application servers
         cell          Domain or cell
         cluster       Clusters (server groups)
         dsource       Data sources
         entapp        Enterprise applications
         jcafact       J2C connection factories
         jdbcdrv       JDBC drivers (providers)
         jmsdest       JMS destinations
         jmsfact       JMS connection factories
         jmsprov       Generic JMS providers
         mail          Java mail
         nagent        Node agents
         resadapt      Resource adapters
         vhost         Virtual hosts

47                                                           © 2004 IBM Corporation
                    WebSphere UK User Group - October 2004
IBM Software Group | Server
          WebSphere ApplicationWebSphere software



Installing enterprise applications using SWAN
     Packager or Deployer runs "entapp produceaid":
       o Creates an XML file called an Enterprise Archive Application Installation
         Descriptor (EAR AID)
       o EAR AID houses all of the deployable options from the EAR file's
         deployment descriptors
     Intention is that the Deployer then edits this file using an XML or text
     editor to set appropriate values (as would be done through the console)
     Deployer then runs "entapp create":
       o takes the EAR file and uses the AID file to install the enterprise app
       o same procedure whether v4 or v5, but different EAR AID file
     Non-SWAN software available to produce an Excel spreadsheet
     containing the EAR AID file, and to transform it back
       o makes it easier to edit




48                                                                       © 2004 IBM Corporation
                      WebSphere UK User Group - October 2004
IBM Software Group | Server
             WebSphere ApplicationWebSphere software



SWAN: Example Code
     Code:
       o sample_swan.tcl (25 lines, does both v4 and v5)
     Reset:
       o sample_swan_reset_wscp.bat
       o sample_swan_reset_wsadmin.bat
     Run it:
       o sample_swan_wscp.bat
       o sample_swan_wsadmin.bat




49                                                                © 2004 IBM Corporation
                         WebSphere UK User Group - October 2004
IBM Software Group | Server
        WebSphere ApplicationWebSphere software



SWAN Internals: Code Size
     File Type                               # lines non-commentary code

     Configuration files                     800

     v4 code                                 3700

     v5 code                                 3600

     Common v4 code                          1400

     Common v5 code                          900

     Other common code                       1500

     Total non-commentary code               11,400

     Plus comment lines                      4,300

     Includes debug/trace code               1000



50                                                                   © 2004 IBM Corporation
                     WebSphere UK User Group - October 2004
IBM Software Group | Server
                     WebSphere ApplicationWebSphere software



Configuration & Deployment Using SWAN (1)
           Default
     Configuration
     Spreadsheet
                                                                            Other      Release
                                                .ear           .zip        Artefacts    Note
               1

                                                                       2
                        Edit in Excel

                                                                      PVCS




          Project-Specific
          Configuration Spreadsheet
          iwf_acm_iiw_app.cfg.xls

51                                                                                       © 2004 IBM Corporation
                                 WebSphere UK User Group - October 2004
IBM Software Group | Server
        WebSphere ApplicationWebSphere software



Configuration & Deployment Using SWAN (2)
                                        entapp                  EAR
                        .ear
     PVCS
                                4     produceaid                AID
               3
                                                           5
                                                         Generate
                                                        Spreadsheet
                                                                           AID
                                                                           Spreadsheet
                                         6                                 iwf_acm_iiw_ap
                                                                           p.xls

                                     Edit in Excel


            Project-Specific
            Configuration                              Edited
            Spreadsheet                                Project-Specific
                                                       Configuration
                                                       Spreadsheet


52                                                                        © 2004 IBM Corporation
                       WebSphere UK User Group - October 2004
IBM Software Group | Server
                 WebSphere ApplicationWebSphere software



Configuration & Deployment Using SWAN (3)

                                                     7
                                   Generator


     Project-Specific
     Configuration                  Configuration
                                   Configuration
                                  Configuration
     Spreadsheet                       scripts
                                      scripts
                                     scripts


                                                 9

                                       zip                                      Package                PVCS


                                                                    Generator


                            Other            Release       Edited       8                      AID
      .ear        .zip     Artefacts          Note          EAR                                Spreadsheet
                                                            AID
53                                                                                        © 2004 IBM Corporation
                             WebSphere UK User Group - October 2004
IBM Software Group | Server
                  WebSphere ApplicationWebSphere software



Configuration & Deployment Using SWAN (4)
                     10         Tivoli Software
     Package                      Distribution                               Node A


                                                                           14
                                         11
                               Package
                                                                                    i..edApps
                               on node                                                 EAR
                                  A



                   Edited        Configuration
                                Configuration
                               Configuration      12
            13                      scripts
                                                                                Tivoli Software
     .ear           EAR            scripts
                                  scripts               Configurator
                                                                                 Distribution
                    AID




                                                                                      15
                                      WebSphere
                                       Domain
               entapp create

                                                              Node B     Node C            Node D
54                                                                                    © 2004 IBM Corporation
                                WebSphere UK User Group - October 2004
IBM Software Group | Server
           WebSphere ApplicationWebSphere software



 Tool 9: J2EE 1.4 Management and Deployment
     What is it?
       o J2EE 1.4 APIs for product-independent configuration & deployment
     Main features:
       o No standard up to J2EE 1.3
       o J2EE 1.4 (WebSphere v6) introduces:
          • J2EE Management Specification (JSR-77)
               • ability to configure and control J2EE objects in a Java-application-
                 server-independent manner
          • J2EE Deployment Specification (JSR-88)
               • ability to install enterprise applications in a Java-application-
                 server-independent manner
          • wsadmin still works
          • write programs to these specs to lessen vendor lock-in
          • many configuration/deployment possibilities:
               • Admin Console
               • wsadmin scripts in Jacl and Jython
               • Programs written to the JMX API
               • Programs written to JSR-77 & JSR-88

55                                                                        © 2004 IBM Corporation
                       WebSphere UK User Group - October 2004
IBM Software Group | Server
          WebSphere ApplicationWebSphere software



Comparison: Lines of code

                       wscp   XmlConfig       wsadmin     wsadmin   ws_ant   JMX    SWAN
                                              Jacl        Jython

     Heap sizes           2                          4          6      45      9           2
                                                                     (plus
     Environment         16            60            24        19    wsad     35           6
                                                                      min)
     Transport           43                          23         ?             40           3

     Display             30              8           30         ?             50           6
                              (but displays
                               everything)

     Installation        20            75            25         ?              ?           4




56                                                                                 © 2004 IBM Corporation
                      WebSphere UK User Group - October 2004
IBM Software Group | Server
           WebSphere ApplicationWebSphere software



Summary
     References
      o “IBM WebSphere System Administration” by Leigh Williamson et al (ISBN: 0-
        13-144604-5)
      o “IBM WebSphere Deployment and Advanced Configuration” by
        Barcia/Hines/Alcott/Botzum (ISBN: 0-13-146862-6)
      o WAP:
          • http://www-1.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/PRS981
      o SWAN:
         • simmsa@uk.ibm.com




57                                                                   © 2004 IBM Corporation
                       WebSphere UK User Group - October 2004

Más contenido relacionado

La actualidad más candente

10 Reasons ColdFusion PDFs should rule the world
10 Reasons ColdFusion PDFs should rule the world10 Reasons ColdFusion PDFs should rule the world
10 Reasons ColdFusion PDFs should rule the worldColdFusionConference
 
Load Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusionLoad Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusionColdFusionConference
 
Jazoon2010 - Edgar Silva - Open source SOA on Steroids
Jazoon2010 - Edgar Silva - Open source SOA on SteroidsJazoon2010 - Edgar Silva - Open source SOA on Steroids
Jazoon2010 - Edgar Silva - Open source SOA on SteroidsEdgar Silva
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuseejlp12
 
[AWS Dev Day] 앱 현대화 | AWS Fargate를 사용한 서버리스 컨테이너 활용 하기 - 삼성전자 개발자 포털 사례 - 정영준...
[AWS Dev Day] 앱 현대화 | AWS Fargate를 사용한 서버리스 컨테이너 활용 하기 - 삼성전자 개발자 포털 사례 - 정영준...[AWS Dev Day] 앱 현대화 | AWS Fargate를 사용한 서버리스 컨테이너 활용 하기 - 삼성전자 개발자 포털 사례 - 정영준...
[AWS Dev Day] 앱 현대화 | AWS Fargate를 사용한 서버리스 컨테이너 활용 하기 - 삼성전자 개발자 포털 사례 - 정영준...Amazon Web Services Korea
 
VMworld 2013: Virtualizing and Tuning Large Scale Java Platforms
VMworld 2013: Virtualizing and Tuning Large Scale Java Platforms VMworld 2013: Virtualizing and Tuning Large Scale Java Platforms
VMworld 2013: Virtualizing and Tuning Large Scale Java Platforms VMworld
 
What is new in .NET 4.5
What is new in .NET 4.5What is new in .NET 4.5
What is new in .NET 4.5Robert MacLean
 
Domino OSGi Development
Domino OSGi DevelopmentDomino OSGi Development
Domino OSGi DevelopmentPaul Fiore
 
Linux container & docker
Linux container & dockerLinux container & docker
Linux container & dockerejlp12
 
Managing Docker & ECS Based Applications with AWS Elastic Beanstalk - DevDay ...
Managing Docker & ECS Based Applications with AWS Elastic Beanstalk - DevDay ...Managing Docker & ECS Based Applications with AWS Elastic Beanstalk - DevDay ...
Managing Docker & ECS Based Applications with AWS Elastic Beanstalk - DevDay ...Amazon Web Services
 
JBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the UnionJBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the UnionDimitris Andreadis
 
WebSphere Application Server Topology Options
WebSphere Application Server Topology OptionsWebSphere Application Server Topology Options
WebSphere Application Server Topology Optionsejlp12
 
Scale ColdFusion with Terracotta Distributed Caching for Ehchache
Scale ColdFusion with Terracotta Distributed Caching for EhchacheScale ColdFusion with Terracotta Distributed Caching for Ehchache
Scale ColdFusion with Terracotta Distributed Caching for EhchacheColdFusionConference
 
When Two Worlds Collide: Java and Ruby in the Enterprise
When Two Worlds Collide: Java and Ruby in the EnterpriseWhen Two Worlds Collide: Java and Ruby in the Enterprise
When Two Worlds Collide: Java and Ruby in the Enterprisebenbrowning
 
Scaling Rails With Torquebox Presented at JUDCon:2011 Boston
Scaling Rails With Torquebox Presented at JUDCon:2011 BostonScaling Rails With Torquebox Presented at JUDCon:2011 Boston
Scaling Rails With Torquebox Presented at JUDCon:2011 Bostonbenbrowning
 

La actualidad más candente (20)

10 Reasons ColdFusion PDFs should rule the world
10 Reasons ColdFusion PDFs should rule the world10 Reasons ColdFusion PDFs should rule the world
10 Reasons ColdFusion PDFs should rule the world
 
Load Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusionLoad Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusion
 
Hidden Gems in ColdFusion 2016
Hidden Gems in ColdFusion 2016Hidden Gems in ColdFusion 2016
Hidden Gems in ColdFusion 2016
 
Symfony aws
Symfony awsSymfony aws
Symfony aws
 
Jazoon2010 - Edgar Silva - Open source SOA on Steroids
Jazoon2010 - Edgar Silva - Open source SOA on SteroidsJazoon2010 - Edgar Silva - Open source SOA on Steroids
Jazoon2010 - Edgar Silva - Open source SOA on Steroids
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
 
[AWS Dev Day] 앱 현대화 | AWS Fargate를 사용한 서버리스 컨테이너 활용 하기 - 삼성전자 개발자 포털 사례 - 정영준...
[AWS Dev Day] 앱 현대화 | AWS Fargate를 사용한 서버리스 컨테이너 활용 하기 - 삼성전자 개발자 포털 사례 - 정영준...[AWS Dev Day] 앱 현대화 | AWS Fargate를 사용한 서버리스 컨테이너 활용 하기 - 삼성전자 개발자 포털 사례 - 정영준...
[AWS Dev Day] 앱 현대화 | AWS Fargate를 사용한 서버리스 컨테이너 활용 하기 - 삼성전자 개발자 포털 사례 - 정영준...
 
Hidden gems in cf2016
Hidden gems in cf2016Hidden gems in cf2016
Hidden gems in cf2016
 
Composer
ComposerComposer
Composer
 
VMworld 2013: Virtualizing and Tuning Large Scale Java Platforms
VMworld 2013: Virtualizing and Tuning Large Scale Java Platforms VMworld 2013: Virtualizing and Tuning Large Scale Java Platforms
VMworld 2013: Virtualizing and Tuning Large Scale Java Platforms
 
Corley scalability
Corley scalabilityCorley scalability
Corley scalability
 
What is new in .NET 4.5
What is new in .NET 4.5What is new in .NET 4.5
What is new in .NET 4.5
 
Domino OSGi Development
Domino OSGi DevelopmentDomino OSGi Development
Domino OSGi Development
 
Linux container & docker
Linux container & dockerLinux container & docker
Linux container & docker
 
Managing Docker & ECS Based Applications with AWS Elastic Beanstalk - DevDay ...
Managing Docker & ECS Based Applications with AWS Elastic Beanstalk - DevDay ...Managing Docker & ECS Based Applications with AWS Elastic Beanstalk - DevDay ...
Managing Docker & ECS Based Applications with AWS Elastic Beanstalk - DevDay ...
 
JBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the UnionJBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the Union
 
WebSphere Application Server Topology Options
WebSphere Application Server Topology OptionsWebSphere Application Server Topology Options
WebSphere Application Server Topology Options
 
Scale ColdFusion with Terracotta Distributed Caching for Ehchache
Scale ColdFusion with Terracotta Distributed Caching for EhchacheScale ColdFusion with Terracotta Distributed Caching for Ehchache
Scale ColdFusion with Terracotta Distributed Caching for Ehchache
 
When Two Worlds Collide: Java and Ruby in the Enterprise
When Two Worlds Collide: Java and Ruby in the EnterpriseWhen Two Worlds Collide: Java and Ruby in the Enterprise
When Two Worlds Collide: Java and Ruby in the Enterprise
 
Scaling Rails With Torquebox Presented at JUDCon:2011 Boston
Scaling Rails With Torquebox Presented at JUDCon:2011 BostonScaling Rails With Torquebox Presented at JUDCon:2011 Boston
Scaling Rails With Torquebox Presented at JUDCon:2011 Boston
 

Similar a Web sphere administration

Ansible & Salt - Vincent Boon
Ansible & Salt - Vincent BoonAnsible & Salt - Vincent Boon
Ansible & Salt - Vincent BoonMyNOG
 
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
2016 - Easing Your Way Into Docker: Lessons From a Journey to Productiondevopsdaysaustin
 
Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014André Rømcke
 
Wsadminlib.wasug.2011 0125-0726
Wsadminlib.wasug.2011 0125-0726Wsadminlib.wasug.2011 0125-0726
Wsadminlib.wasug.2011 0125-0726Rohit Kelapure
 
Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6Ido Flatow
 
Ibm web sphere application server interview questions
Ibm web sphere application server interview questionsIbm web sphere application server interview questions
Ibm web sphere application server interview questionspraveen_guda
 
01 overview-servlets-and-environment-setup
01 overview-servlets-and-environment-setup01 overview-servlets-and-environment-setup
01 overview-servlets-and-environment-setupdhrubo kayal
 
WebLogic JMX for DevOps
WebLogic JMX for DevOpsWebLogic JMX for DevOps
WebLogic JMX for DevOpsFrank Munz
 
Chris Omland - AWS Code Deploy - BSDC 2016
Chris Omland - AWS Code Deploy - BSDC 2016Chris Omland - AWS Code Deploy - BSDC 2016
Chris Omland - AWS Code Deploy - BSDC 2016roblund
 
Docker presentasjon java bin
Docker presentasjon java binDocker presentasjon java bin
Docker presentasjon java binOlve Hansen
 
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?Zend by Rogue Wave Software
 
Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administratorsSharon James
 
IBM WebSphere Application Server Update - Technical University (March 2015)
IBM WebSphere Application Server Update - Technical University (March 2015)IBM WebSphere Application Server Update - Technical University (March 2015)
IBM WebSphere Application Server Update - Technical University (March 2015)Ian Robinson
 
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the Cloud
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the CloudAAI-1445 Managing Dynamic Workloads with WebSphere ND and in the Cloud
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the CloudWASdev Community
 
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 lessDavalen LLC
 

Similar a Web sphere administration (20)

Ansible & Salt - Vincent Boon
Ansible & Salt - Vincent BoonAnsible & Salt - Vincent Boon
Ansible & Salt - Vincent Boon
 
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
2016 - Easing Your Way Into Docker: Lessons From a Journey to Production
 
Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014Dockerize your Symfony application - Symfony Live NYC 2014
Dockerize your Symfony application - Symfony Live NYC 2014
 
Wsadminlib.wasug.2011 0125-0726
Wsadminlib.wasug.2011 0125-0726Wsadminlib.wasug.2011 0125-0726
Wsadminlib.wasug.2011 0125-0726
 
Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6Learning ASP.NET 5 and MVC 6
Learning ASP.NET 5 and MVC 6
 
Ibm web sphere application server interview questions
Ibm web sphere application server interview questionsIbm web sphere application server interview questions
Ibm web sphere application server interview questions
 
Avik_RailsTutorial
Avik_RailsTutorialAvik_RailsTutorial
Avik_RailsTutorial
 
Avik_RailsTutorial
Avik_RailsTutorialAvik_RailsTutorial
Avik_RailsTutorial
 
WLS
WLSWLS
WLS
 
Apache servicemix1
Apache servicemix1Apache servicemix1
Apache servicemix1
 
01 overview-servlets-and-environment-setup
01 overview-servlets-and-environment-setup01 overview-servlets-and-environment-setup
01 overview-servlets-and-environment-setup
 
WebLogic JMX for DevOps
WebLogic JMX for DevOpsWebLogic JMX for DevOps
WebLogic JMX for DevOps
 
Chris Omland - AWS Code Deploy - BSDC 2016
Chris Omland - AWS Code Deploy - BSDC 2016Chris Omland - AWS Code Deploy - BSDC 2016
Chris Omland - AWS Code Deploy - BSDC 2016
 
Docker presentasjon java bin
Docker presentasjon java binDocker presentasjon java bin
Docker presentasjon java bin
 
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?
 
Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administrators
 
IBM WebSphere Application Server Update - Technical University (March 2015)
IBM WebSphere Application Server Update - Technical University (March 2015)IBM WebSphere Application Server Update - Technical University (March 2015)
IBM WebSphere Application Server Update - Technical University (March 2015)
 
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the Cloud
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the CloudAAI-1445 Managing Dynamic Workloads with WebSphere ND and in the Cloud
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the Cloud
 
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
 
DevOps for database
DevOps for databaseDevOps for database
DevOps for database
 

Último

HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxUmeshTimilsina1
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...Amil baba
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 

Último (20)

HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 

Web sphere administration

  • 1. IBM Software Group WebSphere Administration A practical guide to WebSphere scripted administration options Andrew Simms, Consulting IT Specialist IBM SWG WebSphere Services simmsa@uk.ibm.com WebSphere UK User Group - October 2004 © 2004 IBM Corporation
  • 2. IBM Software Group | Server WebSphere ApplicationWebSphere software WebSphere Administration: What we’ll cover 2 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 3. IBM Software Group | Server WebSphere ApplicationWebSphere software What we’re going to do . . . Talk through and demonstrate configuration scripts that: o set the initial heap and maximum heap size o add or change environment entries o set the maximum requests per keep-alive value of a particular transport o display the changed values Talk through and demonstrate application deployment scripts. From these hope to see the relative merits of each tool 3 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 4. IBM Software Group | Server WebSphere ApplicationWebSphere software Tool 1: The Admin Console You could avoid writing scripts by using the Admin Console to perform configuration tasks and install applications If you like typing and don’t make mistakes, this is the tool for you Going to: o select server1 o navigate to Process Definition + Java Virtual Machine and change heap sizes o navigate to Process Definition + Environment Entries and change envvars o navigate to Web Container + HTTP Transports, select the SSL-disabled transport, select Custom Properties and add a new property o install an application Similar navigation on v4 http://ajsnode1:9090/admin 4 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 5. IBM Software Group | Server WebSphere ApplicationWebSphere software Admin Console: Comments Different look and feel in v4 and v5 v5.1 & v6 have same look and feel as v5 Use for ad hoc configuration and operational tasks, e.g.: o building a playpen environment o examining transactions o examining product information o controlling trace and examining logs Avoid for bulk and repetitive tasks Useful early in the test cycle Use when some task is just too difficult or expensive to script 5 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 6. IBM Software Group | Server WebSphere ApplicationWebSphere software So why not just use the Admin Console? Consider: o you have N1 domains/cells o N2 test environments o N3 application servers or server groups (clusters) in each domain/cell o N4 enterprise applications o N5 drops received from development for each app If Ni ≈ 1 for each i, then you could use the Admin Console When Ni >> 1 then using Admin Console becomes tedious and error prone Solution: script domain/cell builds and enterprise application installations Up front cost but in the long term you save administrator costs and provide a more reliable service. 6 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 7. IBM Software Group | Server WebSphere ApplicationWebSphere software Tool 2: wscp What is it? o v4’s configuration and runtime scripting language Main features: o Extension of Tcl, the Tool Command Language • Tcl is portable across many platforms • Tcl widely used for scripting tasks, not just WebSphere • Simple to learn, powerful to use o Interactive or scripted access o Typically used for bulk and repeatable tasks, e.g.: • Add a set of definitions in a repeatable manner • Change the value of a system property on all servers in all domains (but not easily) o Can do most things that can be done in the Admin Console 7 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 8. IBM Software Group | Server WebSphere ApplicationWebSphere software wscp: Style of usage Command line /script Three modes of operation: o interactive o single command (-c option) o run a script (-f option) Access resources using <class> <verb> <object> <options>, e.g.: o J2CResourceAdapter create <name> –attribute {{Name fred} {ArchiveFile freda}} Names look like this: o /Node:ajsnode/Server:server1/ o /JDBCDriver:schumacher/DataSource:button/ Lots of curly brackets!!, e.g.: o ServerGroup show <name> –attribute EJBServerAttributes o ServerGroup modify <name> -attribute {{EJBServerAttributes {WebContainerConfig {SessionManagerConfig {EnableUrlRewriting true}}}}} 8 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 9. IBM Software Group | Server WebSphere ApplicationWebSphere software wscp: Example Code Code: o sample_wscp.tcl (about 90 lines) o sample_wscp_install.tcl (about 20 lines) Reset before running: o sample_swan_reset_wscp.bat Run it: o sample_wscp.bat o sample_wscp_install.bat 9 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 10. IBM Software Group | Server WebSphere ApplicationWebSphere software Tool 3: XMLConfig What is it? o v4’s XML configuration utility Main features: o Private to WebSphere, unlike Tcl o Exports full or partial repository to an XML file o Imports from XML file with arbitrary substitutions o Not interactive (but can be called interactively from wscp) o Can create, update or delete objects o Can start/stop objects o Typically used for repeatable tasks, e.g.: • Add a set of definitions in a repeatable manner o Can be invoked from Admin Console, shell or wscp 10 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 11. IBM Software Group | Server WebSphere ApplicationWebSphere software XMLConfig: Style of Usage Command Run xmlconfig –export to export the entire domain to an XML file Run xmlconfig –export –partial <file> to export part of a domain to an XML file, where <file> directs what is to be exported Edit the generated XML file: o remove unwanted bits o change values to variable names to allow substitution Run xmlconfig –import to import from the XML file to a new or the same domain, usually with substitutions Can also build the XML file by hand 11 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 12. IBM Software Group | Server WebSphere ApplicationWebSphere software XMLConfig: Example Code Code: o sample_xmlconfig_partial_export.xml (7 lines) o sample_xmlconfig_partial_export_output.xml (c200 lines, generated) o sample_xmlconfig_import.xml (50 lines, edited) o sample_xmlconfig_partial_export_install.xml (5 lines) o sample_xmlconfig_partial_export_output_install.xml (c70 lines, generated & edited) Reset before running: o sample_swan_reset_wscp.bat Run it: o sample_xmlconfig.bat o sample_xmlconfig_install.bat 12 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 13. IBM Software Group | Server WebSphere ApplicationWebSphere software wscp is better than XMLConfig is better than wscp wscp XMLConfig Is a powerful procedural scripting language Is a utility that allows simple substitutions with variables and has limited actions Is based on a Java implementation of a popular Its output is XML, but the utility is unique to scripting language (Tcl) WebSphere Represents WebSphere objects as commands Places actions in XML attributes (rather like (e.g. ApplicationServer) with verbs (e.g. ANT) “start”, “modify”) Is a natural choice for doing anything in bulk or Is a good choice for repetitive tasks where repetitive changes are simple substitutions Is not dependent on having something built Is dependent on creating something first manually first manually (unless you create the XML by hand) Can be used for ad hoc purposes interactively Export+partial can do some ad hoc tasks (but not always easily) 13 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 14. IBM Software Group | Server WebSphere ApplicationWebSphere software Scripted options in v5 & v5.1 & v6 Gone! Replacement for wscp: wsadmin o But provides a completely different set of objects o wscp scripts are not migratable to wsadmin Replacement for XMLConfig: nothing o Repository now a set of XML files o Expectation that customers would copy/edit directories/files o Proved too hard o Some as-is scripts available on WebSphere Developer Domain for doing XMLConfig-like things (v5.1.2) o Some more XMLConfig-like things in v6 and beyond 14 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 15. IBM Software Group | Server WebSphere ApplicationWebSphere software Tool 4: wsadmin What is it? o v5’s scripting language Main features: o Uses the Bean Scripting Framework (BSF) • Provides access to Java objects and methods from supported scripting languages. • Architecture for easily incorporating scripting into Java applications and applets • Applications independent and not bound to a single scripting language • Different language scripts can access Java objects using wsadmin o Current supported languages for wsadmin: • Jacl - Java Command Language based on Tcl scripting • Jython – Java implementation of the OO language Python 15 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 16. IBM Software Group | Server WebSphere ApplicationWebSphere software Tool 4: wsadmin How is it different from wscp? o The WebSphere objects are completely different from wscp o Tcl is easy to learn, but wsadmin is complex o Separates static configuration from dynamic changes Typically used for bulk and repeatable tasks, e.g.: o Add a set of definitions in a repeatable manner o Change the value of an environment variable on all servers in all cells Can do everything in the Admin Console, but not in a necessarily intuitive manner 16 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 17. IBM Software Group | Server WebSphere ApplicationWebSphere software wsadmin: JMX MBeans wsadmin acts as an interface to Java objects for access by scripts o Objects communicate with MBeans (JMX management objects) Objects perform different operations. There are four built-in objects: o $AdminConfig (Jacl) or AdminConfig (Jython) • Create or change the WebSphere configuration o $AdminApp (Jacl) or AdminApp (Jython) • Install, modify, or administer applications o $AdminControl (Jacl) or AdminControl (Jython) • Work with live running objects and perform traces and data type conversion o $Help (Jacl) or Help (Jython) • Display general help information and details about which MBeans are running Separation between Configuration and Control pp minA Ad MBean AdminConfig MBean Script wsadmin AdminContr ol H el MBean p MBean 17 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 18. IBM Software Group | Server WebSphere ApplicationWebSphere software wsadmin: Style of usage Command line / script Three modes of operation: o interactive o single command (-c option) o run a script (-f option) Connect over SOAP or RMI Pass language identifier to wsadmin command – Jacl assumed Access configuration resources using AdminConfig. In Jacl: o set id [$AdminConfig getid <name>] o $AdminConfig modify $id {{name fred} {desc “fred bloggs”}} And in Jython: o id = AdminConfig.getid(<name>) o AdminConfig.modify(id, “[[name fred], [desc ““fred bloggs””]]” Configuration names look like this: o /Cell:ajs_cell/Node:ajsnode/Server:server1/ o /JDBCProvider:schumacher/DataSource:button/ 18 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 19. IBM Software Group | Server WebSphere ApplicationWebSphere software wsadmin: Style of usage (2) Access runtime resources using AdminControl. In Jacl: o set mbeanId [$AdminConfig getObjectName $id] o $AdminControl invoke $mbeanId getState And in Jython: o mbeanId = AdminConfig.getObjectName($id) o AdminControl.invoke(mbeanId, getState) Runtime names look like this: o WebSphere:platform=common,cell=ajs_cell,version=5.0.1,name=NodeAgen t,mbeanIdentifier=NodeAgent,type=NodeAgent,node=ajsnode1,process=no deagent 19 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 20. IBM Software Group | Server WebSphere ApplicationWebSphere software wsadmin: Some Operations and Functions $AdminConfig $AdminApp $AdminControl $Help o attributes o deleteUserAndGroupEntries o completeObjectName o attributes o convertToCluster o edit o getAttribute o operations o create o editInteractive o getAttributes o constructors o export o getCell o description o createClusterMember o exportDDL o getConfigId o classname o createUsingTemplate o install o getHost o all o defaults o installInteractive o getMBeanCount o AdminControl o getid o list o getNode o AdminApp o getObjectName o listModules o getPort o AdminConfig o installResourceAdapter o options o getType o wsadmin o list o publishWSDL o invoke o message o listTemplates o taskInfo o makeObjectName o modify o uninstall o queryNames o parents o setAttribute o reset o setAttributes o startServer o save o stopServer o show o testConnection o showall o trace o showAttribute o types 20 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 21. IBM Software Group | Server WebSphere ApplicationWebSphere software wsadmin: Miscellaneous Commands are case-sensitive Configuration changes not persisted until "save" call If multiple scripts or clients (Administrative Console) are saving configuration changes at the same time, exception thrown on Save call o No changes will be persisted Upon "save" call, validation procedure verifies updates o Create two servers with the same name throws exception wsadmin -f "xxxxx" much faster than wsadmin -c "xxxxx" o Better to run multiple commands in a file than individual commands o Call "save" in file periodically to persist configurations updates • Avoids no changes being persisted should an exception occur 21 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 22. IBM Software Group | Server WebSphere ApplicationWebSphere software wsadmin: Installing an Application Use $AdminApp Can use interactively inside a command Can get the configurable options from an EAR file o $AdminApp options myapp.ear Then can get the task information for each option: o $AdminApp taskInfo myapp.ear MapWebModToVH Could then use this info to help build the relevant options for installation: o $AdminApp install myapp.ear {-appname freda -MapWebModToVH {{{Default Application} default_app.war,WEB-INF/web.xml myvhost}} -<lots of other options . . .>} Just as difficult to construct this as in wscp 22 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 23. IBM Software Group | Server WebSphere ApplicationWebSphere software wsadmin: Example Code JACL Code: o sample_wsadmin.tcl (about 90 lines) o sample_wsadmin_install.tcl (about 25 lines) Jython Code: o sample_wsadmin.py (about 90 lines) Reset before running: o sample_swan_reset_wsadmin.bat Run JACL: o sample_wsadmin_jacl.bat o sample_wsadmin_install_jacl.bat Reset before running: o sample_swan_reset_wsadmin.bat Run Jython: o sample_wsadmin_py.bat 23 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 24. IBM Software Group | Server WebSphere ApplicationWebSphere software Jacl is better than Jython is better than Jacl Not that different If you can program in one you can probably program in the other Jacl may suit shell script programmers Jython may suit those with OO background Both take just as much as code as the other in our example 24 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 25. IBM Software Group | Server WebSphere ApplicationWebSphere software Tool 5: ws_ant (ANT) What is it? o ANT – Java-based, platform-neutral, open source build tool o ws_ant: Copy of Apache ANT with task extensions to support WebSphere- specific capabilities Main Features: o Tasks provided include: • Install and uninstall applications • Start and stop servers • Run administration scripts or commands o But the admin task is just a call to wsadmin – you still have to write the wsadmin code to do the actual configuration o Main advantage is ability to build the EAR, run a configuration script and then install the EAR, all from a single ws_ant build.xml. 25 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 26. IBM Software Group | Server WebSphere ApplicationWebSphere software ws_ant: Style of Usage Command-oriented Specify tasks, targets and dependencies between targets Connect over SOAP or RMI Pass language identifier to wsadmin command – Jacl assumed 26 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 27. IBM Software Group | Server WebSphere ApplicationWebSphere software ws_ant: Example Code Code: o build.xml (45 lines) o sample.props (20 lines) Reset: o sample_swan_reset_wsadmin.bat Run it: o sample_wsant_wsadmin.bat o sample_wsant_install.bat 27 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 28. IBM Software Group | Server WebSphere ApplicationWebSphere software Tool 6: WsAdmin Automation Platform (WAP) What is it? o Set of utility functions sitting over wsadmin o Eases a lot of wsadmin hassle Main features: o Available from IBM Techdocs, the Technical Sales Library o Not supported by IBM: provided “as is” o Greatly simplifies many wsadmin scripting tasks o Provides a library of Tcl procedures for creating, modifying and deleting WebSphere objects (e.g. application servers, data sources) o Runs on 5.0 and 5.1 o Syntax (on Windows): • set WAP_SOURCE=/installed/wap • set PATH=%PATH%;%WAP_SOURCE% • jwap.bat 28 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 29. IBM Software Group | Server WebSphere ApplicationWebSphere software WAP: Style of usage Command line / script Runs over wsadmin, so: o Three modes of operation: • interactive • single command (-c option) • run a script (-f option) o Connect over SOAP or RMI Jacl only (not Jython) Set subsequent commands’ scope: o setNode ajsnode1 o setServer server1 Provides a number of Jacl procedures named: o createXXX, removeXXX, modifyXXX o e.g. createCustomService, modifyJDBCProvider Pass parameters as dash-options, plus “you-name-it” options 29 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 30. IBM Software Group | Server WebSphere ApplicationWebSphere software WAP: Style of usage (2) Names become simpler (no need for /Cell:xxx/Node:xxx/Server:xxx/) Not all documented: o getIDByListing & modifyConfigObject are not documented but very useful Mainly aimed at create/modify/delete o little support for display & list o “list” does not return as Tcl lists so you can’t do “foreach” style processing 30 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 31. IBM Software Group | Server WebSphere ApplicationWebSphere software WAP: Example Code Code: o sample_wap.tcl (c90 lines) Reset: o sample_swan_reset_wsadmin.bat Run it: o sample_wap.bat 31 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 32. IBM Software Group | Server WebSphere ApplicationWebSphere software WAP: Installing an application Use the installApplication command Pass customisations in same way as wsadmin’s $AdminApp install: installApplication -appname fred -earfile /installed/websphere/appserver/base5.1/installableApps/ivtApp.ear {-MapModulesToServers {{{IVT Application} ivt_app.war,WEB- INF/web.xml WebSphere:cell=ajs_cell,node=ajsnode1,server=server1}}} -interact option to customise by answering questions (couldn’t get this to work) Can install then customise afterwards using the editApplication command Not really any different from $AdminApp About 15 long statements in our example 32 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 33. IBM Software Group | Server WebSphere ApplicationWebSphere software Tool 7: JMX What is it? o Java Management Extensions (JMX) is a framework oriented at managing applications and resources (like application servers) • Allows for exposing your application to remote or local management tools • JMX is a specification oriented to the application and network management • Part of J2SE Main Features: o Some of the JMX functionality: • Allows you to query the configuration settings and change them at runtime • Provides services such as monitoring, event notification, timers, .... • Allows you to load, initialize, change, and monitor application components and resources o Structured in three layers: • Instrumentation layer - MBeans • Agent layer - MBeanServer and agents • Distributed Services (this part is still out of the scope of the current level of the specs) JSR-077 33 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 34. IBM Software Group | Server WebSphere ApplicationWebSphere software About JMX: How does JMX work? Resources are managed by Managed Beans (MBeans) o These are simple JavaBeans that perform operational or configuration changes on resources MBeans provide APIs to the external world to manage its resources o Each JMX-enabled JVM contains a MBean Server (Managed Bean Server) that registers all the MBeans in the system • MBean Server provides access to all of its registered MBeans o External programs access MBeans registered on the MBean Server via Connectors/Adapters JVM Resources External tools Connector MBeans and programs MBean Server MBeans 34 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 35. IBM Software Group | Server WebSphere ApplicationWebSphere software JMX Benefits Enables Java applications to be managed without heavy investment o Relies on a core managed object server that act as a ‘management agent’ o Java application simply needs to embed a managed object server and make some of its functionality available as one or several Manageable Beans registered in the object server Provides a scalable management architecture o Every JMX agent service is an independent module that can be plugged into the management agent Integrates existing management solutions o JMX smart agents are capable of being managed through HTML browsers or by various management protocols such as Web Services, JMS, SNMP, etc. Defines only the interfaces necessary for management 35 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 36. IBM Software Group | Server WebSphere ApplicationWebSphere software JMX: Architectural Principles Management Application Connector Adapter Agent Layer MBean Server Agent Agent Agent Services Services Services (as MBeans) Resource 1 Resource 2 Instrumentation MBean MBean Layer Manages Manages Resource 1 Resource 2 Managed Resources JVM 36 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 37. IBM Software Group | Server WebSphere ApplicationWebSphere software WebSphere JMX Architecture All WebSphere 5.0 processes run the JMX agent All WebSphere 5.0 runtime administration is done through JMX operations E xternal tools and prog ram s W ebS phere A pplication H TTP S e rv er P rocess SNMP JM X JM X A dapter R M I/IIO P A dapter JM X SOAP C onnector internal JM X runtim e C onnector M B ea n objects S erver M Beans M B eans M B ean M B ean P roxy P roxy In te rn al M B e an s reg iste r w ith loca l E xternal M B eanS erver M B ea nS e rve r. E xte rn al M B e an s h ave lo ca l proxy to the ir Illustrates possibilities or future M B ea nS e rve r. P roxy registe rs w ith loca l plans M B ea nS e rve r. 37 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 38. IBM Software Group | Server WebSphere ApplicationWebSphere software WebSphere Distributed Administration Clients, Multi-cell mgmt, & other EMS (Tivoli, BMC) Deployment Mgr JMX MBean Connector Server MBeans MBeans MBean MBean Proxy Proxy Node Mgr Config Repository Service JMX MBean Connector Server To Other Nodes Master MBeans Master files MBeans Master files To Other App MBean files MBean Servers Proxy Proxy App Server Config Distribution Service JMX tmx4j Connector config MBean files MBean Server Server MBeans EAR files MBeans 38 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 39. IBM Software Group | Server WebSphere ApplicationWebSphere software JMX: Some MBeans Cell J2CConnectionFactory Node JavaMailProvider ManagedObject MailSession ApplicationServer URLProvider ServerCluster URL JMSServer JDBCProvider Application, EJBModuleConfig, DataSource, WAS40DataSource WebModuleConfig ConnectionPool EJBContainer, WebContainer ORBPlugin ListenerPort JavaVirtualMachine JMSProvider SecurityPermission JMSConnectionFactory NameServer JMSDestination LocalOSUserRegistry J2CResourceAdapter These Mbeans are built into WebSphere – 224 of them in v5.1 39 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 40. IBM Software Group | Server WebSphere ApplicationWebSphere software How Can Customers Use JMX? All WAS 5.0 Admin client programs use JMX o Web Admin console o wsadmin scripting o Admin Client Java API o Included in both Base App Server package and Advanced Deployment Use the APIs to control WebSphere runtime Extend the set of managed objects with custom JMX MBeans Attach Admin clients to Cell Manager in order to access entire Admin domain Node Agents start & monitor individual App Servers 40 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 41. IBM Software Group | Server WebSphere ApplicationWebSphere software JMX: Example Code Code: o sample_jmx.java (c160 lines) Reset: o sample_swan_reset_wsadmin.bat Run it: o sample_jmx.bat 41 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 42. IBM Software Group | Server WebSphere ApplicationWebSphere software Tool 8: SWAN What is it? o Simplified WebSphere AdministratioN o Greatly eases wscp and wsadmin hassle Main features: o Runs in wscp and wsadmin o Obtainable from the author o Runs on WebSphere v4, v5, v5.1 o Runs on Windows, AIX (probably all UNIXes) and z/OS o Simplifies writing wscp and wsadmin scripts o Simplifies interactive access o Provides a high degree of portability between WebSphere versions SWAN wscp wsadmin 42 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 43. IBM Software Group | Server WebSphere ApplicationWebSphere software SWAN Syntax <class> <verb> [<object>] [<options>] [<attributes>] Examples: o appserv list o dsource list –format -short o jcafact delete jack –ra jill o resadapt create ada –rarfile /usr/product/somefile.rar o cluster show clouseau +maxheap +minheap o appserv show jeeves +webhttpbacklog –constraint {Host * Port 9080} o appserv modify jeeves +webhttpbacklog 53 –constraint {Host * Port 9080} o appserv modify –constraint {Host * Port 9080} +webhttpbacklog 57 jeeves o jmsdest exists jack –jmsprov jill 43 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 44. IBM Software Group | Server WebSphere ApplicationWebSphere software SWAN is better than wscp/wsadmin is better than SWAN In wscp/wsadmin you have to know how to reach a particular attribute o Not a problem for many cases • e.g. JDBCProvider has no attribute hierarchy o Big problem for server groups and application servers • have to understand the hierarchy to navigate through it o SWAN solves this by hiding the hierarchy In wscp/wsadmin you have long names: o Long names for configuration and runtime objects o Much of which is probably constant in your script (e.g. cell name & node name) o SWAN solves this by setting a scope and providing the –short option In wscp/wsadmin you need long Tcl lists to set attributes: o SWAN solves this because it has flattened the attribute hierarchy wscp scripts cannot be migrated to wsadmin without complete rewriting: o But wscp scripts written to use the SWAN syntax will be migratable o Some changes will be needed though because of differences in v5 44 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 45. IBM Software Group | Server WebSphere ApplicationWebSphere software SWAN is better than wscp/wsadmin is better than SWAN SWAN does not implement all of the object types: o There are 224 in wsadmin in v5.1 o SWAN implements the most commonly used object types o SWAN can be extended to implement the others – easily if they follow the patterns of the current SWAN types o You can always use the wsadmin types directly in your scripts SWAN is not supported by IBM: o SWAN is provided as-is o Whereas wscp and wsadmin are supported 45 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 46. IBM Software Group | Server WebSphere ApplicationWebSphere software SWAN: Further Examples Getting help: o help o dsource help o jdbcdrv help create o jcafact attributes o jcafact attributes -details o cluster create clouseau -member sellers –vertical 3 o cluster showmembers clouseau o appserv makecluster jeeves –cluster wooster o cluster start wooster o cluster stop wooster -force 46 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 47. IBM Software Group | Server WebSphere ApplicationWebSphere software SWAN: Coverage appserv Application servers cell Domain or cell cluster Clusters (server groups) dsource Data sources entapp Enterprise applications jcafact J2C connection factories jdbcdrv JDBC drivers (providers) jmsdest JMS destinations jmsfact JMS connection factories jmsprov Generic JMS providers mail Java mail nagent Node agents resadapt Resource adapters vhost Virtual hosts 47 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 48. IBM Software Group | Server WebSphere ApplicationWebSphere software Installing enterprise applications using SWAN Packager or Deployer runs "entapp produceaid": o Creates an XML file called an Enterprise Archive Application Installation Descriptor (EAR AID) o EAR AID houses all of the deployable options from the EAR file's deployment descriptors Intention is that the Deployer then edits this file using an XML or text editor to set appropriate values (as would be done through the console) Deployer then runs "entapp create": o takes the EAR file and uses the AID file to install the enterprise app o same procedure whether v4 or v5, but different EAR AID file Non-SWAN software available to produce an Excel spreadsheet containing the EAR AID file, and to transform it back o makes it easier to edit 48 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 49. IBM Software Group | Server WebSphere ApplicationWebSphere software SWAN: Example Code Code: o sample_swan.tcl (25 lines, does both v4 and v5) Reset: o sample_swan_reset_wscp.bat o sample_swan_reset_wsadmin.bat Run it: o sample_swan_wscp.bat o sample_swan_wsadmin.bat 49 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 50. IBM Software Group | Server WebSphere ApplicationWebSphere software SWAN Internals: Code Size File Type # lines non-commentary code Configuration files 800 v4 code 3700 v5 code 3600 Common v4 code 1400 Common v5 code 900 Other common code 1500 Total non-commentary code 11,400 Plus comment lines 4,300 Includes debug/trace code 1000 50 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 51. IBM Software Group | Server WebSphere ApplicationWebSphere software Configuration & Deployment Using SWAN (1) Default Configuration Spreadsheet Other Release .ear .zip Artefacts Note 1 2 Edit in Excel PVCS Project-Specific Configuration Spreadsheet iwf_acm_iiw_app.cfg.xls 51 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 52. IBM Software Group | Server WebSphere ApplicationWebSphere software Configuration & Deployment Using SWAN (2) entapp EAR .ear PVCS 4 produceaid AID 3 5 Generate Spreadsheet AID Spreadsheet 6 iwf_acm_iiw_ap p.xls Edit in Excel Project-Specific Configuration Edited Spreadsheet Project-Specific Configuration Spreadsheet 52 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 53. IBM Software Group | Server WebSphere ApplicationWebSphere software Configuration & Deployment Using SWAN (3) 7 Generator Project-Specific Configuration Configuration Configuration Configuration Spreadsheet scripts scripts scripts 9 zip Package PVCS Generator Other Release Edited 8 AID .ear .zip Artefacts Note EAR Spreadsheet AID 53 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 54. IBM Software Group | Server WebSphere ApplicationWebSphere software Configuration & Deployment Using SWAN (4) 10 Tivoli Software Package Distribution Node A 14 11 Package i..edApps on node EAR A Edited Configuration Configuration Configuration 12 13 scripts Tivoli Software .ear EAR scripts scripts Configurator Distribution AID 15 WebSphere Domain entapp create Node B Node C Node D 54 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 55. IBM Software Group | Server WebSphere ApplicationWebSphere software Tool 9: J2EE 1.4 Management and Deployment What is it? o J2EE 1.4 APIs for product-independent configuration & deployment Main features: o No standard up to J2EE 1.3 o J2EE 1.4 (WebSphere v6) introduces: • J2EE Management Specification (JSR-77) • ability to configure and control J2EE objects in a Java-application- server-independent manner • J2EE Deployment Specification (JSR-88) • ability to install enterprise applications in a Java-application- server-independent manner • wsadmin still works • write programs to these specs to lessen vendor lock-in • many configuration/deployment possibilities: • Admin Console • wsadmin scripts in Jacl and Jython • Programs written to the JMX API • Programs written to JSR-77 & JSR-88 55 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 56. IBM Software Group | Server WebSphere ApplicationWebSphere software Comparison: Lines of code wscp XmlConfig wsadmin wsadmin ws_ant JMX SWAN Jacl Jython Heap sizes 2 4 6 45 9 2 (plus Environment 16 60 24 19 wsad 35 6 min) Transport 43 23 ? 40 3 Display 30 8 30 ? 50 6 (but displays everything) Installation 20 75 25 ? ? 4 56 © 2004 IBM Corporation WebSphere UK User Group - October 2004
  • 57. IBM Software Group | Server WebSphere ApplicationWebSphere software Summary References o “IBM WebSphere System Administration” by Leigh Williamson et al (ISBN: 0- 13-144604-5) o “IBM WebSphere Deployment and Advanced Configuration” by Barcia/Hines/Alcott/Botzum (ISBN: 0-13-146862-6) o WAP: • http://www-1.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/PRS981 o SWAN: • simmsa@uk.ibm.com 57 © 2004 IBM Corporation WebSphere UK User Group - October 2004