7 Configuring the Contacts Server Document Store

This chapter describes how to configure the Oracle Communications Contacts Server document store.

About Configuring the Document Store

The Contacts Server document store is used to store and retrieve large data, such as photos and logos. You must set up one document store per configured Contacts Server back-end database.

The document store can be either local or remote, or, if you use Oracle Database, within the database itself. When the document store is local, Contacts Server accesses the file systems directly. When the document store is remote, Contacts Server accesses the documents by using either HTTP or HTTPS. If you use Oracle Database, you can configure it to contain both the contact data and the data that otherwise would need to be stored in the separate document store. That is, you would use a single, large Oracle database for both contacts data and the document store.

Configuring Oracle Database for Both Contact Data and Large Data

In the case of Oracle Database, you can configure it to contain both the contacts data and the data that would otherwise need be stored in the separate document store. This type of configuration is not possible with a MySQL database. If you are using MySQL Server, refer instead to "Configuring a Local Document Store" and "Configuring a Remote Document Store" to set up a local or remote document store.

To configure Oracle Database for both contact data and large data:

  1. Set the store.dav.backend-name.attachstorehost parameter to a value of dbdocstore. For example:

    cd ContactsServer_home/sbin
    davadmin config modify -o store.dav.defaultbackend.attachstorehost -v dbdocstore
    

    You must do this on all back ends.

  2. Restart Contacts Server by restarting the application server.

Configuring a Local Document Store

To configure a local document store:

  1. Log in to the local document store host.

  2. Either use the default document store directory (/var/opt/sun/comms/nabserver/db/), or create a data directory for the document store.

    mkdir path_to_docstore
    
  3. Set the directory access permissions to be readable and writable by the document store user only:

    chmod 700 path_to_docstore
    
  4. Configure Contacts Server to use the document store directory:

    davadmin config modify -u admin -o store.dav.defaultbackend.dbdir -v path_to_docstore
    
  5. Restart Contacts Server by restarting the application server.

Configuring a Remote Document Store

To configure a remote document store:

  1. Log in to the remote document store host.

  2. Either use the default document store directory (/var/opt/sun/comms/nabserver/db/), or create a data directory for the document store.

    mkdir path_to_docstore
    
  3. Set the directory access permissions to be readable and writable by the document store user only:

    chmod 700 path_to_docstore
    
  4. Run the configure-as script, which is located in the document store sbin directory:

    ContactsServer_home/sbin/configure-as
    
  5. Change the store.dav.backend.attachstorehost and store.dav.backend.attachstoreport parameters on each Contacts Server front-end host to specify the host name and port number of the document store hosts for the back-end database.

    For example:

    davadmin config modify -u admin -o store.dav.defaultbackend.attachstorehost -v ahost.example.com
    davadmin config modify -u admin -o store.dav.defaultbackend.attachstoreport -v 8008
    

    Each back-end database has its own document store. See the davadmin command documentation for more information about how to change the store.dav.backend.attachstorehost and store.dav.backend.attachstoreport parameters.

  6. Restart Contacts Server by restarting the application server.

If you need to start or stop the remote document store, the commands are:

ContactsServer_home/sbin/start-as
ContactsServer_home/sbin/stop-as

Configuring the Remote Document Store to Run as a Non-Root User

This procedure assumes that you have already configured the remote document store to run as root, and are now changing it to run as a non-root user.

  1. On the remote document store host, make sure that the document store is stopped.

    ContactsServer_home/sbin/stop-as
    
  2. On the remote document store host, run the chown command to change the user and group ownership of the files in the nabserver configuration and data directory (default is /var/opt/sun/comms/nabserver), and for the start-as and stop-as commands.

    chown -R non-root_user:group /var/opt/sun/comms/nabserver
    chown non-root_user:group ContactsServer_home/sbin/start-as
    chown non-root_user:group ContactsServer_home/sbin/stop-as
    
  3. If you have changed the default directory in the ashttpd.properties file for the store.datadir parameter, you must also change the ownership of that directory to the non-root user.

    For example, if store.datadir is set to /export/nabstore/nab, then run the following command:

    chown -R non-root_user:group /export/nabstore/nab
    
  4. Start the remote document store as the non-root user.

    su - non-root_user -c "ContactsServer_home/sbin/start-as"
    

Configuring Remote Document Store Authentication

