
WebSphere Application Server for z/OS V6.1 WSADMIN Primer (With Jython Scripting Illustrated) This document supersedes WP100421, which was V5.x and JACL This document can be found on the web at: www.ibm.com/support/techdocs Search for document number WP 101014 under the category of "White Papers" Version Date : September 10, 2008 Please see "Document Change History" on page 108 for updates provided in this version of the document. IBM Washington Systems Center Don Bagwell IBM Washington Systems Center 301-240-3016 [email protected] Many thanks to Mike Loos for sharing with me his knowledge of WSADMIN, in particular the specifics of Jython and the "fine grain security" topic. Mike Kearney is my source for nearly all things related to security, such as keyrings, certificates and all that other mysterious stuff. Rohith Ashok of WebSphere development, who seems to know something about any question I've ever asked him. WP101014 - WSADMIN z/OS V6.1 Primer Table of Contents Introduction and Overview ................................................... ................ 4 What is WSADMIN? ................................................... ..................... 4 What is the primary benefit of WSADMIN? ................................................... .... 4 Is this just for WebSphere on z/OS? ................................................... ......... 4 Basic elements of WSADMIN ................................................... .............. 4 Five programming "objects" (or "commands") ................................................... 4 WSADMIN "client" ................................................... ...................... 5 Programming "script" ................................................... .................... 5 How the WSADMIN client is invoked ................................................... ........ 6 Important Point: two "modes" -- local and remote ................................................. 6 This document is not the complete source of information on WSADMIN ............................... 7 How this document is organized ................................................... ............ 7 Performing the exercises provided in this document ............................................... 7 Other sources of WSADMIN information ................................................... ..... 7 Summary ................................................... .............................. 7 WSADMIN Invocation Exercises ................................................... ............ 8 Lesson Overview ................................................... ........................ 8 Checklist: what you need to do the exercises in this section ......................................... 8 Background: where wsadmin.sh client shell script is located ....................................... 8 Exercise: invoke WSADMIN with no parameters at all .............................................. 9 Exercise: invoke WSADMIN with -conntype NONE ............................................. 10 Exercise: invoke WSADMIN with -help parameter .............................................. 10 Exercise: invoke WSADMIN with -conntype SOAP ............................................. 12 Exercise: invoke Help object ................................................... .............. 12 Background: the default script language ................................................... ..... 14 How to tell WSADMIN to use Jython rather than JACL ........................................... 14 Where the default scripting language is defined to WSADMIN ..................................... 15 Exercise: invoke WSADMIN so Jython is the expected scripting language ............................ 15 Exercise: invoke WSADMIN using RMI rather than SOAP ......................................... 16 Lesson wrap-up and summary ................................................... ............ 17 Command Line Usage and Jython Exercises ................................................... 18 Lesson Overview ................................................... ....................... 18 Background: where the wsadmin.properties file is located .......................................... 18 Exercise: change default script language of WSADMIN and verify ................................... 18 Exercise: simple application installation ................................................... ..... 19 Exercise: uninstall the application ................................................... .......... 21 Exercise: setting simple Jython variables ................................................... .... 21 Exercise: list variables ................................................... ................... 24 Exercise: another way of constructing list variables ............................................... 26 Lesson wrap-up and summary ................................................... ............ 26 File-based Input Exercises ................................................... ............... 27 Lesson Overview ................................................... ....................... 27 Exercise: use the execfile() function ................................................... .... 27 Exercise: comments in the file (optional) ................................................... .... 28 Exercise: invoke WSADMIN and specifying input file .............................................. 28 Exercise: ASCII vs. EBCDIC encoding of Jython file .............................................. 29 Exercise: looping and other logic in Jython ................................................... 30 The "if" and "elif" statements ................................................... ............. 31 The "for" statement ................................................... .................... 31 The "break" statement ................................................... .................. 32 Exercise: passing parameters into a script ................................................... 32 © 2007, IBM Americas Advanced Technical Support Section: Table of Contents - 1 - Washington Systems Center, Gaithersburg, MD Version Date: Wednesday, September 10, 2008 WP101014 - WSADMIN z/OS V6.1 Primer Lesson wrap-up and summary ................................................... .......... 33 JCL and BPXBATCH Exercises ................................................... ........... 34 Lesson Overview ................................................... ....................... 34 Exercise: simple invocation of WSADMIN ................................................... 34 Exercise: passing in parameters ................................................... ........... 35 Lesson wrap-up and summary ................................................... ............ 36 Exploring the WSADMIN Objects Exercises ................................................... 37 Becoming an expert in WSADMIN ................................................... ......... 37 Topic: Admin Console command assistance ................................................... 37 Lesson Overview ................................................... ...................... 37 Exercise: enable command assistance in Admin Console ........................................ 37 Exercise: enable logging of command assistance ............................................... 38 Exercise: a more complex command ................................................... ...... 39 Lesson wrap-up and summary ................................................... ........... 40 Topic: use "help" to get a sense for what methods are on what objects ............................... 40 Lesson Overview ................................................... ...................... 40 Exercise: display contents of help() method .................................................. 40 Exercise: drill down on the AdminApp object ................................................... 44 Lesson wrap-up and summary ................................................... ........... 47 Topic: WSADMIN and application-oriented activities .............................................. 47 Lesson Overview ................................................... ...................... 47 Exercise: simple installation and listing of installed applications .................................... 47 Exercise: node synchronization ................................................... .......... 49 Exercise: starting and stopping an application .................................................. 51 Exercise: uninstall application ................................................... ............ 53 Exercise: combined installation, synchronization and application starting in one script .................. 55 Background: AdminApp.install() options syntax and how to learn what to use .................... 56 Background: syntax for our highlighted AdminApp.install() options ............................ 57 Exercise: using taskInfo() to get information on contents of application EAR file ................... 58 Exercise: change the application name and context root at installation time .......................... 59 Exercise: change JNDI name relationships at installation time ..................................... 61 Exercise: map application to different virtual host at installation time ................................ 63 Example: map resource reference to connection factory JNDI ..................................... 65 Example: map resource reference to JDBC data source .......................................... 67 Lesson wrap-up and summary ..................................................
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages110 Page
-
File Size-