Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate from docker-compose v1 to docker compose v2 #1522

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .ci/scripts/benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ NODEJS_VERSION=14

USER_ID="${USER_ID}" \
NODEJS_VERSION="${NODEJS_VERSION}" \
docker-compose -f ./dev-utils/docker-compose.yml down \
docker compose -f ./dev-utils/docker-compose.yml down \
--remove-orphans \
--volumes || true

USER_ID="${USER_ID}" \
NODEJS_VERSION="${NODEJS_VERSION}" \
docker-compose -f ./dev-utils/docker-compose.yml up \
docker compose -f ./dev-utils/docker-compose.yml up \
--build \
--abort-on-container-exit \
--exit-code-from node-benchmark \
Expand Down
4 changes: 2 additions & 2 deletions .ci/scripts/load-testing.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ NODEJS_VERSION=14
USER_ID="${USER_ID}" \
NODEJS_VERSION="${NODEJS_VERSION}" \
STACK_VERSION=${STACK_VERSION} \
docker-compose -f ./dev-utils/docker-compose.yml down \
docker compose -f ./dev-utils/docker-compose.yml down \
--remove-orphans \
--volumes || true

USER_ID="${USER_ID}" \
NODEJS_VERSION="${NODEJS_VERSION}" \
STACK_VERSION=${STACK_VERSION} \
docker-compose -f ./dev-utils/docker-compose.yml up \
docker compose -f ./dev-utils/docker-compose.yml up \
--build \
--exit-code-from load-testing \
load-testing
4 changes: 2 additions & 2 deletions .ci/scripts/pull_and_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ export NODEJS_VERSION=$(cat .nvmrc)
export STACK_VERSION=${STACK_VERSION:-8.6.1}

STACK_VERSION=${STACK_VERSION} \
docker-compose -f ./dev-utils/docker-compose.yml --log-level INFO pull --quiet --ignore-pull-failures
docker compose -f ./dev-utils/docker-compose.yml --log-level INFO pull --quiet --ignore-pull-failures

# We are building the images here even though the Docker images are already cached in Packer.
# This is because there could be changes in the PR affecting the files copied to the Docker image,
# which we want to test in the current build.
NODEJS_VERSION="${NODEJS_VERSION}" \
STACK_VERSION=${STACK_VERSION} \
docker-compose -f ./dev-utils/docker-compose.yml --log-level INFO build >docker-compose.log 2>docker-compose.err
docker compose -f ./dev-utils/docker-compose.yml --log-level INFO build >docker-compose.log 2>docker-compose.err
if [ $? -gt 0 ] ; then
echo "Docker compose failed, see the below log output"
cat docker-compose.log && rm docker-compose.log
Expand Down
4 changes: 2 additions & 2 deletions .ci/scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ do
APM_SERVER_PORT=${APM_SERVER_PORT} \
APM_SERVER_URL=${APM_SERVER_URL} \
KIBANA_URL=${KIBANA_URL} \
docker-compose \
docker compose \
-f ./dev-utils/docker-compose.yml \
--log-level INFO \
up \
Expand All @@ -42,5 +42,5 @@ do
fi
sleep 5;
done
echo "Exit code from docker-compose ${status}"
echo "Exit code from docker compose ${status}"
exit ${status}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ $ npx lerna bootstrap
Tests fall under unit, integration and end-to-end tests. Before running the test, we have to start the APM server manually since all the APM payload data are sent to the server.

```sh
NODEJS_VERSION=<nodeVersion> STACK_VERSION=<version> docker-compose -f ./dev-utils/docker-compose.yml up -d apm-server
NODEJS_VERSION=<nodeVersion> STACK_VERSION=<version> docker compose -f ./dev-utils/docker-compose.yml up -d apm-server
# nodeVersion - corresponds to NodeJS version to be used when building the test images
# version - corresponds to Elastic Stack versions
```
Expand Down
2 changes: 1 addition & 1 deletion packages/rum-core/test/run-apm-server.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ELASTICSEARCH_PORT=9201 STACK_VERSION=6.4.0 APM_SERVER_PORT=8001 docker-compose up apm-server kibana
ELASTICSEARCH_PORT=9201 STACK_VERSION=6.4.0 APM_SERVER_PORT=8001 docker compose up apm-server kibana
4 changes: 2 additions & 2 deletions packages/rum/test/run-apm-server.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#docker run -p 127.0.0.1:8200:8201 elastic/apm-server:6.2.4 /bin/sh -c "apm-server -e -E output.elasticsearch.password=$(ELASTICSEARCH_PASSWORD) -E output.elasticsearch.username=$(ELASTICSEARCH_USERNAME) -E output.elasticsearch.hosts=['$(ELASTICSEARCH_SERVICE_HOST):$(ELASTICSEARCH_SERVICE_PORT)'] -E apm-server.expvar.enabled=true -E apm-server.frontend.enabled=true -E apm-server.frontend.rate_limit=100000 -E apm-server.host=0.0.0.0:8200 -E apm-server.read_timeout=1m -E apm-server.shutdown_timeout=2m -E apm-server.write_timeout=1m"
STACK_VERSION=6.2.4 APM_SERVER_PORT=8001 docker-compose up apm-server
#STACK_VERSION=6.2.4 docker-compose -f ./test/docker-compose.yml start apm-server
STACK_VERSION=6.2.4 APM_SERVER_PORT=8001 docker compose up apm-server
#STACK_VERSION=6.2.4 docker compose -f ./test/docker compose.yml start apm-server
Loading