6 Configuring Contacts Server With Multiple Hosts

This chapter describes how to configure Oracle Communications Contacts Server with multiple hosts.

About Installing and Configuring Multiple Contacts Server Databases

A standard Contacts Server installation consists of a default back-end database that contains contact data. Perform the procedures in this section to add additional back-end data bases to your initial deployment.

In the case of multiple Contacts Server front ends, configure each to use the same initial default database back end. Then, you add additional back ends to each front end.

Each back-end database must have its own document store. When you use multiple front ends, all document stores must be available to all front ends. You cannot make all document stores local to a front end in a multiple front-end deployment.

The configuration procedure follows these steps:

  1. (Optional) If you have not done so already, install and configure the new database. Then prepare the new database by running either the config-mysql or config-oracle script.

  2. Gather the database host names, ports, and other database names.

  3. Install all front-end servers, if not already done.

  4. Configure all front-end servers by running the init-config script, if not already done.

    Running the init-config script creates the config-backend script for use in the next step. Information about your back-end server is used for this step. See "Renaming the Default Contacts Server Database" if you have already run the init-config script, and you want to rename the default back-end server.

  5. On each front-end server, run the config-backend script.

    Note:

    If you use WebLogic Server, you cannot run this script. See "Installing and Configuring Multiple Contacts Server Back-End Hosts for WebLogic Server Manually" for more information.
  6. On each front-end server, enable connection pool validation.

    Note:

    This step is applicable only for GlassFish Server.
  7. On each front-end server, restart the application server.

Installing and Configuring Multiple Contacts Server Back-End Hosts for GlassFish Server

To install and configure multiple Contacts Server back-end hosts for GlassFish Server:

  1. Install the database software on each back-end host. Choose one of the following:

  2. If you want to create additional MySQL Server databases, do the following:

    Note:

    If the Contacts Server software is not installed on the back-end host, copy the config-mysql, config-oracle, and Util.pm scripts from an installed Contacts Server host and adjust the following path to those scripts accordingly.
    • If this is the first database on the host, set up the instance, and create the user and database by running the following command:

      ContactsServer_home/tools/unsupported/bin/config-mysql -s -u -c
      
    • If there is already a database on the host, just create the database by running the following command:

      ContactsServer_home/tools/unsupported/bin/config-mysql -c
      
  3. To create the Oracle database user and schema, see the following:

  4. On each front-end host, run the config-backend script.

    This script creates a JDBC connection pool and a JDBC resource on the GlassFish Server, and a back-end configuration using the user-provided back-end identifier.

    ContactsServer_home/sbin/config-backend
    

    Follow the prompts and enter the database and document store information.

    • If your deployment is using MySQL Server, make sure the value you enter for Contacts db name on remote server is the one that you used for the config-mysql -c command.

    • If your deployment is using Oracle Database, make sure the value you enter for Contacts db user name is the one that you used for the config-oracle -c command.

  5. Enter Y when prompted to perform the tasks for creating the JDBC connection pool and resource using the user-provided back-end identifier.

    The system responds that the database back-end configuration is configured successfully.

  6. Restart GlassFish Server.

  7. Provision accounts for a multiple back-end deployment.

    If needed, provision accounts for a multiple back-end deployment. See "Provisioning Accounts in a Multiple Back-End Deployment" for more information.

Renaming the Default Contacts Server Database

The Contacts Server init-config script creates the JDBC connection pool and resource, and adds the information to the davserver.properties file, for the one database host specified during the front-end configuration. The default JDBC resource name used is defaultbackend.

If you need to change this JDBC resource name, to match other naming conventions, follow these steps.

  1. On each front-end application server, create a JDBC resource associated with the nabPool connection Pool.

    For example, you might use db1 as the resource name.

  2. Save this change then restart the application server.

  3. Add the following two lines to each ContactsServer_home/config/davserver.properties file.

    store.dav.jdbc-backend-id.backendid=jdbc-backend-id
    store.dav.jdbc-backend-id.jndiname=jdbc/jdbc-backend-id
    

    For example, if your resource name is db1, then you would add:

    store.dav.db1.backendid=db1
    store.dav.db1.jndiname=jdbc/db1
    

    The new resource name can be used in nabStore attribute values.

