This directory provides Docker compose scripts with sample configurations for the various supported Stargate backends. Pick a backend for more detailed instructions:
Once you have used one of the above options, give the APIs a try using the Swagger or Playground pages listed below, or use one of the Postman collections from the DataStax Stargate workspace. See the Stargate documentation for more information.
Each of the Docker compose scripts starts one Stargate coordinator node and one instance of each API service, exposing the following endpoints on localhost
:
As noted in the table above, the Docker compose files do not expose the following ports on the Coordinator by default, but you can enable them as needed:
- port 8082 for the REST API
/v1
endpoints, which were not implemented in the Stargate v2 REST API Service) - port 8091 for the Bridge service used by the Stargate v2 API services.
To enable access to these ports from outside the Docker network, you'll need to modify your compose file as follows:
coordinator:
...
ports:
...
- "8082:8082"
- "8091:8091"
Stargate Docker images are publicly available on Docker Hub. To learn how the images are built or to build your own local versions, see the coordinator node developer guide or API Service developer guides (under the apis directory).
The fastest way to build your own local images involves the following steps:
- Local build of coordinator images
- Make sure you are in the repository root directory and have
JAVA_HOME
set to point to a JDK 1.8 installation - Do a local build of jar files for coordinator:
./mvnw clean install -DskipTests -P dse
- Generate docker images (image tag will default to the Stargate version specified in the
pom.xml
):./build_docker_images.sh
- Make sure you are in the repository root directory and have
- Local build of API images
- Make sure you are in the
apis
directory and haveJAVA_HOME
set to point to a JDK 17 installation - Do a Quarkus build including the option to generate images:
./mvnw clean package -DskipTests -Dquarkus.container-image.build=true
- Make sure you are in the
- Verify the images exist
docker images | grep <stargate version>
- Select one of the supported backends listed at the top of this page and follow the instructions for using one of the provided convenience script with the
-l
(local) option
If you have problems running Stargate Docker images there are couple of things you can check that might be causing these problems.
Many Docker engines have default settings for low memory usage. For example:
- Docker Desktop defaults to 2 GB: depending on your set up, you may need to increase this up to 6 GBs (although some developers report 4 GB being sufficient)
If you see a message like this:
Jars will not be watched due to unexpected error: User limit of inotify instances reached or too many open files
on Docker logs for Coordinator, you are probably hitting it.
Solution depends on OS you are on; here are some suggestions
On MacOS a solution is to increase maxfiles
limit; you can do that by:
sudo launchctl limit maxfiles 999999 999999
but note that this setting will not persist over restart.
For more information see f.ex:
- https://wilsonmar.github.io/maximum-limits/
- https://superuser.com/questions/433746/is-there-a-fix-for-the-too-many-open-files-in-system-error-on-os-x-10-7-1
Unfortunately the "permanent" solution appears to be different across different MacOS versions!