Skip to content

Commit

Permalink
ap: Migrate to docker compose V2
Browse files Browse the repository at this point in the history
actions/runner-images#9557

> Docker Compose v1 will be removed from images on April, 1

https://docs.docker.com/compose/migrate/
  • Loading branch information
stanislavlevin committed Sep 9, 2024
1 parent 5563a45 commit 50a7cba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions ipatests/azure/scripts/azure-run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ IPA_TESTS_CLIENTS="${!IPA_TESTS_CLIENTS_VARNAME:-0}"
IPA_TESTS_REPLICAS_VARNAME="IPA_TESTS_REPLICAS_${PROJECT_ID}"
IPA_TESTS_REPLICAS="${!IPA_TESTS_REPLICAS_VARNAME:-0}"

IPA_TESTS_CONTROLLER="${PROJECT_ID}_master_1"
IPA_TESTS_CONTROLLER="${PROJECT_ID}-master-1"
IPA_TESTS_LOGSDIR="${IPA_TESTS_REPO_PATH}/ipa_envs/${IPA_TESTS_ENV_NAME}/${CI_RUNNER_LOGS_DIR}"

# path to azure scripts inside container
Expand Down Expand Up @@ -108,14 +108,14 @@ IPA_INSTALLED_PKGS_DIR="${project_dir}/installed_packages"
BASH_CMD="/bin/bash --noprofile --norc"

function containers() {
local _containers="${PROJECT_ID}_master_1"
local _containers="${PROJECT_ID}-master-1"
# build list of replicas
for i in $(seq 1 1 "$IPA_TESTS_REPLICAS"); do
_containers+=" ${PROJECT_ID}_replica_${i}"
_containers+=" ${PROJECT_ID}-replica-${i}"
done
# build list of clients
for i in $(seq 1 1 "$IPA_TESTS_CLIENTS"); do
_containers+=" ${PROJECT_ID}_client_${i}"
_containers+=" ${PROJECT_ID}-client-${i}"
done
printf "$_containers"
}
Expand Down Expand Up @@ -158,7 +158,7 @@ IPA_TESTS_CLIENT_MEMSWAP_LIMIT="$IPA_TESTS_CLIENT_MEMSWAP_LIMIT" \
IPA_TESTS_CLIENT_MEM_RESERVATION="$IPA_TESTS_CLIENT_MEM_RESERVATION" \
IPA_TESTS_SERVER_MEM_RESERVATION="$IPA_TESTS_SERVER_MEM_RESERVATION" \
IPA_TESTS_REPLICA_MEM_RESERVATION="$IPA_TESTS_REPLICA_MEM_RESERVATION" \
docker-compose -p "$PROJECT_ID" up \
docker compose -p "$PROJECT_ID" up \
--scale replica="$IPA_TESTS_REPLICAS" \
--scale client="$IPA_TESTS_CLIENTS" \
--force-recreate --remove-orphans -d
Expand Down Expand Up @@ -279,7 +279,7 @@ IPA_TESTS_CLIENT_MEMSWAP_LIMIT="$IPA_TESTS_CLIENT_MEMSWAP_LIMIT" \
IPA_TESTS_CLIENT_MEM_RESERVATION="$IPA_TESTS_CLIENT_MEM_RESERVATION" \
IPA_TESTS_SERVER_MEM_RESERVATION="$IPA_TESTS_SERVER_MEM_RESERVATION" \
IPA_TESTS_REPLICA_MEM_RESERVATION="$IPA_TESTS_REPLICA_MEM_RESERVATION" \
docker-compose -p "$PROJECT_ID" down
docker compose -p "$PROJECT_ID" down
popd

exit $tests_result
2 changes: 1 addition & 1 deletion ipatests/azure/scripts/setup_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def __init__(
# initialize containers
self.containers = [
Container(
name=f"{self.prefix}_{self.role}_{c}",
name=f"{self.prefix}-{self.role}-{c}",
hostname=f"{self.role}{c}.{self.domain}",
network=f"{IPA_TESTS_ENV_ID}_{IPA_NETWORK}",
)
Expand Down

0 comments on commit 50a7cba

Please sign in to comment.