You are here: Create New Domain

Configure WebLogic Server

This section is applicable if you are using WebLogic as the J2EE Web container for the setup. After making necessary modifications to Kony Fabric Engagement Services files, you must configure WebLogic server. Perform the following tasks using WebLogic Administration Console. You need to log in to the Administration Console to perform these operations.

Create New Domain

To create a new domain, follow these steps:

  1. Start the Configuration wizard. You can start the configuration wizard by executing config.bat under WL_HOME/common/bin.
  2. Choose Create a new WebLogic domain option and click Next.
  3. In the Select Domain Source window, choose the default option and click Next.
  4. Specify the domain name as KonyPushNotification, and click Next.
  5. Configure the Administrator Username as weblogic and Password as a required value.
  6. Click Next.
  7. Configure the Server startup mode as development or production.
  8. Under JDK Selection pane, select JDK and click Next.
  9. By default, Administration server is created on port number 7001. If you want to modify the port number, perform these steps. If you do not want to make any changes, skip to step 9.
    1. Check Administration Server in the option and click Next.
    2. Enter a port (for example,7110) that is not in use in the Listen port field.
  10. Click Next.
  11. Click Create.

Create Cluster

A WebLogic Server cluster consists of multiple WebLogic server instances running simultaneously and working together to provide increased scalability and reliability. A Cluster configuration is setup on one of the physical servers on which you want to configure the cluster. The Administration server will be running on this machine only as shown below:

Note: Each server instance in a cluster must run the same version of WebLogic Server.

Step 1: Create a Cluster

  1. In the left pane of the Administration Console, expand Environment and select Clusters.
  2. Click New, and select the New.
  3. On the Create a New Cluster > Cluster Properties page, enter following details:
    1. Name: Enter the name of the cluster as KPNCluster.
    2. Messaging Mode: Select Unicast (default).
    3. Click OK.

Step 2: Create Managed Servers

On a physical server, to setup the Administration server and the Cluster, start the Administration server and open the Administration Console. On this server create the planned number of managed servers. For instance, for a Cluster architecture cited in the above figure, you need nine managed servers. So, you need to create nine managed servers as described in the steps given below:

To create a Managed Server in an existing domain, follow these steps:

  1. In the left pane of the Administration Console, select Environment > Servers.
  2. In the Servers table, click New.
  3. On the Create a New Server > Server Properties page:
    1. Name: Enter the name of the server as KPNSrv1.
    2. Server Listen Address: Suppose the physical machine has multiple IP addresses, and you want to restrict the machine to listen particular IP address, then provide the particular IP address or DNS name here. If you do not enter any value, then by default WebLogic configures the server to listen on all the addresses. Considering the example in the figure above, you need to create three managed servers listening to the address of machine one, three listening on the address of machine two and three listening on the address of Machine three. All the nine managed servers are created on the physical machine on which the cluster is configured.
    3. Server Listen Port: Enter the port number that is not in use, for instance 8001, from which you want to access the server instance.
    4. Under Should this server belong to a cluster?
      1. Select Yes, make this server a member of an existing cluster.
      2. Select a cluster: Choose the cluster created earlier.
    5. Click Next.
    6. Click Finish.
  4. Repeat steps 1 to 3 to create multiple managed servers, with a unique name and port, on this domain.

Step 3: Start the Node Manager

Node Manager is a stand-alone Java program provided with each WebLogic server installation. You use it to start, stop, and suspend server instances, and to automatically restart servers that fails. Node Manager must run on each computer that hosts WebLogic Server instances that you want to control with the Node Manager.

You can manually start the node manager by executing startNodeManager script. For WebLogic 11g you can find the script file under <WL_INSTALL_DIR>/Middleware/wlserver/server/bin.

Step 4: Create Machines

To start a managed server from the cluster for each computer hosting a set of managed servers, a machine needs to be configured on the server where you want to create the cluster.

To create a Machine, follow these steps:

  1. In the left pane of the Administration Console, expand Environment and select Machines.
  2. Click New.
  3. On Create a New Machine > Machine Properties page, enter the following details:
    • Name: Enter the name of the machine as machine1.
  4. Repeat steps 1 to 3 to create multiple machines, with a unique name, on this domain.

