6 Installing Cassandra Message Store

This chapter describes how to install and configure Oracle Communications Messaging Server software on Cassandra message store nodes, message access tier hosts, and front-end tier hosts. For more information on the Messaging Server install command, see the discussion on the commpkg install command in Messaging Server Installation and Configuration Guide.

About Messaging Server Components

When you install the Cassandra message store, you install and configure one or more of the following components:

  • Cassandra and Solr Node. Consists of the Cassandra database and Solr indexing and search system. The Cassandra keyspaces and schema are created whenever the Messaging Server stored process starts on any message access node that points to this Cassandra data center.

  • Message Access Tier. Consists of a set of components that store, retrieve, and manipulate messages for mail clients. When using Cassandra message store, you configure at least IMAP and the LMTP server components on this tier. In addition, LMTP pre-conversion is set on by default (iscimmediate option is enabled). That is, when LMTP is involved, the message access tier's Indexed Search Convertor (ISC) converts the messages before delivering them to the store. (The result is that email messages become searchable almost immediately upon delivery into the message store.) The message access tier also must be affinity-group aware for notification publishing.

  • Front-End Tier. Consists of hosts that connect to the message access tier affinity group based on a user's LDAP mailHost attribute. For Cassandra message store, this includes the Message Transfer Agent (MTA), Messaging Multiplexor (MMP), LMTP Client, and mshttpd daemon.

    Note:

    Messaging Server front-end tier components—Message Transfer Agent and Messaging Multiplexor (MMP) hosts, LMTP clients, and Webmail Server (mshttpd) hosts—must be running at least Messaging Server 8.0.1.

The Cassandra message store changes the semantics of the mailHost attribute in LDAP. Instead of referring to a physical host, in Messaging Server 8.0.2 "mail host" refers to a store affinity group. You configure the store affinity group by using the proxy:mailhost.storehostlist msconfig option. You must configure store affinity groups with the same storehostlist on all front-end and access-layer hosts in the deployment. Store affinity groups enable the MTA to route to an alternate LMTP server in the list if the first one listed is unavailable. Affinity groups are used to distribute ENS delivery events so that IMAP IDLE works without the need to broadcast all delivery events to all IMAP servers.

Note:

The store affinity group concept is also used by the Messaging Server 8.0.1 automatic failover (without cluster) feature. That is why it is supported for Messaging Server 8.0.1 front-end hosts to communicate with Cassandra message access-tier hosts.

About Unified Configuration

You must use Unified Configuration to configure and administer Messaging Server on the message access tier hosts.

Unified Configuration is an improved, streamlined process to configure and administer Messaging Server. Unlike in legacy configurations, Unified Configuration uses validation to verify configuration accuracy, and employs a single tool to configure the entire Messaging Server configuration (with a few exceptions). For more information, see the discussion on Unified Configuration in Messaging Server System Administrator's Guide.

Before Installing Messaging Server

You must have already completed the following steps on all Messaging Server components:

  1. Ensure that DNS is running and configured properly.

  2. Ensure you have sufficient file descriptors on Linux.

  3. Make sure you do not configure conflicting port numbers on a host when various components run on a single machine.

  4. Preparing Directory Server by running the comm_dssetup.pl script against it.

For more information on completing these tasks, see "Messaging Server Pre-Installation Tasks" in Messaging Server Installation and Configuration Guide.

The following steps must be completed for Cassandra nodes:

  1. Install Java.

    You also need to install Java on the message access tier hosts if they run the Indexed Search Convertor (ISC), in addition to the normal processes (imap, enpd, and lmtps).

  2. Install Python.

  3. Install DataStax Enterprise software.

  4. Start DataStax Enterprise as a transactional (Cassandra) node.

See Chapter 5, "Cassandra Message Store Pre-Installation Tasks" for more information.

Using a Configuration Management Tool to Simplify Installation and Configuration

Currently, Messaging Server does not supply its own tool for configuration management. However, you can use a configuration management tool, such as Chef or Puppet, to simplify the installation and management of Messaging Server across multiple servers. For more information, see the topic on using a configuration management tool with Messaging Server in Messaging Server Installation and Configuration Guide.

Installing and Configuring Messaging Server

The tasks to install the front-end and message access tiers, and the Cassandra message store are as follows:

Downloading the Messaging Server Software

  1. Download the media pack for Oracle Communications Messaging Server software and for Messaging-CAS software (the Comms FIT component) from the Oracle software delivery website, located at:

    http://edelivery.oracle.com/

  2. Copy the Messaging Server ZIP file to a temporary directory on your Messaging Server hosts and extract the files.

  3. Copy the Comms FIT ZIP file to a temporary directory on your Cassandra/Solr hosts and extract the files.

