Speed up docker deployment in CI
Speeding up CI:
-
Using
docker compose up --waitinstead of a custom healthcheck script: from: https://docs.docker.com/reference/cli/docker/compose/up/--waitWait for services to be running|healthy. Implies detached mode. --wait-timeoutMaximum duration in seconds to wait for the project to be running|healthy -
Speeding up the healthchecks by reducing the interval from 1-10s to 0.5s during start period
start_periodcreates a special period after the start of the container where the healthcheck is executed everystart_interval. During this time the failures do not count towards the retries counter, but successes change the status to healthy. This allows container to reach healthy status much sooner. -
Using
init: trueto speed updocker compose down/stopinit: trueinitializes the docker container withtinior alternative: tini is used to collect all the processes and correctly pass the termination signal to them. This allows the docker container to be stopped without waiting 10 seconds to kill the containerSmallest example of this is:
services: test-init: image: ubuntu:jammy command: sleep 10d
This compose file takes 10 seconds to docker compose down
Adding init:true makes it 0.5 seconds
Use new healthcheck condition for OTA gNB/UE deployments
- use PRACH IO as an indicator of the gNB's status (container is marked as "healthy" when the PRACH IO value in gNB nrL1_stats.log exceeds 0.0 dB.)
- benefits:
- speedup deployment by 2-3 s
- detect unsuccessful USRP initialization (as reported in #871) in SA-2x2, OAIUE pipelines - container is marked as unhealthy and attempts to connect the UE is skipped
TODO:
-
test with CI unit test