Using Couchbase as PCC Data Repository (4.0)


Note!

Refer to /wiki/spaces/3PP/pages/1671475 for supported Couchbase versions.

In order for Usage Engine to communicate with the Couchbase database, the PCC Couchbase Storage option must be included in your license.

You can then install the Couchbase database by following the steps described in the Couchbase documentation, docs.couchbase.com.

 

Note!

Couchbase services required by Usage Engine are:

  • Data
  • Index
  • Query

Refer to docs.couchbase.com for information about these services. 

Note!

 For the optimal Couchbase Server operations, you must set swappiness to 0 (zero).

When Couchbase is installed, buckets for each created Couchbase profile will be generated and visible in the Couchbase Web Console, as soon as the data buckets are called.

Couchbase Profiles Required by PCC

You should now create two Couchbase Profiles; one for the static configurations in the Data Repository, and one for the runtime data in the Data Repository.

To create these Couchbase profiles:
 

  1. Click on the Configuration button in the upper left part of the Desktop, and then double-click on the Couchbase Profile in the list.

    A Couchbase Profile configuration opens.

    Here you have three tabs; Connectivity, which contains settings for the connections between the buckets in the cluster(s), Management , which contains the user name, password, size, and monitoring settings for the bucket, and Advanced, which contains the advanced properties.
     

  2. Create one profile for the configurations bucket, where:

    • The Bucket Name is config or something similar.

    • Set the Bucket User and User Password as a user who has access to the bucket and their password.

    • The Cluster Nodes section contains the IP-address/host name for each of the Couchbase nodes in the cluster.

    • The user name and password for the administrator created during Initial Server setup is added in the Management tab.

    • You can select the Monitoring checkbox if you want to use monitoring functions for detecting unresponsive nodes and performing fail-over.

    This profile will create a bucket called config (or similar), which will be used for static data in the Data Repository, such as the different rules, products and periods defined.
     

  3. Create another profile for the usage bucket, where:

    • The bucket name is bucket or something similar.

    • Set the Bucket User and User Password as a user who has access to the bucket and their password.

    • The Cluster Nodes section contains the IP-address/host name for each of the Couchbase nodes in the cluster.

    • The user name and password for the administrator created during Initial Server setup is added in the Management tab.

    • You can select the Monitoring checkbox if you want to use monitoring functions for detecting unresponding nodes and performing failover.

    This profile will create a usage bucket called bucket (or similar), which will be used for the runtime data in the Data Repository, that is, the actual usage of the subscribers.
     

  4. Open the pcc.properties file, located in the /etc/pcc/pcc.properties directory, and enter the names of your newly created profiles with the following properties:

    mz.pcc.storage.couchbase.config.profile=
    mz.pcc.storage.couchbase.buckets.profile=

    Example - pcc.properties

    mz.pcc.storage.couchbase.config.profile=MyFolder.config
    mz.pcc.storage.couchbase.buckets.profile=MyFolder.bucket
  5. In the PCC Config Storage Properties group, ensure that the property mz.pcc.config.storage.class is set to com.digitalroute.pcc.storage.config.couchbase.CouchbaseConfigStorage.
     

  6. In the PCC Bucket Storage Properties group, ensure that the property mz.pcc.bucket.storage.class is set to com.digitalroute.pcc.buckets.storage.couchbase.CouchbaseBucketStorage.

     

  7. Save the pcc.properties file.
     

  8. In order for the ECDs to be able to locate the pcc.properties file, you must add the following system property:

    mz.pcc.properties=/etc/pcc/pcc.properties


    for each ECD, see Configuring ECD(s) with PCC Properties (4.0).

For further information about the settings in the Couchbase profile, see Couchbase (3.1).