Preview only show first 10 pages with watermark. For full document please download

W25

   EMBED


Share

Transcript

IBM Washington Systems Center WebSphere Scripting: WSADMIN, jacl, jython Lee­Win Tai [email protected] Advanced Technical Support 2005-09-23 © 2005 IBM Corporation WebSphere Scripting: WSADMIN, JACL, Jython Our Agenda ● WSADMIN basics ● Scripting with WSADMIN ● 2 ● JACL ● Jython Script examples IBM Washington Systems Center 2005-09-23 © 2005 IBM Corporation WebSphere Scripting: WSADMIN, JACL, Jython WSADMIN Concepts WSADMIN is not a keyboard recording mechanism! WSADMIN is a scripting interface used at the command line. Windows, Linux, USS WSADMIN can: • Install / uninstall applications • Stop / start servers • Create new servers 3 IBM Washington Systems Center 2005-09-23 © 2005 IBM Corporation WebSphere Scripting: WSADMIN, JACL, Jython Interactive vs Inline Commands Interactive commands Telnet or OMVS Enter command Useful for quick administrative tasks Receive output Enter command 4 IBM Washington Systems Center • stop server • install / uninstall applications 2005-09-23 © 2005 IBM Corporation WebSphere Scripting: WSADMIN, JACL, Jython Interactive vs Inline Commands Inline commands Telnet or OMVS Use “­c” to indicate inline command Command BBOWIAPP job uses inline command to install the administrative console 5 IBM Washington Systems Center 2005-09-23 © 2005 IBM Corporation WebSphere Scripting: WSADMIN, JACL, Jython Using wsadmin From Your Workstation wsadmin.bat – Windows wsadmin.sh – Unix and Linux SOAP port Deployment Manager wsadmin.sh ­host  ­port  Is global security turned on? No port Yes Application CA certificate No worries must be on client’s keyring 6 SOAP IBM Washington Systems Center Provide userid Server and password 2005-09-23 © 2005 IBM Corporation WebSphere Scripting: WSADMIN, JACL, Jython Can We Use WSADMIN If the Server is Down? It depends! wsadmin in local mode wsadmin.sh ­conntype none Manipulates configuration data HFS The server does not have to be up Obviously, this does not work from your workstation... 7 IBM Washington Systems Center 2005-09-23 © 2005 IBM Corporation WebSphere Scripting: WSADMIN, JACL, Jython Can We Use WSADMIN if the Server is Down? It depends! wsadmin in remote mode wsadmin.sh ­conntype soap wsadmin.sh ­conntype rmi ! Connects to server Manipulates It is not recommended to use remote mode configuration data HFS and the admin console simultaneously 8 IBM Washington Systems Center 2005-09-23 © 2005 IBM Corporation WebSphere Scripting: WSADMIN, JACL, Jython Using WSADMIN With Global Security On wsadmin.sh ­conntype soap ­user  ­password  sas.client.props soap.client.props securityEnabled=true securityEnabled=true Import server’s CA certificate onto client keyring using ikeyman.(sh|bat) Should not be necessary if executing wsadmin from USS 9 IBM Washington Systems Center 2005-09-23 © 2005 IBM Corporation WebSphere Scripting: WSADMIN, JACL, Jython Is This a Security Exposure? wsadmin.sh ­conntype soap ­user  ­password  Hmm.. I could use Specify userid and password “ps” to display running processes Grr... Disgruntled employee 10 IBM Washington Systems Center soap.client.props 2005-09-23 sas.client.props © 2005 IBM Corporation WebSphere Scripting: WSADMIN, JACL, Jython Are There Multiple WSADMINs? Only if in an ND $dmgr/profiles/default/bin/wsadmin.sh $appserver/profiles/default/bin/wsadmin.sh environment One for each application server Each of these are a “managed process” to which WSADMIN can connect. 11 IBM Washington Systems Center 2005-09-23 © 2005 IBM Corporation WebSphere Scripting: WSADMIN, JACL, Jython Using WSADMIN – Objects WSADMIN uses four objects: AdminApp manipulate applications AdminConfig manipulate configuration data 12 IBM Washington Systems Center AdminControl manipulate “objects” (e.g., servers) Help self-explanatory 2005-09-23 © 2005 IBM Corporation WebSphere Scripting: WSADMIN, JACL, Jython What Can I Do With the AdminApp Object? install uninstall edit list AdminApp help listing: 13 IBM Washington Systems Center 2005-09-23 © 2005 IBM Corporation WebSphere Scripting: WSADMIN, JACL, Jython AdminApp – Installing an Application Q: What options? $AdminApp install A: $AdminApp options Not all options are required for installation Remember to save and synchronize after installation: Details to come... 14 IBM Washington Systems Center 2005-09-23 © 2005 IBM Corporation WebSphere Scripting: WSADMIN, JACL, Jython AdminApp – Installation Options $AdminApp options Use this to find options specific to the ear file What is the syntax for these $AdminApp taskInfo MapModulesToServers options? Works $AdminApp taskInfo