Note:

After your Contacts Server deployment is up and running, do not change the user back-end ID as defined by the nabStore attribute. Otherwise, data in the original database becomes orphaned and inconsistency errors result for users.

Provisioning Accounts in a Multiple Back-End Deployment

For accounts to know which back-end host they should connect to, you must provision accounts with the nabStore attribute. The nabStore attribute indicates the back-end host that stores a user's data if the deployment is configured for multiple back ends. For more information, see the topic on Contacts Server LDAP attributes in Communications Suite Schema Reference.

Installing and Configuring Multiple Contacts Server Back-End Hosts for WebLogic Server Manually

To install and configure multiple Contacts Server back-end hosts for WebLogic Server manually, perform the following steps:

  1. Install the database software on each back-end host. Choose one of the following:

  2. Decide if you must create additional Oracle Database or MySQL Server back-end databases. If you have chosen MySQL, continue with this step. If you have chosen Oracle Database, skip to Step 3.

    Note:

    If the Contacts Server software is not installed on the back-end host, copy the config-mysql, config-oracle, and Util.pm scripts from an installed Contacts Server host and adjust the following path to those scripts accordingly.
    • If this is the first database on the host, set up the instance, and create the user and database by running the following command:

      ContactsServer_home/tools/unsupported/bin/config-mysql -s -u -c
      
    • If there is a database on the host already, create the Contacts Server database by running the following command:

      ContactsServer_home/tools/unsupported/bin/config-mysql -c
      
  3. To create the Oracle database user and schema, see the following:

  4. Collect the following details specific to your new database backend setup.

    • Frontend: host1.us.oracle.com: Contacts Server deployed on WebLogic Server exists on this host.

    • Database host: host2.us.oracle.com: Existing backend database in production. Currently, frontend Contacts Server on host1 is configured to the backend database.

    • New: Additional database to be added: host3.us.oracle.com: Required database (MySQL database or Oracle database) is setup on this machine. This is associated with identifier backend2.

    Based on the above details, provide values for the following.

    If you use MySQL database:

    • Remote database server host name= host3.us.oracle.com

    • Remote database server port= 3306

    • Contacts database name on remote server=dav1

    • Contacts database user name=mysql

    • Contacts database user password=mysql

    • Backend identifier for the remote database=backend2

    • Document store directory (leave blank if store is remote)= /var/opt/sun/comms/nabserver/db/backend2

    • Document store host (leave blank if store is local)

    • Document store port (leave blank if store is local)

    • Application server admin user password=adminpass (Front-end WebLogic Server Admin User password)

    If you use Oracle database:

    • Remote database server host name=host3.us.oracle.com

    • Remote database server port = 1521

    • Oracle database service name on remote server=pdb2.us.oracle.com

    • Contacts database user name=nabadmin

    • Contacts database user password= password

    • Backend identifier for the remote database= backend2

    • Document store directory = /var/opt/sun/comms/nabserver/db/backend2

      Note:

      Do not provide any value if the document store directory is remote.
    • Document store host

      Note:

      Do not provide any value if the document store host is local.
    • Document store port

      Note:

      Do not provide any value if the document store port is local.
    • Application server administrator user password= adminpass

      Note:

      You should provide the front-end WebLogic Server Administration user password.
  5. Create JDBC Data Source using WebLogic Server Administrator Console on your frontend machine.

    Log in to your front-end computer where Contacts Server is deployed on WebLogic Server. You must possess the WebLogic Server Administration credentials and have access to WebLogic Server Administration Console.

    Based on the values you have gathered in step 4, proceed to enter the details.

    Note:

    The following WebLogic Administration Console screen options are provided based on WebLogic Server 12.2.1.3.
  6. Log in to WebLogic Server Administration Console on host1.us.oracle.com. For example, https://host1.us.oracle.com:7002/console

  7. Click Lock & Edit.

  8. Click your domain directory. For example, domain1.

  9. Navigate to Services and then Data Sources.

  10. Under the Configuration tab, click New.

  11. Select Generic Data Source.

  12. Enter the following details:

    • name: backend2

    • scope: global

    • JNDI Name: jdbc/backend2

    • If your database type is MySQL, select Database type: MySQL

      1. Click Next.

      2. Database Driver: Select MySQL's Driver (Type 4) Versions: using com.mysql.jdbc.jdbc2.optional.MySqlDataSource

      3. Click Next.

        You can leave the default values shown under the Transaction options.

      4. Click Next.

      5. Database Name: dav1

      6. Hostname=host3.us.oracle.com

      7. port = 3306

      8. Database User Name=mysql

      9. password=mysql

      10. confirm password=mysql

      11. Click Next.

      12. Ensure that the following is shown in URL=jdbc:mysql://host3.us.oracle.com:3306/dav1

      13. Under Properties, (properties to pass to the JDBC driver when creating database connections), you can have the following: user=mysql, databaseName=dav1, characterEncoding=UTF8

      14. Test table Name: SQL SELECT 1

      15. Click Test Configuration.

        The result must be Connection test succeeded.

      16. Click Next.

    • If your database type is Oracle, select Database type: Oracle.

      1. Click Next.

      2. Database Driver: Select *Oracle's Driver (Thin) for Service connections; Versions:Any.

      3. Click Next.

      4. You can leave the default values shown under Transaction options.

      5. Click Next.

      6. Database Name: pdb2.in.oracle.com

      7. Hostname=host3.us.oracle.com

      8. port=1521

      9. Database User Name=nabadmin

      10. password=password

      11. confirm password=password

      12. Click Next.

      13. Ensure the URL is shown correctly as: URL=jdbc:oracle:thin:@//host3.us.oracle.com:1521/pdb2.in.oracle.com

      14. Test table Name: SQL SELECT 1 FROM DUAL

      15. Click Test Configuration.

        The result must be Connection test succeeded.

      16. Click Next.

  13. Select the target server.

    Note:

    The target server must be your Managed Server. For example, server1. The selected target server must be the same target server that you had selected during the init-config setup on the front-end machine.
  14. Click Finish.

    You can see the newly created backend2 in the list of Data Sources table.

  15. Click Activate Changes.

  16. Restart WebLogic Server.

    Ensure that WebLogic Admin or Managed Server log file does not contain any errors.

  17. Run davadmin backend create where a new resource is created. For example, backend2.

  18. Log in to your front-end host where the Contacts Server is set up. For example, host1.us.oracle.com.

  19. Navigate to the ContactsServer_home/sbin directory where davadmin CLI tool is residing. For example, /opt/sun/comms/nabserver/sbin/davadmin.

  20. Run the davadmin command:

    /opt/sun/comms/nabserver/sbin/davadmin backend create -u weblogic_adminuser -n newbackend_identifier -j newbackend_JNDIName -d  local_documentstorepath
    

    For example,

    /opt/sun/comms/nabserver/sbin/davadmin  backend create -u weblogic -n  backend2 -j "jdbc/backend2" -d  "/var/opt/sun/comms/nabserver/db/backend2"
    
  21. Run the following CLI command and verify the created backend details by checking the store.dav.xx parameters that are listed:

    /opt/sun/comms/nabserver/sbin/davadmin config list

    When you run the above command, the list must contain the following:

    store.dav.backend2.jndiname=jdbc/backend2

    store.dav.backend2.dbdir=/var/opt/sun/comms/nabserver/db/backend2

    store.dav.backend2.attachstorehost=

    store.dav.backend2.attachstoreport=8008

    store.dav.backend2.backendid=backend2

    store.dav.backend2.purgedelay=2592000

  22. Provision accounts for a multiple back-end deployment.

    See "Provisioning Accounts in a Multiple Back-End Deployment".