The OperationalString Archive (OAR) is an archive of the libraries, configuration and OperationalString(s) required for an application deployment. The OAR is a JAR file, containing a manifest that provides context on what needs to be deployed. The OAR's manifest attributes are as follows:
Manifest Attributes
OAR-Name
Attributes are stored in the Manifest in order allow the Provision Monitor to create necessary directories. The OAR-Name manifest attribute will be used to create a directory name the OAR will be copied to and extracted. If the OAR-Name has spaces ' ' in it, the spaces will be translated to '_' characters, ensuring there are no issues with directory name creating and accessibility (think Windows here).
OAR-Activation
This attribute tells the Provision Monitor what to do with the installed OAR. If the OAR-Activation attribute is "Manual", then the deployment will only be loaded manually. If the OAR-Activation attribute is "Automatic", then the Provision Monitor will deploy the OAR immediately after installation and at Provision Monitor startup time.
OAR-OperationalString
This attribute tells the Provision Monitor what OperationalString to load when deploying the OAR.
OAR Construction
A <macrodef> task has been added to allow the creation of an OAR. This An task is part of the install target (in build/import/deploy-tasks.xml), and will create the OAR and copy the OAR to the rio/deploy directory where it will be picked up by the Provision Monitor, extracted and deployed.
An example of using this task is shown below:
<target name="oar" depends="jars">
<oar name="bean" file="bean.oar" opstring="bean.groovy"/>
<copy todir="${deploy.dir}" file="bean.oar"/>
</target>
The declaration above will produce an OAR with the following structure (and information)
META-INF/MANIFEST
OAR-Name: bean
OAR-Activation: Automatic
OAR-OperationalString: bean.groovy
lib/bean.jar
lib/bean-dl.jar
src/conf/bean.groovy
| Attribute |
Description |
Required |
|---|---|---|
| name |
Creates the directory name when the OAR is extracted |
yes |
| file |
The filename of the OAR |
yes |
| opstring |
The OperationalString file to deploy |
yes |
| activation |
Tells the Provision Monitor what to do with the installed OAR. If the OAR-Activation attribute is "Manual", then the deployment will only be loaded manually. If the OAR-Activation attribute is "Automatic", then the Provision Monitor will deploy the OAR immediately after installation |
no, default is Automatic |
| lib.dir |
The directory that contains application libraries |
no, default is lib |
| opstring.dir |
The directory that contains the OperationalString deployment configuration |
no, default is src/conf |
| Make sure the oar name property matches the directory name you use for resources in your opstring |
| You can also use the jar task by itself if you have custom settings. Consult the build/import/deploy-tasks.xml for details |
OAR Hot Deploy
The Provision Monitor is configured with a FileSystemOARDeployHandler that handles OAR files. It uses two directories; a dropDirectory, and a installDirectory. Both of these are (by default) set to RIO_HOME/deploy.
The installDirectory is the location where the OARs will be extracted to, the dropDirectory is the directory where OARs will be scanned for.
If you want to change these values, it's simple, edit RIO_HOME/config/monitor.groovy and look for (or add) the following entry. Either change the constructor argument to match the directories you want, or add a new FileSystemOARDeployHandler set with the directories you want.
class MonitorConfig {
...
String deployDir = "${RIO_HOME}/deploy"
DeployHandler[] getDeployHandlers() {
def handlers = [new FileSystemOARDeployHandler(new File(deployDir))]
return handlers as DeployHandler[]
}
}
class MonitorConfig {
...
long deployMonitorPeriod = 30000;
...
}