Step 5: Configure Machines

Configure the machine to listen to the local or remote Node Manager and add the servers the machine controls.

To configure Machines, follow these steps:

  1. In the left pane of the Administration Console, expand Environment and select Clusters.
  2. Select the machine created earlier.
  3. Select Configuration > Node Manager tab:
    1. Type: Select the Node Manager type from the drop-down list. By default the type of the Node Manager is SSL. It is recommended to go with the default type.
    2. Listen Address: Enter the DNS name or the IP address on which the Node Manager listens this physical server. You can enter localhost, if the Node Manager runs on the same box.
    3. Listen Port: This is the port where the Node Manager listens for incoming requests. By default,Node Manager listens on port 5556.
    4. Click Save.
  4. Select Configuration > Servers tab:
    1. Click Add.
    2. Under Add a Server to Machine > Identify Server
      • Select a Server: Select the managed server created earlier.
    3. Repeat steps i and ii to add multiple servers.
  5. These steps should be repeated for each machine created.

Configure Application Server

Provide JVM parameters using the Administration Console. You need to log in to the WebLogic Administration Console to perform these operations.

To configure the server, follow these steps:

  1. Log in to WebLogic Administration Console.
  2. Select Environment > Servers from the left menu.
  3. Click the server on which you need to set the JVM parameters.
  4. Select the Server Start tab.
  5. In the Arguments field, enter the system properties as described below:
    Parameters (for JVM)RequiredDescription

    -Xmx2048m (Sun)

    -Xmx:2048m (JRockit)

    Yes

    Minimum Heap size: 2GB

    -Xms2048m (Sun)

    -Xms:2048m (JRockit)

    YesMaximum Heap size: 2GB

    - XX:UseParallelGC (SUN)

    -Xgcprio:throughput (JRockit)

    YesThis is a recommended setting.
    -XX:MaxPermSize=512mYesOne fourth of the main Heap memory assigned
    -Dkpns.configLocationYesThis is the directory where the configResouce.properties, database.properties, kpnslog4j.properties and pns-ehcache.xml files must be placed. Example: if the location is /data/kpnsconfig , then you must specify the property as Dkpns.configLocation=/data/kpnsconfig
    Dhibernate.dialectEnables you to connect to the database. JDBC has to be configured on the AppServer level.

    DB2=org.hibernate.dialect.DB2Dialect- per database

    SQL= org.hibernate.dialect.SQLServerDialect

    Oracle= org.hibernate.dialect.Oracle10gDialect

    MYSQL= org.hibernate.dialect.MySQLDialect

    Sample arguments for Managed Server1 would look like:

    -Xms2048m –Xmx2048m -Dkpns.configLocation=/data/kpnsconfig

  6. Save the configuration.
  7. Restart the server.
  8. Perform steps number two to seven for all the managed servers on which Kony Application Server needs to be deployed.

Configure Datasource

To configure datasource, follows these steps:

Setup Datasource

  1. In Administration Console, select Services > Data Sources from the left menu.
  2. Click New, and select Generic Data Source.
  3. Provide the following information:
    • Data source name: kpnsdb
    • JNDI Name: jdbc/kpnsdb
    • Database Type: Select the database type.
  4. Click Next to continue.
  5. In the page that appears:
    • Select the database driver.
      • Oracle:If the selected database type is Oracle, the default driver selected is a two phase commit driver. For setting up database drivers for KPNS, we recommend you to use Oracle Driver (Thin) for Instance Connections.
      • MySQL: If the selected database type is MySQL, the default selected driver is the recommended database driver.
      • DB2: If the selected database type is DB2, select the database driver as:Oracle's DB2 Driver XA
        1. Oracle's DB2 Driver Non-XA
        2. Oracle's DB2 Driver Non-XA
      • Microsoft SQL Server: If the selected database type is Microsoft SQL Server, select the database driver as, Oracle's MS SQL Server Driver Non-XA.
    • Click Next.
    • Enter connection properties like Database Name, Host Name, Port, Database User Name and Password.

      Note: For DB2, database schema name should be in capital letters like KPNSDB.

  6. Click Next to continue.
  7. Select the cluster created earlier, as the target for the data source
  8. Click Finish to create a datasource for the given details.

