diff --git a/.github/workflows/check-build-test.yml b/.github/workflows/check-build-test.yml index dac251c57..15840f3d0 100644 --- a/.github/workflows/check-build-test.yml +++ b/.github/workflows/check-build-test.yml @@ -76,49 +76,50 @@ jobs: fail-fast: false matrix: include: - - { connector: amqp, pre_cmd: 'docker-compose up -d amqp' } + - { connector: amqp, pre_cmd: 'docker compose up -d amqp' } - { connector: avroparquet } - { connector: awslambda } - - { connector: aws-event-bridge, pre_cmd: 'docker-compose up -d amazoneventbridge' } + - { connector: aws-event-bridge, pre_cmd: 'docker compose up -d amazoneventbridge' } - { connector: azure-storage-queue } - - { connector: cassandra, pre_cmd: 'docker-compose up -d cassandra' } - - { connector: couchbase, pre_cmd: 'docker-compose up -d couchbase_prep' } + - { connector: cassandra, pre_cmd: 'docker compose up -d cassandra' } + - { connector: couchbase, pre_cmd: 'docker compose up -d couchbase_prep' } - { connector: csv } - - { connector: dynamodb, pre_cmd: 'docker-compose up -d dynamodb' } - - { connector: elasticsearch, pre_cmd: 'docker-compose up -d elasticsearch6 elasticsearch7 opensearch1' } + - { connector: dynamodb, pre_cmd: 'docker compose up -d dynamodb' } + - { connector: elasticsearch, pre_cmd: 'docker compose up -d elasticsearch6 elasticsearch7 opensearch1' } - { connector: file } - { connector: ftp, pre_cmd: './scripts/ftp-servers.sh' } - - { connector: geode, pre_cmd: 'docker-compose up -d geode' } + - { connector: geode, pre_cmd: 'docker compose up -d geode' } - { connector: google-cloud-bigquery } - { connector: google-cloud-bigquery-storage } - - { connector: google-cloud-pub-sub, pre_cmd: 'docker-compose up -d gcloud-pubsub-emulator_prep' } - - { connector: google-cloud-pub-sub-grpc, pre_cmd: 'docker-compose up -d gcloud-pubsub-emulator_prep' } + - { connector: google-cloud-pub-sub, pre_cmd: 'docker compose up -d gcloud-pubsub-emulator_prep' } + - { connector: google-cloud-pub-sub-grpc, pre_cmd: 'docker compose up -d gcloud-pubsub-emulator_prep' } - { connector: google-cloud-storage } - { connector: google-common } - { connector: google-fcm } # hbase disabled until we resolve why new docker image fails our build: https://github.com/akka/alpakka/issues/2185 - # - { connector: hbase, pre_cmd: 'docker-compose up -d hbase' } + # - { connector: hbase, pre_cmd: 'docker compose up -d hbase' } - { connector: hdfs, pre_cmd: 'file ${HOME}/.cache/coursier/v1/https/repo1.maven.org/maven2/org/typelevel/cats-kernel_2.13/2.0.0/cats-kernel_2.13-2.0.0.jar' } - { connector: huawei-push-kit } - - { connector: influxdb, pre_cmd: 'docker-compose up -d influxdb' } - - { connector: ironmq, pre_cmd: 'docker-compose up -d ironauth ironmq' } - - { connector: jms, pre_cmd: 'docker-compose up -d ibmmq' } + - { connector: influxdb, pre_cmd: 'docker compose up -d influxdb' } + # ironmq disabled while we resolve https://github.com/apache/pekko-connectors/issues/697 + # - { connector: ironmq, pre_cmd: 'docker compose up -d ironauth ironmq' } + - { connector: jms, pre_cmd: 'docker compose up -d ibmmq' } - { connector: json-streaming } - { connector: kinesis } - - { connector: kudu, pre_cmd: 'docker-compose up -d kudu-master-data kudu-tserver-data kudu-master kudu-tserver' } - - { connector: mongodb, pre_cmd: 'docker-compose up -d mongo' } - - { connector: mqtt, pre_cmd: 'docker-compose up -d mqtt' } - - { connector: mqtt-streaming, pre_cmd: 'docker-compose up -d mqtt' } - - { connector: orientdb, pre_cmd: 'docker-compose up -d orientdb' } - - { connector: pravega, pre_cmd: 'docker-compose up -d pravega'} + - { connector: kudu, pre_cmd: 'docker compose up -d kudu-master-data kudu-tserver-data kudu-master kudu-tserver' } + - { connector: mongodb, pre_cmd: 'docker compose up -d mongo' } + - { connector: mqtt, pre_cmd: 'docker compose up -d mqtt' } + - { connector: mqtt-streaming, pre_cmd: 'docker compose up -d mqtt' } + - { connector: orientdb, pre_cmd: 'docker compose up -d orientdb' } + - { connector: pravega, pre_cmd: 'docker compose up -d pravega'} - { connector: reference } - { connector: s3 } - { connector: spring-web } - { connector: simple-codecs } - { connector: slick } - - { connector: sns, pre_cmd: 'docker-compose up -d amazonsns' } + - { connector: sns, pre_cmd: 'docker compose up -d amazonsns' } - { connector: solr } - - { connector: sqs, pre_cmd: 'docker-compose up -d elasticmq' } + - { connector: sqs, pre_cmd: 'docker compose up -d elasticmq' } - { connector: sse } - { connector: text } - { connector: udp } diff --git a/build.sbt b/build.sbt index ed633c026..85868d698 100644 --- a/build.sbt +++ b/build.sbt @@ -83,7 +83,7 @@ lazy val `pekko-connectors` = project | starts a webserver and opens a new browser window | | test - runs all the tests for all of the connectors. - | Make sure to run `docker-compose up` first. + | Make sure to run `docker compose up` first. | | mqtt/testOnly *.MqttSourceSpec - runs a single test | diff --git a/docker-compose.yml b/docker-compose.yml index 573a97b92..c5b122b83 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,7 @@ # For detailed information about docker-compose visit https://docs.docker.com/compose/ # To start all docker containers required to execute the tests locally run: -# docker-compose up +# docker compose up -version: '2.2' services: amazoneventbridge: image: localstack/localstack:0.10.6 @@ -26,44 +25,51 @@ services: ports: - "9042:9042" couchbase: - image: couchbase:community-5.1.1 + image: couchbase:community-7.6.1 ports: - - "8091-8094:8091-8094" - - "11210:11210" + - "8091-8096:8091-8096" + - "11210-11211:11210-11211" couchbase_prep: - image: couchbase:community-5.1.1 + image: couchbase:community-7.6.1 links: - "couchbase" entrypoint: "" + # when we drop couchbase2, we don't need to create bucket pekkoquery command: > - bash -c " - echo 'waiting until couchbase is up' - until `curl --output /dev/null --silent --head --fail http://couchbase:8091`; do + bash -c + "echo 'waiting until couchbase is up' + + until `curl --output /dev/null --silent --head --fail http://couchbase:8091`; do printf '.' sleep 2 - done - couchbase-cli cluster-init -c couchbase \ - --cluster-username Administrator --cluster-password password \ - --cluster-ramsize 300 \ - --cluster-index-ramsize 256 \ - --services data,index,query,fts - couchbase-cli bucket-create -c couchbase \ - -u Administrator -p password \ - --bucket pekko \ - --bucket-type couchbase \ - --bucket-ramsize 100 \ - --bucket-replica 1 \ - --wait - couchbase-cli bucket-create -c couchbase \ - -u Administrator -p password \ - --bucket pekkoquery \ - --bucket-type couchbase \ - --bucket-ramsize 100 \ - --bucket-replica 1 \ - --wait - sleep 2 # just wait a tiny bit more after creating the bucket - echo 'CREATE PRIMARY INDEX ON pekkoquery USING GSI;' | \ - cbq -c Administrator:password -e http://couchbase:8093 + done + + couchbase-cli cluster-init -c couchbase + --cluster-username Administrator + --cluster-password password + --cluster-ramsize 300 + --cluster-index-ramsize 256 + --cluster-fts-ramsize 256 + --cluster-query-ramsize 256 + --services data,index,query,fts + + couchbase-cli bucket-create -c couchbase + -u Administrator -p password + --bucket pekko + --bucket-type couchbase + --bucket-ramsize 120 + --bucket-replica 1 + --wait + + couchbase-cli bucket-create -c couchbase + -u Administrator -p password + --bucket pekkoquery + --bucket-type couchbase + --bucket-ramsize 120 + --bucket-replica 1 + --wait + + sleep 2 # just wait a tiny bit more after creating the bucket " elasticmq: image: softwaremill/elasticmq-native:1.3.4 diff --git a/docs/src/main/paradox/aws-event-bridge.md b/docs/src/main/paradox/aws-event-bridge.md index 99c4642b2..e50782bf7 100644 --- a/docs/src/main/paradox/aws-event-bridge.md +++ b/docs/src/main/paradox/aws-event-bridge.md @@ -116,7 +116,7 @@ Messages published in a batch using @apidoc[EventBridgePublisher.flowSeq](EventB ## Integration testing -For integration testing without connecting directly to Amazon EventBridge, Apache Pekko Connectors uses [Localstack](https://github.com/localstack/localstack), which comes as a docker image - and has a corresponding service `amazoneventbridge` in the `docker-compose.yml` file. Which needs to be started before running the integration tests `docker-compose up amazoneventbridge`. +For integration testing without connecting directly to Amazon EventBridge, Apache Pekko Connectors uses [Localstack](https://github.com/localstack/localstack), which comes as a docker image - and has a corresponding service `amazoneventbridge` in the `docker-compose.yml` file. Which needs to be started before running the integration tests `docker compose up amazoneventbridge`. @@@ index diff --git a/docs/src/main/paradox/ftp.md b/docs/src/main/paradox/ftp.md index 4fd0b0e53..f5fb90ab1 100644 --- a/docs/src/main/paradox/ftp.md +++ b/docs/src/main/paradox/ftp.md @@ -159,7 +159,7 @@ Java The code in this guide is part of runnable tests of this project. You are welcome to browse the code, edit and run it in sbt. ``` - docker-compose up -d ftp sftp + docker compose up -d ftp sftp sbt > ftp/test ``` diff --git a/docs/src/main/paradox/google-cloud-pub-sub-grpc.md b/docs/src/main/paradox/google-cloud-pub-sub-grpc.md index 9513a701e..785ca7614 100644 --- a/docs/src/main/paradox/google-cloud-pub-sub-grpc.md +++ b/docs/src/main/paradox/google-cloud-pub-sub-grpc.md @@ -153,7 +153,7 @@ Java @@@ note Integration test code requires Google Cloud Pub/Sub emulator running in the background. You can start it quickly using docker: -`docker-compose up -d gcloud-pubsub-client` +`docker compose up -d gcloud-pubsub-client` This will also run the Pub/Sub admin client that will create topics and subscriptions used by the integration tests. diff --git a/docs/src/main/paradox/mqtt.md b/docs/src/main/paradox/mqtt.md index 01025b5ee..3e70a5754 100644 --- a/docs/src/main/paradox/mqtt.md +++ b/docs/src/main/paradox/mqtt.md @@ -186,7 +186,7 @@ The code in this guide is part of runnable tests of this project. You are welcom > Test code requires a MQTT server running in the background. You can start one quickly using docker: > -> `docker-compose up mqtt` +> `docker compose up mqtt` Scala : ``` diff --git a/scripts/ftp-servers.sh b/scripts/ftp-servers.sh index 249b5da75..b086a79b8 100755 --- a/scripts/ftp-servers.sh +++ b/scripts/ftp-servers.sh @@ -5,4 +5,4 @@ set -x export FTP_USER_UID=$(id -u) export FTP_USER_GID=$(id -g) -docker-compose up -d ftp sftp squid +docker compose up -d ftp sftp squid