2 About OIG Configuration Utility

The OIG Configuration Utility is designed to simplify configuration tasks. Rather than the manual process of changing dozens of values in the WebLogic Server UI, the configuration utility enables you to perform a complete configuration update in one step by applying a set of configuration values to the system. The utility makes a backup of the current system settings before applying any changes. If a problem arises due to a configuration change, you can use the utility to restore to a previous configuration.

Which attributes are modified in WebLogic Server are determined by the gestures and operations that are executed by the OIG Configuration Utility. A gesture consists of one or more operations, where an operation performs a set of configurations within the gesture’s domain. For example, the “tune” gesture provides three operations to tune the performance of three aspects of WebLogic Server: database, JVM, and OIM. To tune the JVM performance of a WebLogic Server, you set the values related to JVM performance in the attributes file and call the utility, executing the JVM tuning operation from the tune gesture. You can implement your own gestures and use them with the utility; see Adding a Gesture for more information.

Utility Structure and Contents

The installation directory of the OIG Configuration Utility contains the utility itself, oig-config-utility.sh. This directory also contains the following directories used by the utility:

Directory Description
backup/ Contains copies of the latest state, which are implicitly created after each operation.
baseline/ Contains baseline images created by the utility. These files contain the current values of the system attributes; that is, the current state of the system.
config/ Contains input files used by the utility (inputs.properties, oig-configuration-attributes.json, and oig-utility-config.json).
current_state/ Contains files that store the current state of the system after a gesture operation is performed.
lib/ Contains the libraries used by the utility, including gesture implementation libraries, the utility library, and the service provider (SPI) library that is the backbone of the utility's framework.
logs/ Contains logs created by the utility.
reports/ Contains reports showing the pre- and post-operation values of attributes affected by operations executed by the utility.
resource/ Contains resource files used by the utility.

The utility is installed with the config/, lib/, and resource/ directories already in place; the other directories are created at runtime by the utility as needed.

Every time one or more operations are executed, the utility creates a file with the current state of the attributes being modified and stores it in backup/. After the operation is executed, the final state is stored in the current_state/ directory. Every time any operation is performed, files are created in both the backup/ and current_state/ directories.

A baseline contains the attributes for all the enabled gestures and their operations at the time the baseline is created. You can use any backup, baseline, or current state file to restore the state of the system. By default, these files are stored in the backup/, baseline/, and current_state/ directories, respectively.

Config Files

The config/ directory contains the files oig-utility-config.json, oig-configuration-attributes.json, and inputs.properties. These files are used to configure the utility, set the values to which the utility will configure WebLogic Server attributes, and pass inputs to the utility, respectively.

oig-utility-config.json

The file oig-utility-config.json is used to configure the OIG Configuration Utility. Its contents define a set of directories used by the utility, the inputs and attributes files to use, which gestures are available, and which gestures are enabled.

There are five directories whose locations you can configure for the OIG Configuration Utility. You can configure their values in the configuration file, or you can configure them using system/environment variables. In the case where a directory is defined both in the configuration file and in an environment variable, the value of the environment variable is used. The following table lists the directory variables in the configuration file, their corresponding environment variable names, and their default values:

Configuration File Variable Name System/Environment Variable Name Default Value
backupDir BACKUP_DIR backup
baseLineDir BASELINE_DIR baseline
currentStateDir CURRENT_STATE_DIR current_state
logsDir LOGS_DIR logs
reportDir REPORTS_DIR reports

The values of the attributes file is set by the attributesFile entry. Its default value is config/oig-configuration-attributes.json.

The gesturesConfig structure array contains information about each gesture that OIG Configuration Utility can use. Each entry contains a name for the gesture, the gesture class name, and whether the gesture is enabled. For example, the following is the entry for the tune gesture included with the utility:

{
    "name": "Tuning Gesture",
    "gestureClass": "com.oracle.oig.gestures.TuningGesture",
    "isEnabled": "true"
}

To disable a gesture from being used, set that gesture's isEnabled value to false.

The utility help provides a list of available gestures to the user. This list includes each gesture from the oig-utility-config.json file whose isEnabled value is true.

oig-configuration-attributes.json

The oig-configuration-attributes.json file contains the schema used by the utility to configure a WebLogic Server.

To set the values the utility will use, open oig-configuration-attributes.json, and edit the values of the attributes used by the gesture operations you plan to execute. The attributes used by a gesture operation are in the section of the schema labeled with that operation's name (for example, "Tune OIM Operation").

For example, suppose you want to set the JVM minimum and maximum heap space values to 3072 and 4096 megabytes, respectively. Edit the values in the "Tune JVM Operation" section of the oig-configuration-attributes.json file to the following:

"Tune JVM Operation": 
{
  "com.oracle.oig.config.attributes.JVMTuneAttributes": 
  {
    "minHeapSpace": "3072m",
    "maxHeapSpace": "4096m"
  }
}

To configure the system with these values, save the attributes file, then run the utility and execute the tune JVM operation.

inputs.properties

The inputs.properties file contains an entry for each possible required input for all supported gestures and their operations. These are the inputs that you can specify on the command line when calling the utility, for example, WebLogic Server user name and password.

If you wish to supply a value without specifying it each time you call the utility, you can enter it into inputs.properties. For example, if your WebLogic Server host and port never change, enter those values in the file for their respective properties weblogicHost and weblogicPort. When you call the utility, the values from inputs.properties are used, and you do not need to enter them on the command line.

You can choose which values to supply via inputs.properties, if any. For example, you might choose to supply values for all of the required inputs except for passwords via inputs.properties. You'd then have to supply the passwords when calling the utility.

When you run the utility in interactive mode, you'll be prompted to enter a value for each required input whose value is not defined in inputs.properties.

When you run the utility in silent mode, you must provide a value on the command line for each required input that doesn't have a value defined in inputs.properties. If you specify a value for an input on the command line that's also defined in inputs.properties, the utility uses the value from the command line.