Start the Cluster

You must first complete the above configurations and complete the KPNS setup before starting the cluster.

To start the cluster, follow these steps:

Step 1: Create the Managed Server Configuration

The domain configuration currently exists in the machine hosting the Administration server. You have to copy the domain configuration on each machine. These copies of the domain configuration will be used by the managed servers. Run the following commands to create a template of the domain configuration.

  1. Navigate to the common/bin directory of the WebLogic Home.

    cd <WL_HOME>/common/bin

  2. Run the pack command to generate the template.

    pack.bat -managed=true -domain=<Weblogic_Install_Dir>/user_projects/domain/<domain_name> -template=<Location_to_store_generated_template>/<template_name>.jar -template_name=”<template_name>”

    A template is created based on which you create domain on the other physical servers.

Step 2: Copy the Managed Server Configuration

Copy the template created in the above step to a temporary location on each physical machine. Make sure you installed same version of WebLogic Server on each physical machine. Execute the below command to create the domain on each physical server.

  1. Navigate to the common/bin directory of the WebLogic Home.

    cd <WL_HOME>/common/bin

  2. Run the unpack command to create the domain configuration.

    unpack.bat -domain=<Weblogic_Install_Dir>/Middleware/user_projects/domain/<domain_name>
    -template=<location_of_the_copied_template>

    A domain is created with the provided domain name.

Step 3: Enroll the Node Manager

Enroll the Node Manager to make the managed servers on the domain to be accessible. On each machine, which is a part of the cluster, perform the following steps:

  1. Navigate to WL_HOME/common/bin.
  2. Execute wlst.bat This action opens a console to execute the commands required for enrolling the Node Manager.

    Initializing WebLogic Scripting Tool (WLST) ...

    Welcome to WebLogic Server Administration Scripting Shell Type help() for help on available commands wls:/offline>

  3. Enter connect('<username>','<password>','t3://<Admin Host>:<Admin Port>'), where the username and password are the credentials required to connect to the Administration Server.
  4. Below is the sample command:

    wls:/offline>connect('weblogic','weblogic1','t3://KonyServer:8080')

  5. Enter nmEnroll('<Domain Dir>', '<Node Manager Home>'), where domain directory in our case is <Weblogic_Install_Dir>/Middleware/user_projects/domain/<domain_name> and Node Manager home is usually WL_HOME/common/nodemanager.wls:/KonyMiddleware/serverConfig>nmEnroll('<Weblogic_Install_Dir>/Middleware/user_projects/domain/<domain_name>', 'WL_HOME/common/nodemanager')

    Restart the Node Managers on all the machines after performing this step.

Step 4: Start the cluster

  1. In the left pane of the Administration Console, expand Environment and select Clusters.
  2. Select the cluster you created.
  3. On the Control page, select all the servers and click Start.

This starts the Managed Servers on all physical servers. The remote start is done through the Node Manager.

This completes the cluster setup. Configure a hardware Load Balancer to complete the load balancing.

Deploy Engagement Services

Deploy Kony Fabric Engagement Services after you start the Cluster. Download or copy kpns.war and place it on your local machine.

