These sample jacl and Jython scripts let you automate common administation tasks and configure security in WebSphere Application Server Versions. The versions that the scripts apply to are noted. Download them and run them as is, or modify them to suit your environment.
- The sample scripts that export, import, and synchronize existing configuration objects run on WebSphere Application Server V8.
- The sample admin script and the script library package for the Feature Pack for Communications Enabled Applications run on WebSphere Application Server version 7.
- The automated deployment sample runs on WebSphere Application Server versions 5.0, 5.1, and 6.0
- The security configuration samples run on WebSphere Application Server Version 5 and WebSphere Application Server - Express, Version 5 and on WebSphere Application Server Version 6 and 6.1. There is one download that contains the samples for versions 5 and 5.1, one for version 6, and another for version 6.1.
- The administration samples run on WebSphere Application Server versions 5.0, 5.1, and 6.0. (The Jython versions of the administration scripts only run on versions 5.1 and 6.0)
- The configuration change samples run on version 5.1.1 and on version 6.
The hardware and software requirements for these samples are the same as for the products on which they run.
Download sample scripts that export, import, and synchronize existing configuration objects for WebSphere Application Server. This version has been created for individual installations of WebSphere Application Server 8.0, but the commands can be sequenced to perform the required tasks in network deployment installations.
To export data, you must specify the type of objects, the scope, and a local file system folder to write data to. Subsequently, all objects exported to this location can be recreated with one import operation. Additionally, another script is provided to match previously exported DataSource objects to existing JDBC Providers, and import them accordingly. Details and usage instructions are located at the beginning of each file.
- objsExport.py - exports to local file system, all the configuration objects of a given type, belonging to a given scope.
- objsImport.py - imports all the configuration objects found in a given folder.
- syncDataSources.py - attempts to match exported DataSource objects to existing JDBC providers and imports them accordingly.
Download the IBM WebSphere Application Server Sample Script (wsadminlib.py package). This package is a single large sample script file with hundreds of methods. It is intended to simplify configuration of the WebSphere Application Server via scripting, 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. These methods perform tasks such as creating servers, starting servers, and querying and setting numerous configuration options. Consumers may invoke wsadminlib.py directly in their configuration scripts, or they may use its contents as a sample code reference. The benefit is speedier development of scripts and testcases, and reduced errors.
Download the WebSphere Application Server V7.0 Feature Pack for Communications Enabled Applications (CEA) script library package (AdminCEA.py.zip). This package is a wsadmin script library file that includes procedures for configuring and displaying the settings associated with the Feature Pack for CEA. The following tasks are supported:
- Defining the context root and virtual host for the CEA communications service application.
- For a given server or cluster, defining the state of the CEA communications service application, REST interface maximum hold time, telephony access method, and related telephony interface settings.
- Creating, modifying, and deleting custom SIP application routers.
- Moving a server or a cluster to the default SIP application router or a custom SIP application router.
- Showing the targets assigned to the default SIP application router and the startup order (weight) of the applications deployed on each target.
- Showing the targets assigned to custom SIP application routers.
Download (version 3.1 May 2007) example scripts for automating deployment of Enterprise Application Archives (EARs) into WebSphere Application Servers. It also includes a PDF of an article explaining the scripts. These scripts may be downloaded anywhere on a system containing a WebSphere installation. When the ZIP is expanded it creates a directory AdderDeploy, which contains an TestDeploy program which performs the following tasks:
- Dynamically read a Distribution Directory to determine what EARs need to be installed or updated or reconfigured or uninstalled.
- Use environment/stage specific property files to determine the targets (Nodes/Servers and/or Clusters) and the application settings.
- Calculate the unique set of affected Nodes and Servers, (to avoid unnecessary interruptions to others)
- Perform a phased update of the affected Nodes and Servers to assist in maintaining high availability (and has hook-points for customer work-flow rerouting to further maintain availability).
- The 3.0 version and above contain both Jacl and Jython versions of the AutoDeploy scripts. The Jython scripts were created using the IBM Jacl-2-Jython conversion assistant, available from the WebSphere support site as download swg24012144 . Note that the Jython AutoDeploy scripts require WebSphere Application Server verrsion 6.1, since the scripts require the complete Jython library (only shipped with version 6.1 and above).
- The 3.1 version uses an application.scripts property file to specify user scripts to be loaded and executed preInstall, postInstall, preUninstall, and postUninstall.
Download a set of files for configuring WebSphere Application Server security:
SecConfigProps.properties- a sample file with all available security properties, including the cipher suites which are used in SSL config.Security levels.
SecConfigProcs.jacl- low level procedures which are necessary to configure security and are called by the other security scripts.
SecConfigMenu.jacl- text menu choices for interactive mode, similar to security configuration choices found on the web-based WebSphere administrative console .
SecConfigBatch.jacl- configuration procedures that read and parse the properties from a property file which specify the security configuration values to set in batch mode.
readme.txt- detailed information about each script, what they do, and how to run them.
Download sample scripts that change, export, and import existing configuration data for WebSphere Application Server. Versions of these scripts are available for WebSphere Application Server 5.1.1 and for version 6. For the version 6 scripts in the Network Deployment environment, the scripts can be used in mixed cell environment where WebSphere Deployment Manager is Version 6 and all other federated WebSphere Application Servers can be Version 5.1.1 and/or Version 6.
These scripts are invoked through
Scripts that perform the following tasks are included:
- change host name
- change cell name
- change node name
- change server name
- export/import the whole repository config directory
- export/import individual application server
- export/import enterprise application
- export/import JDBC Provider with associate Data Sources
Download sample scripts that perform common administration functions:
- Create and modify a server, load an application onto the server, and start the server.
- Stop a server on a given node, uninstall an application, and remove the server from the configuration.
- Create a server group on the server, and start the server (requires Network Deployment configuration).
- Invoke useful problem-determination actions involving traces and thread dump.
- Invoke various application install commands.
- Invoke commands that produce a short summary of configuration and runtime information about the WebSphere installation.
- Creation JDBCProvider object using a template.
- Demonstrate J2C Security configuration by installing a J2CResourceAdapter and creating a J2CConnectionFactory.
- Create JDBCProvider, DataSource and CMPConnectorFactory objects.
- Create use a variable for a URLProvider object.
- Set port numbers kept in the serverindex.xml file.
- Update configuration attributes that are presented in lists or lists of objects.
- List all enterprise applications installed on a specific application server. (separate download)
|WebSphere import/export scripts||was_exportimport_v8.zip||8 KB||HTTP|
|WebSphere administration scripts||wsadminlib.py.zip||85 KB||HTTP|
|Feature Pack for CEA script library||AdminCEA.py.zip||8 KB||HTTP|
|WebSphere automated deployment scripts||AutoDeploy_v31.zip||355 KB||FTP|HTTP|
|Security scripts for versions 5.0 and 5.1||was_security_cfg_v5.zip||30 KB||FTP|HTTP|
|WebSphere security scripts for version 6.0||was_security_cfg.zip||30 KB||FTP|HTTP|
|WebSphere security scripts for version 6.1||was_security_cfg_v61.zip||30 KB||FTP|HTTP|
|Configuration management scripts for V5.1.1||exportimport.zip||40 KB||FTP|HTTP|
|Configuration management scripts for V6||ConfigScripts.zip||50 KB||FTP|HTTP|
|WebSphere administration scripts (1-12)||wsadminExampleScripts.zip||0.3 MB||FTP|HTTP|
|Administration scripts (1-12) -- Jython version||wsadminJythonExampleScripts.zip||0.3 MB||FTP|HTTP|
|WebSphere administration script 13||wsadminEx13.zip||3 KB||FTP|HTTP|