A small HTTP server for running orderly reports.
The worker and API server are intended to be run as separate containers created from the same image, using the two different entrypoints in docker/bin.
To install orderly.runner from GitHub:
remotes::install_github("mrc-ide/orderly.runner", upgrade = FALSE)To install for local development, you can use:
devtools::install(dependencies = TRUE)To develop (or test) functions that use private git repositories, you will need to set the environment variable TEST_PRIVATE_REPO_SSH_KEY.
- Create an ssh key - crucially, without setting a passphrase.
- Add it as a deploy key on the private test repo at this link.
- Then set the private key as an environment variable:
Sys.setenv(TEST_PRIVATE_REPO_SSH_KEY = paste(readLines("path/to/ssh/key"), collapse = "\n"))devtools::test()
# or to run a specific test file:
devtools::test(filter='e2e')If redis is not running, then tests relying on redis will be skipped.
To run a redis container, use scripts/redis start. Bring it down with scripts/redis stop.
- Optionally modify
docker/test/examplesorderly reports. These will be used as reports in the container - Run
docker/test/run-testto use the docker image from GitHub Container Registry, ordocker/test/run-test --localto build from your local version for development. This will produce atest-repodirectory to show you what was copied into the docker containers (you can create just this directory without running the docker containers by runningdocker/test/setup-test-repoif you want). - The server will be available at
localhost:8001 - To view the orderly root directory in the docker container (you may want to do this after workers have run orderly reports for example), run
docker/test/copy-orderly-rootand this will copy the contents todocker/test/orderly-root-volume - Finally to clear docker and remove
test-repoandorderly-root-volumedirectories rundocker/test/clear-test
When running the server or worker containers, you should set REDIS_URL to point to your Redis instance.
You should also set the ORDERLY_RUNNER_QUEUE_ID to the same thing between server and worker containers so they connect to the same queue.
MIT © Imperial College of Science, Technology and Medicine