OpenTP1 Version 7 Operation

[Contents][Index][Back][Next]

3.15.6 Using sample scenario templates

OpenTP1 provides sample scenario templates for the scenario for adding a new OpenTP1 node in the Scale Out scenario.

When you execute the OpenTP1_ScenarioScaleout sample scenario template with OpenTP1 installed, a new OpenTP1 environment is created. After creation of the environment, OpenTP1 and a sample user server (basespp) start. By customizing sample scenario templates, you can easily execute Scale Out in a way appropriate for your environment.

Organization of this subsection
(1) Overview of sample scenario templates
(2) Registering sample scenario templates
(3) Customizing a sample scenario template

(1) Overview of sample scenario templates

This subsection provides an overview of sample scenario templates.

The sample scenario templates perform the processing shown in the following table.

Table 3-40 Processing executed by the sample scenario templates

No. Processing Scenario template name Input scenario variables referenced
1 Creating an OpenTP1 directory OpenTP1_MakeTP1Dir
  • DCDIR
  • DCCONFPATH
  • HOST_NAME
  • USER_NAME
  • GROUP_NAME
2 Setting the OpenTP1 environment OpenTP1_SetConfig
  • DCDIR
  • DCCONFPATH
  • HOST_NAME
  • USER_NAME
  • BETRAN_FILE1
  • BETRAN_FILE2
  • PORT_NUMBER
3 Setting a node ID OpenTP1_ChangeNodeID
  • DCDIR
  • DCCONFPATH
  • HOST_NAME
  • USER_NAME
  • NODE_ID
4 Registering OpenTP1 OpenTP1_Deploy
  • DCDIR
  • DCCONFPATH
  • HOST_NAME
5 Creating OpenTP1 file systems OpenTP1_MakeFileSystem
  • DCDIR
  • DCCONFPATH
  • HOST_NAME
  • USER_NAME
  • BETRAN_FILE1
  • BETRAN_FILE2
6 Starting OpenTP1 OpenTP1_Start
  • DCDIR
  • DCCONFPATH
  • HOST_NAME
  • USER_NAME
7 Starting a UAP (sample program) OpenTP1_StartUAP
  • DCDIR
  • DCCONFPATH
  • HOST_NAME
  • USER_NAME
  • USER_SERVER_NAME

See the following for details about each scenario template.

1. Creating an OpenTP1 directory (OpenTP1_MakeTP1Dir)
Use the OpenTP1 directory creation shell file# to create the OpenTP1 directory with the following procedure:
  1. Acquire a user name and a group name (getUSERNAME).
    The specified USER_NAME and GROUP_NAME are acquired and passed to makeTP1Dir. If both USER_NAME and GROUP_NAME are omitted, the user-mapped primary user defined in JP1/Base and the group the user belongs to are acquired.
  2. Create the OpenTP1 directory (makeTP1Dir).
    Use the OpenTP1 directory creation shell file# to create the following OpenTP1 directories:
    [Figure] Directory: Value set for the input scenario variable DCDIR
    [Figure] Owner: Value set for the input scenario variable USER_NAME
    [Figure] Group: Value set for the input scenario variable GROUP_NAME
    [Figure] Mode: 0755
    If the parent directory of the specified OpenTP1 directory does not exist, create the parent directory and the OpenTP1 directory. You need to set the owner, group, and mode only for the OpenTP1 directory.

2. Setting the OpenTP1 environment (OpenTP1_SetConfig)
Use the OpenTP1 directory creation shell file# to create the OpenTP1 directory with the following procedure.
  1. Create the $DCDIR/aplib, $DCDIR/jp1_template/tools, and $DCCONFPATH directories.
  2. Copy aplib, conf, and tools in the /BeTRAN/jp1_template/examples directory to the created directory.
  3. Set the node-specific information (such as the path name of the file system) in the system definition.

3. Setting a node ID (OpenTP1_ChangeNodeID)
The scenario template uses the value specified for the input scenario variable NODE_ID as the node ID of OpenTP1.

4. Registering OpenTP1 (OpenTP1_Deploy)
The scenario template executes the dcsetup command to register OpenTP1 in the OS.

5. Creating an OpenTP1 file system (OpenTP1_MakeFileSystem)
Use the OpenTP1 file creation shell file# to create an OpenTP1 file system and OpenTP1 files.
The names of the OpenTP1 file systems are the values set for the input scenario variables BETRAN_FILE1 and BETRAN_FILE2.