You must configure password authentication of the connection between the remote document store server (which runs on the remote host where the store is located), and the document store client (which runs on every Contacts Server front end). The password must be known by both the document store client and the remote document store server. The password is stored in a password file (called a wallet) on each host where it is needed.

This procedure assumes you have already created the remote document store and that it is running.

  1. On the local Contacts Server host, use the davadmin passfile create command to set the document store password.

    For example:

    cd ContactsServer_home/sbin
    davadmin passfile create
    Enter the Password File password:
    
    Do you want to set the app server admin user password (y/n)? [n] n
    
    Do you want to set the database password (y/n)? [n] n
    
    Do you want to set the migration server user password (y/n)? [n] n
    
    Do you want to set the document store password (y/n)? [n] y
    Enter the document store password:
    Reenter the document store password:
    
    Do you want to set the document store SSL passwords (y/n)? [n] n
    

    Setting the document store password updates the store.document.password configuration parameter.

  2. On the remote document store host, configure the document store.

    cd ContactsServer_home/sbin
    configure-as
    
    Do you want to set the document store password (y/n)? [n] y
    Enter the document store password: password
    Reenter the document store password: password
    
    Do you want to set the document store SSL passwords (y/n)? [n] y
    Enter the document store SSL keystore password: <Type the same password that you used when creating the self-signed certificate, that is, the keystore password>
    Reenter the document store SSL keystore password: password
    
    Enter the document store SSL certificate password: <Type the same password that you used when creating the self-signed certificate, that is, the keystore password>
    Reenter the document store SSL certificate password: password
    
    Please check the values in /var/opt/sun/comms/nabserver/config/ashttpd.properties
    are correct before starting the server with start-as
    To stop the server, run stop-as
    Document Store server is now configured
    

    To change the document store password, run the davadmin passfile modify -O command.

    For example:

    cd ContactsServer_home/sbin
    davadmin passfile modify -O
    
    Enter the Password File password:
    
    Do you want to set the document store password (y/n)? [n]
    
    Do you want to set the document store SSL passwords (y/n)? [n] y
    

    Note:

    After setting the initial password, if you need to change the password, rerun the davadmin passfile modify command. If you change the password by using the davadmin config modify command instead, to modify the store.document.password configuration parameter, the document store password in the "davadmin" wallet may not be up-to-date.

Configuring Remote Document Store SSL

You can use SSL to secure the transmission of data between the Contacts Server host and the document store. Configuring SSL between Contacts Server and the document store consists of the following high-level steps:

  1. Configure the document store to accept SSL connections.

  2. Configure Contacts Server to connect to the document store over SSL.

For more information, see the topic on configuring SSL for remote document stores in Contacts Server Security Guide.

Configuring the Document Store for High Availability

You can configure Contacts Server for multiple document stores such that, when the current document store host fails, the back-end database host fails over to the next available document store host.

To configure the document store for high availability:

  1. Set up a shared file system, or some kind of data replication, for the document store data.

  2. Use the store.dav.backendid.attachstorehost configuration parameter to specify a comma-separated list of document store hosts.

    For example:

    davadmin config modify -o store.dav.backendid.attachstorehost -v "ahost1.example.com,ahost2.example.com"
    

    When the current document store host fails, the back end fails over to the next document store host on the list.

  3. Keep the data on the document stores synchronized at all times.

Migrating the Document Store

If, after installing the document store, you must migrate it to another location, you reconfigure the store location in the ashttpd.properties file, then manually move your existing documents in the astore directory. You also manually move the files in the config and logs directories to the new location before restarting the document store server and the front-end Contacts Server hosts. See the topic on document store configuration parameters in Contacts Server System Administrator's Guide for more information about the ashttpd.properties file.

To migrate the document store:

  1. Stop Contacts Server by stopping the application server.

  2. If the document store is remote, stop it as well:

    DocumentServer_home/sbin/stop-as
    
  3. Manually move the existing documents from the old path to the newly configured location.

  4. Use one of the following methods to reconfigure the document store server, depending on whether it is local or remote:

    • Remote store: Reconfigure the store.datadir parameter in the ashttpd.properties file.

      See the topic on document store configuration parameters in Contacts Server System Administrator's Guide for more information about these parameters.

    • Local store: Reconfigure the store.dav.defaultbackend.dbdir parameter.

  5. If the document store is remote, restart it:

    DocumentServer_home/sbin/start-as
    
  6. Restart Contacts Server by restarting the application server.