Hitachi

uCosminexus Application Server System Setup and Operation Guide


4.2.2 Scaling out the system environment (when using CUI)

This subsection describes the steps to scale out the system by adding service unit (unit2) using the Smart Composer functionality.

Organization of this subsection

(1) Preparing the host to be added

Before scaling out the system, set up the OS or the applications on the Application Server to be added. The following table describes the tasks to be executed in the hosts to be added, and the necessity of the tasks:

Table 4‒21: Tasks to be executed in the hosts to be added, and necessity of the tasks

Tasks to be implemented in the hosts to be added

Necessity of the tasks

Conditions for executing the tasks

References

Setting up Component Container Administrator (For UNIX)

A

When assigning operation permissions to the general users in UNIX OS

4.1.3

Installing Application Server

Y

Mandatory (when the OS is Windows)

2.2.2

Mandatory (when the OS is AIX)

2.2.3

Mandatory (when the OS is Linux)

2.2.4

Installing products used for connecting to the database

A

For connecting to the database

2.2.5

Symbolic link supported in the Application Server (For UNIX)

A

When the OS is UNIX

4.1.5

Setting up the database connection environment

A

When connecting to the database (HiRDB)

4.1.6

When connecting to the database (Oracle)

4.1.7

For connecting to the database (SQL Server)

4.1.8

Setting up the environment variables for the system

Y

Mandatory

4.1.11

Setting up the environment variables for the logical server

A

When changing the environment variables during installation

4.1.12

Starting the Administration Agent

Y

Mandatory

4.1.17

Legend:

Y: Mandatory task

A: Tasks to be executed with the execution conditions are fulfilled.

If you change the Web system configuration, you must also change the resources required to operate the Web system. For estimating the resources necessary for the operations of the Web system, see 5. Estimating Resources to be Used (J2EE Application Execution Platform) in the uCosminexus Application Server System Design Guide.

(2) Creating the configuration change definition file

Copy the configuration change definition file for adding a service unit or host to any location, and then edit the file contents.

  1. Copy the template file (cmxaddcombinedmodel.xml) for Configuration Change Definition file to any location.

    The template for configuration change definition file for adding the service unit or host is available at the following location:

    For Windows

    Cosminexus-installation-directory\manager\config\templates\cmxaddcombinedmodel.xml

    For UNIX

    /opt/Cosminexus/manager/config/templates/cmxaddcombinedmodel.xml

  2. Rename the template mentioned in step 1 to any name.

    In the following example the file is renamed as MyWebSystemAdd.xml.

  3. Use the Text editor to define the service units and hosts to be added to the configuration change definition file.

    Example of creating MyWebSystemAdd.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <unit-addition xmlns="http://www.cosminexus.com/mngsvr/schema/UnitAddition-2.5">
      <web-system>
        <name>MyWebSystem</name>
        
        <!--Specify the settings for the Service Unit to add.-->
        <unit>
          <name>unit2</name>
          <allocated-host>
            <host-ref>apsv3</host-ref>
            <hosts-for>http-tier</hosts-for>
          </allocated-host>
          <allocated-host>
            <host-ref>apsv4</host-ref>
            <hosts-for>j2ee-tier</hosts-for>
          </allocated-host>
        </unit>
      </web-system>
      
      <!--Specify the settings for the host to add.-->
      <host>
        <host-name>apsv3</host-name>
        <agent-host>apsv3</agent-host>
      </host>
      <host>
        <host-name>apsv4</host-name>
        <agent-host>apsv4</agent-host>
      </host>
    </unit-addition>

    Note: The part that is bold and highlighted is the part to be edited.

(3) Changing the system information model

Apply the contents of the created configuration change definition file to the system information model registered in the Management Server.

  1. Start the command prompt on the host for allocating the Management functionality (Management Server).

  2. Execute the cmx_change_model command to change the system information model registered in the Management Server.

    Command execution example is as follows:

    cmx_change_model -m 192.168.100.12 -u cosmi_admin -p cosmi_admin_passwd -f MyWebSystemAdd.xml-file-path

    Specify the path of the directory storing MyWebSystemAdd.xml, and the file name (MyWebSystemAdd.xml) in MyWebSystemAdd.xml-file-path.

(4) Adding the service unit

Apply the information model of the changed system to the actual system to add a service unit.

  1. Start the command prompt on the host for allocating the Management functionality (Management Server).

  2. Execute the cmx_build_system command to deploy the information model of the changed system to the actual system.

    Command execution example is as follows:

    cmx_build_system -m 192.168.100.12 -u cosmi_admin -p cosmi_admin_passwd -s MyWebSystem
  3. Execute the cmx_start_target command to start the added service unit.

    Set the added service unit unit2 to Operating status. To set the service unit to Operating status, specify ALL in the -mode option.

    cmx_start_target -m 192.168.100.12 -u cosmi_admin -p cosmi_admin_passwd -s MyWebSystem -unit unit2 -mode ALL -strict
  4. Start the command prompt on the host for allocating the J2EE server existing in the added service unit.

  5. Set up and start the resource adapter.

    Command execution example is as follows:

    cjimportres MyWebSystem_J2EE02 -nameserver corbaname::192.168.100.14:900 -type rar -f DBConnector_HiRDB_Type4_CP.rar-file-path
     
    cjdeployrar MyWebSystem_J2EE02 -nameserver corbaname::192.168.100.14:900 -resname DB_Connector_for_HiRDB_Type4
     
    cjsetrarprop MyWebSystem_J2EE02 -nameserver corbaname::192.168.100.14:900 -resname DB_Connector_for_HiRDB_Type4 -c MyDBConnectorAttr.xml#-file-path
     
    cjtestres MyWebSystem_J2EE02 -nameserver corbaname::192.168.100.14:900 -resname DB_Connector_for_HiRDB_Type4
     
    cjstartrar MyWebSystem_J2EE02 -nameserver corbaname::192.168.100.14:900 -resname DB_Connector_for_HiRDB_Type4

    # Use the Connector property file applied to the resource adapter of the service unit to be scaled out. If the Connector property file is not saved, use the server management command (cjgetrarprop) from the resource adaptor deployed on the service unit to be scaled out; to acquire the Connector property file. Edit the acquired Connector property file as and when required.

  6. Set up and start the J2EE application.

    Command execution example is as follows:

    cjimportapp MyWebSystem_J2EE02 -nameserver corbaname::192.168.100.14:900 -f MyApp.ear
     
    cjstartapp MyWebSystem_J2EE02 -nameserver corbaname::192.168.100.14:900 -name MyApp