diff --git a/Makefile b/Makefile index e14b087..ec9c34f 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ start_sentinel_env: base_image redis/src/redis-server cmd/rdsync/rdsync recreate rm -rf ./tests/images/redis/redis-server && cp redis/src/redis-server ./tests/images/redis/redis-server rm -rf ./tests/images/redis/redis-senticache && cp redis/src/redis-senticache ./tests/images/redis/redis-senticache rm -rf ./tests/images/redis/redis-cli && cp redis/src/redis-cli ./tests/images/redis/redis-cli - docker-compose -p $(PROJECT) -f ./tests/images/jepsen-compose.yaml up -d --force-recreate --build + docker compose -p $(PROJECT) -f ./tests/images/jepsen-compose.yaml up -d --force-recreate --build timeout 600 docker exec rdsync_zoo1_1 setup_zk.sh timeout 600 docker exec rdsync_redis1_1 setup_sentinel.sh timeout 600 docker exec rdsync_redis2_1 setup_sentinel.sh redis1 @@ -62,7 +62,7 @@ start_cluster_env: base_image redis/src/redis-server cmd/rdsync/rdsync recreate_ rm -rf ./tests/images/redis/redis-server && cp redis/src/redis-server ./tests/images/redis/redis-server rm -rf ./tests/images/redis/redis-senticache && cp redis/src/redis-senticache ./tests/images/redis/redis-senticache rm -rf ./tests/images/redis/redis-cli && cp redis/src/redis-cli ./tests/images/redis/redis-cli - docker-compose -p $(PROJECT) -f ./tests/images/jepsen-compose.yaml up -d --force-recreate --build + docker compose -p $(PROJECT) -f ./tests/images/jepsen-compose.yaml up -d --force-recreate --build timeout 600 docker exec rdsync_zoo1_1 setup_zk.sh timeout 600 docker exec rdsync_redis1_1 setup_cluster.sh timeout 600 docker exec rdsync_redis2_1 setup_cluster.sh redis1 diff --git a/README.md b/README.md index 547044f..61deae7 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ It uses a patched redis version to make a cluster or sentinel-like setup less pr ## Try it out -* You will need a linux vm with gnu make, docker, docker-compose and go >1.22 installed. +* You will need a linux vm with gnu make, docker, docker compose and go >1.22 installed. * Use `make start_sentinel_env` to start an environment with senticache * Or `make start_cluster_env` to start an environment with single shard of clustered setup * Run `make clean` to drop containers and network diff --git a/tests/testutil/docker_composer.go b/tests/testutil/docker_composer.go index 4417ef7..3bac9ee 100644 --- a/tests/testutil/docker_composer.go +++ b/tests/testutil/docker_composer.go @@ -90,14 +90,14 @@ func NewDockerComposer(project, config string) (*DockerComposer, error) { } func (dc *DockerComposer) runCompose(args []string, env []string) error { - args2 := []string{} + args2 := []string{"compose"} args2 = append(args2, "-f", dc.config, "-p", dc.projectName) args2 = append(args2, args...) - cmd := exec.Command("docker-compose", args2...) + cmd := exec.Command("docker", args2...) cmd.Env = append(os.Environ(), env...) out, err := cmd.CombinedOutput() if err != nil { - return fmt.Errorf("failed to run 'docker-compose %s': %s\n%s", strings.Join(args2, " "), err, out) + return fmt.Errorf("failed to run 'docker compose %s': %s\n%s", strings.Join(args2, " "), err, out) } return nil }