Friday, March 26, 2010

Welcome to wsadminlib.py

Overview


wsadminlib.py is a large python file containing hundreds of methods to help simplify configuring the IBM WebSphere Application Server (WAS) product using scripting.

Where do I get it?


Update 2013-1012: An official version of wsadminlib is now available at https://github.com/wsadminlib/wsadminlib  IBM has made wsadminlib available on this popular software-sharing site for you to copy, fork, and make your own enhancements!

The original is still available here [developerWorks] and search for 'wsadminlib'.  Its official name is "The IBM WebSphere Application Server Sample Script (wsadminlib.py package)".

Design goals


wsadminlib.py was designed to simplify configuration of the IBM WebSphere Application Server (WAS) product by providing much-improved understandability and ease-of-use. The underlying scripting syntax for configuring the WAS product can be complex and challenging to understand. The wsadminlib package was created to provide simple method names and simple parameter names, and hide the underlying nonsense.

A wide variety of methods have been developed. These methods perform tasks such as creating servers, starting servers, creating clusters, installing applications, proxies, core groups, core group bridge, dynacache, shared libraries, classloaders, replication domains, security, BLA, JDBC, etc, etc, etc.

History

wsadminlib.py was originally created in 2006 by two IBM product developers who were having trouble understanding the native wsadmin syntax. They were both encountering the same problems and both spending time researching the same solutions. They joined forces to split the work and share the benefits, and the original wsadminlib.py was born.

By word of mouth, other teammates discovered the joys of wsadminlib, using it as both a code reference and in production. Eventually, many of these teammates began contributing new methods which they had researched and debugged, thus sharing solutions with others.

Community interest grew steadily over time. By 2010, several dozen people had contributed methods related to component areas they understood, and wsadminlib was being used in production by a good number of components in the current strategic agile automated test infrastructure.

Other script packages

wsadminlib is one of many sample script packages available from IBM and others. Here are some comparisons to guide your selection. Pick your favorite. Vive la difference.

- The developers of wsadminlib like having everything in one monolithic file. There is only one file to include, and only one place to search. Other script developers prefer smaller files, organized in subdirectories, in a more object-oriented fashion.

- The developers of wsadminlib strive to write methods with self-documenting names, and intuitively named parameters. They write pydoc only when necessary. Other script developers like to write verbose documentation.

- Other packages may support multiple languages. Wsadminlib is English-only.

Limitations

- Error-handling is not consistent. Some methods raise python exceptions, others use a return code.

- All wsadminlib methods work well on WAS V7 and V8 (beta). Some methods work on V6.1, but not all have been tested. WAS 6.0.2 is unknown.

- wsadminlib is not a formally-supported product. It is provided as a sample, on an as-is basis. The official disclaimer is in the prologue at the top of wsadminlib.py.

Summary

wsadminlib has been very helpful to many of us inside IBM to speed development of configuration scripts and to run testcases. We hope you find something useful too.