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.
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.
-
In Terminal, determine the location on your local machine where you want to run the
scalardl-samples
app. Then, clone thescalardl-samples
repository.git clone https://github.com/scalar-labs/scalardl-samples.git
-
Go to the
scalardl-samples
directory.cd scalardl-samples
Set your license key​
- ScalarDL Ledger only
- ScalarDL Auditor mode
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 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 your license key for ScalarDL Auditor
You must set your license key for ScalarDL Auditor. In the docker-compose-auditor.yml
file, please replace <SET_YOUR_LICENSE_KEY>
with your license key. For example:
services:
scalar-auditor:
environment:
- SCALAR_DL_LICENSING_LICENSE_KEY={"organization_name":"XXXXXXXX","expiration_date_time":"YYYY-MM-DDTHH:mm:SS+TIMEZONE","product_name":"ScalarDL Auditor","product_version":N,"license_type":"trial","signature":"XXXXXXXX"}
Set the certificate file for checking the license key​
If you have a trial license, you can skip this step and start up ScalarDL.
- ScalarDL Ledger only
- ScalarDL Auditor mode
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
In this step, you must set the certificate file for ScalarDL Ledger and ScalarDL Auditor.
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
Set the certificate file for ScalarDL Auditor
If you have a commercial license, you must update the docker-compose-auditor.yml
file as follows:
-
Before changing the certificate file path (default configuration):
services:
scalar-auditor:
volumes:
- ./fixture/auditor.pem:/scalar/auditor.pem
- ./fixture/auditor-key.pem:/scalar/auditor-key.pem
- ./fixture/auditor.properties.tmpl:/scalar/auditor/auditor.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-auditor:
volumes:
- ./fixture/auditor.pem:/scalar/auditor.pem
- ./fixture/auditor-key.pem:/scalar/auditor-key.pem
- ./fixture/auditor.properties.tmpl:/scalar/auditor/auditor.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​
- ScalarDL Ledger only
- ScalarDL Auditor mode
The following command starts up ScalarDL Ledger, along with the backend Cassandra server in the Docker containers.
The first time you run this command, the required Docker images will be downloaded from GitHub Container Registry.
docker compose up -d
The following command starts up ScalarDL Ledger and ScalarDL Auditor, along with the backend Cassandra server in the Docker containers.
The first time you run this command, the required Docker images will be downloaded from GitHub Container Registry.
docker compose -f docker-compose.yml -f docker-compose-auditor.yml up -d
Shut down ScalarDL​
To shut down the containers, run the following command.
- ScalarDL Ledger only
- ScalarDL Auditor mode
docker compose down -v
docker compose -f docker-compose.yml -f docker-compose-auditor.yml down -v