To deploy Engagement Services follow these steps:

  1. In the left pane of WebLogic Administration Console, select Deployments.
  2. Click Install.
  3. In the Install Application Assistant, select the kpns.war by using the folder navigation provided.
  4. Let the Target style be the default (Application type deployment) and click Next.
  5. In the Select deployment targets pane, select the cluster created and click Next.
  6. Go to Source accessibility section of the Optional Settings pane and choose Copy this application onto every target for me.
  7. Click Finish. The deployment has been completed successfully.
  8. To access the kpns console, navigate to http://<Host Name or IP address>/kpns.

    Note: If Kony Fabric Engagement Services security is enabled, the Weblgic basic authentication security has to be disabled.
    To disable the Weblgic basic authentication security, modify the security-configuration tag in the config.xml file located in the config folder of Weblogic server

    <?xml version='1.0' encoding='UTF-8'?>
    <domain xmlns="http://xmlns.oracle.com/weblogic/domain" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.oracle.com/weblogic/security/xacml http://xmlns.oracle.com/weblogic/security/xacml/1.0/xacml.xsd http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator http://xmlns.oracle.com/weblogic/security/providers/
    passwordvalidator/1.0/passwordvalidator.xsdhttp://xmlns.oracle.com/weblogic/domain http://xmlns.oracle.com/weblogic/1.0/domain.xsd http://xmlns.oracle.com/weblogic/security http://xmlns.oracle.com/weblogic/1.0/security.xsd http://xmlns.oracle.com/weblogic/security/wls http://xmlns.oracle.com/weblogic/security/wls/1.0/wls.xsd"> <name>plt1</name> <domain-version>10.3.5.0</domain-version> <security-configuration> <name>plt1</name> <realm> <sec:authentication-provider xsi:type="wls:default-authenticatorType "></sec:authentication-provider> <sec:authentication-provider xsi:type="wls:default-identity-asserter Type"> <sec:active-type>AuthenticatedUser</sec:active-type> </sec:authentication-provider> <sec:role-mapper xmlns:xac="http://xmlns.oracle.com/weblogic/security/xacml" xsi:type="xac:xacml-role-mapperType"></sec:role-mapper> <sec:authorizer xmlns:xac="http://xmlns.oracle.com/weblogic/security/xacml" xsi:type="xac:xacml-authorizerType"></sec:authorizer> <sec:adjudicator xsi:type="wls:default-adjudicatorType"></sec:adjudicator> <sec:credential-mapper xsi:type="wls:default-credential-mapperType"> </sec:credential-mapper> <sec:cert-path-provider xsi:type="wls:web-logic-cert-path-providerType"></sec:cert-path-provider> <sec:cert-path-builder>WebLogicCertPathProvider</sec:cert-path-builder> <sec:name>myrealm</sec:name> <sec:password-validator xmlns:pas="http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator" xsi:type="pas:system-password-validatorType"> <sec:name>SystemPasswordValidator</sec:name> <pas:min-password-length>8</pas:min-password-length> <pas:min-numeric-or-special-characters>1</pas:min-numeric-or-speci al-characters> </sec:password-validator> </realm> <default-realm>myrealm</default-realm> <credential-encrypted>{AES}ojAgdYBG3tN2+X/c52RaQbhB6hCRrlFlKKqz/
    4joVzQUtk+WEdm0MbvIGgPusmcfhcKHQLaYwnhtnUWvkMZ7NTxoXv1hQjlNKBRbnhMat8ti0KFaN46QT bd4AmW3qczp</credential-encrypted> <node-manager-username>weblogic</node-manager-username> <node-manager-password-encrypted>{AES}dbeIf/S+jYhL1Uyj1rS33ZJf3G3oi9n4Bi9RdJwWv8w=</node-manager-password-encrypted> <enforce-valid-basic-auth-credentials>false</enforce-valid-basic-auth-credentials> </security-configuration> <server> <name>AdminServer</name> <listen-address></listen-address> <server-start> <arguments>-Xms1024m -Xmx1024m -Dkpns.configLocation=/data/kpns-config -Dhibernate.dialect=org.hibernate.dialect.Oracle10gDialect -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=4000</arguments> <username>weblogic</username> <password-encrypted>{AES}EZZ/aAqiz+8goecXlWC+jaWOcVOijjUY3KXjM3EHHHw =</password-encrypted> </server-start> </server> <embedded-ldap> <name>plt1</name> <credential-encrypted>{AES}C6eItmd8OAAirP/G/TIQur8boApKvb1sICBHGFuvafr RWCRg/pUfxjTceh2s7mGO</credential-encrypted> </embedded-ldap> <configuration-version>10.3.5.0</configuration-version> <app-deployment> <name>kpns</name> <target>AdminServer</target> <module-type>war</module-type> <source-path>servers/AdminServer/upload/kpns.war</source-path> <security-dd-model>DDOnly</security-dd-model> </app-deployment> <admin-server-name>AdminServer</admin-server-name> <jdbc-system-resource> <name>kpnsdb</name> <target>AdminServer</target> <descriptor-file-name>jdbc/kpnsdb-jdbc.xml</descriptor-file-name> </jdbc-system-resource> </domain>
Copyright © 2015 Temenos AG. All rights reserved.