xx Deployment info OLD - RTXteam/RTX GitHub Wiki
NOTE: This page is out of date. Instead see ARAX Docker Deployment, RTX-KG2 API Docker Deployment, and Operations & deployment info.
ARAX ARA Capacity and technology stack
The production ARAX server (API endpoint) arax.ncats.io
is hosted in AWS EC2 on an instance of type m5a.4xlarge
with 16 processors, 64 GiB of memory, a 32 GiB root filesystem, and a 1 TiB filesystem mounted as /translator
. The host OS is Ubuntu 18.04 and it has the following software stack:
- Docker version 19.03.12 for containerization
- Nginx version 1.14.0 (OpenSSL 1.1.1) for TLS termination (proxying 443 to 8080).
- sudo 1.8.21p2
ARAX runs within a Docker container rtx1
(which maps host TCP port 8080 to within-container TCP port 80) that has Ubuntu 16.04 as the base image within the container, and that uses the following stack within the container (installed using apt-get
unless otherwise indicated):
- Apache version 2.4.18 as the webserver
- Flask version 1.1.2 as WSGI web application framework
- OpenSSH version 7.2p2 (with OpenSSL 1.0.2g)
- python version 3.7.3 (we are using the system python,
/usr/bin/python
; see the ARAX requirements file for packages) - mysql version 14.14 (Distrib 5.7.19)
- git version 2.7.4
- Neo4j version 3.2.6, Community Version (within the
rtx1
ARAX server container, Neo4j is a legacy dependency ; most Neo4j usage is via a Neo4j serverkg2canonicalized.rtx.ai
that is hosted separately fromarax.ncats.io
) - For Neo4j, OpenJDK version 1.8.0_131
- OpenAPI version 3.0.1 for code generation of interface python classes for the API
KG2 KP Capacity and technology stack
The KG2 KP runs in an AWS EC2 instance of type r5a.4xlarge
with 100 GiB of storage, with an Ubuntu 18.04 AMI.
ARAX Deployment Recipe - OLD
All but the final step are to be executed within the rtx1
docker container as user rt
.
From the host OS, logging into the rtx1
container and becoming user rt
would entail:
sudo docker exec -it rtx1 bash -c "su - rt"
Database cache area
Outside container is /data/orangeboard/databases/KG2.3.4
Inside container is /mnt/data/orangeboard/databases/KG2.3.4
Setup
INST=test
SRC=/mnt/data/orangeboard/databases/KG2.3.4
DST=/mnt/data/orangeboard/$INST/RTX
Roll out code
cd $DST/code
git pull
Copy config.json
cd $DST/code
cp -p $SRC/config.json .
Link NodeSynonymizer
cd $DST/code/ARAX/NodeSynonymizer
rm node_synonymizer.sqlite
ln -s $SRC/node_synonymizer.sqlite
Link NGD
cd $DST/code/ARAX/ARAXQuery/Overlay/ngd
rm curie_to_pmids.sqlite
ln -s $SRC/curie_to_pmids.sqlite
Copy COHD
cd $DST/code/ARAX/KnowledgeSources/COHD_local/data
rm COHDdatabase_v*.db
ln -s $SRC/COHDdatabase_v*.db
Copy Drug-Treats-Disease
cd $DST/code/ARAX/ARAXQuery/Overlay/predictor/retrain_data
rm GRAPH.sqlite LogModel.pkl
ln -s $SRC/GRAPH.sqlite
ln -s $SRC/LogModel.pkl
Run tests
cd $DST/code/ARAX/test
pytest -v --durations=10
Restart the service as user root inside container
INST=test
service RTX_OpenAPI_$INST restart
sleep 1
tail -f /tmp/RTX_OpenAPI_$INST.elog
Where are error log files?
- Apache2 logfile: inside the container,
/var/log/apache2/error.log
- Python flask server logfile: inside the container,
/tmp/RTX_OpenAPI_XXXXXXXX.elog
, where instead ofXXXXXXXX
, substitute the deployment label likeproduction
,test
,legacy
, etc.