Skip to main content
Version: 3.16

ScalarDB Cluster Standalone Mode

Instead of setting up a Kubernetes cluster and deploying ScalarDB Cluster on top of it by using a Helm Chart, you can run ScalarDB Cluster in standalone mode, which simplifies development and testing processes. A primary use case for this would be when you want to start ScalarDB Cluster in standalone mode via Docker on your local machine and use it for development and testing.

To run ScalarDB Cluster in standalone mode, you need to set the scalar.db.cluster.node.standalone_mode.enabled property to true:

scalar.db.cluster.node.standalone_mode.enabled=true

Run ScalarDB Cluster in standalone mode on Docker Compose​

This section explains how to start ScalarDB Cluster in standalone mode on Docker Compose.

warning

You need to have a license key (trial license or commercial license) to use ScalarDB Cluster. If you don't have a license key, please contact us.

Clone the ScalarDB samples repository​

Open Terminal, then clone the ScalarDB samples repository by running the following command:

git clone https://github.com/scalar-labs/scalardb-samples

Then, go to the directory that contains the necessary files by running the following command:

cd scalardb-samples/scalardb-cluster-standalone-mode/

Set up your database for ScalarDB Cluster​

Follow the instructions below to configure your database for ScalarDB Cluster.

For a list of databases that ScalarDB supports, see Databases.

Select your relational database.

Run Db2 locally

You can run IBM Db2 in Docker Compose by using the docker-compose.yml file in the scalardb-samples/scalardb-cluster-standalone-mode directory.

To start IBM Db2, run the following command:

docker compose up -d db2

Configure ScalarDB Cluster

The scalardb-cluster-node.properties file in the scalardb-samples/scalardb-cluster-standalone-mode directory contains database configurations. Please uncomment the properties for Db2 in the scalardb-cluster-node.properties file so that the configuration looks as follows:

# For Db2
scalar.db.storage=jdbc
scalar.db.contact_points=jdbc:db2://db2-1:50000/sample
scalar.db.username=db2inst1
scalar.db.password=db2inst1

Set the license key​

Set the license key (trial license or commercial license) for the ScalarDB Clusters in the configuration file scalardb-cluster-node.properties. For details, see How to Configure a Product License Key.

Start ScalarDB Cluster in standalone mode​

To start ScalarDB Cluster in standalone mode, run the following command:

note

If you want to change other configurations for ScalarDB Cluster, update the scalardb-cluster-node.properties file before running the command below.

docker compose up -d scalardb-cluster-node

Client configurations for the ScalarDB Cluster Java API​

You can use the indirect client mode to connect to ScalarDB Cluster in standalone mode. For details about client configurations for the ScalarDB Cluster Java API, see Developer Guide for ScalarDB Cluster with the Java API.