diff --git a/Integrations/build.gradle b/Integrations/build.gradle index 9a182f7b907..109fd30252d 100644 --- a/Integrations/build.gradle +++ b/Integrations/build.gradle @@ -1,3 +1,6 @@ +import java.nio.charset.StandardCharsets +import java.security.MessageDigest + plugins { id 'com.bmuschko.docker-remote-api' id 'io.deephaven.project.register' @@ -103,8 +106,17 @@ def runInDocker = { String name, String sourcePath, List command, Closur } } -// Using Integrations/docker-compose.yml, this will start redpanda and wait until it is running before letting tests proceed. +// Using Integrations/docker-compose.yml, this will start all the containers and wait until the exposed ports are ready dockerCompose { + // To workaround errors encountered when dockerCompose auto-inherits the projectName (it uses "-" and "_" next to + // each other, which violates docker naming conventions), we can explicitly set a projectName. + // https://github.com/avast/gradle-docker-compose-plugin/issues/393 + // https://github.com/avast/gradle-docker-compose-plugin/issues/372#issuecomment-1403264410 + // Additionally, this preserves the prefix logic that dockerCompose chooses to use based on the absolutePath of the + // project. This may be beneficial in workflows where the user has checked out multiple repositories and wants to + // ensure docker names do not collide. + def projectSafePrefix = MessageDigest.getInstance("MD5").digest(project.projectDir.absolutePath.toString().getBytes(StandardCharsets.UTF_8)).encodeHex().toString() + projectName = "${projectSafePrefix}_${project.name.replace('.', '_')}" waitForTcpPortsTimeout = Duration.ofMinutes(2) } diff --git a/Integrations/docker-compose.yml b/Integrations/docker-compose.yml index 55d367dcf11..2b2ed4fcf0b 100644 --- a/Integrations/docker-compose.yml +++ b/Integrations/docker-compose.yml @@ -1,7 +1,5 @@ # test-oriented local docker compose file to run redpanda and postgres for testing -version: "3.4" - services: redpanda: extends: diff --git a/authentication/example-providers/oidc/README.md b/authentication/example-providers/oidc/README.md index 82da56be65a..a6c127af297 100644 --- a/authentication/example-providers/oidc/README.md +++ b/authentication/example-providers/oidc/README.md @@ -11,9 +11,9 @@ server component is designed using [Pac4j](https://www.pac4j.org/), making it fl general OpenID Connect services, but also other kinds of single-sign on services like SAML, OAuth, etc. ## Example Keycloak setup -In this directory, run `docker-compose up` to start Keycloak and database for it. When the container first starts up, a +In this directory, run `docker compose up` to start Keycloak and database for it. When the container first starts up, a [JSON file](deephaven_realm.json) configures a realm and a client that can access it, and two users: `admin`/`admin` and -`user`/`user`. This docker-compose configuration is designed to be fast to start and ephemeral, and is not meant for +`user`/`user`. This docker compose configuration is designed to be fast to start and ephemeral, and is not meant for production use. After that has run, there will be a docker container running with port 6060 exposed on localhost. The account to diff --git a/authentication/example-providers/oidc/docker-compose.yml b/authentication/example-providers/oidc/docker-compose.yml index ede61a64465..9b1700ce008 100644 --- a/authentication/example-providers/oidc/docker-compose.yml +++ b/authentication/example-providers/oidc/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: db: image: postgres:14.2 diff --git a/authentication/example-providers/sql-username-password/README.md b/authentication/example-providers/sql-username-password/README.md index a6856b452fc..fc3e669af1f 100644 --- a/authentication/example-providers/sql-username-password/README.md +++ b/authentication/example-providers/sql-username-password/README.md @@ -6,8 +6,8 @@ to follow best practices in storing secure information like the password itself, rudimentary. ## Example database setup -In this directory, run `docker-compose up` to start a SQL database. The `init-users.sql` file will be used to initialize -this database, which has one user, named `admin`, with a password of `p@ssw0rd`. This docker-compose configuration is +In this directory, run `docker compose up` to start a SQL database. The `init-users.sql` file will be used to initialize +this database, which has one user, named `admin`, with a password of `p@ssw0rd`. This docker compose configuration is designed to be fast to start and ephemeral, and is not meant for production use. After that has run, there will be a docker container running with port 5432 exposed on localhost. The password for the diff --git a/authentication/example-providers/sql-username-password/docker-compose.yml b/authentication/example-providers/sql-username-password/docker-compose.yml index ffc923a6af1..b5b2e96154e 100644 --- a/authentication/example-providers/sql-username-password/docker-compose.yml +++ b/authentication/example-providers/sql-username-password/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: postgres: image: postgres:15.1 diff --git a/build.gradle b/build.gradle index 8e19a43a37f..a5086daf053 100644 --- a/build.gradle +++ b/build.gradle @@ -64,7 +64,7 @@ tasks.register('nightly') { tasks.register('prepareCompose') { it.group 'Deephaven lifecycle' - it.description 'A lifecycle task that prepares prerequisites for local docker-compose builds' + it.description 'A lifecycle task that prepares prerequisites for local docker compose builds' it.dependsOn project(':docker-server-jetty').tasks.findByName('buildDocker-server-jetty') } diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 96cc1777c1e..a413615a03c 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -26,7 +26,7 @@ dependencies { because('needed by plugin com.bmuschko.docker-remote-api') } - implementation('com.avast.gradle:gradle-docker-compose-plugin:0.16.11') { + implementation('com.avast.gradle:gradle-docker-compose-plugin:0.17.6') { because('needed by plugin com.avast.gradle.docker-compose') } diff --git a/containers/groovy-examples-redpanda/docker-compose.yml b/containers/groovy-examples-redpanda/docker-compose.yml index bc0a0484bc7..10c27be19f0 100644 --- a/containers/groovy-examples-redpanda/docker-compose.yml +++ b/containers/groovy-examples-redpanda/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: deephaven: image: ghcr.io/deephaven/server-slim:${VERSION:-latest} diff --git a/containers/groovy-examples/docker-compose.yml b/containers/groovy-examples/docker-compose.yml index 5c275fb2ee4..33b218a925a 100644 --- a/containers/groovy-examples/docker-compose.yml +++ b/containers/groovy-examples/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: deephaven: image: ghcr.io/deephaven/server-slim:${VERSION:-latest} diff --git a/containers/groovy-redpanda/docker-compose.yml b/containers/groovy-redpanda/docker-compose.yml index 1cb7594a8ff..61e3e3b5af3 100644 --- a/containers/groovy-redpanda/docker-compose.yml +++ b/containers/groovy-redpanda/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: deephaven: image: ghcr.io/deephaven/server-slim:${VERSION:-latest} diff --git a/containers/groovy/docker-compose.yml b/containers/groovy/docker-compose.yml index b1ac295ec5d..1e4bdf8221a 100644 --- a/containers/groovy/docker-compose.yml +++ b/containers/groovy/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: deephaven: image: ghcr.io/deephaven/server-slim:${VERSION:-latest} diff --git a/containers/python-examples-redpanda/docker-compose.yml b/containers/python-examples-redpanda/docker-compose.yml index 218494e5293..ad75dbe688a 100644 --- a/containers/python-examples-redpanda/docker-compose.yml +++ b/containers/python-examples-redpanda/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: deephaven: image: ghcr.io/deephaven/server:${VERSION:-latest} diff --git a/containers/python-examples/NLTK/docker-compose.yml b/containers/python-examples/NLTK/docker-compose.yml index e1094f48afd..aa76643e322 100644 --- a/containers/python-examples/NLTK/docker-compose.yml +++ b/containers/python-examples/NLTK/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: deephaven: image: ghcr.io/deephaven/server-nltk:${VERSION:-latest} diff --git a/containers/python-examples/PyTorch/docker-compose.yml b/containers/python-examples/PyTorch/docker-compose.yml index f36b67fb41c..f6da11c1722 100644 --- a/containers/python-examples/PyTorch/docker-compose.yml +++ b/containers/python-examples/PyTorch/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: deephaven: image: ghcr.io/deephaven/server-pytorch:${VERSION:-latest} diff --git a/containers/python-examples/SciKit-Learn/docker-compose.yml b/containers/python-examples/SciKit-Learn/docker-compose.yml index aa1f88e27ff..3c4f62e1360 100644 --- a/containers/python-examples/SciKit-Learn/docker-compose.yml +++ b/containers/python-examples/SciKit-Learn/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: deephaven: image: ghcr.io/deephaven/server-sklearn:${VERSION:-latest} diff --git a/containers/python-examples/TensorFlow/docker-compose.yml b/containers/python-examples/TensorFlow/docker-compose.yml index aaf1cb6024f..1e066106011 100644 --- a/containers/python-examples/TensorFlow/docker-compose.yml +++ b/containers/python-examples/TensorFlow/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: deephaven: image: ghcr.io/deephaven/server-tensorflow:${VERSION:-latest} diff --git a/containers/python-examples/base/docker-compose.yml b/containers/python-examples/base/docker-compose.yml index f828b276981..c04a729fa4c 100644 --- a/containers/python-examples/base/docker-compose.yml +++ b/containers/python-examples/base/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: deephaven: image: ghcr.io/deephaven/server:${VERSION:-latest} diff --git a/containers/python-redpanda/docker-compose.yml b/containers/python-redpanda/docker-compose.yml index acbccaa7560..8b518f2c1ed 100644 --- a/containers/python-redpanda/docker-compose.yml +++ b/containers/python-redpanda/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: deephaven: image: ghcr.io/deephaven/server:${VERSION:-latest} diff --git a/containers/python/NLTK/docker-compose.yml b/containers/python/NLTK/docker-compose.yml index 9f10e96de13..927674d0623 100644 --- a/containers/python/NLTK/docker-compose.yml +++ b/containers/python/NLTK/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: deephaven: image: ghcr.io/deephaven/server-nltk:${VERSION:-latest} diff --git a/containers/python/PyTorch/docker-compose.yml b/containers/python/PyTorch/docker-compose.yml index 02f75134ca9..247f7951122 100644 --- a/containers/python/PyTorch/docker-compose.yml +++ b/containers/python/PyTorch/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: deephaven: image: ghcr.io/deephaven/server-pytorch:${VERSION:-latest} diff --git a/containers/python/SciKit-Learn/docker-compose.yml b/containers/python/SciKit-Learn/docker-compose.yml index 8ce64e939d7..7c6cda06a02 100644 --- a/containers/python/SciKit-Learn/docker-compose.yml +++ b/containers/python/SciKit-Learn/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: deephaven: image: ghcr.io/deephaven/server-sklearn:${VERSION:-latest} diff --git a/containers/python/TensorFlow/docker-compose.yml b/containers/python/TensorFlow/docker-compose.yml index a9e086327d0..edefa62177f 100644 --- a/containers/python/TensorFlow/docker-compose.yml +++ b/containers/python/TensorFlow/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: deephaven: image: ghcr.io/deephaven/server-tensorflow:${VERSION:-latest} diff --git a/containers/python/base/docker-compose.yml b/containers/python/base/docker-compose.yml index b828010371b..5ce118f8be7 100644 --- a/containers/python/base/docker-compose.yml +++ b/containers/python/base/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: deephaven: image: ghcr.io/deephaven/server:${VERSION:-latest} diff --git a/debezium/demo/README.md b/debezium/demo/README.md index b5080779f54..8e2bb021894 100644 --- a/debezium/demo/README.md +++ b/debezium/demo/README.md @@ -34,12 +34,12 @@ and ensure you can launch a regular version of Deephaven as per the instructions there. Once that works, stop that Deephaven instance, and continue below. -Start docker-compose with the compose file in this +Start docker compose with the compose file in this directory: ``` cd debezium/demo -docker-compose up --build +docker compose up --build ``` Then start a Deephaven web console (will be in python mode diff --git a/debezium/demo/docker-compose.yml b/debezium/demo/docker-compose.yml index 569ad577f75..c0df3930507 100644 --- a/debezium/demo/docker-compose.yml +++ b/debezium/demo/docker-compose.yml @@ -1,8 +1,6 @@ # docker compose file to run the debezium-kafka ecommerce demo # with DHC ticking tables and dashboard -version: '3.4' - services: server: extends: diff --git a/debezium/docker-compose-debezium-common.yml b/debezium/docker-compose-debezium-common.yml index e3fd99976c2..525b8e125b2 100644 --- a/debezium/docker-compose-debezium-common.yml +++ b/debezium/docker-compose-debezium-common.yml @@ -1,8 +1,6 @@ # docker compose file to run the debezium-kafka ecommerce demo # with DHC ticking tables and dashboard -version: '3.4' - services: redpanda: image: docker.redpanda.com/vectorized/redpanda:${REDPANDA_VERSION} diff --git a/debezium/perf/README.md b/debezium/perf/README.md index ef1ca0e9e15..cca488555de 100644 --- a/debezium/perf/README.md +++ b/debezium/perf/README.md @@ -159,7 +159,7 @@ can make them execute their respective demo scripts. see the tables refreshing. * To load the Materialize script, run the materialized command line interface (cli) via: - `docker-compose run mzcli` + `docker compose run mzcli` (this command needs to be executed from the `perf` directory to work). Once in the materialize cli, run: diff --git a/debezium/perf/docker-compose.yml b/debezium/perf/docker-compose.yml index 4ae6305e1a5..28cffa15e7b 100644 --- a/debezium/perf/docker-compose.yml +++ b/debezium/perf/docker-compose.yml @@ -1,8 +1,6 @@ # docker compose file to run the debezium-kafka ecommerce demo # with DHC ticking tables and dashboard -version: '3.4' - services: server: extends: diff --git a/debezium/perf/mz_run_demo.sh b/debezium/perf/mz_run_demo.sh index 607769c9e17..88b2519d5ef 100755 --- a/debezium/perf/mz_run_demo.sh +++ b/debezium/perf/mz_run_demo.sh @@ -2,4 +2,4 @@ set -eu -exec docker-compose run -T mzcli -f /scripts/demo.sql +exec docker compose run -T mzcli -f /scripts/demo.sql diff --git a/debezium/perf/mz_sample_dt.sh b/debezium/perf/mz_sample_dt.sh index 019e016f1ce..207129d68aa 100755 --- a/debezium/perf/mz_sample_dt.sh +++ b/debezium/perf/mz_sample_dt.sh @@ -20,6 +20,6 @@ done EOF ) -(nohup docker-compose run -T --entrypoint /bin/bash mzcli -c "$SCRIPT" < /dev/null >& $OUT &) +(nohup docker compose run -T --entrypoint /bin/bash mzcli -c "$SCRIPT" < /dev/null >& $OUT &) exit 0 diff --git a/debezium/perf/start_perf_run.sh b/debezium/perf/start_perf_run.sh index 60f46e1f95c..7debbc2450d 100755 --- a/debezium/perf/start_perf_run.sh +++ b/debezium/perf/start_perf_run.sh @@ -30,9 +30,9 @@ LOG="$OUT_DIR/start.log" rm -f $LOG if [ "$engine" = "mz" ]; then - docker-compose up -d mysql redpanda debezium loadgen materialized mzcli >> $LOG 2>&1 + docker compose up -d mysql redpanda debezium loadgen materialized mzcli >> $LOG 2>&1 elif [ "$engine" = "dh" ]; then - docker-compose up -d mysql redpanda debezium loadgen server grpc-proxy envoy web >> $LOG 2>&1 + docker compose up -d mysql redpanda debezium loadgen server grpc-proxy envoy web >> $LOG 2>&1 else echo "$0: Internal error, aborting." 1>&2 exit 1 @@ -40,7 +40,7 @@ fi # fire and forget; will stop when compose stops. COMPOSE_LOG="${OUT_DIR}/docker-compose.log" -(nohup docker-compose logs -f >& $COMPOSE_LOG < /dev/null &) +(nohup docker compose logs -f >& $COMPOSE_LOG < /dev/null &) # avoid race with creation of log file above sleep 0.2 diff --git a/debezium/perf/stop_all.sh b/debezium/perf/stop_all.sh index 4a258d82866..a50a11bbb6b 100755 --- a/debezium/perf/stop_all.sh +++ b/debezium/perf/stop_all.sh @@ -2,4 +2,4 @@ set -eu -docker-compose stop && docker-compose down -v +docker compose stop && docker compose down -v diff --git a/docker-compose-common.yml b/docker-compose-common.yml index fc19684bd75..2f2e5fcfbcf 100644 --- a/docker-compose-common.yml +++ b/docker-compose-common.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: server: image: ${DEEPHAVEN_SERVER_IMAGE} @@ -40,8 +38,8 @@ services: cpus: '4.0' # Allows the querying of this process jinfo/jmap - # docker-compose exec server jmap -heap 1 - # docker-compose exec server jinfo 1 + # docker compose exec server jmap -heap 1 + # docker compose exec server jinfo 1 # # Add NET_ADMIN to allow throttling network speeds # $ docker exec -it core_server_1 apt-get install iproute2 diff --git a/docker-compose.yml b/docker-compose.yml index ff3b4f6ab6e..f5455cf3c16 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,8 +9,6 @@ # # Please see README.md with more details on how to get started. -version: "3.4" - services: server: extends: diff --git a/docker/server-slim/src/main/docker/Dockerfile b/docker/server-slim/src/main/docker/Dockerfile index 044eb806699..00c956aed4c 100644 --- a/docker/server-slim/src/main/docker/Dockerfile +++ b/docker/server-slim/src/main/docker/Dockerfile @@ -23,7 +23,7 @@ VOLUME /cache # failure mode (via docker inspect, but only until that failure stales out). # * If grpc_health_probe fails with any non-zero exit code, normalize to 1. # The net effect is that the server will have 3s until the earliest possible success, and -# 33-36s until it is considered to have failed startup (so downstream docker-compose services +# 33-36s until it is considered to have failed startup (so downstream docker compose services # will not attempt to start). If the server is running but trying to shut down, failure will # occur within about 9s, as the port will connect correctly, but respond that it isn't # available. diff --git a/docker/web-plugin-packager/README.md b/docker/web-plugin-packager/README.md index c9ddaaaa787..a9cab5dcaf1 100644 --- a/docker/web-plugin-packager/README.md +++ b/docker/web-plugin-packager/README.md @@ -38,7 +38,7 @@ FROM ghcr.io/deephaven/server:latest RUN pip install deephaven-plugin-matplotlib ``` -After building, you need to specify using that build in your `docker-compose`. Do this by modifying the existing a `docker-compose.yml` file and replace the web and server definitions with the following: +After building, you need to specify using that build in your `docker compose`. Do this by modifying the existing a `docker-compose.yml` file and replace the web and server definitions with the following: ```yaml services: server: @@ -66,7 +66,7 @@ When you're done, your directory structure should look like: └── Dockerfile ``` -Everything's ready to go! Now you just need to run `docker-compose up` as normal, and you will be using your custom image with your JS plugins installed. See what you can create! +Everything's ready to go! Now you just need to run `docker compose up` as normal, and you will be using your custom image with your JS plugins installed. See what you can create! ## JS Plugin Development diff --git a/postgres/docker-compose.yml b/postgres/docker-compose.yml index b90d18fda51..adc85499833 100644 --- a/postgres/docker-compose.yml +++ b/postgres/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.4" - services: postgres: build: diff --git a/redpanda-apicurio/docker-compose.yml b/redpanda-apicurio/docker-compose.yml index 29b1eb1cfb8..c30b0560b89 100644 --- a/redpanda-apicurio/docker-compose.yml +++ b/redpanda-apicurio/docker-compose.yml @@ -1,8 +1,6 @@ # Developer-oriented local docker compose file to run together # Deephaven Core and Redpanda (Kafka compatible event streaming) -version: "3.4" - services: server: extends: diff --git a/redpanda-apicurio/examples/python/kafka-produce-avro.py b/redpanda-apicurio/examples/python/kafka-produce-avro.py index 0ca73483a50..3af8636722f 100644 --- a/redpanda-apicurio/examples/python/kafka-produce-avro.py +++ b/redpanda-apicurio/examples/python/kafka-produce-avro.py @@ -20,7 +20,7 @@ # # == Common to all: # -# * Start the redpanda-apicurio compose: (cd redpanda-apicurio && docker-compose up --build) +# * Start the redpanda-apicurio compose: (cd redpanda-apicurio && docker compose up --build) # * From web UI do: # # > from deephaven import kafka_consumer as kc diff --git a/redpanda-standalone/docker-compose.yml b/redpanda-standalone/docker-compose.yml index 12249145c39..b047ab6dadd 100644 --- a/redpanda-standalone/docker-compose.yml +++ b/redpanda-standalone/docker-compose.yml @@ -1,4 +1,3 @@ -version: '3.4' services: redpanda: command: diff --git a/redpanda/docker-compose.yml b/redpanda/docker-compose.yml index 49519441f19..eddc3bd9850 100644 --- a/redpanda/docker-compose.yml +++ b/redpanda/docker-compose.yml @@ -1,8 +1,6 @@ # Developer-oriented local docker compose file to run together # Deephaven Core and Redpanda (Kafka compatible event streaming) -version: "3.4" - services: server: extends: diff --git a/redpanda/examples/python/kafka-produce-avro.py b/redpanda/examples/python/kafka-produce-avro.py index aaf9374b0c0..00ae6e9a29b 100644 --- a/redpanda/examples/python/kafka-produce-avro.py +++ b/redpanda/examples/python/kafka-produce-avro.py @@ -24,7 +24,7 @@ # # == Common to all: # -# * Start the redpanda compose: (cd redpanda && docker-compose up --build) +# * Start the redpanda compose: (cd redpanda && docker compose up --build) # * From web UI do: # # > from deephaven import kafka_consumer as kc diff --git a/redpanda/examples/python/kafka-produce.py b/redpanda/examples/python/kafka-produce.py index 0336e718898..92cd402e052 100644 --- a/redpanda/examples/python/kafka-produce.py +++ b/redpanda/examples/python/kafka-produce.py @@ -23,7 +23,7 @@ # # == Common to all: # -# * Start the redpanda compose: (cd redpanda && docker-compose up --build) +# * Start the redpanda compose: (cd redpanda && docker compose up --build) # * From web UI do: # # > from deephaven import kafka_consumer as kc