Installing and Configuring the Messaging Server Software

You must install and configure the Cassandra message store, and associated components, in the following order, to ensure proper operation:

Note:

You must use ENS for notifications with the Cassandra message store. The default when you run the configure command is for ENS to be enabled, so no additional steps are necessary to enable ENS. However, manual store affinity group configuration is required to have ENS tolerate host failures.

Caution:

When completing the steps in this section, do not start Messaging Server until instructed to do so. Otherwise, errors might result.

Installing Messaging-CAS Software on DSE/Solr Nodes

This task assumes that you have already installed and started Cassandra, as explained in "Installing the DataStax Enterprise Software". The Messaging-CAS software contains the FIT component, which you must install on every Cassandra/Solr node.

To install and configure Messaging-CAS software on the DSE/Solr nodes:

  1. Log in as or become the superuser (root).

  2. Use the commpkg install command to install Messaging-CAS software.

    See "commpkg Reference" in Messaging Server Installation and Configuration Guide for more information about the commpkg install command.

  3. Run the config-fit script to create the FIT configuration.

    See "config-fit Reference" for more information about the config-fit script.

    cd MessagingServer_home/cas/bin
    config-fit
    

    Be sure to use the same FIT port throughout the deployment. (The default is 8070.)

Note:

The UNIX owner of the FIT directories and files must be the same as the owner of the DSE_HOME location. Permissions for the configuration files must be similar to those used by the configure script (644 for the config.xml file, and 600 for the xpass.xml file).

Installing Message Access Tier Hosts

The message access tier hosts must run at least Messaging Server 8.0.2 and be configured for Unified Configuration.

To install and configure Messaging Server software on the message access tier hosts:

  1. Log in as or become the superuser (root).

  2. Use the commpkg install command to install Messaging Server software.

    See "commpkg Reference" in Messaging Server Installation and Configuration Guide for more information about the commpkg install command.

  3. Create the Cassandra configuration:

    cd MessagingServer_home/bin
    configure
    

    Note:

    By default, the configure command also performs the necessary configuration to set up LMTP pre-conversion of messages. Round robin load balancing does not exist for hosts specified as ISC servers to perform LMTP pre-conversion. Instead, the first available server in list is used.
  4. Configure required Cassandra message store options by using the CasAccessTier.rcp recipe file.

    This recipe enables the message store, sets the message store type to Cassandra, sets replication factors and data centers, sets connection points, sets up the LMTP server, sets up store affinity groups, and disables unwanted Messaging Server processes.

    1. Change to the MessagingServer_home/lib/recipes directory.

    2. Edit the CasAccessTier.rcp recipe for your deployment to configure the access tier hosts. Relevant options that the CasAccessTier.rcp file sets are:

      store.enable = 1
      store.purge.enable = 1
      store.serviceadmingroupdn = Service_Administrators_Group_DN
      store.dbtype = cassandra
      store.casconnectpoints = IP_address_CSnode1 IP_address_CSnode2 ...
      store.casmetarf = 3
      store.casmsgrf = 3
      store.cascacherf = 1
      store.cassolrdc = DC2
      store.cassolrrf = 3
      store.cascachedc = DC3
      store.casmetadc = DC1
      store.solrconnectpoints = IP_addressSL_node IP_address_SL_node ...
      

      Note:

      The store.enable, store.purge.enable, and store.serviceadmingroupdn options should be set automatically by the configure command.
    3. Run your edited recipe file:

      msconfig run CasAccessTier.rcp
      
  5. If Cassandra cluster authentication is required, use the msconfig command to set the store.casusername and store.caspassword options.

  6. (Optional) Configure how the ISC is invoked.

    By default, the ISC is configured with the iscimmediate option, for LMTP pre-conversion. See Messaging Server Reference for more information on the iscdeferred option to delay ISC operations until after delivery to the message store.

Installing MTA Tier Hosts

The MTA tier hosts must run Messaging Server 8.0.1 or greater and be configured for Unified Configuration (for store affinity group support).

