Creating and deleting instances using the Command Central command line interface
By default, the working directory of an instance is APAMA_HOME/command-central/instances/ComponentType/instance_name. All the log files including stdout and stderr are located in the instance_name/logs folder. The environment variables ${APAMA_WORK} and ${APAMA_HOME} can be used inside extraArgs, iafConfigFile and log files, and this will be replaced with the location of those directories.
For all configuration instances that use a properties file as input, the contents of these files are interpreted using the rules of the standard Java Properties File Format, and therefore any backslashes should be escaped (as \\). In most cases, no special escaping should be performed when editing the equivalent values in the web interface, except for the environment variables text box which does need escaping of backslashes, as it contains the raw contents of a .properties file.
You can create and delete Apama component instances using the Command Central command line interface as well.
Use the following command to create an instance of an Apama component:
sagcc create instances nodeAlias productId
[param1=value1 param2=value2 ...]
Where nodeAlias specifies the alias name of the installation in which to create the Apama component instance, and productID is always PAMServer when administering Apama components.
For example:
sagcc create instances local PAMServer
instance.name=myCorrelator instance.type=correlator instance.port=15993
Where productID is PAMServer, and [param1=value1 param2=value2 ...] is instance.name=myCorrelator instance.type=correlator instance.port=15993. Here, instance.type indicates the Apama component type correlator, iaf, displayserver, or dataserver.
Use the following command to delete an instance of an Apama component:
sagcc delete instances nodeAlias runtimeComponentId
The runtimeComponentID is the ID of an instance in the format Apama-ComponentType-InstanceName, where:
ComponentType is one of the supported Apama components
correlator,
iaf,
displayserver, or
dataserver.
myCorrelator,
myIAFmyDisplayServer, and
myDataServer are the
InstanceName when the instance was created.
For example:
sagcc delete instances local Apama-correlator-myCorrelator
Where the runtimeComponentID is Apama-correlator-myCorrelator.
For more information on using the commands, see Software AG Command Central Help.
The following table lists the properties required to create and update an Apama component instances. You do not have to specify any properties to delete an instance.
Component | Required Properties |
correlator | instance.name instance.type instance.port |
IAF | instance.name instance.type instance.port iafConfigFile |
Dashboard display server | instance.name instance.type |
Dashboard data server | instance.name instance.type |
Examples when executing on Command Central
To create an instance of IAF with the name "myIAF" in the installation with alias "local". The instance uses connection port 15993 and a configuration file with the name "iaf-config.xml":
sagcc create instances local PAMServer instance.name=myIAF
instance.type=iaf instance.port=15993 iafConfigFile=iaf-config.xml
To create an instance of display server with the name "myDisplayServer" in the installation with alias "local". The instance uses connection port 3279 and management port 28889:
sagcc create instances local PAMServer instance.name=myDisplayServer
instance.type=displayserver dataPort=3279
managementPort=28889
To create an instance of data server with the name "myDataServer" in the installation with alias "local". The instance uses data port 3278 and management port 28888:
sagcc create instances local PAMServer instance.name=myDataServer
instance.type=dataserver dataPort=3278
managementPort=28888
To delete an instance of correlator with runtime component ID "Apama-correlator-myCorrelator" from the installation with alias "local":
sagcc delete instances local Apama-correlator-myCorrelator
To delete an instance of IAF with runtime component ID "Apama-iaf-myIAF" from the installation with alias "local":
sagcc delete instances local Apama-iaf-myIAF
To delete an instance of display server with runtime component ID "Apama-displayserver-myDisplayServer" from the installation with alias "local":
sagcc delete instances local
Apama-displayserver-myDisplayServer
To delete an instance of data server with runtime component ID "Apama-dataserver-myDataServer" from the installation with alias "local":
sagcc delete instances local
Apama-dataserver-myDataServer
After an instance is created, the instance is referred to in the other commands by the component identifier Apama-instance.type-instance.name.