Automated Cluster Setup
The crdemocluster tool automates all the necessary creation and configuration steps for a three-node cluster, turning a complex manual process into a single command. The tool performs the following actions:

Creates the Primary Node: It creates the first database and automatically loads the same standard demo files and system files as a database created by
crdemodb.

Creates Secondary Nodes: It prepares the necessary infrastructure for the two secondary nodes in the cluster.

Configures Cluster Parameters: For all three databases, it automatically modifies their INI files with the required
settings for cluster operation. This includes:

Enabling TCP/IP communication (
ADATCP=YES).

Assigning a unique client port (
PORTNUMBER) and a unique cluster communication port (
CLUSTER_PORT).

Assembling the particular
CLUSTER_URL for each node to communicate with the two other nodes.

Disabling the protection log (
PLOG=NO) on the secondary nodes.
After the tool has finished, the cluster is fully configured and ready to be started.
1. How to use the Tool
To run the tool, provide three unique database IDs (dbids) as arguments. The first dbid will be used for the primary node, and the next two will be for the secondary nodes.
Usage:
crdemocluster <dbid-primary> <dbid-secondary-1> <dbid-secondary-2>
Example:
crdemocluster 111 112 113
2. After Running the Tool
The crdemocluster tool only prepares the cluster nodes; it does not start the nodes. Once the command has finished successfully, it will print the exact commands needed to start the cluster, configure client access, and later delete the cluster.
a. Starting the Cluster Nodes
To start the cluster, you must first start the primary node with a particular environment variable (CLUSTER_BOOTSTRAP) to signal that it should not synchronize with the other nodes as they are not yet running. After the primary node is up, you can start the secondary nodes normally.
# Start the primary node (e.g., dbid 111)
export CLUSTER_BOOTSTRAP=""
adastart 111
unset CLUSTER_BOOTSTRAP
# Start the secondary nodes (e.g., dbids 112 and 113)
adastart 112
adastart 113
b. Configuring Client Access
For clients to connect to the cluster as a single entity, you need to configure a dbmapping.txt file in $ACLDIR/config.
Please refer to the Adabas Client documentation for details. The tool displays a template in its output.
Example dbmapping.txt entry:
1111 = adatcp://localhost:26111?cluster=adatcp://localhost:25112;adatcp://localhost:25113
c. Deleting the Demo Cluster
To clean up and delete the cluster databases, ensure all nodes are offline and run the following commands:
adadbm dbid=111 delete_database=full
adadbm dbid=112 delete_database=full
adadbm dbid=113 delete_database=full