Skip to main content
Version: 3.9

How to Install ScalarDL in Your Local Environment with Docker

This document shows how to set up a local environment that runs ScalarDL along with the back-end Cassandra server using Docker Compose.

warning

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

Prerequisites​

  • Docker 20.10 or later with Docker Compose V2 or later

    Follow the instructions on the Docker website according to your platform.

Clone the scalardl-samples repository​

The scalar-labs/scalardl-samples repository includes sample applications for you to start using ScalarDL instantly.

  1. In Terminal, determine the location on your local machine where you want to run the scalardl-samples app. Then, clone the scalardl-samples repository.

    git clone https://github.com/scalar-labs/scalardl-samples.git
  2. Go to the scalardl-samples directory.

    cd scalardl-samples

Set your license key​

Set your license key for ScalarDL Ledger

You must set your license key for ScalarDL Ledger. In the docker-compose.yml file, please replace <SET_YOUR_LICENSE_KEY> with your license key. For example:

services:
scalar-ledger:
environment:
- SCALAR_DL_LICENSING_LICENSE_KEY={"organization_name":"XXXXXXXX","expiration_date_time":"YYYY-MM-DDTHH:mm:SS+TIMEZONE","product_name":"ScalarDL Ledger","product_version":N,"license_type":"trial","signature":"XXXXXXXX"}

Set the certificate file for checking the license key​

note

If you have a trial license, you can skip this step and start up ScalarDL.

In this step, you must set the certificate file for ScalarDL Ledger.

Set the certificate file for ScalarDL Ledger

If you have a commercial license, you must update the docker-compose.yml file as follows:

  • Before changing the certificate file path (default configuration):

    services:
    scalar-ledger:
    volumes:
    - ./fixture/ledger-key.pem:/scalar/ledger-key.pem
    - ./fixture/ledger.properties.tmpl:/scalar/ledger/ledger.properties.tmpl
    - ./fixture/trial-license-cert.pem:/scalar/license-cert.pem
    # If you have a commercial license key, you must use `commercial-license-cert.pem` instead of `trial-license-cert.pem`.
    # - ./fixture/commercial-license-cert.pem:/scalar/license-cert.pem
  • After changing the certificate file path:

    services:
    scalar-ledger:
    volumes:
    - ./fixture/ledger-key.pem:/scalar/ledger-key.pem
    - ./fixture/ledger.properties.tmpl:/scalar/ledger/ledger.properties.tmpl
    # - ./fixture/trial-license-cert.pem:/scalar/license-cert.pem
    # If you have a commercial license key, you must use `commercial-license-cert.pem` instead of `trial-license-cert.pem`.
    - ./fixture/commercial-license-cert.pem:/scalar/license-cert.pem

Start up ScalarDL​

The following command starts up ScalarDL Ledger, along with the backend Cassandra server in the Docker containers.

note

The first time you run this command, the required Docker images will be downloaded from GitHub Container Registry.

docker compose up -d

Shut down ScalarDL​

To shut down the containers, run the following command.

docker compose down -v