RELECOV Platform deployment guide (containers and bare-metal), including iSkyLIMS and Nextstrain integration.
- RELECOV Platform
git clone https://github.com/bu-isciii/relecov-platform.git
cd relecov-platformiSkyLIMS is required for the integrated platform stack:
cd ..
git clone https://github.com/bu-isciii/iskylims.git relecov-iskylims- Docker (test): full local stack for validation.
- Docker (production): app + iSkyLIMS + Nextstrain containers pointing to your production DB.
- Bare-metal: install directly on the host using
install.sh.
Baseline software (minimum recommended):
- MySQL 8.0+ or MariaDB 10.4+
- Git 2.34+
- Python 3.11+
- Apache HTTP Server 2.4+ (for reverse proxy on production)
- Docker Engine + Compose v2, or Podman 4.9+ +
podman-compose tar,rsync,wget,curl
Notes:
- This guide does not cover MySQL installation itself, only DB/user/grant creation and operational tasks.
- For container deployments with external DB, ensure network connectivity from containers to DB host/port.
- For Podman, prefer
host.containers.internalin DB host settings.
Prerequisites:
- Docker Compose v2 or Podman + podman-compose.
- Both repositories checked out side-by-side:
relecov-platformrelecov-iskylims
Runs:
relecov_test_db(MySQL)relecov_test_app(RELECOV Platform)relecov_test_iskylims_app(iSkyLIMS)relecov_test_nextstrain(Nextstrain viewer)
Basic test install:
cd relecov-platform
bash container_install.sh --test --engine podman 2>&1 | tee relecov_test_install.logPer-service conf mapping (recommended):
bash container_install.sh --test --engine podman \
--install_conf_map app,conf/docker_test_platform_settings.txt \
--install_conf_map iskylims_app,conf/docker_test_iskylims_settings.txt \
2>&1 | tee relecov_test_install.log- Prepare production confs (separate for each service):
cp conf/docker_production_settings.txt conf/docker_production_platform_settings.txt
cp ../relecov-iskylims/conf/docker_production_settings.txt ../relecov-iskylims/conf/docker_production_iskylims_settings.txt-
Edit both files with your production DB/network values.
-
Deploy:
cd relecov-platform
bash container_install.sh --engine podman \
--action install \
--install_conf_map app,conf/docker_production_platform_settings.txt \
--install_conf_map iskylims_app,../relecov-iskylims/conf/docker_production_iskylims_settings.txt \
2>&1 | tee relecov_prod_install.log- Endpoints:
- RELECOV Platform:
http://<host>:8000 - iSkyLIMS:
http://<host>:8001 - Nextstrain:
http://<host>:8100
For production container deployments, keep these paths persistent:
- Logs:
/var/log/local/apps/relecov-platform->/opt/relecov-platform/logs - Documents: named volume
relecov_documents->/opt/relecov-platform/documents - Static:
/opt/relecov-platform/static-host->/opt/relecov-platform/static
Prepare host directories and ownership:
sudo mkdir -p /var/log/local/apps/relecov-platform
sudo mkdir -p /opt/relecov-platform/static-host
sudo chown -R ${APP_UID:-1212}:${APP_GID:-1212} /var/log/local/apps/relecov-platform /opt/relecov-platform/static-hostFor production, host Apache can proxy the platform container on localhost:8000.
You can use the existing Apache templates in this repository:
- Ubuntu/Debian:
conf/relecov_apache_ubuntu.conf - CentOS/RHEL:
conf/relecov_apache_centos_redhat.conf
Copy and enable (adapt paths/domain names to your environment):
# Ubuntu/Debian
sudo cp conf/relecov_apache_ubuntu.conf /etc/apache2/sites-available/relecov-platform.conf
sudo a2ensite relecov-platform.conf
sudo a2enmod proxy proxy_http headers rewrite
sudo systemctl reload apache2
# CentOS/RHEL
sudo cp conf/relecov_apache_centos_redhat.conf /etc/httpd/conf.d/relecov-platform.conf
sudo systemctl reload httpdUse upgrade when DB schema/data already exist.
IMPORTANT:Before upgrading, perform backups from Backups.
cd relecov-platform
bash container_install.sh --engine podman \
--action upgrade \
--install_conf_map app,conf/docker_production_platform_settings.txt \
--install_conf_map iskylims_app,../relecov-iskylims/conf/docker_production_iskylims_settings.txt \
2>&1 | tee relecov_prod_upgrade.log- Prepare DB/users/grants from Database creation, users and grants.
- Edit config files:
relecov-platform/conf/install_settings.txtrelecov-iskylims/conf/install_settings.txt
- Install dependencies + app (needs root):
cd relecov-platform
bash install.sh --install full --conf conf/install_settings.txt
cd ../relecov-iskylims
bash install.sh --install full --conf conf/install_settings.txtcd relecov-platform
bash install.sh --upgrade app --conf conf/install_settings.txt
cd ../relecov-iskylims
bash install.sh --upgrade app --conf conf/install_settings.txtBefore upgrading, perform backups from Backups.
Run as MySQL root:
CREATE DATABASE IF NOT EXISTS relecov_dev CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE DATABASE IF NOT EXISTS iskylims_rel_dev CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER IF NOT EXISTS 'relecov'@'%' IDENTIFIED BY 'djangopass';
CREATE USER IF NOT EXISTS 'relecovlims'@'%' IDENTIFIED BY 'djangopass';
CREATE USER IF NOT EXISTS 'relecov'@'localhost' IDENTIFIED BY 'djangopass';
CREATE USER IF NOT EXISTS 'relecovlims'@'localhost' IDENTIFIED BY 'djangopass';
GRANT ALL PRIVILEGES ON relecov_dev.* TO 'relecov'@'%';
GRANT ALL PRIVILEGES ON relecov_dev.* TO 'relecov'@'localhost';
GRANT ALL PRIVILEGES ON iskylims_rel_dev.* TO 'relecovlims'@'%';
GRANT ALL PRIVILEGES ON iskylims_rel_dev.* TO 'relecovlims'@'localhost';
FLUSH PRIVILEGES;Verification:
SHOW GRANTS FOR 'relecov'@'%';
SHOW GRANTS FOR 'relecovlims'@'%';Database dumps:
mysqldump -h <db_host> -P <db_port> -u relecov -p relecov_dev > relecov_dev_$(date +%Y%m%d_%H%M%S).sql
mysqldump -h <db_host> -P <db_port> -u relecovlims -p iskylims_rel_dev > iskylims_rel_dev_$(date +%Y%m%d_%H%M%S).sqlRELECOV logs (host bind path used by production compose):
tar -czf relecov_logs_$(date +%Y%m%d_%H%M%S).tgz -C /var/log/local/apps/relecov-platform .Docker/Podman named volumes (documents + nextstrain datasets):
# podman (replace with docker if needed)
podman run --rm -v relecov_documents:/from -v "$PWD":/to alpine \
tar -czf /to/relecov_documents_$(date +%Y%m%d_%H%M%S).tgz -C /from .
podman run --rm -v nextstrain_data:/from -v "$PWD":/to alpine \
tar -czf /to/nextstrain_data_$(date +%Y%m%d_%H%M%S).tgz -C /from .Suggested backup order before any risky change:
- DB dumps.
- Documents volume.
- Nextstrain datasets volume.
- Logs archive.
Restore DB:
mysql -h <db_host> -P <db_port> -u relecov -p relecov_dev < relecov_dev_YYYYMMDD_HHMMSS.sql
mysql -h <db_host> -P <db_port> -u relecovlims -p iskylims_rel_dev < iskylims_rel_dev_YYYYMMDD_HHMMSS.sqlRestore volumes:
podman run --rm -v relecov_documents:/to -v "$PWD":/from alpine \
sh -lc "cd /to && tar -xzf /from/relecov_documents_YYYYMMDD_HHMMSS.tgz"
podman run --rm -v nextstrain_data:/to -v "$PWD":/from alpine \
sh -lc "cd /to && tar -xzf /from/nextstrain_data_YYYYMMDD_HHMMSS.tgz"Restore logs archive:
sudo mkdir -p /var/log/local/apps/relecov-platform
sudo tar -xzf relecov_logs_YYYYMMDD_HHMMSS.tgz -C /var/log/local/apps/relecov-platformQuick checks:
podman ps -a
podman logs --tail 200 relecov_app
podman logs --tail 200 relecov_iskylims_app
podman logs --tail 200 relecov_nextstrainIf deployment is broken after migration or bad data load, rollback using Restore / rollback.
- Create the admin/superuser if not already created.
- Load RELECOV schema:
in
Configuration -> SchemaHandling, upload the latestrelecov_schema.json:https://raw.githubusercontent.com/BU-ISCIII/relecov-tools/main/relecov_tools/schema/relecov_schema.json - Load annotation GFF:
in
Configuration -> Annotation, upload:conf/NC_045512.2.gff - iSkyLIMS endpoint verification:
in
/admin/core/configsetting/, ensureISKYLIMS_SERVERpoints to your iSkyLIMS service (for examplerelecov-limsin test, or your production hostname).
Pre-load RELECOV sample project data before normal usage:
cd /opt/iskylims
source virtualenv/bin/activate
python manage.py migrate --noinput
python manage.py loaddata /path/to/relecov_iskylims_projects.jsonIf you need to generate that fixture from an existing environment:
cd /opt/iskylims
source virtualenv/bin/activate
python manage.py dumpdata --indent 2 core.SampleProjects > ~/relecov_iskylims_test_data.jsonThen configure RELECOV in iSkyLIMS:
- Create
relecovbotin/admin/auth/user/and assign required permissions/groups for your integration flows. - Go to WetLab (
/wetlab) and open:PARAMETERS SETTINGS -> Define Sample projects. - If the project does not exist, create one including
RELECOVin the name and set the manager (for exampleisabel.cuestain your environment). - In that RELECOV project:
Define fields -> Load batch, then set:
upload schema:relecov_schema.jsonProperty where to fetch fields:classification- select classifications to import:
- Database Identifiers
- Files info
- Host information
- Pathogen diagnostic testing
- Sample collection and processing
- Sequencing
- Configure ontology mapping in
/admin/core/ontologymap/:
lab_request->GENEPIO:0001153(submitting_institution)species->GENEPIO:0001386(Organism)sample_name->GENEPIO:0001123(sequencing_sample_id)sample_entry_date->NCIT:C93644(received_date)collection_sample_date->GENEPIO:0001174(sample_collection_date)
- Define species in:
PARAMETERS SETTINGS -> Initial Settings -> Define new Specie. Add all enum values used by your schema forOrganism(or the ontology-mapped equivalent), for example:
- Severe acute respiratory syndrome coronavirus 2
- Respiratory syncytial virus
- Influenza virus
- Ensure
wetlabapp assignment is enabled for the related flow.
Recommended endpoint checks:
curl -I http://<host>:8000
curl -I http://<host>:8001
curl -I http://<host>:8100Create and review migrations locally, then commit migration files:
cd /opt/relecov-platform
source virtualenv/bin/activate
python manage.py makemigrations core dashboard
python manage.py migrate --noinput
python manage.py showmigrations core dashboardDo not rely on runtime auto-generation of migrations in production.
# bring stack down (keep volumes)
podman-compose -f docker-compose.test.yml down
# rebuild changed services
podman-compose -f docker-compose.test.yml build app iskylims_app
# start again
podman-compose -f docker-compose.test.yml up -dSee Persist logs/documents on the host in the production deployment section.
podman exec -it relecov_test_app python /opt/relecov-platform/manage.py check
podman exec -it relecov_test_iskylims_app python /opt/iskylims/manage.py check
podman volume ls | grep -E 'relecov|nextstrain'