5.1. Installation of Couchbase

Couchbase Software


Note!

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

In order for  to communicate with the Couchbase database, the couchbase.mzp package must be included in your installation.

When the couchbase.mzp package is installed in , the Couchbase database can be installed by following these steps:

  1. Open a web browser and go to http://www.couchbase.com.

  2. Click Downloads

  3. Select the Enterprise edition for  your operating system.
     
  4. Click on Install Instructions to view information on how to install Couchbase. 

    Note!

    It is important that you perform the steps that are specific to your operating system. For instance, when you install Couchbase on an operating system that is based on Red Hat Enterprise Linux, Transparent Huge Pages (THP) should be disabled on all server nodes.  

     

    Note!

    Couchbase services required are:

    These links may refer to another version of Couchbase than the one you install. If you install a different version, refer to docs.couchbase.com for the corresponding documentation version. 

  5. In the Couchbase documentation, review the subtopics under Deployment Considerations in Administration.

    Note!

     For the optimal Couchbase Server operations, you must set swappiness to 0 (zero) as described in the topic about swap space.

  6. Start a web browser and go to http://localhost:8091/.

    The Couchbase Web Administration interface opens.

     
    The Coucbhase Web Administration interface
  7. Click the Setup New Cluster button and follow the instructions https://developer.couchbase.com/documentation/server/5.1/install/init-setup.html. The Couchbase Web Console opens displaying the Dashboard.


    The Couchbase Dashboard

  8. In the Dashboard, select Settings and click on the Auto-Compaction tab. Select the checkbox Compact Buckets and View indexes in parallel. When you have a large number of documents in the database, creating iterators may sometimes fail. Enabling this setting may help to mitigate this problem.

  9. Repeat the installation on all the Couchbase nodes in the cluster, and ensure that you select the option Join Existing Cluster during the installation of the remaining nodes.

  10. In the Dashboard on any of the nodes, select Servers and click the Rebalance button to distribute the data between the nodes evenly.

    Couchbase Dashboard showing the Rebalance button

  11. These links may refer to another version of Couchbase than the one you install Couchbase profile will be generated and visible in the Couchbase Web Console, as soon as the data buckets are called.

Couchbase Profiles

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

  2. Click on the New Configuration button in the upper left part of the  Desktop window, and then select Couchbase Profile from the menu.

    A Couchbase Profile configuration opens.

    Couchbase Profile - Connectivity tab

    In this dialog 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.
     

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

    • The Bucket Name is config or something similar.

    • If you have selected Couchbase Release 5.x - 6.x, set the Bucket User and User Password as a user who has access to the bucket and their password. If you have selected Couchbase Release 4.x, it is optional to set a Bucket 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 check box if you want to use monitoring functions for detecting unresponsive nodes and performing failover.

    Couchbase Profile - Management tab

    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 configurations.
     

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

    • The bucket name is bucket or something similar.

    • If you have selected Couchbase Release 5.x - 6.x, set the Bucket User and User Password as a user who has access to the bucket and their password. If you have selected Couchbase Release 4.x, it is optional to set a Bucket 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 check box 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, i e the actual usage of the subscribers.
     

  5. In each Execution Container, open the pcc.properties file, located in the MZ_HOME/etc directory, and enter the names of your newly created profiles in 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
  6. 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.
     

  7. 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.

     

  8. Save the pcc.properties file.
     

  9. In order for the EC/ECSAs to be able to locate the pcc.properties file, you must set the Execution Context property mz.pcc.properties.

     $ mzsh topo set topo://container:<container>/pico:<pico>/val:config.properties.mz.pcc.properties <path>

    Example - Setting mz.pcc.properties

     $ mzsh topo set topo://container:exec1/pico:ec1/val:config.properties.mz.pcc.properties '${mz.home}/"etc/pcc.properties"'
     $ mzsh topo set topo://container:exec1/pico:ec2/val:config.properties.mz.pcc.properties '${mz.home}/"etc/pcc.properties"'

    Note

    It is important that the pcc.properties property file is located in the stated directory in all Execution Containers.

  10. Restart the EC/ECSAs.

For further information about the settings in the Couchbase profile, see  8.5 Couchbase Profile in the Desktop User's Guide.