Open sundareswarpullela opened 2 months ago
KG2.10.1c Synonymizer build completed, will be poking at it a bit and then proceed with a test KG2.10.1c build followed by the full build.
Commenced the KG2.10.1c build on buildkg2c.rtx.ai on kg2cbuild screen session.
from today's AHM: @sundareswarpullela - let's make a final decision on Friday as to whether we will squeeze KG2.10.1c into Sprint 6 (ends Oct. 4). (figuring we will, but would be good to get a little more testing in before officially deciding)
All ARAX pytests are passing.
All available databases uploaded onto arax.ncats.io. Once mohsen is done with building the latest curie_ngd database, I’ll upload that onto arax.ncats.io too.
@sundareswarpullela - looks like CI Plover finished building! https://kg2cploverdb.ci.transltr.io/code_version
I'm seeing Plover's pytest suite passing with:
cd PloverDB/test
pytest -v --endpoint https://kg2cploverdb.ci.transltr.io
NOTE: To create a new issue based on this template, simply go to: https://github.com/RTXteam/RTX/issues/new?template=kg2rollout.md
THE BRANCH FOR THIS ROLLOUT IS:
kg2.10.1c
THE ARAX-DATABASES.RTX.AI DIRECTORY FOR THIS ROLLOUT IS:/home/rtxconfig/KG2.10.1
Sprint changelog link: (Changelog)
Prerequisites
ssh access
To complete this workflow, you will need
ssh
access to:arax-databases.rtx.ai
arax.ncats.io
(see example configuration information below)kg2cploverN.rtx.ai
kg2canoncalizedN.rtx.ai
cicd.rtx.ai
kg2webhost.rtx.ai
GitHub access
RTXteam/PloverDB
project areaRTXteam/RTX
project areancats/translator-lfs-artifacts
project area (not critical, but needed for some final archiving steps; Amy Glen and Sundar Pullela have access)AWS access
You will need:
s3://rtx-kg2/
(ask Stephen Ramsey for access)Slack workspaces
You will also need access to the following Slack workspaces:
Example ssh config for setting up login into
arax.ncats.io
:1. Build and load KG2c:
master
into the branch being used for this KG2 version (which would typically be named likeKG2.X.Yc
). Record this issue number in the merge message.code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml
(github; local)code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml
(github; local)code/UI/OpenAPI/specifications/export/ARAX/1.5.0/openapi.yaml
(github)code/UI/OpenAPI/specifications/export/KG2/1.5.0/openapi.yaml
(github)buildkg2c.rtx.ai
from the branch (how-to is here)arax-databases.rtx.ai
(need at least 100G, ideally >120G). delete old KG2 database directories as needed (warn the team on Slack in advance).kg2c_config.json
, as described in the how-tonode_synonymizer.sqlite
should be around 8-15 GBnode_synonymizer.sqlite
's last modified date is today (or whatever day the build was run)kg2c_lite.json.gz
's last modified date is today (or whatever day the build was run)arax-databases.rtx.ai
(/home/rtxconfig/KG2.X.Y
)match (n {id:"RTX:KG2c"}) return n
RTX/code/config_dbs.json
in the branch:kg2c_lite_2.X.Y.json.gz
file (which you can get from the S3 buckets3://rtx-kg2/kg2c_lite.json.gz
(but CHECK THE DATE AND MD5 HASH TO BE SURE YOU ARE NOT GETTING AN OLD FILE) to the directory/home/ubuntu/nginx-document-root/
onkg2webhost.rtx.ai
kg2cploverN.rtx.ai
:ssh ubuntu@kg2cploverN.rtx.ai
cd PloverDB && git pull origin kg2.X.Yc
./run.sh ploverimage2.X.Y plovercontainer2.X.Y "sudo docker"
(takes about an hour)sudo docker start plovercontainer2.X.Y
(takes about five minutes)cd PloverDB
pytest -v test/test.py --endpoint http://kg2cploverN.rtx.ai:9990
config_dbs.json
in the branch for this KG2 version in the RTX repo to point to the new Plover for the 'dev' maturity level2. Rebuild downstream databases:
The following databases should be rebuilt and copies of them should be put in
/home/rtxconfig/KG2.X.Y
onarax-databases.rtx.ai
. Please use this kind of naming format:mydatabase_v1.0_KG2.X.Y.sqlite
.NOTE: As databases are rebuilt,
RTX/code/config_dbs.json
will need to be updated to point to their new paths! Push these changes to the branch for this KG2 version, unless the rollout of this KG2 version has already occurred, in which case you should push tomaster
(but first follow the steps described here).3. Update the ARAX codebase:
All code changes should go in the branch for this KG2 version!
RTX/code/ARAX/KnowledgeSources/RTX_KG2c_test_triples.json
force_local = True
inARAX_expander.py
(to avoid using the old KG2 API)pytest -v
)RTX/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml
(github; local); the major and minor release numbers are kept synchronous with the TRAPI version; just bump the patch release version (least significant digit)RTX/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml
(github; local); the first three digits are kept synchronous with the KG2 release versionRTX/code/UI/OpenAPI/python-flask-server/RTX_OA3_TRAPI1.4_ARAX.yaml
(github; local); same as for the ARAXopenapi.yaml
fileRTX/code/UI/OpenAPI/python-flask-server/RTX_OA3_TRAPI1.4_KG2.yaml
(github; local); same as for the KG2openapi.yaml
file4. Pre-upload databases:
Before rolling out, we need to pre-upload the new databases (referenced in
config_dbs.json
) toarax.ncats.io
and the ITRB SFTP server. These steps can be done well in advance of the rollout; it doesn't hurt anything to do them early.arax.ncats.io
has at least 100G of disk space free; delete old KG2 databases to free up space as needed (before doing this, warn the team on the#deployment
Slack channel on theARAXTeam
workspace)arax-databases.rtx.ai
toarax.ncats.io:/translator/data/orangeboard/databases/KG2.X.Y
; example for KG2.8.0:ssh myuser@arax.ncats.io
cd /translator/data/orangeboard/databases/
mkdir -m 777 KG2.8.0
scp rtxconfig@arax-databases.rtx.ai:/home/rtxconfig/KG2.8.0/*2.8.0* KG2.8.0/
5. Rollout new KG2c version to
arax.ncats.io
development endpoints#deployment
channel in theARAXTeam
Slack workspace that you are rolling out a new version of KG2c to the variousarax.ncats.io
development endpoints. Provide the KG2c version number in this notification.RTXteam/RTX
project, merge themaster
branch into the branch for this KG2 version. Record the RTX issue number (for the KG2c rollout checklist issue) in the merge message.RTXteam/RTX
project, merge this KG2 version's branch back into themaster
branch. Record this issue number in the merge message.master
out to a specific ARAX or KG2 endpoint named/EEE
, you would do the following steps:arax.ncats.io
)arax.ncats.io
:ssh arax.ncats.io
(you previously need to have set up your username, etc. in~/.ssh/config
; see the top of this issue template for an example)rtx1
container:sudo docker exec -it rtx1 bash
rt
:su - rt
EEE
endpoint:cd /mnt/data/orangeboard/EEE/RTX
git branch
(should show* master
)git stash
git pull origin master
git stash pop
requirements.txt
, make sure to dopip3 install -r code/requirements.txt
exit
(exiting out of your shell session as userrt
should return you to aroot
user session)service RTX_OpenAPI_EEE restart
tail -f /tmp/RTX_OpenAPI_EEE.elog
{"nodes": {"n00": {"ids": ["RTX:KG2c"]}}, "edges": {}}
(it should return 1 result and the name of that node gives the KG2c version that is installed in the PloverDB that is being queried by the endpoint)RTX:KG2
in the Synonyms tab in the UImaster
out to the variousarax.ncats.io
development endpoints. Usually in this order:devED
kg2beta
beta
kg2test
test
devLM
rtx1
container, run the pytest suite on the various ARAX development endpoints (that meansdevED
,devLM
,test
, andbeta
):cd /mnt/data/orangeboard/EEE/RTX/code/ARAX/test && pytest -v
ssh ubuntu@cicd.rtx.ai
cd RTX
git pull origin master
requirements.txt
, make sure to do~/venv3.9/bin/pip3 install -r requirements.txt
sudo bash
mkdir -m 777 /mnt/data/orangeboard/databases/KG2.X.Y
exit
~/venv3.9/bin/python3 code/ARAX/ARAXQuery/ARAX_database_manager.py --mnt --skip-if-exists --remove_unused
6. Final items/clean up:
kg2.X.Yc
branch in the RTX repo (since it has been merged intomaster
at this point)kg2-X-Zc.rtx.ai
(whereZ
is one less than the new minor release version): runnslookup kg2-X-Zc.rtx.ai
(it will return eitherkg2canonicalized.rtx.ai
orkg2canonicalized2.rtx.ai
; we'll call itkg2canonicalizedN.rtx.ai
).#deployment
channel in theARAXTeam
Slack workspace that you will be stopping thekg2canonicalizedN.rtx.ai
Neo4j endpointssh ubuntu@kg2-X-Zc.rtx.ai
sudo service neo4j stop
kg2canonicalizedN.rtx.ai
kg2-X-Zcplover.rtx.ai
(whereZ
is one less than the new minor release version): runnslookup kg2-X-Zploverc.rtx.ai
(it will return eitherkg2cplover.rtx.ai
,kg2cplover2.rtx.ai
, orkg2cplover3.rtx.ai
; we'll call itkg2cploverN.rtx.ai
).#deployment
channel in theARAXTeam
Slack workspace that you will be stopping thekg2-X-Zcplover.rtx.ai
PloverDB servicekg2cploverN.rtx.ai
:ssh ubuntu@kg2cploverN.rtx.ai
sudo docker stop plovercontainer2.X.Z
(if you are not sure of the container name, usesudo docker container ls -a
to get the container name).main
branch intokg2.X.Yc
branch (ifmain
has any commits ahead ofkg2.X.Yc
). Reference this issue (via its full GitHub URL) in the merge message.kg2.X.Yc
branch intomain
branch. Reference this issue (via its full GitHub URL) in the merge message.kg_config.json
in themain
branch of the Plover repo to point to the newkg2c_lite_2.X.Y.json.gz
file (push this change)kg2cploverdb.ci.transltr.io
cd PloverDB/test && pytest -vsk test_version --endpoint https://kg2cploverdb.ci.transltr.io
cd PloverDB/test && pytest -v --endpoint https://kg2cploverdb.ci.transltr.io
RTX/code/config_dbs.json
and setforce_local = True
in Expand)RTX/code/config_dbs.json
in themaster
branch to point to the ITRB Plover endpoints (all maturity levels): (dev
:kg2cploverdb.ci.transltr.io
;test
:kg2cploverdb.test.transltr.io
;prod
:kg2cploverdb.transltr.io
)master
branch code commit to the various endpoints onarax.ncats.io
that you previously updated (this is in order to get the changedconfig_dbs.json
file) and restart ARAX and KG2 services#deployment
channel to notify people what you are about to dossh ubuntu@kg2cploverM.rtx.ai
sudo docker container ls -a
(gives you the name of the container; assume it isplovercontainer2.X.Y
)sudo docker stop plovercontainer2.X.Y
kg2.X.Yc
branch in the PloverDB repo (since it has been merged intomain
at this point)kg2c_lite_2.X.Y.json.gz
file to the translator-lfs-artifacts repo (ask Amy Glen or Sundar Pullela, who have permission to do this)kg2_nodes_not_in_sri_nn.tsv
file to the translator-lfs-artifacts repo