6. Starting OpenTP1 (OpenTP1_Start)
The scenario template starts OpenTP1.

7. Starting a UAP (sample program) (OpenTP1_StartUAP)
The scenario template starts the UAP on the user server specified in the input scenario variable USER_SERVER_NAME.

#
The shell files depend on the OS being used. The table below shows the shell file paths for each OS.

Table 3-41 Paths for the shell files for each OS

Shell file name OS
UNIX Windows
OpenTP1 directory creation shell file /BeTRAN/jp1_template/examples/tools/dcjmk_dcdir.sh OpenTP1-installation-directory\jp1_template\examples\tools\dcjmk_dcdir.bat
OpenTP1 environment setup shell file /BeTRAN/jp1_template/examples/tools/dcjset_conf.sh OpenTP1-installation-directory\jp1_template\examples\tools\dcjset_conf.bat
OpenTP1 file creation shell file /BeTRAN/jp1_template/examples/tools/dcj_mkfs.sh OpenTP1-installation-directory\jp1_template\examples\tools\dcj_mkfs.bat

(2) Registering sample scenario templates

To execute a sample scenario template, you register it in JP1/AJS2 - Manager from JP1/AJS2 - Scenario Operation View.

The sample scenario templates are stored in the following location:

/ScenarioLibrary/OpenTP1/TP1_ServerBase/OpenTP1_ScenarioScaleout

To register a sample scenario template, set the input scenario variables listed in the following table.

Table 3-42 Information to be set in the sample scenario templates

Input scenario variable Description Example
DCDIR OpenTP1 home directory /home/user/OpenTP1
DCCONFPATH Directory containing the OpenTP1 definition file /home/user/OpenTP1/conf
HOST_NAME#1 Host name of the OpenTP1 node where the scenario template is to be executed hostX
USER_NAME#1 OpenTP1 user name user
GROUP_NAME#1 OpenTP1 group name tp1
BETRAN_FILE1#2 Path for an OpenTP1 file system /home/user/OpenTP1/betranfile1
BETRAN_FILE2#2 Path for an OpenTP1 file system /home/user/OpenTP1/betranfile2
USER_SERVER_NAME User server name basespp (fixed in the sample)
NODE_ID OpenTP1 node identifier (unique character string of 4 characters for each node) smpl
PORT_NUMBER OpenTP1 name port number 10000

#1
You can omit this specification. You need to either specify both the input scenario variables USER_NAME and GROUP_NAME, or omit both of them.

#2
When you set a character type special file, allocate a partition before you execute a scenario.

When you execute a scenario created by entering into a sample scenario template the values shown in the table above, an OpenTP1 execution environment is created with the directory configuration shown in the following figure.

Figure 3-42 OpenTP1 directory configuration after the sample scenario templates are executed

[Figure]

(3) Customizing a sample scenario template

By customizing a sample OpenTP1 definition file or shell file, you can easily change the OpenTP1 configuration. You can also store the files customized for your environment and the installation environment settings of OpenTP1 on a master disk, which is created by using DPM, so that you can easily execute Scale Out.

You can customize the following sample files:

See the following for details about how to customize each file.

(a) Customizing a load module for a sample program

You can create an SUP or an SPP appropriate for your tasks and store the load module (executable file) in the desired directory.

(b) Customizing the system definition file and the OpenTP1 environment setup shell file

To customize the system definition of OpenTP1, you need to change the system definition file and the OpenTP1 environment setup shell file.

(c) Customizing the OpenTP1 file creation shell file

The sample scenario template creates the files listed in the following table in the OpenTP1 file systems (/home/user/OpenTP1/betranfile1 and /home/user/OpenTP1/betranfile2) that are set for the input scenario variables BETRAN_FILE1 and BETRAN_FILE2. To change the files to be created, customize the OpenTP1 file creation shell file.

Table 3-45 Files created in the OpenTP1 file systems set for the input scenario variables BETRAN_FILE1 and BETRAN_FILE2

File name File type
cpdf01#1 Checkpoint dump file
cpdf02#1
cpdf03#1
stsfil01#1 Status file (system A)
stsfil03#1
jnlf01#1 System journal file
jnlf02#1
jnlf03#1
stsfil02#2 Status file (system B)
stsfil04#2

#1
File created in /home/user/OpenTP1/betranfile1

#2
File created in /home/user/OpenTP1/betranfile2