This directory provides two ways to start Stargate with DSE 6.8 using docker compose
.
Make sure that you have Docker engine 20.x installed, which should include Docker compose 2.x. Our compose files rely on features only available in the Docker compose v2 file format.
We recommend the following minimum settings for Docker resources:
- 4 CPUs
- 8 GB RAM
- 1 GB swap
- 8 GB disk space
If you want to use locally built versions of the Docker images rather than pulling released versions from Docker Hub, build the snapshot version locally using instructions for the coordinator and apis.
Follow instructions under the Script options section to use the locally built image.
You can start a simple Stargate configuration with the following command:
./start_dse_68.sh
This convenience script verifies your Docker installation meets minimum requirements and brings up the configuration described in the docker-compose.yml
file. The configuration includes health criteria for each container that is used to ensure the containers come up in the correct order.
The convenience script uses the -d
and --wait
options to track the startup progress, so that the compose command exits when all containers have started and reported healthy status within a specified timeout.
The default environment settings in the .env
file include variables that describe which image tags to use, typically Stargate v2
and and DSE 6.8.X
(where X
is the latest supported patch version). The start_dse_68.sh
script supports options for overriding which image tags are used, including using a locally generated image as described above. We recommend doing a docker compose pull
periodically to ensure you always have the latest patch versions of these tags.
Once done using the containers, you can stop them using the command docker compose down
.
Running on M1 Macs Currently DSE Docker images do not support the ARM64 architecture used by M1 Macs. For this reason, the
docker-compose.yml
file hardcodes DSE containers to run using thelinux/amd64
architecture. You will need to make sure that Rosetta 2 emulation is enabled in the Docker Desktop settings for this to work on your M1 Mac.
This alternate configuration runs the Stargate coordinator node in developer mode, so that no separate Cassandra cluster is required. This configuration is useful for development and testing since it initializes more quickly, but is not recommended for production deployments. This can be run with the command:
./start_dse_68_dev_mode.sh
This script supports the same options as the start_dse_68.sh
script.
To stop the configuration, use the command:
docker compose -f docker-compose-dev-mode.yml down
Both convenience scripts support the following options:
-
You can specify a released image tag (version) using
-t [VERSION]
. Consult Docker Hub for a list of available tags. -
Alternatively, build the snapshot images locally using the instructions referenced above and run the script using the
-l
option. -
You can change the default root log level for the API services using
-r [LEVEL]
(defaultINFO
). Valid values:ERROR
,WARN
,INFO
,DEBUG
-
You can enable reguest logging for the API services using
-q
: if so, each request is logged under categoryio.quarkus.http.access-log
-
The
.env
file defines variables for the docker compose project name (COMPOSE_PROJECT_NAME
), the DSE Docker image tag to use (DSETAG
), and the Stargate Docker image tag to use (SGTAG
). -
When using the convenience scripts, the Stargate Docker image (
SGTAG
) used for the-l
option is the current (snapshot) version as defined in the top level projectpom.xml
file. It can be overridden with the-t
option on either script:./start_dse_68.sh -t v2.0.1
-
Running more than one of these multi-container environments on one host may require changing the port mapping to be changed to avoid conflicts on the host machine.
If you see an error like:
Pulling coordinator (stargateio/coordinator-dse-68:2.0.1-SNAPSHOT)...
ERROR: manifest for stargateio/coordinator-dse-68:2.0.1-SNAPSHOT not found: manifest unknown: manifest unknown
you are trying to deploy a version that is neither publicly available (official release) nor built locally.