Skip to content

Commit 2e66155

Browse files
authored
Fix nightly tests (#1182)
* replace "docker-compose" with "docker compose" * replace more docker-compose calls with docker compose
1 parent 9b46922 commit 2e66155

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ The `webknossos` folder contains examples, which are not part of the package, bu
140140
The tests also contain functionality for the WEBKNOSSOS client. There a two modes to run the tests:
141141

142142
1. `./test.sh --refresh-snapshots`, sending network requests to a WEBKNOSSOS instance:
143-
This expects a local WEBKNOSSOS setup with specific test data, which is shipped with WEBKNOSSOS. If you're starting and running WEBKNOSSOS manually, please use port 9000 (the default) and run the `tools/postgres/dbtool.js prepare-test-db` script in the WEBKNOSSOS repository (⚠️ this overwrites your local WEBKNOSSOS database). Alternatively, a docker-compose setup is started automatically for the tests, see `./test.sh` and `tests/docker-compose.yml` for details. The network requests & response are recorded as "cassettes" by [vcr.py](https://vcrpy.readthedocs.io), see next point:
143+
This expects a local WEBKNOSSOS setup with specific test data, which is shipped with WEBKNOSSOS. If you're starting and running WEBKNOSSOS manually, please use port 9000 (the default) and run the `tools/postgres/dbtool.js prepare-test-db` script in the WEBKNOSSOS repository (⚠️ this overwrites your local WEBKNOSSOS database). Alternatively, a `docker compose` setup is started automatically for the tests, see `./test.sh` and `tests/docker-compose.yml` for details. The network requests & response are recorded as "cassettes" by [vcr.py](https://vcrpy.readthedocs.io), see next point:
144144
2. `./test.sh` replays responses from previous network snapshots using [vcr.py](https://vcrpy.readthedocs.io) via [pytest-recording](https://github.com/kiwicom/pytest-recording). No additional network requests are allowed in this mode.
145145

146146
`./test.sh --store-durations` updates the durations for
@@ -149,7 +149,7 @@ which is used in the CI to split the tests for different runners.
149149

150150
#### `cluster_tools` package
151151

152-
For testing the `slurm` setup a docker-compose setup is available. Please see the [respective Readme](https://github.com/scalableminds/webknossos-libs/blob/master/cluster_tools/README.md) for details.
152+
For testing the `slurm` setup a `docker compose` setup is available. Please see the [respective Readme](https://github.com/scalableminds/webknossos-libs/blob/master/cluster_tools/README.md) for details.
153153

154154
For testing the `kubernetes` setup, we recommend a [Kubernetes-in-Docker setup](https://kind.sigs.k8s.io/).
155155

cluster_tools/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ If you would like to configure these limits independently, you can do so by sett
7676
```
7777
# See ./dockered-slurm/README.md for troubleshooting
7878
cd dockered-slurm
79-
docker-compose up -d
79+
docker compose up -d
8080
docker exec -it slurmctld bash
8181
docker exec -it c1 bash
8282
```

cluster_tools/dockered-slurm/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**Note: Refer to cluster_tools/README.md for how to use this container in the context of testing the cluster_tools**
44

5-
This is a multi-container Slurm cluster using docker-compose. The compose file
5+
This is a multi-container Slurm cluster using `docker compose`. The compose file
66
creates named volumes for persistent storage of MySQL data files as well as
77
Slurm state and log directories.
88

@@ -26,10 +26,10 @@ The compose file will create the following named volumes:
2626

2727
## Starting the Cluster
2828

29-
Run `docker-compose` to instantiate the cluster:
29+
Run `docker compose` to instantiate the cluster:
3030

3131
```console
32-
$ docker-compose up -d
32+
$ docker compose up -d
3333
```
3434

3535
> Note: If you encounter permission errors (`Failed to check keyfile "/etc/munge/munge.key": Permission denied`), follow the steps from the "Deleting the Cluster" section and run the previous command again.
@@ -47,10 +47,10 @@ $ ./register_cluster.sh
4747
> ready before registering the cluster. Otherwise, you may get an error such
4848
> as **sacctmgr: error: Problem talking to the database: Connection refused**.
4949
>
50-
> You can check the status of the cluster by viewing the logs: `docker-compose
50+
> You can check the status of the cluster by viewing the logs: `docker compose
5151
> logs -f`
5252
53-
> Note: If you encounter an error that the daemon is not running (`Error response from daemon: Container <...> is not running`), the start of the containers was not successful. Check the logs using `docker-compose logs -f` and revisit the last step.
53+
> Note: If you encounter an error that the daemon is not running (`Error response from daemon: Container <...> is not running`), the start of the containers was not successful. Check the logs using `docker compose logs -f` and revisit the last step.
5454
5555
## Accessing the Cluster
5656

@@ -85,18 +85,18 @@ slurm-2.out
8585
## Stopping and Restarting the Cluster
8686

8787
```console
88-
$ docker-compose stop
88+
$ docker compose stop
8989
```
9090

9191
```console
92-
$ docker-compose start
92+
$ docker compose start
9393
```
9494

9595
## Deleting the Cluster
9696

9797
To remove all containers and volumes, run:
9898

9999
```console
100-
$ docker-compose rm -sf
100+
$ docker compose rm -sf
101101
$ docker volume rm dockered-slurm_etc_munge dockered-slurm_etc_slurm dockered-slurm_slurm_jobdir dockered-slurm_var_lib_mysql dockered-slurm_var_log_slurm
102102
```

cluster_tools/dockered-slurm/register_cluster.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
set -e
33

44
docker exec slurmctld bash -c "/usr/bin/sacctmgr --immediate add cluster name=linux" && \
5-
docker-compose restart slurmdbd slurmctld
5+
docker compose restart slurmdbd slurmctld

webknossos/local_wk_setup.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ function ensure_local_test_wk {
88
export_vars
99

1010
if ! curl -sf localhost:9000/api/health; then
11-
echo "Using docker-compose setup with the docker tag $DOCKER_TAG"
11+
echo "Using docker compose setup with the docker tag $DOCKER_TAG"
1212
echo " To change this, please update DOCKER_TAG in local_wk_setup.sh"
1313

1414
WK_DOCKER_DIR="tests"
1515
pushd $WK_DOCKER_DIR > /dev/null
16-
docker-compose pull webknossos
16+
docker compose pull webknossos
1717
if [ ! -d binaryData/Organization_X/l4_sample ]; then
1818
mkdir -p binaryData/Organization_X
1919
pushd binaryData/Organization_X > /dev/null
@@ -22,19 +22,19 @@ function ensure_local_test_wk {
2222
rm l4_sample.zip
2323
popd > /dev/null
2424
fi
25-
USER_UID=$(id -u) USER_GID=$(id -g) docker-compose up -d --no-build webknossos
25+
USER_UID=$(id -u) USER_GID=$(id -g) docker compose up -d --no-build webknossos
2626
stop_wk () {
2727
ARG=$?
2828
pushd $WK_DOCKER_DIR > /dev/null
29-
docker-compose down
29+
docker compose down
3030
popd > /dev/null
3131
exit $ARG
3232
}
3333
trap stop_wk EXIT
3434
while ! curl -sf localhost:9000/api/health; do
3535
sleep 5
3636
done
37-
OUT=$(docker-compose exec -T webknossos tools/postgres/dbtool.js prepare-test-db 2>&1) || echo "$OUT"
37+
OUT=$(docker compose exec -T webknossos tools/postgres/dbtool.js prepare-test-db 2>&1) || echo "$OUT"
3838
popd > /dev/null
3939
else
4040
echo "Using the already running local webknossos setup at localhost:9000"
@@ -62,7 +62,7 @@ function ensure_local_test_wk {
6262
function stop_local_test_wk {
6363
if [ -n "${WK_DOCKER_DIR-}" ]; then
6464
pushd $WK_DOCKER_DIR > /dev/null
65-
docker-compose down || true
65+
docker compose down || true
6666
popd > /dev/null
6767
fi
6868
}

0 commit comments

Comments
 (0)