To install and configure Messaging Server software on the MTA tier (Submission/Relay) hosts:

  1. Log in as or become the superuser (root).

  2. Use the commpkg install command to install Messaging Server software.

    See "commpkg Reference" in Messaging Server Installation and Configuration Guide for more information about the commpkg install command.

  3. Create the configuration:

    cd MessagingServer_home/bin
    configure --noisc
    

    Running the configure command automatically sets up the LMTP channel correctly on the MTA tier hosts. Also, running the configure --noisc command installs the front-end services without requiring that Java be present.

  4. Configure the MTA by copying the CasFrontEnd.rcp recipe from the MessagingServer_home/lib/recipes directory to the ConfigRoot/recipes directory, then editing the file.

    When configuring an MTA host, make sure to:

    • Disable the message store

    • Disable the LMTP server

    • Disable mshttpd

    For the store affinity group:

    • Specify a list of fully qualified server names that have access to the same message store data. The first host name in the list should be the default master for the message store while the other hosts in the list should be configured to act as failover hosts for the master. When a mailHost attribute is found in LDAP, it is first resolved through this configuration. The store affinity group settings (the storehostlist option values) must be the same on all hosts in the deployment It is not permitted for the same server name to appear in more than one storehostlist. For the Cassandra message store, you can reorder the storehostlist on different servers as long as the content is the same.

      Note:

      The MTA ignores the storehostlist option unless the affinitylist option is set.
  5. Run your edited recipe file:

    msconfig run CasFrontEnd.rcp
    

Installing MMP Hosts

The MMP tier is required if there is more than one store affinity group. The classic message store and Cassandra message store must be in different store affinity groups if both are present in the deployment for migration purposes.

The MMP tier hosts must run Messaging Server 8.0.1 or greater and be configured for Unified Configuration (for store affinity group support).

To install and configure Messaging Server software on the Cassandra MMP tier hosts:

  1. Log in as or become the superuser (root).

  2. Use the commpkg install command to install Messaging Server software.

    See "commpkg Reference" in Messaging Server Installation and Configuration Guide for more information about the commpkg install command.

  3. Create the configuration:

    cd MessagingServer_home/bin
    configure --noisc
    

    Running the configure --noisc command installs the front-end services without requiring that Java be present.

  4. Configure the MMP by copying the CasFrontEnd.rcp recipe from the MessagingServer_home/lib/recipes directory to the ConfigRoot/recipes directory, then editing the file.

    When configuring an MMP host, make sure to:

    • Disable the message store

    • Disable the LMTP server

    • Disable mshttpd

    • Enable the MMP (mmp.enable option)

    • Uncomment the delete_ options

    For the store affinity group:

    • Specify a list of fully qualified server names that have access to the same message store data. The first host name in the list should be the default master for the message store while the other hosts in the list should be configured to act as failover hosts for the master. When a mailHost attribute is found in LDAP, it is first resolved through this configuration. The store affinity group settings (the storehostlist option values) must be the same on all hosts in the deployment It is not permitted for the same server name to appear in more than one storehostlist. For the Cassandra message store, you can reorder the storehostlist on different servers as long as the content is the same.

  5. Run your edited recipe file:

    msconfig run CasFrontEnd.rcp
    

Using a Non-MMP IMAP Proxy

If you want to use a different IMAP proxy, that proxy must support IMAP LOGIN referrals (RFC 2221) and for robustness needs to support a facility to handle the store affinity groups.

Configuring a Remote Indexed Search Converter

To configure a remote Indexed Search Converter (ISC), where the ISC is not running on the same host as LMTP, run the following command:

msconfig set isc_client.ischosts ISC_host_name1 ISC_host_name2 ...

Enabling SSL

You can configure the ISC and FIT components to communicate using Secure Sockets Layer (SSL). To enable SSL, you set the appropriate ISC and FIT configuration options, and generate a certificate to import into the certificate database. For detailed steps, see the topic on configuring the ISC component for SSL in Messaging Server Security Guide.

Starting the Cassandra Message Store Across Tiers

After you have installed Messaging Server software and configured the Cassandra message store (across all tiers), start the tiers in the following order:

  1. DSE non-Solr nodes: DSE should already be started (by running the service dse start command).

  2. Solr nodes: DSE should already be started. When starting Messaging Server, only the isc process should start.

  3. Message access hosts: When starting Messaging Server, the appropriate message access services (imapd, stored, isc, and so on) should start.

  4. Front-end hosts: When starting Messaging Server, the appropriate front-end services (MMP, MTA, mshttp, and so on) should start.

Restarting a Cassandra Cluster

A restarted Solr process on a rebooted Solr node takes a long time to join the Cassandra cluster. Therefore, when restarting a cluster, you must follow specific steps to avoid read failures in the FIT logs and DSE taking a long time to start on the Solr nodes. See the topic on restarting a Cassandra message store cluster in Messaging Server System Administrator's.