From b5227c9240383f030c7e389f7178e52ca2b8e7da Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Wed, 26 Jul 2023 13:55:58 -0700 Subject: [PATCH 1/5] Convert non-dev docker-compose too; rename --- docker-compose/docker-compose.yml | 19 +++++++++---------- .../{start_dse_68.sh => start_dse_next.sh} | 0 ...dev_mode.sh => start_dse_next_dev_mode.sh} | 0 3 files changed, 9 insertions(+), 10 deletions(-) rename docker-compose/{start_dse_68.sh => start_dse_next.sh} (100%) rename docker-compose/{start_dse_68_dev_mode.sh => start_dse_next_dev_mode.sh} (100%) diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index 8375e84c49..a63450e28f 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -2,14 +2,14 @@ version: '2' services: dse-1: - image: datastax/dse-server:${DSETAG} + image: stargateio/dse-next:${DSETAG} networks: - stargate mem_limit: 2G environment: - MAX_HEAP_SIZE=1536M - CLUSTER_NAME=dse-${DSETAG}-cluster - - DC=dc1 + - DC=datacenter1 - RACK=rack1 - DS_LICENSE=accept healthcheck: @@ -19,7 +19,7 @@ services: retries: 10 dse-2: - image: datastax/dse-server:${DSETAG} + image: stargateio/dse-next:${DSETAG} networks: - stargate mem_limit: 2G @@ -30,7 +30,7 @@ services: - MAX_HEAP_SIZE=1536M - SEEDS=dse-1 - CLUSTER_NAME=dse-${DSETAG}-cluster - - DC=dc1 + - DC=datacenter1 - RACK=rack1 - DS_LICENSE=accept healthcheck: @@ -40,7 +40,7 @@ services: retries: 10 dse-3: - image: datastax/dse-server:${DSETAG} + image: stargateio/dse-next:${DSETAG} networks: - stargate mem_limit: 2G @@ -51,7 +51,7 @@ services: - MAX_HEAP_SIZE=1536M - SEEDS=dse-1 - CLUSTER_NAME=dse-${DSETAG}-cluster - - DC=dc1 + - DC=datacenter1 - DS_LICENSE=accept healthcheck: test: [ "CMD", "cqlsh", "-u cassandra", "-p cassandra" ,"-e describe keyspaces" ] @@ -60,8 +60,8 @@ services: retries: 10 coordinator: - image: stargateio/coordinator-dse-68:${SGTAG} - depends_on: + image: stargateio/coordinator-dse-next:${SGTAG} + depends_on: dse-1: condition: service_healthy networks: @@ -74,10 +74,9 @@ services: - JAVA_OPTS="-Xmx1536M" - CLUSTER_NAME=dse-${DSETAG}-cluster - CLUSTER_VERSION=6.8 - - DSE=1 - SEED=dse-1 - RACK_NAME=rack1 - - DATACENTER_NAME=dc1 + - DATACENTER_NAME=datacenter1 - ENABLE_AUTH=true healthcheck: test: curl -f http://localhost:8084/checker/readiness || exit 1 diff --git a/docker-compose/start_dse_68.sh b/docker-compose/start_dse_next.sh similarity index 100% rename from docker-compose/start_dse_68.sh rename to docker-compose/start_dse_next.sh diff --git a/docker-compose/start_dse_68_dev_mode.sh b/docker-compose/start_dse_next_dev_mode.sh similarity index 100% rename from docker-compose/start_dse_68_dev_mode.sh rename to docker-compose/start_dse_next_dev_mode.sh From 018a13b707acbf128b3810530d6c55da9b808bf6 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Wed, 26 Jul 2023 14:08:21 -0700 Subject: [PATCH 2/5] Update README as well --- docker-compose/README.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/docker-compose/README.md b/docker-compose/README.md index b828e4fc72..7c527b1532 100644 --- a/docker-compose/README.md +++ b/docker-compose/README.md @@ -1,6 +1,6 @@ -# Docker Compose scripts for JSONAPI with DSE 6.8 +# Docker Compose scripts for JSONAPI with DSE-next -This directory provides two ways to start the JSON API and Stargate coordinator with DSE 6.8 using `docker compose`. +This directory provides two ways to start the JSON API and Stargate coordinator with DSE-next using `docker compose`. ## Prerequisites @@ -19,31 +19,33 @@ You can control the platform using the `-Dquarkus.docker.buildx.platform=linux/a Follow instructions under the [Script options](#script-options) section to use the locally built image. -## Stargate JSON API with 3-node DSE 6.8 cluster +## Stargate JSON API with 3-node DSE-next cluster You can start a simple Stargate configuration with the following command: ``` -./start_dse_68.sh +./start_dse_next.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 environment settings in the `.env` file include variables that describe the image tags that will be used by default, typically JSON API `v1`, Stargate `v2` and DSE `6.8.X` (where `X` is the latest supported patch version). The `start_dse_68.sh` script supports [options](#script-options) for overriding which image tags are used, including using a locally generated image as described [above](#building-the-local-docker-image). We recommend doing a `docker compose pull` periodically to ensure you always have the latest patch versions of these tags. +The environment settings in the `.env` file include variables that describe the image tags that will be used by default, typically JSON API `v1`, Stargate `v2` and DSE `4.0.7-SHA` (where `SHA` is a unique indicator for commit used to build DSE-next). The `start_dse_next.sh` script supports [options](#script-options) for overriding which image tags are used, including using a locally generated image as described [above](#building-the-local-docker-image). +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`. -## Stargate JSON API with embedded DSE 6.8 in coordinator (developer mode) +## Stargate JSON API with embedded DSE-next in coordinator (developer mode) -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: +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. It can be run with the command: ``` -./start_dse_68_dev_mode.sh +./start_dse_next_dev_mode.sh ``` -This script supports the same [options](#script-options) as the `start_dse_68.sh` script. +This script supports the same [options](#script-options) as the `start_dse_next.sh` script. To stop the configuration, use the command: @@ -70,7 +72,7 @@ Both convenience scripts support the following options: * When using the convenience scripts, the Docker image (`JSONTAG`) is the current (snapshot) version as defined in the top level project `pom.xml` file. It can be overridden with the `-t` option on either script: - `./start_dse_68.sh -t v1.0.0` + `./start_dse_next.sh -t v1.0.0` * 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. From 59549870958d76ce9e64d0b3ba7b460eb50e04d1 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Wed, 26 Jul 2023 14:28:24 -0700 Subject: [PATCH 3/5] Remove one last extra CLUSTER_VERSION --- docker-compose/docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index a63450e28f..f9ce9844fb 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -73,7 +73,6 @@ services: environment: - JAVA_OPTS="-Xmx1536M" - CLUSTER_NAME=dse-${DSETAG}-cluster - - CLUSTER_VERSION=6.8 - SEED=dse-1 - RACK_NAME=rack1 - DATACENTER_NAME=datacenter1 From 9daf9342fc1449b9c93959db43aaaca82ebc22b0 Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Wed, 26 Jul 2023 16:00:17 -0700 Subject: [PATCH 4/5] Fix CLUSTER_NAME -> CASSANDRA_CLUSTER_NAME --- docker-compose/docker-compose.yml | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index f9ce9844fb..aa5eedf813 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -8,7 +8,7 @@ services: mem_limit: 2G environment: - MAX_HEAP_SIZE=1536M - - CLUSTER_NAME=dse-${DSETAG}-cluster + - CASSANDRA_CLUSTER_NAME=dse-${DSETAG}-cluster - DC=datacenter1 - RACK=rack1 - DS_LICENSE=accept @@ -29,7 +29,7 @@ services: environment: - MAX_HEAP_SIZE=1536M - SEEDS=dse-1 - - CLUSTER_NAME=dse-${DSETAG}-cluster + - CASSANDRA_CLUSTER_NAME=dse-${DSETAG}-cluster - DC=datacenter1 - RACK=rack1 - DS_LICENSE=accept @@ -39,26 +39,6 @@ services: timeout: 10s retries: 10 - dse-3: - image: stargateio/dse-next:${DSETAG} - networks: - - stargate - mem_limit: 2G - depends_on: - dse-2: - condition: service_healthy - environment: - - MAX_HEAP_SIZE=1536M - - SEEDS=dse-1 - - CLUSTER_NAME=dse-${DSETAG}-cluster - - DC=datacenter1 - - DS_LICENSE=accept - healthcheck: - test: [ "CMD", "cqlsh", "-u cassandra", "-p cassandra" ,"-e describe keyspaces" ] - interval: 15s - timeout: 10s - retries: 10 - coordinator: image: stargateio/coordinator-dse-next:${SGTAG} depends_on: From 436e43ba321cfcaf11cf8aec77edfac2824bc90e Mon Sep 17 00:00:00 2001 From: Tatu Saloranta Date: Wed, 26 Jul 2023 16:19:30 -0700 Subject: [PATCH 5/5] Remove some unneeded env variables --- docker-compose/docker-compose.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index aa5eedf813..ab5fdb31c6 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -9,9 +9,6 @@ services: environment: - MAX_HEAP_SIZE=1536M - CASSANDRA_CLUSTER_NAME=dse-${DSETAG}-cluster - - DC=datacenter1 - - RACK=rack1 - - DS_LICENSE=accept healthcheck: test: [ "CMD", "cqlsh", "-u cassandra", "-p cassandra" ,"-e describe keyspaces" ] interval: 15s @@ -28,11 +25,8 @@ services: condition: service_healthy environment: - MAX_HEAP_SIZE=1536M - - SEEDS=dse-1 + - CASSANDRA_SEEDS=dse-1 - CASSANDRA_CLUSTER_NAME=dse-${DSETAG}-cluster - - DC=datacenter1 - - RACK=rack1 - - DS_LICENSE=accept healthcheck: test: [ "CMD", "cqlsh", "-u cassandra", "-p cassandra" ,"-e describe keyspaces" ] interval: 15s