WPSconfig.sh

 

+
Search Tips   |   Advanced Search

 


Contents

  1. Overview
  2. Using configuration tasks
  3. Using configuration templates

 

Overview

WebSphere Portal configuration is accomplished by executing configuration tasks implemented using the Apache Ant build tool. Configuration tasks also invoke scripts, Java programs, and other configuration tasks.

To execute configuration tasks, run...

./WPSconfig.sh task_name [task_name ...] [-Dproperty=value ...]

...where task_name indicates the configuration task you want to run and the property flag specifies the value of a specific property that will be used by the task.

For example, to invoke the configuration task that creates the databases used by WebSphere Portal and indicate that tracing and logging messages generated by the task should be in English (using standard Java properties), you would use the following:

./WPSconfig.sh create-database \
               -Duser.language=en \
               -Duser.region=US

Values used for configuration are obtained from properties specified either in a properties file or as part of the task invocation itself. The properties you can modify are located in...

$WP_ROOT/config/wpconfig.properties

When specifying a property value for a configuration task with the -D flag, the value persists only while that particular task is running. Although the value temporarily supersedes the value for that property in the wpconfig.properties file, it does not overwrite the value stored in the property file. If the same configuration task is invoked again, the value in the property file will be used unless it is overridden again with the -D flag.

Once a property is set during configuration, its value cannot be overridden by later attempts to set it. The precedence order for setting properties is as follows, from highest precedence to lowest precedence:

  1. Command line from configuration task
  2. Parent properties file
  3. wpconfig.properties file
  4. XML configuration files

Running multiple configuration tasks concurrently is not supported.

 

Configuration templates

When performing configuration tasks, WebSphere Portal derives the values for these tasks from the wpconfig.properties file. In addition to simplifying file management, the use of a single file for maintaining property values has the advantage of serving as a centralized reference for current configuration settings. However, depending on the task you want to perform, there might be many properties in the file that are unrelated to the task. In addition, the possible values for each property, which are often documented in the file, pertain to many different cases.

For example, database properties are described for a number of different database types, although you would be interested in only one at any given time.

To make interaction with the wpconfig.properties file more convenient, WebSphere Portal includes configuration templates, which are condensed, special-purpose properties files. These templates provide only the properties needed for a given task and can also be tailored to a particular type of resource (for example, only for the DB2 database type).

 

Parent properties files

The basis for the configuration templates is WebSphere Portal's support for the use of parent properties files. When you invoke a parent properties file during configuration, a property value from that file supersedes a value for the same property in the wpconfig.properties file. The use of a parent properties file is useful in situations where you want to perform the same configuration tasks on multiple machines, such that some of the properties in wpconfig.properties would be same for on all machines, while other properties might be different.

For example, the database type and drivers might be the same on each machine, while the user IDs and passwords might be different. In such a case, using a single main properties file (wpconfig.properties) to perform common tasks on each machine is not practical. By putting properties that are common across machines into a parent properties file, it is easier to ensure that each machine is configured in the same way.

To use a parent properties file when invoking a WebSphere Portal configuration task, specify the parentProperties property when launching the configuration program. For example:

./WPSconfig.sh -DparentProperties=$WP_ROOT/transfer_db2.properties \
               -DSaveParentProperties=true \
               task_name [task_name ...]

In this example, if a property is specified in the transfer_db2.properties file, an attempt to set the property from the wpconfig.properties file, which is loaded later by the configuration program, will be ignored.

When using a parent properties file, if all the specified tasks execute successfully, the properties from the parent properties file will automatically be saved to the wpconfig.properties file.  In this way, the wpconfig.properties should always reflect the property values that were used for configuration.

 

Windows/UNIX configuration templates

Configuration templates are essentially parent properties files that are provided with WebSphere Portal and are designed to support specific tasks or sets of tasks. For example, one configuration template might be used to configure WebSphere Portal to use a DB2 database, including transferring the data from Cloudscape to DB2. Another configuration template might be used to configure WebSphere Portal for security with IBM Tivoli Directory Server. Where possible, properties in these files are set to the most common default values, and only those values appropriate to the specific type of resource are included. Comments within each configuration template summarize the tasks perform with the configuration template and also include additional details regarding the template's use.

To use a configuration template, launch the configuration program and specify the configuration template as a parent properties file. For example, if you have edited transfer_db2.properties for the environment, you would invoke the configuration template using...

./WPSconfig.sh -DparentProperties=$WP_ROOT/config/helpers/transfer_db2.properties \
               -DSaveParentProperties=true

Note that when no task is specified, the configuration program simply updates the wpconfig.properties file with the values from the configuration template. This enables you to set up templates specific to a particular task for the purpose of entering the properties and then have those properties saved to wpconfig.properties without being required to edit wpconfig.properties directly.

WebSphere Portal provides several example configuration templates in the wp_root/config/helpers directory.

Configuration template Description
transfer_db2.properties

Configure Portal to use a DB2 database, including transferring the data from Cloudscape to DB2.

transfer_oracle.properties

Configure WebSphere Portal to use a Oracle database, including transferring the data from Cloudscape to Oracle.

transfer_sqlserver.properties

Configure WebSphere Portal to use a SQL Server database, including transferring the data from Cloudscape to SQL Server.

config_http.properties

Configure Portal to use an external Web server, instead of the internal HTTP transport provided by WAS.

security_active_directory.properties

Configure Portal to use WAS security with Active Directory as its LDAP directory.

security_disable.properties

Disable security for WAS if you have previously configured WebSphere Portal to use security.

security_domino.properties

Configure Portal to use WAS security with Domino as its LDAP directory.

security_ibm_dir_server.properties

Configure Portal to use WebSphere Application Server security with IBM Tivoli Directory Server as its LDAP directory.

security_sun_one.properties

Configure Portal to use WAS security with Sun ONE as its LDAP directory.

 

Create your own configuration templates

In addition to using the configuration templates provided with WebSphere Portal, you can create your own configuration templates if you find it useful to do so. For example, if you found that you were commonly doing the same task across many WebSphere Portal nodes in the enterprise, you could create your own configuration template to make it easier to correctly perform this task on each node. Follow the conventions depicted in the example configuration template files for adding comments, specifying property values, and so on.

 

 

See also

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.

 

Tivoli is a trademark of the IBM Corporation in the United States, other countries, or both.