-
Notifications
You must be signed in to change notification settings - Fork 0
Home
The user of this caplet should be aware of the application packaging and deploying solution offered by Capsule (http://www.capsule.io). The following is the description of a Caplet from the website.
Caplets are classes that hook into the capsule and modify its behavior. A capsule contains metadata about your application and the means to execute it as a plain JVM program. Caplets can use the metadata in the capsule to launch the application in some more sophisticated ways.
This caplet overrides the default launch functionality of Capsule, uses the Capsule's meta-data together with TS/MP specific configuration to launch the application in the HPE NonStop Server's TS/MP environment.
Just as any other Caplet, the main-class in the jar's manifest should be the full path of this class i.e. TSMPCapsule
. This class will assume its TS/MP role only if the mode
is set to the value TSMP
. This makes it easy for the app developers to test the application package in a development environment such as Linux / Windows.
One of the ways to configure a generic Capsule is to have the configuration parameters as part of the manifest file in different sections. TSMPCapsule does not employ this method as there is chance of a single capsule jar being used to configure multiple TSMP runtime environments. Instead the capsule loads the configuration from a file. The file itself is in the format specified by java.util.Properties
. The following are the keys that this Caplet recognizes.
Properties related to configuring the PATHMON process
- PATHMON_NAME : This is the name of the pathmon process without the '$'. Example: CRD
- PRIMARY_CPU : The CPU on which the primary of the pathmon process should run. Example: 0
- BACKUP_CPU : The CPU on which the backup of the pathmon process should run. Example: 1
Properties related to configuring the SERVERCLASS process. The details of each attribute can be found in the 'HPE NonStop TS/MP System Management Manual'
- AUTORESTART : Value should be a number. Default 10
- NUMSTATIC : Value should be a number. Default 1
- MAXSERVERS : Value should be a number. Default 1
- PROCESS_NAMES : This is a comma separated list of names for the static instances. Example: PRC1,PRC2,PRC3. The names do not contain '$' symbol
- CPUS : This is a list of CPUs on which the processes should be started. Default {{0,1}}. Following are some examples: Example 1: {{0},{2,3},{4}}. Example 2: {{0,1},{1,2},{2,3},{3,0}}
- STDOUT : Default "/dev/null"
- STDERR : Default "/dev/null"
- DEFINE : This is the list of defines that have to be added to the serverclass configuration. Each define is enclosed in paranthesis and multiple defines have to be separated by comma. No Default. Example: (=_SQLMX_SMD_LOCATION, class defaults, volume $MYVOL.ZSD0),(=_MX_CMP_PROG_FILE_NAME, class map, file $MYVOL.MYSUBVOL.MXCMP) A single Capsule jar (with TSMP Caplet) will result in configuration of a pathway environment comprising a single PATHMON and a single SERVERCLASS. If multiple SERVERCLASSes are to be configured they have to be done with a Jar per SERVERCLASS. If the PATHMON in the configuration is already running, the Caplet will try to add SERVERCLASS to the existing PATHMON.
-
How does the TS/MP behaviour get triggered? The TS/MP mode gets triggered when the system property
capsule.mode
is set toTSMP
-
What are the ways to pass configuration file? The configuration file can be passed using system property
tsmp.config.prop
or the file can be placed in the META-INF folder of the jar that is being run -
Can it be run on any platform? No. It has to be run on an HPE NonStop Server ONLY
-
Can this caplet configure processes in the Guardian Environment? No. It can only configure Java processes and hence only in the OSS environment
-
Can the caplet be enhanced to spawn/configure any kind of process on NonStop? Yes. It can be