Static Couchbase Agent for Gluesync: Features

Source data from Couchbase

Prerequisites

To have Gluesync working and performing its CDC duties on your Couchbase Server instance you will need to have:

  • Valid user credentials with permission to read, and write to the source bucket, for automatic eventing function deployment cluster-admin role is also required;

  • Couchbase Eventing service deployed into your Couchbase Server cluster;

  • Following ports opened on your Couchbase Server cluster:

  • 8091-8096 (REST API);

  • 18091 (TLS REST API), in case you use TLS;

  • 11210:11210 (Bucket API), in case you use TLS;

  • 21100:21100 (Management API), in case you use TLS;

Setup via Web UI

  • Hostname / IP Address: DNS SVR record of your Couchbase Server cluster or IP Address of one of the nodes (automatic discovery of all other nodes is then applied). For Capella users, put the given hostname like cb.XYZ.cloud.couchbase.com;

  • Port: Optional, defaults to 8091, use 18091 for Couchbase Capella DBaaS and secured connections;

  • Database name: Name of your source bucket;

  • Username: Username with read & write access role to source bucket;

  • Password: Password belonging to the given username;

  • Enable Tls: (optional, defaults to false) Enable or disable the usage of TLS encryption;

  • Tls certificates: (optional) File browser to let you upload your certificates;

Custom host credentials

This agent has no specific configuration properties.

Specific configuration

The following example shows how to apply the agent-specific configurations via Rest API.

  • Index replica count: (optional, defaults to 0) Indicates the number of index replicas that will be generated by Gluesync. We suggest to size that number calculating it as number-of-index-node -1. For example, 3 node index means a suggested replica of 2. For more details please see Couchbase doc;

  • Timeout seconds: (optional, defaults to 60 seconds) Number of seconds to set as timeout for operations involving communication with the server;

  • Workers number: (optional, defaults to 3) Number of workers per node to process the events;

  • Script timeout seconds: (optional, defaults to 60) Timeout in seconds for the Eventing functions execution.

Setup via Rest APIs

Here following an example of calling the CoreHub’s Rest API via curl to setup the connection for this Agent.

Connect the agent

curl --location --request PUT 'http://core-hub-ip-address:1717/pipelines/{pipelineId}/agents/{agentId}/config/credentials' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
        "hostCredentials": {
        "connectionName": "myAgentNickName",
        "host": "host-address",
        "port": 8091,
        "databaseName": "myBucket",
        "username": "",
        "password": "",
        "enableTls": true,
        "certificatePath": "/myPath/cert.pem",
}'

Setup specific configuration

The following example shows how to apply the agent-specific configurations via Rest API.

curl --location --request PUT 'http://core-hub-ip-address:1717/pipelines/{pipelineId}/agents/{agentId}/config/specific' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
  "configuration": {
      "indexReplicaCount": 0,
      "timeoutSeconds": 60,
      "workersNumber": 3,
      "scriptTimeoutSeconds": 60
    }
}'

Deploying the Eventing service and relative functions

The Eventing service should be deployed and available in your Couchbase cluster before running Gluesync. For sizing questions about how to dimension properly your cluster with this new service, we recommend to reach us via mail or contact directly the Couchbase representative who can manage to properly help you size the Eventing service based on your specific goals. We recommend reserving for the Eventing service at least a minimum of 512 Mb of RAM before starting any production workload.

Regarding the deployment of the Eventing functions, Gluesync manages to deploy and update each function needed automatically.

Troubleshooting

Here is the list of common errors.

  • ERROR TIMEOUT: BUCKET_OPEN_IN_PROGRESS: You might either have specified the wrong server port for your Couchbase connection or this is blocked by the firewall.