Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests: re-work docker-compose usage. rucio#6212 (rucio#6344)
* Tests: merge all docker compose files into one. rucio#6212 Use profiles to activate additional features when needed. For example: ``` docker-compose --file etc/docker/dev/docker-compose.yml --profile storage --profile monitoring up ``` instead of ``` docker-compose --file etc/docker/dev/docker-compose-storage-monit.yml up ``` Hope this will reduce the amount of un-maintained and duplicated stuff in these files * Tests: don't open docker-compose ports by default. rucio#6212 Opening ports is not a requirement. It's a comfort feature which some developers use to access services directly from their machine. But this is also opening the door for security-related problems. This commit stops opening ports by default. If somebody needs this feature, they can call docker-compose with two --file arguments: ``--file docker-compose.yaml --file docker-compose.ports.yml` to merge the both files together and achieve the same behavior. * Tests: directly install gridsite in alma9 it's now available in epel. * Tests: use docker-compose in autotests Remove the home-made suites.py which was manually starting the same docker containers, but with a slightly different configuration. The difference in configuration was not justified in any way. The relevant autotests will now use docker-compose to run database/elastic/activemq/influx. The same way it's done for integration tests. An override docker-compose file is used to set the container image and to disable the default 'ruciodb' postgres from running. This commit doesn't change the interface exposed by run_tests.py. In theory, donkeyrider should still run correctly for all those 1 person who actually use it, but will have a dependency on docker-compose, which wasn't the case until now. Rollback the oracle container version in docker-compose. Put there the version which was actually used in suites.py (18). * Tests: fix typo in matrix * Tests: merge run_tests.sh and run_tests_docker.sh Why do we even have two of them ? * Tests: factorize common rucio.cfg This also has the benefit of testing the tools/merge_rucio_configs.py script, which is critical for our containers, but is not tested anywhere. * Tests: use sqlalchemy to wait for database readiness It's much more generic this way. This will probably allow to completely get rid of the before_script.sh later. * Tests: merge before_script.sh into install_script.sh The content is now small enough that it doesn't justify having a separate script. The only tricky part was configuration of the oracle database. Luckily, the container which we use already supports mounting a shell script to be executed on initialization. It's enough to mount it at the correct location. * Tests: merge install_script.sh into test.sh These two scripts are always called one after the other. Make it explicit. Especially considering that the second heavily depends on the first. Mostly just code movement, no refactoring (which would be very welcomed in a later commit). * Tests: remove with_venv.sh file It's not needed for rucio operation or tests. If somebody uses this simple wrapper, they can keep a local version of it. * Tests: remove purge_bin.py It was used for housekeeping when testing on the CERN oracle devdb instance, but the recommended way to run tests against oracle now is using docker-compose. * Tests: remove submit_fts3_transfer.py This script is broken for a long time now * Tests: generate rucio.cfg on container startup This will allow to easily create a test env for a specific database: ``` RDBMS=mysql8 docker-compose --file etc/docker/dev/docker-compose.yml --profile mysql8 up ``` Mount the rucio source into the rucio containers and use an alternative entry-point script to generate the desired configuration before running httpd. Also copy the "default" rucio.cfg and alembic.ini from rucio/containers repository. This will reduce the dependency between the rucio/rucio and rucio/containers repositories. Move the httpd restart command in run_tests.sh to fix the sqlite env. Otherwise, httpd continues to use the old database even if we re-created it a couple of lines above. * Tests: reorganize test.sh by suite Make it very clear what code is executed for what suite. Avoid any confusion. Except for the multi_vo tests, where a little rework was needed, everything else is mostly just code movement to put everything under a unique if/else block. Remove rucio_syntax.cfg. It's identical to the sqlite one. * Tests: integrate iam docker-compose into the main one Run the additional containers starting docker-compose with `--profile iam`
- Loading branch information