From 0af89c528de82ec4421640df9d5c1506c0a91221 Mon Sep 17 00:00:00 2001 From: finnagin Date: Fri, 22 Apr 2022 17:13:29 -0700 Subject: [PATCH 01/66] #1824, added production checkout command --- DockerBuild/Dockerfile | 2 +- DockerBuild/KG2-Dockerfile | 2 +- DockerBuild/Merged-Dockerfile | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DockerBuild/Dockerfile b/DockerBuild/Dockerfile index 499e6ee6f..a8ae56f48 100644 --- a/DockerBuild/Dockerfile +++ b/DockerBuild/Dockerfile @@ -28,7 +28,7 @@ RUN chmod -R 700 /home/rt/.ssh # clone RTX repo RUN mkdir -p /mnt/data/orangeboard/production RUN chown -R rt.rt /mnt/data/orangeboard/production -RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git +RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git && git checkout production RUN chown -R rt.rt /mnt/data/orangeboard/production/RTX # install apache2 and copy config file diff --git a/DockerBuild/KG2-Dockerfile b/DockerBuild/KG2-Dockerfile index 03ed1aeb5..94b6ca97a 100644 --- a/DockerBuild/KG2-Dockerfile +++ b/DockerBuild/KG2-Dockerfile @@ -28,7 +28,7 @@ RUN chmod -R 700 /home/rt/.ssh # clone RTX repo RUN mkdir -p /mnt/data/orangeboard/kg2 RUN chown -R rt.rt /mnt/data/orangeboard/kg2 -RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git +RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git && git checkout production RUN chown -R rt.rt /mnt/data/orangeboard/kg2/RTX RUN su rt && mv /mnt/data/orangeboard/kg2/RTX/code/UI/interactive/config.js.example /mnt/data/orangeboard/kg2/RTX/code/UI/interactive/config.js diff --git a/DockerBuild/Merged-Dockerfile b/DockerBuild/Merged-Dockerfile index e71626b26..c0930183f 100644 --- a/DockerBuild/Merged-Dockerfile +++ b/DockerBuild/Merged-Dockerfile @@ -28,7 +28,7 @@ RUN chmod -R 700 /home/rt/.ssh # clone RTX repo RUN mkdir -p /mnt/data/orangeboard/production RUN chown -R rt.rt /mnt/data/orangeboard/production -RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git +RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git && git checkout production RUN chown -R rt.rt /mnt/data/orangeboard/production/RTX # install apache2 and copy config file @@ -72,7 +72,7 @@ RUN su rt && cd /mnt/data/orangeboard/production/RTX/code/ && echo "Github actio # clone RTX repo into KG2 RUN mkdir -p /mnt/data/orangeboard/kg2 RUN chown -R rt.rt /mnt/data/orangeboard/kg2 -RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git +RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git && git checkout production RUN chown -R rt.rt /mnt/data/orangeboard/kg2/RTX # setup KG2 services From 48d51b571b49e6ecac0e2394ae4db29107dc8dd9 Mon Sep 17 00:00:00 2001 From: finnagin Date: Fri, 22 Apr 2022 17:15:26 -0700 Subject: [PATCH 02/66] #1824, added itrb-test checkout command --- DockerBuild/Dockerfile | 2 +- DockerBuild/KG2-Dockerfile | 2 +- DockerBuild/Merged-Dockerfile | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DockerBuild/Dockerfile b/DockerBuild/Dockerfile index 499e6ee6f..3fa7a1f5a 100644 --- a/DockerBuild/Dockerfile +++ b/DockerBuild/Dockerfile @@ -28,7 +28,7 @@ RUN chmod -R 700 /home/rt/.ssh # clone RTX repo RUN mkdir -p /mnt/data/orangeboard/production RUN chown -R rt.rt /mnt/data/orangeboard/production -RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git +RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git && git checkout itrb-test RUN chown -R rt.rt /mnt/data/orangeboard/production/RTX # install apache2 and copy config file diff --git a/DockerBuild/KG2-Dockerfile b/DockerBuild/KG2-Dockerfile index 03ed1aeb5..75a890820 100644 --- a/DockerBuild/KG2-Dockerfile +++ b/DockerBuild/KG2-Dockerfile @@ -28,7 +28,7 @@ RUN chmod -R 700 /home/rt/.ssh # clone RTX repo RUN mkdir -p /mnt/data/orangeboard/kg2 RUN chown -R rt.rt /mnt/data/orangeboard/kg2 -RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git +RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git && git checkout itrb-test RUN chown -R rt.rt /mnt/data/orangeboard/kg2/RTX RUN su rt && mv /mnt/data/orangeboard/kg2/RTX/code/UI/interactive/config.js.example /mnt/data/orangeboard/kg2/RTX/code/UI/interactive/config.js diff --git a/DockerBuild/Merged-Dockerfile b/DockerBuild/Merged-Dockerfile index e71626b26..781dea96f 100644 --- a/DockerBuild/Merged-Dockerfile +++ b/DockerBuild/Merged-Dockerfile @@ -28,7 +28,7 @@ RUN chmod -R 700 /home/rt/.ssh # clone RTX repo RUN mkdir -p /mnt/data/orangeboard/production RUN chown -R rt.rt /mnt/data/orangeboard/production -RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git +RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git && git checkout itrb-test RUN chown -R rt.rt /mnt/data/orangeboard/production/RTX # install apache2 and copy config file @@ -72,7 +72,7 @@ RUN su rt && cd /mnt/data/orangeboard/production/RTX/code/ && echo "Github actio # clone RTX repo into KG2 RUN mkdir -p /mnt/data/orangeboard/kg2 RUN chown -R rt.rt /mnt/data/orangeboard/kg2 -RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git +RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git && git checkout itrb-test RUN chown -R rt.rt /mnt/data/orangeboard/kg2/RTX # setup KG2 services From df7d10993d5bbdcee52aaefc2c02b4cbe7f895aa Mon Sep 17 00:00:00 2001 From: finnagin Date: Fri, 22 Apr 2022 17:26:50 -0700 Subject: [PATCH 03/66] #1824, fix dockerfile checkout bug --- DockerBuild/Dockerfile | 3 ++- DockerBuild/KG2-Dockerfile | 3 ++- DockerBuild/Merged-Dockerfile | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/DockerBuild/Dockerfile b/DockerBuild/Dockerfile index a8ae56f48..1afec9033 100644 --- a/DockerBuild/Dockerfile +++ b/DockerBuild/Dockerfile @@ -28,8 +28,9 @@ RUN chmod -R 700 /home/rt/.ssh # clone RTX repo RUN mkdir -p /mnt/data/orangeboard/production RUN chown -R rt.rt /mnt/data/orangeboard/production -RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git && git checkout production +RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git RUN chown -R rt.rt /mnt/data/orangeboard/production/RTX +RUN su rt && cd /mnt/data/orangeboard/production/RTX && git checkout production # install apache2 and copy config file RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -yq apache2 diff --git a/DockerBuild/KG2-Dockerfile b/DockerBuild/KG2-Dockerfile index 94b6ca97a..ec99b1eef 100644 --- a/DockerBuild/KG2-Dockerfile +++ b/DockerBuild/KG2-Dockerfile @@ -28,8 +28,9 @@ RUN chmod -R 700 /home/rt/.ssh # clone RTX repo RUN mkdir -p /mnt/data/orangeboard/kg2 RUN chown -R rt.rt /mnt/data/orangeboard/kg2 -RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git && git checkout production +RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git RUN chown -R rt.rt /mnt/data/orangeboard/kg2/RTX +RUN su rt && cd /mnt/data/orangeboard/kg2/RTX && git checkout production RUN su rt && mv /mnt/data/orangeboard/kg2/RTX/code/UI/interactive/config.js.example /mnt/data/orangeboard/kg2/RTX/code/UI/interactive/config.js # install apache2 and copy config file diff --git a/DockerBuild/Merged-Dockerfile b/DockerBuild/Merged-Dockerfile index c0930183f..833ca6ffc 100644 --- a/DockerBuild/Merged-Dockerfile +++ b/DockerBuild/Merged-Dockerfile @@ -28,8 +28,9 @@ RUN chmod -R 700 /home/rt/.ssh # clone RTX repo RUN mkdir -p /mnt/data/orangeboard/production RUN chown -R rt.rt /mnt/data/orangeboard/production -RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git && git checkout production +RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git RUN chown -R rt.rt /mnt/data/orangeboard/production/RTX +RUN su rt && cd /mnt/data/orangeboard/production/RTX && git checkout production # install apache2 and copy config file RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -yq apache2 @@ -72,8 +73,9 @@ RUN su rt && cd /mnt/data/orangeboard/production/RTX/code/ && echo "Github actio # clone RTX repo into KG2 RUN mkdir -p /mnt/data/orangeboard/kg2 RUN chown -R rt.rt /mnt/data/orangeboard/kg2 -RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git && git checkout production +RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git RUN chown -R rt.rt /mnt/data/orangeboard/kg2/RTX +RUN su rt && cd /mnt/data/orangeboard/kg2/RTX && git checkout production # setup KG2 services RUN export DEVAREA=kg2 From 38547b83daf5bfc6fe69f26aabd7a7fdebb857e0 Mon Sep 17 00:00:00 2001 From: finnagin Date: Fri, 22 Apr 2022 17:30:00 -0700 Subject: [PATCH 04/66] #1824, fix dockerfile checkout bug in itrb-test --- DockerBuild/Dockerfile | 3 ++- DockerBuild/KG2-Dockerfile | 3 ++- DockerBuild/Merged-Dockerfile | 6 ++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/DockerBuild/Dockerfile b/DockerBuild/Dockerfile index 3fa7a1f5a..5ccff84e1 100644 --- a/DockerBuild/Dockerfile +++ b/DockerBuild/Dockerfile @@ -28,8 +28,9 @@ RUN chmod -R 700 /home/rt/.ssh # clone RTX repo RUN mkdir -p /mnt/data/orangeboard/production RUN chown -R rt.rt /mnt/data/orangeboard/production -RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git && git checkout itrb-test +RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git RUN chown -R rt.rt /mnt/data/orangeboard/production/RTX +RUN su rt && cd /mnt/data/orangeboard/production/RTX && git checkout itrb-test # install apache2 and copy config file RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -yq apache2 diff --git a/DockerBuild/KG2-Dockerfile b/DockerBuild/KG2-Dockerfile index 75a890820..c0b5a1cd1 100644 --- a/DockerBuild/KG2-Dockerfile +++ b/DockerBuild/KG2-Dockerfile @@ -28,8 +28,9 @@ RUN chmod -R 700 /home/rt/.ssh # clone RTX repo RUN mkdir -p /mnt/data/orangeboard/kg2 RUN chown -R rt.rt /mnt/data/orangeboard/kg2 -RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git && git checkout itrb-test +RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git RUN chown -R rt.rt /mnt/data/orangeboard/kg2/RTX +RUN su rt && cd /mnt/data/orangeboard/kg2/RTX && git checkout itrb-test RUN su rt && mv /mnt/data/orangeboard/kg2/RTX/code/UI/interactive/config.js.example /mnt/data/orangeboard/kg2/RTX/code/UI/interactive/config.js # install apache2 and copy config file diff --git a/DockerBuild/Merged-Dockerfile b/DockerBuild/Merged-Dockerfile index 781dea96f..f390799c6 100644 --- a/DockerBuild/Merged-Dockerfile +++ b/DockerBuild/Merged-Dockerfile @@ -28,8 +28,9 @@ RUN chmod -R 700 /home/rt/.ssh # clone RTX repo RUN mkdir -p /mnt/data/orangeboard/production RUN chown -R rt.rt /mnt/data/orangeboard/production -RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git && git checkout itrb-test +RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git RUN chown -R rt.rt /mnt/data/orangeboard/production/RTX +RUN su rt && cd /mnt/data/orangeboard/production/RTX && git checkout itrb-test # install apache2 and copy config file RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -yq apache2 @@ -72,8 +73,9 @@ RUN su rt && cd /mnt/data/orangeboard/production/RTX/code/ && echo "Github actio # clone RTX repo into KG2 RUN mkdir -p /mnt/data/orangeboard/kg2 RUN chown -R rt.rt /mnt/data/orangeboard/kg2 -RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git && git checkout itrb-test +RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git RUN chown -R rt.rt /mnt/data/orangeboard/kg2/RTX +RUN su rt && cd /mnt/data/orangeboard/kg2/RTX && git checkout itrb-test # setup KG2 services RUN export DEVAREA=kg2 From f8c1159263773059ea658be1bd1d16b2f582fc58 Mon Sep 17 00:00:00 2001 From: finnagin Date: Fri, 22 Apr 2022 18:00:58 -0700 Subject: [PATCH 05/66] #1824, fix command order --- DockerBuild/Dockerfile | 2 +- DockerBuild/KG2-Dockerfile | 2 +- DockerBuild/Merged-Dockerfile | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DockerBuild/Dockerfile b/DockerBuild/Dockerfile index 1afec9033..c2f686076 100644 --- a/DockerBuild/Dockerfile +++ b/DockerBuild/Dockerfile @@ -29,8 +29,8 @@ RUN chmod -R 700 /home/rt/.ssh RUN mkdir -p /mnt/data/orangeboard/production RUN chown -R rt.rt /mnt/data/orangeboard/production RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git -RUN chown -R rt.rt /mnt/data/orangeboard/production/RTX RUN su rt && cd /mnt/data/orangeboard/production/RTX && git checkout production +RUN chown -R rt.rt /mnt/data/orangeboard/production/RTX # install apache2 and copy config file RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -yq apache2 diff --git a/DockerBuild/KG2-Dockerfile b/DockerBuild/KG2-Dockerfile index ec99b1eef..51503157a 100644 --- a/DockerBuild/KG2-Dockerfile +++ b/DockerBuild/KG2-Dockerfile @@ -29,8 +29,8 @@ RUN chmod -R 700 /home/rt/.ssh RUN mkdir -p /mnt/data/orangeboard/kg2 RUN chown -R rt.rt /mnt/data/orangeboard/kg2 RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git -RUN chown -R rt.rt /mnt/data/orangeboard/kg2/RTX RUN su rt && cd /mnt/data/orangeboard/kg2/RTX && git checkout production +RUN chown -R rt.rt /mnt/data/orangeboard/kg2/RTX RUN su rt && mv /mnt/data/orangeboard/kg2/RTX/code/UI/interactive/config.js.example /mnt/data/orangeboard/kg2/RTX/code/UI/interactive/config.js # install apache2 and copy config file diff --git a/DockerBuild/Merged-Dockerfile b/DockerBuild/Merged-Dockerfile index 833ca6ffc..6b9c4c98b 100644 --- a/DockerBuild/Merged-Dockerfile +++ b/DockerBuild/Merged-Dockerfile @@ -29,8 +29,8 @@ RUN chmod -R 700 /home/rt/.ssh RUN mkdir -p /mnt/data/orangeboard/production RUN chown -R rt.rt /mnt/data/orangeboard/production RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git -RUN chown -R rt.rt /mnt/data/orangeboard/production/RTX RUN su rt && cd /mnt/data/orangeboard/production/RTX && git checkout production +RUN chown -R rt.rt /mnt/data/orangeboard/production/RTX # install apache2 and copy config file RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -yq apache2 @@ -74,8 +74,8 @@ RUN su rt && cd /mnt/data/orangeboard/production/RTX/code/ && echo "Github actio RUN mkdir -p /mnt/data/orangeboard/kg2 RUN chown -R rt.rt /mnt/data/orangeboard/kg2 RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git -RUN chown -R rt.rt /mnt/data/orangeboard/kg2/RTX RUN su rt && cd /mnt/data/orangeboard/kg2/RTX && git checkout production +RUN chown -R rt.rt /mnt/data/orangeboard/kg2/RTX # setup KG2 services RUN export DEVAREA=kg2 From 69f63492facfced33d6a437218ae1cb5f65b4a10 Mon Sep 17 00:00:00 2001 From: finnagin Date: Fri, 22 Apr 2022 18:13:21 -0700 Subject: [PATCH 06/66] #1824, fix command order --- DockerBuild/Dockerfile | 2 +- DockerBuild/KG2-Dockerfile | 2 +- DockerBuild/Merged-Dockerfile | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DockerBuild/Dockerfile b/DockerBuild/Dockerfile index 5ccff84e1..c7ef1e8a8 100644 --- a/DockerBuild/Dockerfile +++ b/DockerBuild/Dockerfile @@ -29,8 +29,8 @@ RUN chmod -R 700 /home/rt/.ssh RUN mkdir -p /mnt/data/orangeboard/production RUN chown -R rt.rt /mnt/data/orangeboard/production RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git -RUN chown -R rt.rt /mnt/data/orangeboard/production/RTX RUN su rt && cd /mnt/data/orangeboard/production/RTX && git checkout itrb-test +RUN chown -R rt.rt /mnt/data/orangeboard/production/RTX # install apache2 and copy config file RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -yq apache2 diff --git a/DockerBuild/KG2-Dockerfile b/DockerBuild/KG2-Dockerfile index c0b5a1cd1..4ab13e3a3 100644 --- a/DockerBuild/KG2-Dockerfile +++ b/DockerBuild/KG2-Dockerfile @@ -29,8 +29,8 @@ RUN chmod -R 700 /home/rt/.ssh RUN mkdir -p /mnt/data/orangeboard/kg2 RUN chown -R rt.rt /mnt/data/orangeboard/kg2 RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git -RUN chown -R rt.rt /mnt/data/orangeboard/kg2/RTX RUN su rt && cd /mnt/data/orangeboard/kg2/RTX && git checkout itrb-test +RUN chown -R rt.rt /mnt/data/orangeboard/kg2/RTX RUN su rt && mv /mnt/data/orangeboard/kg2/RTX/code/UI/interactive/config.js.example /mnt/data/orangeboard/kg2/RTX/code/UI/interactive/config.js # install apache2 and copy config file diff --git a/DockerBuild/Merged-Dockerfile b/DockerBuild/Merged-Dockerfile index f390799c6..8d7b84011 100644 --- a/DockerBuild/Merged-Dockerfile +++ b/DockerBuild/Merged-Dockerfile @@ -29,8 +29,8 @@ RUN chmod -R 700 /home/rt/.ssh RUN mkdir -p /mnt/data/orangeboard/production RUN chown -R rt.rt /mnt/data/orangeboard/production RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git -RUN chown -R rt.rt /mnt/data/orangeboard/production/RTX RUN su rt && cd /mnt/data/orangeboard/production/RTX && git checkout itrb-test +RUN chown -R rt.rt /mnt/data/orangeboard/production/RTX # install apache2 and copy config file RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -yq apache2 @@ -74,8 +74,8 @@ RUN su rt && cd /mnt/data/orangeboard/production/RTX/code/ && echo "Github actio RUN mkdir -p /mnt/data/orangeboard/kg2 RUN chown -R rt.rt /mnt/data/orangeboard/kg2 RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git -RUN chown -R rt.rt /mnt/data/orangeboard/kg2/RTX RUN su rt && cd /mnt/data/orangeboard/kg2/RTX && git checkout itrb-test +RUN chown -R rt.rt /mnt/data/orangeboard/kg2/RTX # setup KG2 services RUN export DEVAREA=kg2 From 33463819bfe47a26cce6f52d52520c9b961042f0 Mon Sep 17 00:00:00 2001 From: Finn Womack Date: Tue, 26 Apr 2022 13:10:24 -0700 Subject: [PATCH 07/66] #1824, set kg2 test domain --- DockerBuild/KG2-Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DockerBuild/KG2-Dockerfile b/DockerBuild/KG2-Dockerfile index f4cefa370..53b75548d 100644 --- a/DockerBuild/KG2-Dockerfile +++ b/DockerBuild/KG2-Dockerfile @@ -66,5 +66,5 @@ RUN cd /mnt/data/orangeboard/kg2/RTX/code/autocomplete && sed -i 's/devED/kg2/g' RUN update-rc.d RTX_Complete defaults # setup config.domain -RUN su rt && cd /mnt/data/orangeboard/kg2/RTX/code/ && echo "kg2.ci.transltr.io" > config.domain +RUN su rt && cd /mnt/data/orangeboard/kg2/RTX/code/ && echo "kg2.test.transltr.io" > config.domain From a9e5efb193614a121f681b1cf4c1ace5f2b89e54 Mon Sep 17 00:00:00 2001 From: Finn Womack Date: Tue, 26 Apr 2022 13:10:59 -0700 Subject: [PATCH 08/66] #1824, set arax test domain --- DockerBuild/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DockerBuild/Dockerfile b/DockerBuild/Dockerfile index 8e63ee76b..941b83da8 100644 --- a/DockerBuild/Dockerfile +++ b/DockerBuild/Dockerfile @@ -66,4 +66,4 @@ RUN cd /mnt/data/orangeboard/production/RTX/code/autocomplete && sed -i 's/devED RUN update-rc.d RTX_Complete defaults # setup config.domain -RUN su rt && cd /mnt/data/orangeboard/production/RTX/code/ && echo "arax.ci.transltr.io" > config.domain +RUN su rt && cd /mnt/data/orangeboard/production/RTX/code/ && echo "arax.test.transltr.io" > config.domain From db43916534ad9a9606f4195ae37eceb369121f7d Mon Sep 17 00:00:00 2001 From: Finn Womack Date: Tue, 26 Apr 2022 13:12:21 -0700 Subject: [PATCH 09/66] #1824, set arax prod domain --- DockerBuild/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DockerBuild/Dockerfile b/DockerBuild/Dockerfile index a0f985a72..0d9e36850 100644 --- a/DockerBuild/Dockerfile +++ b/DockerBuild/Dockerfile @@ -66,4 +66,4 @@ RUN cd /mnt/data/orangeboard/production/RTX/code/autocomplete && sed -i 's/devED RUN update-rc.d RTX_Complete defaults # setup config.domain -RUN su rt && cd /mnt/data/orangeboard/production/RTX/code/ && echo "arax.ci.transltr.io" > config.domain +RUN su rt && cd /mnt/data/orangeboard/production/RTX/code/ && echo "arax.transltr.io" > config.domain From 18438f72fdf5110ea01e2626c0a603bc7913cfbe Mon Sep 17 00:00:00 2001 From: Finn Womack Date: Tue, 26 Apr 2022 13:12:47 -0700 Subject: [PATCH 10/66] #1824, set kg2 prod domain --- DockerBuild/KG2-Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DockerBuild/KG2-Dockerfile b/DockerBuild/KG2-Dockerfile index 44c893628..b9ed92415 100644 --- a/DockerBuild/KG2-Dockerfile +++ b/DockerBuild/KG2-Dockerfile @@ -66,5 +66,5 @@ RUN cd /mnt/data/orangeboard/kg2/RTX/code/autocomplete && sed -i 's/devED/kg2/g' RUN update-rc.d RTX_Complete defaults # setup config.domain -RUN su rt && cd /mnt/data/orangeboard/kg2/RTX/code/ && echo "kg2.ci.transltr.io" > config.domain +RUN su rt && cd /mnt/data/orangeboard/kg2/RTX/code/ && echo "kg2.transltr.io" > config.domain From dd10eaae489ca8079e1ae5b51eb07324c0597e65 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi Date: Fri, 6 May 2022 13:02:14 -0400 Subject: [PATCH 11/66] feat: build version is edited --- deploy/arax/Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/arax/Jenkinsfile b/deploy/arax/Jenkinsfile index 6ae587580..396d4ee2a 100644 --- a/deploy/arax/Jenkinsfile +++ b/deploy/arax/Jenkinsfile @@ -31,8 +31,8 @@ pipeline { versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}', projectStartDate: '1970-01-01', skipFailedBuilds: true) - currentBuild.displayName = BUILD_VERSION_GENERATED - env.BUILD_VERSION = BUILD_VERSION_GENERATED + currentBuild.displayName = BUILD_VERSION_GENERATED-test + env.BUILD_VERSION = BUILD_VERSION_GENERATED-test env.BUILD = 'true' } } @@ -47,7 +47,7 @@ pipeline { when { expression { return env.BUILD == 'true' }} steps { configFileProvider([ - configFile(fileId: 'ci-configv2.json', targetLocation: 'DockerBuild/configv2.json') + configFile(fileId: 'configv2.json', targetLocation: 'DockerBuild/configv2.json') ]){ script { docker.build(env.DOCKER_REPO_NAME, "--no-cache ./DockerBuild/") @@ -61,7 +61,7 @@ pipeline { stage('Deploy to AWS EKS Blue') { steps { configFileProvider([ - configFile(fileId: 'ci-configv2.json', targetLocation: 'deploy/arax/configs/configv2.json'), + configFile(fileId: 'configv2.json', targetLocation: 'deploy/arax/configs/configv2.json'), configFile(fileId: 'arax.values.ncats.yaml', targetLocation: 'deploy/arax/arax.values.ncats.yaml') ]){ withCredentials([ From e7cc602168f45ac99753354518178cae1ba6ab4b Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi Date: Fri, 6 May 2022 13:18:39 -0400 Subject: [PATCH 12/66] feat: jenkinsfile is edited --- deploy/arax/Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/arax/Jenkinsfile b/deploy/arax/Jenkinsfile index 396d4ee2a..fb555f50c 100644 --- a/deploy/arax/Jenkinsfile +++ b/deploy/arax/Jenkinsfile @@ -16,8 +16,8 @@ pipeline { } environment { DOCKER_REPO_NAME = "translator-rtx-arax" - KUBERNETES_BLUE_CLUSTER_NAME = "translator-eks-ci-blue-cluster" - KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-ci-green-cluster" + KUBERNETES_BLUE_CLUSTER_NAME = "translator-eks-test-blue-cluster" + KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-test-green-cluster" NAMESPACE = "rtx" SECRET_NAME = "sftp-ssh-key" CONFIG_JSON_CONFIGMAP = "configv2" @@ -69,7 +69,7 @@ pipeline { credentialsId: 'team-expander-ops-sshkey', keyFileVariable: 'SECRET_FILE') ]){ - withAWS(credentials:'aws-ifx-deploy') + withAWS(credentials:'eks-test-access') { sh ''' # Need to save the credential to a file with base64 encoded under deploy/secret From e463e05b00c441881404bce996bfcc0c6937b539 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi Date: Fri, 6 May 2022 13:58:15 -0400 Subject: [PATCH 13/66] feat: jenkinsfile is edited --- deploy/arax/Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/arax/Jenkinsfile b/deploy/arax/Jenkinsfile index fb555f50c..0b20b5aba 100644 --- a/deploy/arax/Jenkinsfile +++ b/deploy/arax/Jenkinsfile @@ -31,8 +31,8 @@ pipeline { versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}', projectStartDate: '1970-01-01', skipFailedBuilds: true) - currentBuild.displayName = BUILD_VERSION_GENERATED-test - env.BUILD_VERSION = BUILD_VERSION_GENERATED-test + currentBuild.displayName = BUILD_VERSION_GENERATED + env.BUILD_VERSION = BUILD_VERSION_GENERATED env.BUILD = 'true' } } @@ -89,4 +89,4 @@ pipeline { } } } -} +} \ No newline at end of file From 631f48891311fd8696f8ddb7297e0cd4d64cd0f8 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi Date: Fri, 6 May 2022 14:05:45 -0400 Subject: [PATCH 14/66] feat: jenkinsfile is edited --- deploy/arax/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/arax/Jenkinsfile b/deploy/arax/Jenkinsfile index 0b20b5aba..337cd182c 100644 --- a/deploy/arax/Jenkinsfile +++ b/deploy/arax/Jenkinsfile @@ -28,7 +28,7 @@ pipeline { steps{ script { BUILD_VERSION_GENERATED = VersionNumber( - versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}', + versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}-test', projectStartDate: '1970-01-01', skipFailedBuilds: true) currentBuild.displayName = BUILD_VERSION_GENERATED From f68962d02f802ea5d560e719a68fa47e996954e2 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi Date: Fri, 6 May 2022 14:51:35 -0400 Subject: [PATCH 15/66] feat: jenkinsfile is renamed --- deploy/arax/{Jenkinsfile => Jenkinsfile-test} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename deploy/arax/{Jenkinsfile => Jenkinsfile-test} (100%) diff --git a/deploy/arax/Jenkinsfile b/deploy/arax/Jenkinsfile-test similarity index 100% rename from deploy/arax/Jenkinsfile rename to deploy/arax/Jenkinsfile-test From 76abfadc50bb00cdb53d7e1178b9ade0c93c81a7 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi Date: Fri, 6 May 2022 15:22:49 -0400 Subject: [PATCH 16/66] feat: jenkinsfile is edited to test --- deploy/kg2/{Jenkinsfile => Jenkinsfile-test} | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename deploy/kg2/{Jenkinsfile => Jenkinsfile-test} (87%) diff --git a/deploy/kg2/Jenkinsfile b/deploy/kg2/Jenkinsfile-test similarity index 87% rename from deploy/kg2/Jenkinsfile rename to deploy/kg2/Jenkinsfile-test index dddc495e3..73e591857 100644 --- a/deploy/kg2/Jenkinsfile +++ b/deploy/kg2/Jenkinsfile-test @@ -16,8 +16,8 @@ pipeline { } environment { DOCKER_REPO_NAME = "translator-rtx-kg2" - KUBERNETES_BLUE_CLUSTER_NAME = "translator-eks-ci-blue-cluster" - KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-ci-green-cluster" + KUBERNETES_BLUE_CLUSTER_NAME = "translator-eks-test-blue-cluster" + KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-test-green-cluster" NAMESPACE = "rtx" SECRET_NAME = "sftp-ssh-key" CONFIG_JSON_CONFIGMAP = "configv2" @@ -28,7 +28,7 @@ pipeline { steps{ script { BUILD_VERSION_GENERATED = VersionNumber( - versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}', + versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}-test', projectStartDate: '1970-01-01', skipFailedBuilds: true) currentBuild.displayName = BUILD_VERSION_GENERATED @@ -47,7 +47,7 @@ pipeline { when { expression { return env.BUILD == 'true' }} steps { configFileProvider([ - configFile(fileId: 'ci-configv2.json', targetLocation: 'DockerBuild/configv2.json') + configFile(fileId: 'configv2.json', targetLocation: 'DockerBuild/configv2.json') ]){ script { docker.build(env.DOCKER_REPO_NAME, "--no-cache -f ./DockerBuild/KG2-Dockerfile ./DockerBuild/") @@ -61,7 +61,7 @@ pipeline { stage('Deploy to AWS EKS Blue') { steps { configFileProvider([ - configFile(fileId: 'ci-configv2.json', targetLocation: 'deploy/kg2/configs/configv2.json'), + configFile(fileId: 'configv2.json', targetLocation: 'deploy/kg2/configs/configv2.json'), configFile(fileId: 'kg2.values.ncats.yaml', targetLocation: 'deploy/kg2/kg2.values.ncats.yaml') ]){ withCredentials([ @@ -69,7 +69,7 @@ pipeline { credentialsId: 'team-expander-ops-sshkey', keyFileVariable: 'SECRET_FILE') ]){ - withAWS(credentials:'aws-ifx-deploy') + withAWS(credentials:'eks-test-access') { sh ''' # Need to save the credential to a file with base64 encoded under deploy/kg2/secret From 6475843998575f7edd99e37d8d7b1804bb617b21 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Fri, 6 May 2022 15:30:33 -0400 Subject: [PATCH 17/66] Update and rename Jenkinsfile to Jenkinsfile-prod --- deploy/arax/{Jenkinsfile => Jenkinsfile-prod} | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename deploy/arax/{Jenkinsfile => Jenkinsfile-prod} (86%) diff --git a/deploy/arax/Jenkinsfile b/deploy/arax/Jenkinsfile-prod similarity index 86% rename from deploy/arax/Jenkinsfile rename to deploy/arax/Jenkinsfile-prod index 6ae587580..b24a513dd 100644 --- a/deploy/arax/Jenkinsfile +++ b/deploy/arax/Jenkinsfile-prod @@ -16,8 +16,8 @@ pipeline { } environment { DOCKER_REPO_NAME = "translator-rtx-arax" - KUBERNETES_BLUE_CLUSTER_NAME = "translator-eks-ci-blue-cluster" - KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-ci-green-cluster" + KUBERNETES_BLUE_CLUSTER_NAME = "translator-eks-prod-blue-cluster" + KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-prod-green-cluster" NAMESPACE = "rtx" SECRET_NAME = "sftp-ssh-key" CONFIG_JSON_CONFIGMAP = "configv2" @@ -28,7 +28,7 @@ pipeline { steps{ script { BUILD_VERSION_GENERATED = VersionNumber( - versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}', + versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}-prod', projectStartDate: '1970-01-01', skipFailedBuilds: true) currentBuild.displayName = BUILD_VERSION_GENERATED @@ -47,7 +47,7 @@ pipeline { when { expression { return env.BUILD == 'true' }} steps { configFileProvider([ - configFile(fileId: 'ci-configv2.json', targetLocation: 'DockerBuild/configv2.json') + configFile(fileId: 'configv2.json', targetLocation: 'DockerBuild/configv2.json') ]){ script { docker.build(env.DOCKER_REPO_NAME, "--no-cache ./DockerBuild/") @@ -61,7 +61,7 @@ pipeline { stage('Deploy to AWS EKS Blue') { steps { configFileProvider([ - configFile(fileId: 'ci-configv2.json', targetLocation: 'deploy/arax/configs/configv2.json'), + configFile(fileId: 'configv2.json', targetLocation: 'deploy/arax/configs/configv2.json'), configFile(fileId: 'arax.values.ncats.yaml', targetLocation: 'deploy/arax/arax.values.ncats.yaml') ]){ withCredentials([ @@ -69,7 +69,7 @@ pipeline { credentialsId: 'team-expander-ops-sshkey', keyFileVariable: 'SECRET_FILE') ]){ - withAWS(credentials:'aws-ifx-deploy') + withAWS(credentials:'eks-prod-access') { sh ''' # Need to save the credential to a file with base64 encoded under deploy/secret From 8cf2d5fe8aeaa66fd493fd75aad4be568e6d32fc Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Fri, 6 May 2022 15:31:51 -0400 Subject: [PATCH 18/66] Update and rename Jenkinsfile to Jenkinsfile-prod --- deploy/kg2/{Jenkinsfile => Jenkinsfile-prod} | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename deploy/kg2/{Jenkinsfile => Jenkinsfile-prod} (87%) diff --git a/deploy/kg2/Jenkinsfile b/deploy/kg2/Jenkinsfile-prod similarity index 87% rename from deploy/kg2/Jenkinsfile rename to deploy/kg2/Jenkinsfile-prod index dddc495e3..4144aa447 100644 --- a/deploy/kg2/Jenkinsfile +++ b/deploy/kg2/Jenkinsfile-prod @@ -16,8 +16,8 @@ pipeline { } environment { DOCKER_REPO_NAME = "translator-rtx-kg2" - KUBERNETES_BLUE_CLUSTER_NAME = "translator-eks-ci-blue-cluster" - KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-ci-green-cluster" + KUBERNETES_BLUE_CLUSTER_NAME = "translator-eks-prod-blue-cluster" + KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-prod-green-cluster" NAMESPACE = "rtx" SECRET_NAME = "sftp-ssh-key" CONFIG_JSON_CONFIGMAP = "configv2" @@ -28,7 +28,7 @@ pipeline { steps{ script { BUILD_VERSION_GENERATED = VersionNumber( - versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}', + versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}-prod', projectStartDate: '1970-01-01', skipFailedBuilds: true) currentBuild.displayName = BUILD_VERSION_GENERATED @@ -47,7 +47,7 @@ pipeline { when { expression { return env.BUILD == 'true' }} steps { configFileProvider([ - configFile(fileId: 'ci-configv2.json', targetLocation: 'DockerBuild/configv2.json') + configFile(fileId: 'configv2.json', targetLocation: 'DockerBuild/configv2.json') ]){ script { docker.build(env.DOCKER_REPO_NAME, "--no-cache -f ./DockerBuild/KG2-Dockerfile ./DockerBuild/") @@ -61,7 +61,7 @@ pipeline { stage('Deploy to AWS EKS Blue') { steps { configFileProvider([ - configFile(fileId: 'ci-configv2.json', targetLocation: 'deploy/kg2/configs/configv2.json'), + configFile(fileId: 'configv2.json', targetLocation: 'deploy/kg2/configs/configv2.json'), configFile(fileId: 'kg2.values.ncats.yaml', targetLocation: 'deploy/kg2/kg2.values.ncats.yaml') ]){ withCredentials([ @@ -69,7 +69,7 @@ pipeline { credentialsId: 'team-expander-ops-sshkey', keyFileVariable: 'SECRET_FILE') ]){ - withAWS(credentials:'aws-ifx-deploy') + withAWS(credentials:'eks-prod-access') { sh ''' # Need to save the credential to a file with base64 encoded under deploy/kg2/secret From a5fc65845b62e9119957e0b3b923f528dbb372b1 Mon Sep 17 00:00:00 2001 From: Eric Deutsch Date: Mon, 6 Jun 2022 21:25:52 +0000 Subject: [PATCH 19/66] add support for another ARS instance --- code/ARAX/ResponseCache/response_cache.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/ARAX/ResponseCache/response_cache.py b/code/ARAX/ResponseCache/response_cache.py index 6d47b67c7..4528473b3 100644 --- a/code/ARAX/ResponseCache/response_cache.py +++ b/code/ARAX/ResponseCache/response_cache.py @@ -324,7 +324,7 @@ def get_response(self, response_id): #### Otherwise, see if it is an ARS style response_id if len(response_id) > 30: - ars_hosts = [ 'ars.transltr.io', 'ars-dev.transltr.io', 'ars.ci.transltr.io' ] + ars_hosts = [ 'ars.transltr.io', 'ars-prod.transltr.io', 'ars-dev.transltr.io', 'ars.ci.transltr.io' ] for ars_host in ars_hosts: with requests_cache.disabled(): try: @@ -355,7 +355,7 @@ def get_response(self, response_id): except: return( { "status": 404, "title": "Error decoding Response", "detail": "Cannot decode ARS response_id="+str(response_id)+" to a Translator Response", "type": "about:blank" }, 404) - if 'fields' in response_dict and 'actor' in response_dict['fields'] and str(response_dict['fields']['actor']) == '9': + if 'fields' in response_dict and 'actor' in response_dict['fields'] and ( str(response_dict['fields']['actor']) == '9' or str(response_dict['fields']['actor']) == '19' ): with requests_cache.disabled(): response_content = requests.get(f"https://{ars_host}/ars/api/messages/" + response_id + '?trace=y', headers={'accept': 'application/json'}) status_code = response_content.status_code From 7737c9c008f2ee916e83d808841b35fdedfa5e0d Mon Sep 17 00:00:00 2001 From: edeutsch Date: Thu, 4 Aug 2022 18:10:35 +0000 Subject: [PATCH 20/66] add test_data_location --- .../python-flask-server/KG2/openapi_server/openapi/openapi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml b/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml index e3cb7f175..aaa66da97 100644 --- a/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml +++ b/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml @@ -23,6 +23,7 @@ info: x-trapi: version: 1.2.1 asyncquery: false + test_data_location: https://raw.githubusercontent.com/RTXteam/RTX/production/code/ARAX/KnowledgeSources/RTX_KG2c_test_triples.json operations: - lookup externalDocs: From d0aac6662ef62c7f72a39e7d5048b2334ec549dc Mon Sep 17 00:00:00 2001 From: Eric Deutsch Date: Thu, 4 Aug 2022 18:19:45 +0000 Subject: [PATCH 21/66] added test_data_location --- .../python-flask-server/openapi_server/openapi/openapi.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml b/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml index 4b55ba494..e76e20ba4 100644 --- a/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml +++ b/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml @@ -23,6 +23,7 @@ info: x-trapi: version: 1.2.1 asyncquery: true + test_data_location: https://raw.githubusercontent.com/RTXteam/RTX/master/code/ARAX/Documentation/arax_kps.json operations: - lookup - lookup_and_score From 739e59e0caac54769a1b1f12dc270e7979367576 Mon Sep 17 00:00:00 2001 From: Ke Wang Date: Wed, 17 Aug 2022 11:06:19 -0400 Subject: [PATCH 22/66] feat: update scripts for new config file --- DockerBuild/Dockerfile | 8 ++++-- deploy/arax/Jenkinsfile-test | 32 +++++++++++++----------- deploy/arax/scripts/download_database.sh | 12 ++++----- deploy/arax/scripts/start_app.sh | 2 +- 4 files changed, 30 insertions(+), 24 deletions(-) diff --git a/DockerBuild/Dockerfile b/DockerBuild/Dockerfile index 941b83da8..f7b6bb134 100644 --- a/DockerBuild/Dockerfile +++ b/DockerBuild/Dockerfile @@ -3,6 +3,9 @@ FROM ubuntu:20.04 # suppress debconf error messages: ARG DEBIAN_FRONTEND=noninteractive +# build based on branch +ARG BUILD_BRANCH=master + # add user "rt" and give sudo privilege: RUN useradd rt -m -s /bin/bash @@ -29,7 +32,8 @@ RUN chmod -R 700 /home/rt/.ssh RUN mkdir -p /mnt/data/orangeboard/production RUN chown -R rt.rt /mnt/data/orangeboard/production RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git -RUN su rt && cd /mnt/data/orangeboard/production/RTX && git checkout itrb-test +# 08/12/2022 NCATS change +RUN su rt && cd /mnt/data/orangeboard/production/RTX && git checkout ${BUILD_BRANCH} RUN chown -R rt.rt /mnt/data/orangeboard/production/RTX # install apache2 and copy config file @@ -66,4 +70,4 @@ RUN cd /mnt/data/orangeboard/production/RTX/code/autocomplete && sed -i 's/devED RUN update-rc.d RTX_Complete defaults # setup config.domain -RUN su rt && cd /mnt/data/orangeboard/production/RTX/code/ && echo "arax.test.transltr.io" > config.domain +RUN su rt && cd /mnt/data/orangeboard/production/RTX/code/ && echo "arax.ci.transltr.io" > config.domain diff --git a/deploy/arax/Jenkinsfile-test b/deploy/arax/Jenkinsfile-test index 337cd182c..9fa620582 100644 --- a/deploy/arax/Jenkinsfile-test +++ b/deploy/arax/Jenkinsfile-test @@ -5,7 +5,7 @@ pipeline { disableConcurrentBuilds() } agent { - node { label 'transltr-ci-build-node-03' } + node { label 'aws && build && translator && rtx' } } parameters { string(name: 'BUILD_VERSION', defaultValue: '', description: 'The build version to deploy (optional)') @@ -20,7 +20,9 @@ pipeline { KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-test-green-cluster" NAMESPACE = "rtx" SECRET_NAME = "sftp-ssh-key" - CONFIG_JSON_CONFIGMAP = "configv2" + CFGFILE2DL = "team-expander-ops@sftp.transltr.io:/transltr-063208468694-sftp/team-expander/config_secrets.json" + CFGFILE2DL_LOCALPATH = "deploy/arax/configs/config_secrets.json" + sftp_key = "deploy/arax/secrets/team-expander-ops-sshkey-secret" } stages { stage('Build Version'){ @@ -44,24 +46,22 @@ pipeline { } } stage('Build and Push Docker Image') { - when { expression { return env.BUILD == 'true' }} + when { expression { return env.BUILD == 'true' }} + environment { + ENV_BUILD_BRANCH= sh (returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim() + } steps { - configFileProvider([ - configFile(fileId: 'configv2.json', targetLocation: 'DockerBuild/configv2.json') - ]){ - script { - docker.build(env.DOCKER_REPO_NAME, "--no-cache ./DockerBuild/") - docker.withRegistry('https://853771734544.dkr.ecr.us-east-1.amazonaws.com', 'ecr:us-east-1:aws-ifx-deploy') { - docker.image(env.DOCKER_REPO_NAME).push("${BUILD_VERSION}") - } - } - } + script { + docker.build(env.DOCKER_REPO_NAME, "--build-arg BUILD_BRANCH=$ENV_BUILD_BRANCH --no-cache ./DockerBuild/") + docker.withRegistry('https://853771734544.dkr.ecr.us-east-1.amazonaws.com', 'ecr:us-east-1:aws-ifx-deploy') { + docker.image(env.DOCKER_REPO_NAME).push("${BUILD_VERSION}") + } + } } } stage('Deploy to AWS EKS Blue') { steps { configFileProvider([ - configFile(fileId: 'configv2.json', targetLocation: 'deploy/arax/configs/configv2.json'), configFile(fileId: 'arax.values.ncats.yaml', targetLocation: 'deploy/arax/arax.values.ncats.yaml') ]){ withCredentials([ @@ -74,6 +74,8 @@ pipeline { sh ''' # Need to save the credential to a file with base64 encoded under deploy/secret cat $SECRET_FILE >> deploy/arax/secrets/team-expander-ops-sshkey-secret + sftp -i $SECRET_FILE -o StrictHostKeyChecking=no -p $CFGFILE2DL $CFGFILE2DL_LOCALPATH + cp code/config_dbs.json deploy/arax/configs aws --region ${AWS_REGION} eks update-kubeconfig --name ${KUBERNETES_BLUE_CLUSTER_NAME} cd deploy/arax && /bin/bash deploy.sh # aws --region ${AWS_REGION} sts get-caller-identity @@ -89,4 +91,4 @@ pipeline { } } } -} \ No newline at end of file +} diff --git a/deploy/arax/scripts/download_database.sh b/deploy/arax/scripts/download_database.sh index 3f2257fe1..a938350d3 100755 --- a/deploy/arax/scripts/download_database.sh +++ b/deploy/arax/scripts/download_database.sh @@ -10,7 +10,7 @@ # sftp -i /etc/ssh-key/ssh-key-SECRET_FILE -o StrictHostKeyChecking=no -pr team-expander-ops@sftp.transltr.io:/transltr-063208468694-sftp/team-expander/databases/ / # variables -config_file="/configs/configv2.json" +config_file="/configs/config_dbs.json" # associative array serves as dict # here we build db_arr with db_path_pvc as its key and 1 as its value, which equivilent to "set" # db_arr: most updated db file path on PVC (in this case, /databases) @@ -32,7 +32,7 @@ echo " # # ################################################################################" -# build db_arr which includes all needed db files in configv2.json +# build db_arr which includes all needed db files in config_secrets.json echo "Reading ${confgi_file} and building new db_arr specified in ${config_file}....." printf "\n" for db in $(jq -r '.Contextual.Production | keys | .[]' ${config_file}) @@ -54,9 +54,9 @@ done # clean up current db first -# check if there's db file not listed in configv2.json and rm +# check if there's db file not listed in config_secrets.json and rm # this is useful when a new db (or a new version of existing db) rolls out -# and we only want to keep what is specificed in configv2.json file +# and we only want to keep what is specificed in config_secretes.json file echo "Removing outdated db files......" for existing_db in $(find $db_folder -type f) do @@ -81,7 +81,7 @@ sftp -i $sftp_key -o StrictHostKeyChecking=no -pr ${sftp_url}/md5_sums/ $md5_sum printf '\n' # this is tricky, we download all MD5 info, some are needed, some are not -# we need to loop through all downloaded MD5s, remove others but only keep the needed ones, which is from the configv2.json +# we need to loop through all downloaded MD5s, remove others but only keep the needed ones, which is from the config_secrets.json for MD5 in $(find $md5_sums_new -type f) do if [[ ! ${new_db_MD5_arr[${MD5}]} ]] @@ -129,4 +129,4 @@ done # rename new MD5 to local printf 'renaming "%s" to "%s"...\n' $md5_sums_new $md5_sums_local rm -rf $md5_sums_local -mv $md5_sums_new $md5_sums_local \ No newline at end of file +mv $md5_sums_new $md5_sums_local diff --git a/deploy/arax/scripts/start_app.sh b/deploy/arax/scripts/start_app.sh index 13f2b029a..946c8dd19 100755 --- a/deploy/arax/scripts/start_app.sh +++ b/deploy/arax/scripts/start_app.sh @@ -1,6 +1,6 @@ #!/bin/bash # rename config file -cp /configs/configv2.json /mnt/data/orangeboard/production/RTX/code/config_local.json +cp /configs/config_secrets.json /mnt/data/orangeboard/production/RTX/code/config_secrets.json # Update database directory permission which is mounted from a PVC chmod -R 777 /mnt/data/orangeboard/databases/ From 98af29d64bf229d214d4414432535b18db5de66f Mon Sep 17 00:00:00 2001 From: Ke Wang Date: Wed, 17 Aug 2022 11:08:31 -0400 Subject: [PATCH 23/66] fix: update domain for test --- DockerBuild/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DockerBuild/Dockerfile b/DockerBuild/Dockerfile index f7b6bb134..147a680cb 100644 --- a/DockerBuild/Dockerfile +++ b/DockerBuild/Dockerfile @@ -70,4 +70,4 @@ RUN cd /mnt/data/orangeboard/production/RTX/code/autocomplete && sed -i 's/devED RUN update-rc.d RTX_Complete defaults # setup config.domain -RUN su rt && cd /mnt/data/orangeboard/production/RTX/code/ && echo "arax.ci.transltr.io" > config.domain +RUN su rt && cd /mnt/data/orangeboard/production/RTX/code/ && echo "arax.test.transltr.io" > config.domain From 6fa4e1f7978f3c5bc432d03671b1194b37de4f38 Mon Sep 17 00:00:00 2001 From: Ke Wang Date: Wed, 17 Aug 2022 11:16:11 -0400 Subject: [PATCH 24/66] feat: update scripts for new config file --- DockerBuild/Dockerfile | 6 ++++- deploy/arax/Jenkinsfile-prod | 30 +++++++++++++----------- deploy/arax/scripts/download_database.sh | 12 +++++----- deploy/arax/scripts/start_app.sh | 2 +- 4 files changed, 28 insertions(+), 22 deletions(-) diff --git a/DockerBuild/Dockerfile b/DockerBuild/Dockerfile index 0d9e36850..1e8945587 100644 --- a/DockerBuild/Dockerfile +++ b/DockerBuild/Dockerfile @@ -3,6 +3,9 @@ FROM ubuntu:20.04 # suppress debconf error messages: ARG DEBIAN_FRONTEND=noninteractive +# build based on branch +ARG BUILD_BRANCH=master + # add user "rt" and give sudo privilege: RUN useradd rt -m -s /bin/bash @@ -29,7 +32,8 @@ RUN chmod -R 700 /home/rt/.ssh RUN mkdir -p /mnt/data/orangeboard/production RUN chown -R rt.rt /mnt/data/orangeboard/production RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git -RUN su rt && cd /mnt/data/orangeboard/production/RTX && git checkout production +# 08/12/2022 NCATS change +RUN su rt && cd /mnt/data/orangeboard/production/RTX && git checkout ${BUILD_BRANCH} RUN chown -R rt.rt /mnt/data/orangeboard/production/RTX # install apache2 and copy config file diff --git a/deploy/arax/Jenkinsfile-prod b/deploy/arax/Jenkinsfile-prod index b24a513dd..33ee33115 100644 --- a/deploy/arax/Jenkinsfile-prod +++ b/deploy/arax/Jenkinsfile-prod @@ -5,7 +5,7 @@ pipeline { disableConcurrentBuilds() } agent { - node { label 'transltr-ci-build-node-03' } + node { label 'aws && build && translator && rtx' } } parameters { string(name: 'BUILD_VERSION', defaultValue: '', description: 'The build version to deploy (optional)') @@ -20,7 +20,9 @@ pipeline { KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-prod-green-cluster" NAMESPACE = "rtx" SECRET_NAME = "sftp-ssh-key" - CONFIG_JSON_CONFIGMAP = "configv2" + CFGFILE2DL = "team-expander-ops@sftp.transltr.io:/transltr-063208468694-sftp/team-expander/config_secrets.json" + CFGFILE2DL_LOCALPATH = "deploy/arax/configs/config_secrets.json" + sftp_key = "deploy/arax/secrets/team-expander-ops-sshkey-secret" } stages { stage('Build Version'){ @@ -44,24 +46,22 @@ pipeline { } } stage('Build and Push Docker Image') { - when { expression { return env.BUILD == 'true' }} + when { expression { return env.BUILD == 'true' }} + environment { + ENV_BUILD_BRANCH= sh (returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim() + } steps { - configFileProvider([ - configFile(fileId: 'configv2.json', targetLocation: 'DockerBuild/configv2.json') - ]){ - script { - docker.build(env.DOCKER_REPO_NAME, "--no-cache ./DockerBuild/") - docker.withRegistry('https://853771734544.dkr.ecr.us-east-1.amazonaws.com', 'ecr:us-east-1:aws-ifx-deploy') { - docker.image(env.DOCKER_REPO_NAME).push("${BUILD_VERSION}") - } - } - } + script { + docker.build(env.DOCKER_REPO_NAME, "--build-arg BUILD_BRANCH=$ENV_BUILD_BRANCH --no-cache ./DockerBuild/") + docker.withRegistry('https://853771734544.dkr.ecr.us-east-1.amazonaws.com', 'ecr:us-east-1:aws-ifx-deploy') { + docker.image(env.DOCKER_REPO_NAME).push("${BUILD_VERSION}") + } + } } } stage('Deploy to AWS EKS Blue') { steps { configFileProvider([ - configFile(fileId: 'configv2.json', targetLocation: 'deploy/arax/configs/configv2.json'), configFile(fileId: 'arax.values.ncats.yaml', targetLocation: 'deploy/arax/arax.values.ncats.yaml') ]){ withCredentials([ @@ -74,6 +74,8 @@ pipeline { sh ''' # Need to save the credential to a file with base64 encoded under deploy/secret cat $SECRET_FILE >> deploy/arax/secrets/team-expander-ops-sshkey-secret + sftp -i $SECRET_FILE -o StrictHostKeyChecking=no -p $CFGFILE2DL $CFGFILE2DL_LOCALPATH + cp code/config_dbs.json deploy/arax/configs aws --region ${AWS_REGION} eks update-kubeconfig --name ${KUBERNETES_BLUE_CLUSTER_NAME} cd deploy/arax && /bin/bash deploy.sh # aws --region ${AWS_REGION} sts get-caller-identity diff --git a/deploy/arax/scripts/download_database.sh b/deploy/arax/scripts/download_database.sh index 3f2257fe1..a938350d3 100755 --- a/deploy/arax/scripts/download_database.sh +++ b/deploy/arax/scripts/download_database.sh @@ -10,7 +10,7 @@ # sftp -i /etc/ssh-key/ssh-key-SECRET_FILE -o StrictHostKeyChecking=no -pr team-expander-ops@sftp.transltr.io:/transltr-063208468694-sftp/team-expander/databases/ / # variables -config_file="/configs/configv2.json" +config_file="/configs/config_dbs.json" # associative array serves as dict # here we build db_arr with db_path_pvc as its key and 1 as its value, which equivilent to "set" # db_arr: most updated db file path on PVC (in this case, /databases) @@ -32,7 +32,7 @@ echo " # # ################################################################################" -# build db_arr which includes all needed db files in configv2.json +# build db_arr which includes all needed db files in config_secrets.json echo "Reading ${confgi_file} and building new db_arr specified in ${config_file}....." printf "\n" for db in $(jq -r '.Contextual.Production | keys | .[]' ${config_file}) @@ -54,9 +54,9 @@ done # clean up current db first -# check if there's db file not listed in configv2.json and rm +# check if there's db file not listed in config_secrets.json and rm # this is useful when a new db (or a new version of existing db) rolls out -# and we only want to keep what is specificed in configv2.json file +# and we only want to keep what is specificed in config_secretes.json file echo "Removing outdated db files......" for existing_db in $(find $db_folder -type f) do @@ -81,7 +81,7 @@ sftp -i $sftp_key -o StrictHostKeyChecking=no -pr ${sftp_url}/md5_sums/ $md5_sum printf '\n' # this is tricky, we download all MD5 info, some are needed, some are not -# we need to loop through all downloaded MD5s, remove others but only keep the needed ones, which is from the configv2.json +# we need to loop through all downloaded MD5s, remove others but only keep the needed ones, which is from the config_secrets.json for MD5 in $(find $md5_sums_new -type f) do if [[ ! ${new_db_MD5_arr[${MD5}]} ]] @@ -129,4 +129,4 @@ done # rename new MD5 to local printf 'renaming "%s" to "%s"...\n' $md5_sums_new $md5_sums_local rm -rf $md5_sums_local -mv $md5_sums_new $md5_sums_local \ No newline at end of file +mv $md5_sums_new $md5_sums_local diff --git a/deploy/arax/scripts/start_app.sh b/deploy/arax/scripts/start_app.sh index 13f2b029a..946c8dd19 100755 --- a/deploy/arax/scripts/start_app.sh +++ b/deploy/arax/scripts/start_app.sh @@ -1,6 +1,6 @@ #!/bin/bash # rename config file -cp /configs/configv2.json /mnt/data/orangeboard/production/RTX/code/config_local.json +cp /configs/config_secrets.json /mnt/data/orangeboard/production/RTX/code/config_secrets.json # Update database directory permission which is mounted from a PVC chmod -R 777 /mnt/data/orangeboard/databases/ From 624f855ad0c2eb0d23191bcde83ffa2fdeee5b94 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Wed, 17 Aug 2022 12:04:27 -0400 Subject: [PATCH 25/66] Update Jenkinsfile-test --- deploy/kg2/Jenkinsfile-test | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/deploy/kg2/Jenkinsfile-test b/deploy/kg2/Jenkinsfile-test index 73e591857..638108e5a 100644 --- a/deploy/kg2/Jenkinsfile-test +++ b/deploy/kg2/Jenkinsfile-test @@ -5,7 +5,7 @@ pipeline { disableConcurrentBuilds() } agent { - node { label 'transltr-ci-build-node-03' } + node { label 'aws && build && translator && rtx' } } parameters { string(name: 'BUILD_VERSION', defaultValue: '', description: 'The build version to deploy (optional)') @@ -16,11 +16,13 @@ pipeline { } environment { DOCKER_REPO_NAME = "translator-rtx-kg2" - KUBERNETES_BLUE_CLUSTER_NAME = "translator-eks-test-blue-cluster" - KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-test-green-cluster" + KUBERNETES_BLUE_CLUSTER_NAME = "translator-eks-ci-blue-cluster" + KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-ci-green-cluster" NAMESPACE = "rtx" SECRET_NAME = "sftp-ssh-key" - CONFIG_JSON_CONFIGMAP = "configv2" + CFGFILE2DL = "team-expander-ops@sftp.transltr.io:/transltr-063208468694-sftp/team-expander/config_secrets.json" + CFGFILE2DL_LOCALPATH = "deploy/kg2/configs/config_secrets.json" + sftp_key = "deploy/kg2/secrets/team-expander-ops-sshkey-secret" } stages { stage('Build Version'){ @@ -28,7 +30,7 @@ pipeline { steps{ script { BUILD_VERSION_GENERATED = VersionNumber( - versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}-test', + versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}', projectStartDate: '1970-01-01', skipFailedBuilds: true) currentBuild.displayName = BUILD_VERSION_GENERATED @@ -45,23 +47,21 @@ pipeline { } stage('Build and Push Docker Image') { when { expression { return env.BUILD == 'true' }} + environment { + ENV_BUILD_BRANCH= sh (returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim() + } steps { - configFileProvider([ - configFile(fileId: 'configv2.json', targetLocation: 'DockerBuild/configv2.json') - ]){ script { - docker.build(env.DOCKER_REPO_NAME, "--no-cache -f ./DockerBuild/KG2-Dockerfile ./DockerBuild/") + docker.build(env.DOCKER_REPO_NAME, "--build-arg BUILD_BRANCH=$ENV_BUILD_BRANCH --no-cache -f ./DockerBuild/KG2-Dockerfile ./DockerBuild/") docker.withRegistry('https://853771734544.dkr.ecr.us-east-1.amazonaws.com', 'ecr:us-east-1:aws-ifx-deploy') { docker.image(env.DOCKER_REPO_NAME).push("${BUILD_VERSION}") } } } - } - } + } stage('Deploy to AWS EKS Blue') { steps { configFileProvider([ - configFile(fileId: 'configv2.json', targetLocation: 'deploy/kg2/configs/configv2.json'), configFile(fileId: 'kg2.values.ncats.yaml', targetLocation: 'deploy/kg2/kg2.values.ncats.yaml') ]){ withCredentials([ @@ -69,11 +69,13 @@ pipeline { credentialsId: 'team-expander-ops-sshkey', keyFileVariable: 'SECRET_FILE') ]){ - withAWS(credentials:'eks-test-access') + withAWS(credentials:'aws-ifx-deploy') { sh ''' # Need to save the credential to a file with base64 encoded under deploy/kg2/secret cat $SECRET_FILE >> deploy/kg2/secrets/team-expander-ops-sshkey-secret + sftp -i $SECRET_FILE -o StrictHostKeyChecking=no -p $CFGFILE2DL $CFGFILE2DL_LOCALPATH + cp code/config_dbs.json deploy/kg2/configs aws --region ${AWS_REGION} eks update-kubeconfig --name ${KUBERNETES_BLUE_CLUSTER_NAME} cd deploy/kg2 && /bin/bash deploy.sh # aws --region ${AWS_REGION} sts get-caller-identity From b7c1a96976b400c632b07f7d1d64705d50dc9bdf Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Wed, 17 Aug 2022 12:05:30 -0400 Subject: [PATCH 26/66] Update start_app.sh --- deploy/kg2/scripts/start_app.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/kg2/scripts/start_app.sh b/deploy/kg2/scripts/start_app.sh index 315b9263c..21c8fe4ae 100755 --- a/deploy/kg2/scripts/start_app.sh +++ b/deploy/kg2/scripts/start_app.sh @@ -1,6 +1,6 @@ #!/bin/bash # rename config file -cp /configs/configv2.json /mnt/data/orangeboard/kg2/RTX/code/config_local.json +cp /configs/config_secrets.json /mnt/data/orangeboard/kg2/RTX/code/config_secrets.json # Update database directory permission which is mounted from a PVC chmod -R 755 /mnt/data/orangeboard/databases/ From cba723241b60c4de47ff4bbcb2511b4b4a09b1b1 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Wed, 17 Aug 2022 12:05:54 -0400 Subject: [PATCH 27/66] Update download_database.sh --- deploy/kg2/scripts/download_database.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/deploy/kg2/scripts/download_database.sh b/deploy/kg2/scripts/download_database.sh index a6e184bc2..820c19942 100755 --- a/deploy/kg2/scripts/download_database.sh +++ b/deploy/kg2/scripts/download_database.sh @@ -10,7 +10,7 @@ # sftp -i /etc/ssh-key/ssh-key-SECRET_FILE -o StrictHostKeyChecking=no -pr team-expander-ops@sftp.transltr.io:/transltr-063208468694-sftp/team-expander/databases/ / # variables -config_file="/configs/configv2.json" +config_file="/configs/config_dbs.json" # associative array serves as dict # here we build db_arr with db_path_pvc as its key and 1 as its value, which equivilent to "set" # db_arr: most updated db file path on PVC (in this case, /databases) @@ -32,19 +32,20 @@ echo " # # ################################################################################" -# build db_arr which includes all needed db files in configv2.json +# build db_arr which includes all needed db files in config_dbs.json echo "Reading ${confgi_file} and building new db_arr specified in ${config_file}....." printf "\n" -for db in $(jq -r '.Contextual.Production | keys | .[]' ${config_file}) +for db in $(jq -r '.database_downloads | keys[]' ${config_file}) do - # NOTE: if there's no .path value, the result will be a string "null" - db_path=$(jq -r '.Contextual.Production.'${db}' | .path' ${config_file}) + db_path=$(jq -r '.database_downloads.'${db} ${config_file}) + echo $db_path if [ ${db_path} != "null" ] then db_path_pvc="${db_path/'/translator/data/orangeboard'}" - # echo $db_path_pvc + echo $db_path_pvc db_arr[${db_path_pvc}]=1 new_db_MD5="${db_path/'/translator/data/orangeboard/databases'/${md5_sums_new}}.md5" + echo $new_db_MD5 new_db_MD5_arr[${new_db_MD5}]=1 fi done @@ -54,9 +55,9 @@ done # clean up current db first -# check if there's db file not listed in configv2.json and rm +# check if there's db file not listed in config_dbs.json and rm # this is useful when a new db (or a new version of existing db) rolls out -# and we only want to keep what is specificed in configv2.json file +# and we only want to keep what is specificed in config_dbs.json file echo "Removing outdated db files......" for existing_db in $(find $db_folder -type f) do @@ -81,7 +82,7 @@ sftp -i $sftp_key -o StrictHostKeyChecking=no -pr ${sftp_url}/md5_sums/ $md5_sum printf '\n' # this is tricky, we download all MD5 info, some are needed, some are not -# we need to loop through all downloaded MD5s, remove others but only keep the needed ones, which is from the configv2.json +# we need to loop through all downloaded MD5s, remove others but only keep the needed ones, which is from the config_dbs.json for MD5 in $(find $md5_sums_new -type f) do if [[ ! ${new_db_MD5_arr[${MD5}]} ]] From 7a0e834abec81f024122ee0639ee4100097f48a0 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Wed, 17 Aug 2022 12:07:30 -0400 Subject: [PATCH 28/66] Update KG2-Dockerfile --- DockerBuild/KG2-Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/DockerBuild/KG2-Dockerfile b/DockerBuild/KG2-Dockerfile index 53b75548d..081333911 100644 --- a/DockerBuild/KG2-Dockerfile +++ b/DockerBuild/KG2-Dockerfile @@ -3,6 +3,9 @@ FROM ubuntu:20.04 # suppress debconf error messages: ARG DEBIAN_FRONTEND=noninteractive +# build based on branch +ARG BUILD_BRANCH=master + # add user "rt" and give sudo privilege: RUN useradd rt -m -s /bin/bash @@ -29,7 +32,8 @@ RUN chmod -R 700 /home/rt/.ssh RUN mkdir -p /mnt/data/orangeboard/kg2 RUN chown -R rt.rt /mnt/data/orangeboard/kg2 RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git -RUN su rt && cd /mnt/data/orangeboard/kg2/RTX && git checkout itrb-test +# 08/12/2022 NCATS change +RUN su rt && cd /mnt/data/orangeboard/kg2/RTX && git checkout ${BUILD_BRANCH} RUN chown -R rt.rt /mnt/data/orangeboard/kg2/RTX RUN su rt && mv /mnt/data/orangeboard/kg2/RTX/code/UI/interactive/config.js.example /mnt/data/orangeboard/kg2/RTX/code/UI/interactive/config.js @@ -66,5 +70,4 @@ RUN cd /mnt/data/orangeboard/kg2/RTX/code/autocomplete && sed -i 's/devED/kg2/g' RUN update-rc.d RTX_Complete defaults # setup config.domain -RUN su rt && cd /mnt/data/orangeboard/kg2/RTX/code/ && echo "kg2.test.transltr.io" > config.domain - +RUN su rt && cd /mnt/data/orangeboard/kg2/RTX/code/ && echo "kg2.ci.transltr.io" > config.domain From ead8fb07e3896223c3bd6495fb08065b0140f835 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Wed, 17 Aug 2022 12:12:36 -0400 Subject: [PATCH 29/66] Update KG2-Dockerfile --- DockerBuild/KG2-Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DockerBuild/KG2-Dockerfile b/DockerBuild/KG2-Dockerfile index 081333911..e7f843ec1 100644 --- a/DockerBuild/KG2-Dockerfile +++ b/DockerBuild/KG2-Dockerfile @@ -70,4 +70,4 @@ RUN cd /mnt/data/orangeboard/kg2/RTX/code/autocomplete && sed -i 's/devED/kg2/g' RUN update-rc.d RTX_Complete defaults # setup config.domain -RUN su rt && cd /mnt/data/orangeboard/kg2/RTX/code/ && echo "kg2.ci.transltr.io" > config.domain +RUN su rt && cd /mnt/data/orangeboard/kg2/RTX/code/ && echo "kg2.test.transltr.io" > config.domain From 85a1cfbc60d0726d15251c042b4aa1c586b30e38 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Wed, 17 Aug 2022 12:22:06 -0400 Subject: [PATCH 30/66] Update Jenkinsfile-prod --- deploy/kg2/Jenkinsfile-prod | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/deploy/kg2/Jenkinsfile-prod b/deploy/kg2/Jenkinsfile-prod index 4144aa447..638108e5a 100644 --- a/deploy/kg2/Jenkinsfile-prod +++ b/deploy/kg2/Jenkinsfile-prod @@ -5,7 +5,7 @@ pipeline { disableConcurrentBuilds() } agent { - node { label 'transltr-ci-build-node-03' } + node { label 'aws && build && translator && rtx' } } parameters { string(name: 'BUILD_VERSION', defaultValue: '', description: 'The build version to deploy (optional)') @@ -16,11 +16,13 @@ pipeline { } environment { DOCKER_REPO_NAME = "translator-rtx-kg2" - KUBERNETES_BLUE_CLUSTER_NAME = "translator-eks-prod-blue-cluster" - KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-prod-green-cluster" + KUBERNETES_BLUE_CLUSTER_NAME = "translator-eks-ci-blue-cluster" + KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-ci-green-cluster" NAMESPACE = "rtx" SECRET_NAME = "sftp-ssh-key" - CONFIG_JSON_CONFIGMAP = "configv2" + CFGFILE2DL = "team-expander-ops@sftp.transltr.io:/transltr-063208468694-sftp/team-expander/config_secrets.json" + CFGFILE2DL_LOCALPATH = "deploy/kg2/configs/config_secrets.json" + sftp_key = "deploy/kg2/secrets/team-expander-ops-sshkey-secret" } stages { stage('Build Version'){ @@ -28,7 +30,7 @@ pipeline { steps{ script { BUILD_VERSION_GENERATED = VersionNumber( - versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}-prod', + versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}', projectStartDate: '1970-01-01', skipFailedBuilds: true) currentBuild.displayName = BUILD_VERSION_GENERATED @@ -45,23 +47,21 @@ pipeline { } stage('Build and Push Docker Image') { when { expression { return env.BUILD == 'true' }} + environment { + ENV_BUILD_BRANCH= sh (returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim() + } steps { - configFileProvider([ - configFile(fileId: 'configv2.json', targetLocation: 'DockerBuild/configv2.json') - ]){ script { - docker.build(env.DOCKER_REPO_NAME, "--no-cache -f ./DockerBuild/KG2-Dockerfile ./DockerBuild/") + docker.build(env.DOCKER_REPO_NAME, "--build-arg BUILD_BRANCH=$ENV_BUILD_BRANCH --no-cache -f ./DockerBuild/KG2-Dockerfile ./DockerBuild/") docker.withRegistry('https://853771734544.dkr.ecr.us-east-1.amazonaws.com', 'ecr:us-east-1:aws-ifx-deploy') { docker.image(env.DOCKER_REPO_NAME).push("${BUILD_VERSION}") } } } - } - } + } stage('Deploy to AWS EKS Blue') { steps { configFileProvider([ - configFile(fileId: 'configv2.json', targetLocation: 'deploy/kg2/configs/configv2.json'), configFile(fileId: 'kg2.values.ncats.yaml', targetLocation: 'deploy/kg2/kg2.values.ncats.yaml') ]){ withCredentials([ @@ -69,11 +69,13 @@ pipeline { credentialsId: 'team-expander-ops-sshkey', keyFileVariable: 'SECRET_FILE') ]){ - withAWS(credentials:'eks-prod-access') + withAWS(credentials:'aws-ifx-deploy') { sh ''' # Need to save the credential to a file with base64 encoded under deploy/kg2/secret cat $SECRET_FILE >> deploy/kg2/secrets/team-expander-ops-sshkey-secret + sftp -i $SECRET_FILE -o StrictHostKeyChecking=no -p $CFGFILE2DL $CFGFILE2DL_LOCALPATH + cp code/config_dbs.json deploy/kg2/configs aws --region ${AWS_REGION} eks update-kubeconfig --name ${KUBERNETES_BLUE_CLUSTER_NAME} cd deploy/kg2 && /bin/bash deploy.sh # aws --region ${AWS_REGION} sts get-caller-identity From 51e202b3ba0e0238f64bb58bccee2d0677a240b0 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Wed, 17 Aug 2022 12:27:06 -0400 Subject: [PATCH 31/66] Update Jenkinsfile-test --- deploy/kg2/Jenkinsfile-test | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/kg2/Jenkinsfile-test b/deploy/kg2/Jenkinsfile-test index 638108e5a..c90f32108 100644 --- a/deploy/kg2/Jenkinsfile-test +++ b/deploy/kg2/Jenkinsfile-test @@ -16,8 +16,8 @@ pipeline { } environment { DOCKER_REPO_NAME = "translator-rtx-kg2" - KUBERNETES_BLUE_CLUSTER_NAME = "translator-eks-ci-blue-cluster" - KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-ci-green-cluster" + KUBERNETES_BLUE_CLUSTER_NAME = "translator-eks-test-blue-cluster" + KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-test-green-cluster" NAMESPACE = "rtx" SECRET_NAME = "sftp-ssh-key" CFGFILE2DL = "team-expander-ops@sftp.transltr.io:/transltr-063208468694-sftp/team-expander/config_secrets.json" @@ -30,7 +30,7 @@ pipeline { steps{ script { BUILD_VERSION_GENERATED = VersionNumber( - versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}', + versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}-test', projectStartDate: '1970-01-01', skipFailedBuilds: true) currentBuild.displayName = BUILD_VERSION_GENERATED From b0c63d214683e6d3f4f7b5e9fab415860ccdd0bc Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Wed, 17 Aug 2022 12:28:07 -0400 Subject: [PATCH 32/66] Update Jenkinsfile-test --- deploy/kg2/Jenkinsfile-test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/kg2/Jenkinsfile-test b/deploy/kg2/Jenkinsfile-test index c90f32108..2411eb2a7 100644 --- a/deploy/kg2/Jenkinsfile-test +++ b/deploy/kg2/Jenkinsfile-test @@ -69,7 +69,7 @@ pipeline { credentialsId: 'team-expander-ops-sshkey', keyFileVariable: 'SECRET_FILE') ]){ - withAWS(credentials:'aws-ifx-deploy') + withAWS(credentials:'eks-test-access') { sh ''' # Need to save the credential to a file with base64 encoded under deploy/kg2/secret From 9b15c346d4a4a5f5dad1a9b3dda0b0ee2caa249b Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Wed, 17 Aug 2022 12:30:08 -0400 Subject: [PATCH 33/66] Update Jenkinsfile-prod --- deploy/kg2/Jenkinsfile-prod | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/kg2/Jenkinsfile-prod b/deploy/kg2/Jenkinsfile-prod index 638108e5a..c9515cd7e 100644 --- a/deploy/kg2/Jenkinsfile-prod +++ b/deploy/kg2/Jenkinsfile-prod @@ -16,8 +16,8 @@ pipeline { } environment { DOCKER_REPO_NAME = "translator-rtx-kg2" - KUBERNETES_BLUE_CLUSTER_NAME = "translator-eks-ci-blue-cluster" - KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-ci-green-cluster" + KUBERNETES_BLUE_CLUSTER_NAME = "translator-eks-prod-blue-cluster" + KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-prod-green-cluster" NAMESPACE = "rtx" SECRET_NAME = "sftp-ssh-key" CFGFILE2DL = "team-expander-ops@sftp.transltr.io:/transltr-063208468694-sftp/team-expander/config_secrets.json" @@ -30,7 +30,7 @@ pipeline { steps{ script { BUILD_VERSION_GENERATED = VersionNumber( - versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}', + versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}-prod', projectStartDate: '1970-01-01', skipFailedBuilds: true) currentBuild.displayName = BUILD_VERSION_GENERATED @@ -69,7 +69,7 @@ pipeline { credentialsId: 'team-expander-ops-sshkey', keyFileVariable: 'SECRET_FILE') ]){ - withAWS(credentials:'aws-ifx-deploy') + withAWS(credentials:'eks-prod-access') { sh ''' # Need to save the credential to a file with base64 encoded under deploy/kg2/secret From 1d4d3ceba967e599531089d32975636d12169484 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Wed, 17 Aug 2022 12:30:32 -0400 Subject: [PATCH 34/66] Update download_database.sh --- deploy/kg2/scripts/download_database.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/deploy/kg2/scripts/download_database.sh b/deploy/kg2/scripts/download_database.sh index a6e184bc2..820c19942 100755 --- a/deploy/kg2/scripts/download_database.sh +++ b/deploy/kg2/scripts/download_database.sh @@ -10,7 +10,7 @@ # sftp -i /etc/ssh-key/ssh-key-SECRET_FILE -o StrictHostKeyChecking=no -pr team-expander-ops@sftp.transltr.io:/transltr-063208468694-sftp/team-expander/databases/ / # variables -config_file="/configs/configv2.json" +config_file="/configs/config_dbs.json" # associative array serves as dict # here we build db_arr with db_path_pvc as its key and 1 as its value, which equivilent to "set" # db_arr: most updated db file path on PVC (in this case, /databases) @@ -32,19 +32,20 @@ echo " # # ################################################################################" -# build db_arr which includes all needed db files in configv2.json +# build db_arr which includes all needed db files in config_dbs.json echo "Reading ${confgi_file} and building new db_arr specified in ${config_file}....." printf "\n" -for db in $(jq -r '.Contextual.Production | keys | .[]' ${config_file}) +for db in $(jq -r '.database_downloads | keys[]' ${config_file}) do - # NOTE: if there's no .path value, the result will be a string "null" - db_path=$(jq -r '.Contextual.Production.'${db}' | .path' ${config_file}) + db_path=$(jq -r '.database_downloads.'${db} ${config_file}) + echo $db_path if [ ${db_path} != "null" ] then db_path_pvc="${db_path/'/translator/data/orangeboard'}" - # echo $db_path_pvc + echo $db_path_pvc db_arr[${db_path_pvc}]=1 new_db_MD5="${db_path/'/translator/data/orangeboard/databases'/${md5_sums_new}}.md5" + echo $new_db_MD5 new_db_MD5_arr[${new_db_MD5}]=1 fi done @@ -54,9 +55,9 @@ done # clean up current db first -# check if there's db file not listed in configv2.json and rm +# check if there's db file not listed in config_dbs.json and rm # this is useful when a new db (or a new version of existing db) rolls out -# and we only want to keep what is specificed in configv2.json file +# and we only want to keep what is specificed in config_dbs.json file echo "Removing outdated db files......" for existing_db in $(find $db_folder -type f) do @@ -81,7 +82,7 @@ sftp -i $sftp_key -o StrictHostKeyChecking=no -pr ${sftp_url}/md5_sums/ $md5_sum printf '\n' # this is tricky, we download all MD5 info, some are needed, some are not -# we need to loop through all downloaded MD5s, remove others but only keep the needed ones, which is from the configv2.json +# we need to loop through all downloaded MD5s, remove others but only keep the needed ones, which is from the config_dbs.json for MD5 in $(find $md5_sums_new -type f) do if [[ ! ${new_db_MD5_arr[${MD5}]} ]] From 126a2395a52742c6a48942b2c831586c67864a16 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Wed, 17 Aug 2022 12:30:52 -0400 Subject: [PATCH 35/66] Update start_app.sh --- deploy/kg2/scripts/start_app.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/kg2/scripts/start_app.sh b/deploy/kg2/scripts/start_app.sh index 315b9263c..21c8fe4ae 100755 --- a/deploy/kg2/scripts/start_app.sh +++ b/deploy/kg2/scripts/start_app.sh @@ -1,6 +1,6 @@ #!/bin/bash # rename config file -cp /configs/configv2.json /mnt/data/orangeboard/kg2/RTX/code/config_local.json +cp /configs/config_secrets.json /mnt/data/orangeboard/kg2/RTX/code/config_secrets.json # Update database directory permission which is mounted from a PVC chmod -R 755 /mnt/data/orangeboard/databases/ From 5f93036c31b352e1f83570cee02fe7742d4100a1 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Wed, 17 Aug 2022 12:31:31 -0400 Subject: [PATCH 36/66] Update KG2-Dockerfile --- DockerBuild/KG2-Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DockerBuild/KG2-Dockerfile b/DockerBuild/KG2-Dockerfile index b9ed92415..2dbd70595 100644 --- a/DockerBuild/KG2-Dockerfile +++ b/DockerBuild/KG2-Dockerfile @@ -3,6 +3,9 @@ FROM ubuntu:20.04 # suppress debconf error messages: ARG DEBIAN_FRONTEND=noninteractive +# build based on branch +ARG BUILD_BRANCH=master + # add user "rt" and give sudo privilege: RUN useradd rt -m -s /bin/bash @@ -29,7 +32,8 @@ RUN chmod -R 700 /home/rt/.ssh RUN mkdir -p /mnt/data/orangeboard/kg2 RUN chown -R rt.rt /mnt/data/orangeboard/kg2 RUN su rt && cd /mnt/data/orangeboard/kg2 && git clone https://github.com/RTXteam/RTX.git -RUN su rt && cd /mnt/data/orangeboard/kg2/RTX && git checkout production +# 08/12/2022 NCATS change +RUN su rt && cd /mnt/data/orangeboard/kg2/RTX && git checkout ${BUILD_BRANCH} RUN chown -R rt.rt /mnt/data/orangeboard/kg2/RTX RUN su rt && mv /mnt/data/orangeboard/kg2/RTX/code/UI/interactive/config.js.example /mnt/data/orangeboard/kg2/RTX/code/UI/interactive/config.js From 22c680977bf9c8161c8130fa95f1344a365a0451 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Wed, 17 Aug 2022 12:37:28 -0400 Subject: [PATCH 37/66] fix: indent fixed --- deploy/kg2/Jenkinsfile-prod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/kg2/Jenkinsfile-prod b/deploy/kg2/Jenkinsfile-prod index c9515cd7e..8d81095da 100644 --- a/deploy/kg2/Jenkinsfile-prod +++ b/deploy/kg2/Jenkinsfile-prod @@ -49,7 +49,7 @@ pipeline { when { expression { return env.BUILD == 'true' }} environment { ENV_BUILD_BRANCH= sh (returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim() - } + } steps { script { docker.build(env.DOCKER_REPO_NAME, "--build-arg BUILD_BRANCH=$ENV_BUILD_BRANCH --no-cache -f ./DockerBuild/KG2-Dockerfile ./DockerBuild/") From c40c7964ddb9ab22df3ab854b387d9a0da21cdba Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Wed, 17 Aug 2022 12:49:58 -0400 Subject: [PATCH 38/66] indent is fixed --- deploy/kg2/Jenkinsfile-prod | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/deploy/kg2/Jenkinsfile-prod b/deploy/kg2/Jenkinsfile-prod index 8d81095da..ee16135a1 100644 --- a/deploy/kg2/Jenkinsfile-prod +++ b/deploy/kg2/Jenkinsfile-prod @@ -46,19 +46,19 @@ pipeline { } } stage('Build and Push Docker Image') { - when { expression { return env.BUILD == 'true' }} - environment { + when { expression { return env.BUILD == 'true' }} + environment { ENV_BUILD_BRANCH= sh (returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim() - } + } steps { - script { - docker.build(env.DOCKER_REPO_NAME, "--build-arg BUILD_BRANCH=$ENV_BUILD_BRANCH --no-cache -f ./DockerBuild/KG2-Dockerfile ./DockerBuild/") - docker.withRegistry('https://853771734544.dkr.ecr.us-east-1.amazonaws.com', 'ecr:us-east-1:aws-ifx-deploy') { - docker.image(env.DOCKER_REPO_NAME).push("${BUILD_VERSION}") - } - } - } - } + script { + docker.build(env.DOCKER_REPO_NAME, "--build-arg BUILD_BRANCH=$ENV_BUILD_BRANCH --no-cache -f ./DockerBuild/KG2-Dockerfile ./DockerBuild/") + docker.withRegistry('https://853771734544.dkr.ecr.us-east-1.amazonaws.com', 'ecr:us-east-1:aws-ifx-deploy') { + docker.image(env.DOCKER_REPO_NAME).push("${BUILD_VERSION}") + } + } + } + } stage('Deploy to AWS EKS Blue') { steps { configFileProvider([ From 24f29dbff50ff2cf0f178faa145c24fe9359c906 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Wed, 17 Aug 2022 12:51:06 -0400 Subject: [PATCH 39/66] Update Jenkinsfile-prod --- deploy/kg2/Jenkinsfile-prod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/kg2/Jenkinsfile-prod b/deploy/kg2/Jenkinsfile-prod index ee16135a1..aeb529d83 100644 --- a/deploy/kg2/Jenkinsfile-prod +++ b/deploy/kg2/Jenkinsfile-prod @@ -54,7 +54,7 @@ pipeline { script { docker.build(env.DOCKER_REPO_NAME, "--build-arg BUILD_BRANCH=$ENV_BUILD_BRANCH --no-cache -f ./DockerBuild/KG2-Dockerfile ./DockerBuild/") docker.withRegistry('https://853771734544.dkr.ecr.us-east-1.amazonaws.com', 'ecr:us-east-1:aws-ifx-deploy') { - docker.image(env.DOCKER_REPO_NAME).push("${BUILD_VERSION}") + docker.image(env.DOCKER_REPO_NAME).push("${BUILD_VERSION}") } } } From 6d0a4135a0bfe0257b9a219f9cb735228b35292a Mon Sep 17 00:00:00 2001 From: edeutsch Date: Tue, 6 Sep 2022 05:12:31 +0000 Subject: [PATCH 40/66] update openapi.yaml to have all maturities on 1.3 --- .../KG2/openapi_server/openapi/openapi.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml b/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml index a6168787d..2b6daa366 100644 --- a/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml +++ b/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml @@ -34,6 +34,21 @@ externalDocs: description: Documentation for the NCATS Biomedical Translator Reasoners web services url: https://github.com/NCATSTranslator/ReasonerAPI servers: +- description: RTX-KG2 TRAPI 1.3 endpoint - production + url: https://arax.ncats.io/api/rtxkg2/v1.3 + x-maturity: production +- description: RTX-KG2 TRAPI 1.3 endpoint - ITRB production + url: https://kg2.transltr.io/api/rtxkg2/v1.3 + x-maturity: production +- description: RTX-KG2 TRAPI 1.3 endpoint - ITRB testing + url: https://kg2.test.transltr.io/api/rtxkg2/v1.3 + x-maturity: testing +- description: RTX-KG2 TRAPI 1.3 endpoint - ITRB staging + url: https://kg2.ci.transltr.io/api/rtxkg2/v1.3 + x-maturity: staging +- description: RTX-KG2 TRAPI 1.3 endpoint - development + url: https://arax.ncats.io/beta/api/rtxkg2/v1.3 + x-maturity: development - description: RTX-KG2 TRAPI 1.3 endpoint - development url: https://arax.ncats.io/api/rtxkg2/v1.3 x-maturity: development From 494becc13c7ce969f3afc39f5fb4d20eebc33148 Mon Sep 17 00:00:00 2001 From: Eric Deutsch Date: Fri, 9 Sep 2022 16:35:19 +0000 Subject: [PATCH 41/66] put the transltr.io instance first --- .../python-flask-server/openapi_server/openapi/openapi.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml b/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml index ef5dcfe7f..455dc09b9 100644 --- a/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml +++ b/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml @@ -8,7 +8,7 @@ info: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html termsOfService: https://github.com/RTXteam/RTX/blob/master/LICENSE - title: ARAX Translator Reasoner + title: ARAX Translator Reasoner - TRAPI 1.3.0 version: 1.3.0 x-translator: component: ARA @@ -55,10 +55,10 @@ externalDocs: url: https://github.com/NCATSTranslator/ReasonerAPI servers: - description: ARAX TRAPI 1.3 endpoint - production - url: https://arax.ncats.io/api/arax/v1.3 + url: https://arax.transltr.io/api/arax/v1.3 x-maturity: production - description: ARAX TRAPI 1.3 endpoint - production - url: https://arax.transltr.io/api/arax/v1.3 + url: https://arax.ncats.io/api/arax/v1.3 x-maturity: production - description: ARAX TRAPI 1.3 endpoint - testing url: https://arax.test.transltr.io/api/arax/v1.3 From d222201c81ec088dc7a735c63a1c7121eb439162 Mon Sep 17 00:00:00 2001 From: Eric Deutsch Date: Fri, 9 Sep 2022 16:42:57 +0000 Subject: [PATCH 42/66] fix title and move transltr.io first --- .../KG2/openapi_server/openapi/openapi.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml b/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml index 2b6daa366..9da8030d6 100644 --- a/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml +++ b/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml @@ -8,7 +8,7 @@ info: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html termsOfService: https://github.com/RTXteam/RTX/blob/master/LICENSE - title: RTX KG2 + title: RTX KG2 - TRAPI 1.3.0 version: 2.7.6.0 x-translator: component: KP @@ -34,12 +34,12 @@ externalDocs: description: Documentation for the NCATS Biomedical Translator Reasoners web services url: https://github.com/NCATSTranslator/ReasonerAPI servers: -- description: RTX-KG2 TRAPI 1.3 endpoint - production - url: https://arax.ncats.io/api/rtxkg2/v1.3 - x-maturity: production - description: RTX-KG2 TRAPI 1.3 endpoint - ITRB production url: https://kg2.transltr.io/api/rtxkg2/v1.3 x-maturity: production +- description: RTX-KG2 TRAPI 1.3 endpoint - production + url: https://arax.ncats.io/api/rtxkg2/v1.3 + x-maturity: production - description: RTX-KG2 TRAPI 1.3 endpoint - ITRB testing url: https://kg2.test.transltr.io/api/rtxkg2/v1.3 x-maturity: testing From c0eebb02dcf970330122de6098ee3b05cf478111 Mon Sep 17 00:00:00 2001 From: Eric Deutsch Date: Fri, 9 Sep 2022 16:48:22 +0000 Subject: [PATCH 43/66] remove extra development entry --- .../KG2/openapi_server/openapi/openapi.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml b/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml index 9da8030d6..19498381c 100644 --- a/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml +++ b/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml @@ -49,9 +49,6 @@ servers: - description: RTX-KG2 TRAPI 1.3 endpoint - development url: https://arax.ncats.io/beta/api/rtxkg2/v1.3 x-maturity: development -- description: RTX-KG2 TRAPI 1.3 endpoint - development - url: https://arax.ncats.io/api/rtxkg2/v1.3 - x-maturity: development tags: - description: Retrieve the meta knowledge graph representation of this TRAPI web service. KPs MUST provide all subject category - predicate - object category triplets From 76feb2b206fbe6861f13d2dfa032b915c2d386de Mon Sep 17 00:00:00 2001 From: Stephen Ramsey Date: Wed, 18 Jan 2023 09:42:19 -0800 Subject: [PATCH 44/66] #1937 testing alternate maturity level for test_data_location --- .../KG2/openapi_server/openapi/openapi.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml b/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml index 19498381c..bafd22f4b 100644 --- a/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml +++ b/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml @@ -23,7 +23,11 @@ info: x-trapi: version: 1.3.0 asyncquery: false - test_data_location: https://raw.githubusercontent.com/RTXteam/RTX/production/code/ARAX/KnowledgeSources/RTX_KG2c_test_triples.json + test_data_location: + default: + url: https://raw.githubusercontent.com/RTXteam/RTX/production/code/ARAX/KnowledgeSources/RTX_KG2c_test_triples.json + development: + url: https://raw.githubusercontent.com/RTXteam/RTX/kg2integration/code/ARAX/KnowledgeSources/RTX_KG2c_test_triples.json operations: - lookup externalDocs: From 82d43265c849a73ef8988ba3f519aa805aff253f Mon Sep 17 00:00:00 2001 From: pahmadi8740 Date: Wed, 8 Feb 2023 09:18:56 -0500 Subject: [PATCH 45/66] feat: arax pipeline is refactored --- deploy/arax/Jenkinsfile-test | 59 ++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/deploy/arax/Jenkinsfile-test b/deploy/arax/Jenkinsfile-test index 9fa620582..050e31ab8 100644 --- a/deploy/arax/Jenkinsfile-test +++ b/deploy/arax/Jenkinsfile-test @@ -15,6 +15,7 @@ pipeline { pollSCM('H/5 * * * *') } environment { + IMAGE_NAME = "853771734544.dkr.ecr.us-east-1.amazonaws.com/translator-rtx-arax" DOCKER_REPO_NAME = "translator-rtx-arax" KUBERNETES_BLUE_CLUSTER_NAME = "translator-eks-test-blue-cluster" KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-test-green-cluster" @@ -30,7 +31,7 @@ pipeline { steps{ script { BUILD_VERSION_GENERATED = VersionNumber( - versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}-test', + versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}', projectStartDate: '1970-01-01', skipFailedBuilds: true) currentBuild.displayName = BUILD_VERSION_GENERATED @@ -47,48 +48,46 @@ pipeline { } stage('Build and Push Docker Image') { when { expression { return env.BUILD == 'true' }} - environment { - ENV_BUILD_BRANCH= sh (returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim() + environment { + ENV_BUILD_BRANCH= sh (returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim() } steps { script { - docker.build(env.DOCKER_REPO_NAME, "--build-arg BUILD_BRANCH=$ENV_BUILD_BRANCH --no-cache ./DockerBuild/") - docker.withRegistry('https://853771734544.dkr.ecr.us-east-1.amazonaws.com', 'ecr:us-east-1:aws-ifx-deploy') { - docker.image(env.DOCKER_REPO_NAME).push("${BUILD_VERSION}") - } + docker.build(env.IMAGE_NAME, "--build-arg BUILD_BRANCH=$ENV_BUILD_BRANCH --no-cache ./DockerBuild/") + sh ''' + aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 853771734544.dkr.ecr.us-east-1.amazonaws.com + ''' + docker.image(env.IMAGE_NAME).push("${BUILD_VERSION}") } } } stage('Deploy to AWS EKS Blue') { + agent { + label 'translator && ci && deploy' + } steps { + cleanWs() + checkout scm configFileProvider([ - configFile(fileId: 'arax.values.ncats.yaml', targetLocation: 'deploy/arax/arax.values.ncats.yaml') + configFile(fileId: 'arax.values.ncats.yaml', targetLocation: 'deploy/arax/arax.values.ncats.yaml'), + configFile(fileId: 'prepare.sh', targetLocation: 'prepare.sh') ]){ - withCredentials([ - sshUserPrivateKey( - credentialsId: 'team-expander-ops-sshkey', - keyFileVariable: 'SECRET_FILE') - ]){ - withAWS(credentials:'eks-test-access') - { - sh ''' - # Need to save the credential to a file with base64 encoded under deploy/secret - cat $SECRET_FILE >> deploy/arax/secrets/team-expander-ops-sshkey-secret - sftp -i $SECRET_FILE -o StrictHostKeyChecking=no -p $CFGFILE2DL $CFGFILE2DL_LOCALPATH - cp code/config_dbs.json deploy/arax/configs - aws --region ${AWS_REGION} eks update-kubeconfig --name ${KUBERNETES_BLUE_CLUSTER_NAME} - cd deploy/arax && /bin/bash deploy.sh - # aws --region ${AWS_REGION} sts get-caller-identity - ''' - } - } - } - } - } + script { + sh ''' + aws --region ${AWS_REGION} eks update-kubeconfig --name ${KUBERNETES_BLUE_CLUSTER_NAME} + /bin/bash prepare.sh + sftp -i SECRET_FILE -o StrictHostKeyChecking=no -p $CFGFILE2DL $CFGFILE2DL_LOCALPATH + cp code/config_dbs.json deploy/arax/configs + cd deploy/arax && /bin/bash deploy.sh + ''' + } + } + } + } stage('Clean Up') { steps { cleanWs() } } } -} +} \ No newline at end of file From 9b347f9c5037aac209bc6c286a05d6e9ce872d71 Mon Sep 17 00:00:00 2001 From: pahmadi8740 Date: Wed, 8 Feb 2023 10:00:59 -0500 Subject: [PATCH 46/66] fix: deploy label updated --- deploy/arax/Jenkinsfile-test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/arax/Jenkinsfile-test b/deploy/arax/Jenkinsfile-test index 050e31ab8..dd904c866 100644 --- a/deploy/arax/Jenkinsfile-test +++ b/deploy/arax/Jenkinsfile-test @@ -63,7 +63,7 @@ pipeline { } stage('Deploy to AWS EKS Blue') { agent { - label 'translator && ci && deploy' + label 'translator && test && deploy' } steps { cleanWs() From e1d2d2cd5d946dd61a62088d42b3ad34923abfad Mon Sep 17 00:00:00 2001 From: pahmadi8740 Date: Wed, 8 Feb 2023 10:53:28 -0500 Subject: [PATCH 47/66] fix: build version is updated --- deploy/arax/Jenkinsfile-test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/arax/Jenkinsfile-test b/deploy/arax/Jenkinsfile-test index dd904c866..1d78fbdfa 100644 --- a/deploy/arax/Jenkinsfile-test +++ b/deploy/arax/Jenkinsfile-test @@ -31,7 +31,7 @@ pipeline { steps{ script { BUILD_VERSION_GENERATED = VersionNumber( - versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}', + versionNumberString: 'v${BUILD_YEAR, XX}.${BUILD_MONTH, XX}${BUILD_DAY, XX}.${BUILDS_TODAY}-test', projectStartDate: '1970-01-01', skipFailedBuilds: true) currentBuild.displayName = BUILD_VERSION_GENERATED From bd07d46dbf68caf0af4ed5962ffe83fdfc61d51d Mon Sep 17 00:00:00 2001 From: pahmadi8740 Date: Wed, 8 Feb 2023 12:02:53 -0500 Subject: [PATCH 48/66] feat: kg2 pipeline is refactored --- deploy/kg2/Jenkinsfile-test | 51 ++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/deploy/kg2/Jenkinsfile-test b/deploy/kg2/Jenkinsfile-test index ceed375a9..b5c3f5728 100644 --- a/deploy/kg2/Jenkinsfile-test +++ b/deploy/kg2/Jenkinsfile-test @@ -15,6 +15,7 @@ pipeline { pollSCM('H/5 * * * *') } environment { + IMAGE_NAME = "853771734544.dkr.ecr.us-east-1.amazonaws.com/translator-rtx-kg2" DOCKER_REPO_NAME = "translator-rtx-kg2" KUBERNETES_BLUE_CLUSTER_NAME = "translator-eks-test-blue-cluster" KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-test-green-cluster" @@ -52,39 +53,37 @@ pipeline { } steps { script { - docker.build(env.DOCKER_REPO_NAME, "--build-arg BUILD_BRANCH=$ENV_BUILD_BRANCH --no-cache -f ./DockerBuild/KG2-Dockerfile ./DockerBuild/") - docker.withRegistry('https://853771734544.dkr.ecr.us-east-1.amazonaws.com', 'ecr:us-east-1:aws-ifx-deploy') { - docker.image(env.DOCKER_REPO_NAME).push("${BUILD_VERSION}") - } + docker.build(env.IMAGE_NAME, "--build-arg BUILD_BRANCH=$ENV_BUILD_BRANCH --no-cache -f ./DockerBuild/KG2-Dockerfile ./DockerBuild/") + sh ''' + aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 853771734544.dkr.ecr.us-east-1.amazonaws.com + ''' + docker.image(env.IMAGE_NAME).push("${BUILD_VERSION}") } } } stage('Deploy to AWS EKS Blue') { + agent { + label 'translator && test && deploy' + } steps { + cleanWs() + checkout scm configFileProvider([ - configFile(fileId: 'kg2.values.ncats.yaml', targetLocation: 'deploy/kg2/kg2.values.ncats.yaml') + configFile(fileId: 'kg2.values.ncats.yaml', targetLocation: 'deploy/kg2/kg2.values.ncats.yaml'), + configFile(fileId: 'preparekg2.sh', targetLocation: 'preparekg2.sh') ]){ - withCredentials([ - sshUserPrivateKey( - credentialsId: 'team-expander-ops-sshkey', - keyFileVariable: 'SECRET_FILE') - ]){ - withAWS(credentials:'eks-test-access') - { - sh ''' - # Need to save the credential to a file with base64 encoded under deploy/kg2/secret - cat $SECRET_FILE >> deploy/kg2/secrets/team-expander-ops-sshkey-secret - sftp -i $SECRET_FILE -o StrictHostKeyChecking=no -p $CFGFILE2DL $CFGFILE2DL_LOCALPATH - cp code/config_dbs.json deploy/kg2/configs - aws --region ${AWS_REGION} eks update-kubeconfig --name ${KUBERNETES_BLUE_CLUSTER_NAME} - cd deploy/kg2 && /bin/bash deploy.sh - # aws --region ${AWS_REGION} sts get-caller-identity - ''' - } - } - } - } - } + script { + sh ''' + aws --region ${AWS_REGION} eks update-kubeconfig --name ${KUBERNETES_BLUE_CLUSTER_NAME} + /bin/bash preparekg2.sh + sftp -i SECRET_FILE -o StrictHostKeyChecking=no -p $CFGFILE2DL $CFGFILE2DL_LOCALPATH + cp code/config_dbs.json deploy/kg2/configs + cd deploy/kg2 && /bin/bash deploy.sh + ''' + } + } + } + } stage('Clean Up') { steps { cleanWs() From a29e02df174bd73f8e428e3dcf30200f0deb8bcd Mon Sep 17 00:00:00 2001 From: pahmadi8740 Date: Wed, 8 Feb 2023 12:58:33 -0500 Subject: [PATCH 49/66] feat: liveness probe added to arax/kg2 --- deploy/arax/templates/deployment.yaml | 5 +++++ deploy/kg2/templates/deployment.yaml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/deploy/arax/templates/deployment.yaml b/deploy/arax/templates/deployment.yaml index 274f8adb0..d1fd6e469 100644 --- a/deploy/arax/templates/deployment.yaml +++ b/deploy/arax/templates/deployment.yaml @@ -43,6 +43,11 @@ spec: - name: http containerPort: 80 protocol: TCP + livenessProbe: + httpGet: + path: / + port: http + periodSeconds: 60 volumeMounts: - name: {{ include "arax.fullname" . }}-pvc mountPath: /mnt/data/orangeboard/databases/ diff --git a/deploy/kg2/templates/deployment.yaml b/deploy/kg2/templates/deployment.yaml index fd8a6011a..72903e180 100644 --- a/deploy/kg2/templates/deployment.yaml +++ b/deploy/kg2/templates/deployment.yaml @@ -43,6 +43,11 @@ spec: - name: http containerPort: 80 protocol: TCP + livenessProbe: + httpGet: + path: / + port: http + periodSeconds: 60 volumeMounts: - name: {{ include "kg2.fullname" . }}-pvc mountPath: /mnt/data/orangeboard/databases/ From 465f7569f8a24c95b94c3b283dc1b02cabbb576e Mon Sep 17 00:00:00 2001 From: pahmadi8740 Date: Tue, 14 Mar 2023 13:04:13 -0400 Subject: [PATCH 50/66] feat: arax/kg2 refactored in prod --- deploy/arax/Jenkinsfile-prod | 57 ++++++++++++++++++------------------ deploy/kg2/Jenkinsfile-prod | 53 ++++++++++++++++----------------- 2 files changed, 54 insertions(+), 56 deletions(-) diff --git a/deploy/arax/Jenkinsfile-prod b/deploy/arax/Jenkinsfile-prod index 33ee33115..4b5ded268 100644 --- a/deploy/arax/Jenkinsfile-prod +++ b/deploy/arax/Jenkinsfile-prod @@ -15,6 +15,7 @@ pipeline { pollSCM('H/5 * * * *') } environment { + IMAGE_NAME = "853771734544.dkr.ecr.us-east-1.amazonaws.com/translator-rtx-arax" DOCKER_REPO_NAME = "translator-rtx-arax" KUBERNETES_BLUE_CLUSTER_NAME = "translator-eks-prod-blue-cluster" KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-prod-green-cluster" @@ -47,48 +48,46 @@ pipeline { } stage('Build and Push Docker Image') { when { expression { return env.BUILD == 'true' }} - environment { - ENV_BUILD_BRANCH= sh (returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim() + environment { + ENV_BUILD_BRANCH= sh (returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim() } steps { script { - docker.build(env.DOCKER_REPO_NAME, "--build-arg BUILD_BRANCH=$ENV_BUILD_BRANCH --no-cache ./DockerBuild/") - docker.withRegistry('https://853771734544.dkr.ecr.us-east-1.amazonaws.com', 'ecr:us-east-1:aws-ifx-deploy') { - docker.image(env.DOCKER_REPO_NAME).push("${BUILD_VERSION}") - } + docker.build(env.IMAGE_NAME, "--build-arg BUILD_BRANCH=$ENV_BUILD_BRANCH --no-cache ./DockerBuild/") + sh ''' + aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 853771734544.dkr.ecr.us-east-1.amazonaws.com + ''' + docker.image(env.IMAGE_NAME).push("${BUILD_VERSION}") } } } stage('Deploy to AWS EKS Blue') { + agent { + label 'translator && prod && deploy' + } steps { + cleanWs() + checkout scm configFileProvider([ - configFile(fileId: 'arax.values.ncats.yaml', targetLocation: 'deploy/arax/arax.values.ncats.yaml') + configFile(fileId: 'arax.values.ncats.yaml', targetLocation: 'deploy/arax/arax.values.ncats.yaml'), + configFile(fileId: 'prepare.sh', targetLocation: 'prepare.sh') ]){ - withCredentials([ - sshUserPrivateKey( - credentialsId: 'team-expander-ops-sshkey', - keyFileVariable: 'SECRET_FILE') - ]){ - withAWS(credentials:'eks-prod-access') - { - sh ''' - # Need to save the credential to a file with base64 encoded under deploy/secret - cat $SECRET_FILE >> deploy/arax/secrets/team-expander-ops-sshkey-secret - sftp -i $SECRET_FILE -o StrictHostKeyChecking=no -p $CFGFILE2DL $CFGFILE2DL_LOCALPATH - cp code/config_dbs.json deploy/arax/configs - aws --region ${AWS_REGION} eks update-kubeconfig --name ${KUBERNETES_BLUE_CLUSTER_NAME} - cd deploy/arax && /bin/bash deploy.sh - # aws --region ${AWS_REGION} sts get-caller-identity - ''' - } - } - } - } - } + script { + sh ''' + aws --region ${AWS_REGION} eks update-kubeconfig --name ${KUBERNETES_BLUE_CLUSTER_NAME} + /bin/bash prepare.sh + sftp -i SECRET_FILE -o StrictHostKeyChecking=no -p $CFGFILE2DL $CFGFILE2DL_LOCALPATH + cp code/config_dbs.json deploy/arax/configs + cd deploy/arax && /bin/bash deploy.sh + ''' + } + } + } + } stage('Clean Up') { steps { cleanWs() } } } -} +} \ No newline at end of file diff --git a/deploy/kg2/Jenkinsfile-prod b/deploy/kg2/Jenkinsfile-prod index 756c3fe5c..149c929ae 100644 --- a/deploy/kg2/Jenkinsfile-prod +++ b/deploy/kg2/Jenkinsfile-prod @@ -15,6 +15,7 @@ pipeline { pollSCM('H/5 * * * *') } environment { + IMAGE_NAME = "853771734544.dkr.ecr.us-east-1.amazonaws.com/translator-rtx-kg2" DOCKER_REPO_NAME = "translator-rtx-kg2" KUBERNETES_BLUE_CLUSTER_NAME = "translator-eks-prod-blue-cluster" KUBERNETES_GREEN_CLUSTER_NAME = "translator-eks-prod-green-cluster" @@ -47,44 +48,42 @@ pipeline { } stage('Build and Push Docker Image') { when { expression { return env.BUILD == 'true' }} - environment { + environment { ENV_BUILD_BRANCH= sh (returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim() } steps { script { - docker.build(env.DOCKER_REPO_NAME, "--build-arg BUILD_BRANCH=$ENV_BUILD_BRANCH --no-cache -f ./DockerBuild/KG2-Dockerfile ./DockerBuild/") - docker.withRegistry('https://853771734544.dkr.ecr.us-east-1.amazonaws.com', 'ecr:us-east-1:aws-ifx-deploy') { - docker.image(env.DOCKER_REPO_NAME).push("${BUILD_VERSION}") - } + docker.build(env.IMAGE_NAME, "--build-arg BUILD_BRANCH=$ENV_BUILD_BRANCH --no-cache -f ./DockerBuild/KG2-Dockerfile ./DockerBuild/") + sh ''' + aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 853771734544.dkr.ecr.us-east-1.amazonaws.com + ''' + docker.image(env.IMAGE_NAME).push("${BUILD_VERSION}") } } } stage('Deploy to AWS EKS Blue') { + agent { + label 'translator && prod && deploy' + } steps { + cleanWs() + checkout scm configFileProvider([ - configFile(fileId: 'kg2.values.ncats.yaml', targetLocation: 'deploy/kg2/kg2.values.ncats.yaml') + configFile(fileId: 'kg2.values.ncats.yaml', targetLocation: 'deploy/kg2/kg2.values.ncats.yaml'), + configFile(fileId: 'preparekg2.sh', targetLocation: 'preparekg2.sh') ]){ - withCredentials([ - sshUserPrivateKey( - credentialsId: 'team-expander-ops-sshkey', - keyFileVariable: 'SECRET_FILE') - ]){ - withAWS(credentials:'eks-prod-access') - { - sh ''' - # Need to save the credential to a file with base64 encoded under deploy/kg2/secret - cat $SECRET_FILE >> deploy/kg2/secrets/team-expander-ops-sshkey-secret - sftp -i $SECRET_FILE -o StrictHostKeyChecking=no -p $CFGFILE2DL $CFGFILE2DL_LOCALPATH - cp code/config_dbs.json deploy/kg2/configs - aws --region ${AWS_REGION} eks update-kubeconfig --name ${KUBERNETES_BLUE_CLUSTER_NAME} - cd deploy/kg2 && /bin/bash deploy.sh - # aws --region ${AWS_REGION} sts get-caller-identity - ''' - } - } - } - } - } + script { + sh ''' + aws --region ${AWS_REGION} eks update-kubeconfig --name ${KUBERNETES_BLUE_CLUSTER_NAME} + /bin/bash preparekg2.sh + sftp -i SECRET_FILE -o StrictHostKeyChecking=no -p $CFGFILE2DL $CFGFILE2DL_LOCALPATH + cp code/config_dbs.json deploy/kg2/configs + cd deploy/kg2 && /bin/bash deploy.sh + ''' + } + } + } + } stage('Clean Up') { steps { cleanWs() From 9ea55a4b008006490a37290a81c792473b591ad2 Mon Sep 17 00:00:00 2001 From: Eric Deutsch Date: Thu, 16 Mar 2023 06:22:48 +0000 Subject: [PATCH 51/66] fix accidentally committed conflict --- deploy/arax/Jenkinsfile-test | 6 +----- deploy/kg2/Jenkinsfile-test | 4 ---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/deploy/arax/Jenkinsfile-test b/deploy/arax/Jenkinsfile-test index ad326bce3..50c885199 100644 --- a/deploy/arax/Jenkinsfile-test +++ b/deploy/arax/Jenkinsfile-test @@ -63,11 +63,7 @@ pipeline { } stage('Deploy to AWS EKS Blue') { agent { -<<<<<<< HEAD - label 'translator && ci && deploy' -======= label 'translator && test && deploy' ->>>>>>> 5d23b7c420babfd4319f055249030a3053d34cf8 } steps { cleanWs() @@ -94,4 +90,4 @@ pipeline { } } } -} \ No newline at end of file +} diff --git a/deploy/kg2/Jenkinsfile-test b/deploy/kg2/Jenkinsfile-test index 03409205a..b4a822f49 100644 --- a/deploy/kg2/Jenkinsfile-test +++ b/deploy/kg2/Jenkinsfile-test @@ -63,11 +63,7 @@ pipeline { } stage('Deploy to AWS EKS Blue') { agent { -<<<<<<< HEAD - label 'translator && ci && deploy' -======= label 'translator && test && deploy' ->>>>>>> 5d23b7c420babfd4319f055249030a3053d34cf8 } steps { cleanWs() From 7f22e60101fc1e5fe6e23d0f5ecc03428ff0e6e7 Mon Sep 17 00:00:00 2001 From: pahmadi8740 Date: Fri, 17 Mar 2023 09:38:09 -0400 Subject: [PATCH 52/66] fix: trigger removed --- deploy/arax/Jenkinsfile-test | 3 --- 1 file changed, 3 deletions(-) diff --git a/deploy/arax/Jenkinsfile-test b/deploy/arax/Jenkinsfile-test index 1d78fbdfa..6f22745f5 100644 --- a/deploy/arax/Jenkinsfile-test +++ b/deploy/arax/Jenkinsfile-test @@ -11,9 +11,6 @@ pipeline { string(name: 'BUILD_VERSION', defaultValue: '', description: 'The build version to deploy (optional)') string(name: 'AWS_REGION', defaultValue: 'us-east-1', description: 'AWS Region to deploy') } - triggers { - pollSCM('H/5 * * * *') - } environment { IMAGE_NAME = "853771734544.dkr.ecr.us-east-1.amazonaws.com/translator-rtx-arax" DOCKER_REPO_NAME = "translator-rtx-arax" From d1264ac4991904a7e5dc9c6f7ca24bfdc30696e3 Mon Sep 17 00:00:00 2001 From: pahmadi8740 Date: Fri, 17 Mar 2023 09:39:24 -0400 Subject: [PATCH 53/66] fix: trigger removed --- deploy/kg2/Jenkinsfile-test | 3 --- 1 file changed, 3 deletions(-) diff --git a/deploy/kg2/Jenkinsfile-test b/deploy/kg2/Jenkinsfile-test index b4a822f49..82c988791 100644 --- a/deploy/kg2/Jenkinsfile-test +++ b/deploy/kg2/Jenkinsfile-test @@ -11,9 +11,6 @@ pipeline { string(name: 'BUILD_VERSION', defaultValue: '', description: 'The build version to deploy (optional)') string(name: 'AWS_REGION', defaultValue: 'us-east-1', description: 'AWS Region to deploy') } - triggers { - pollSCM('H/5 * * * *') - } environment { IMAGE_NAME = "853771734544.dkr.ecr.us-east-1.amazonaws.com/translator-rtx-kg2" DOCKER_REPO_NAME = "translator-rtx-kg2" From 3f8d772529b243b9ef1b3d6931524f8f63df2508 Mon Sep 17 00:00:00 2001 From: pahmadi8740 Date: Fri, 17 Mar 2023 09:41:16 -0400 Subject: [PATCH 54/66] fix: trigger removed --- deploy/arax/Jenkinsfile-prod | 3 --- deploy/kg2/Jenkinsfile-prod | 3 --- 2 files changed, 6 deletions(-) diff --git a/deploy/arax/Jenkinsfile-prod b/deploy/arax/Jenkinsfile-prod index 4b5ded268..567350480 100644 --- a/deploy/arax/Jenkinsfile-prod +++ b/deploy/arax/Jenkinsfile-prod @@ -11,9 +11,6 @@ pipeline { string(name: 'BUILD_VERSION', defaultValue: '', description: 'The build version to deploy (optional)') string(name: 'AWS_REGION', defaultValue: 'us-east-1', description: 'AWS Region to deploy') } - triggers { - pollSCM('H/5 * * * *') - } environment { IMAGE_NAME = "853771734544.dkr.ecr.us-east-1.amazonaws.com/translator-rtx-arax" DOCKER_REPO_NAME = "translator-rtx-arax" diff --git a/deploy/kg2/Jenkinsfile-prod b/deploy/kg2/Jenkinsfile-prod index 06b52eb7f..da94c2883 100644 --- a/deploy/kg2/Jenkinsfile-prod +++ b/deploy/kg2/Jenkinsfile-prod @@ -11,9 +11,6 @@ pipeline { string(name: 'BUILD_VERSION', defaultValue: '', description: 'The build version to deploy (optional)') string(name: 'AWS_REGION', defaultValue: 'us-east-1', description: 'AWS Region to deploy') } - triggers { - pollSCM('H/5 * * * *') - } environment { IMAGE_NAME = "853771734544.dkr.ecr.us-east-1.amazonaws.com/translator-rtx-kg2" DOCKER_REPO_NAME = "translator-rtx-kg2" From 41143be3fe149c5f2fc100394077c69441195ef2 Mon Sep 17 00:00:00 2001 From: Eric Deutsch Date: Wed, 5 Apr 2023 01:48:10 +0000 Subject: [PATCH 55/66] update first server entry to testing --- .../openapi_server/openapi/openapi.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml b/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml index 86045b994..e35cdef05 100644 --- a/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml +++ b/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml @@ -53,18 +53,15 @@ externalDocs: description: Documentation for the NCATS Biomedical Translator Reasoners web services url: https://github.com/NCATSTranslator/ReasonerAPI servers: -- description: ARAX TRAPI 1.3 endpoint - development - url: https://arax.ncats.io/devED/api/arax/v1.3 - x-maturity: development +- description: ARAX TRAPI 1.3 endpoint - testing + url: https://arax.test.transltr.io/api/arax/v1.3 + x-maturity: testing - description: ARAX TRAPI 1.3 endpoint - production url: https://arax.transltr.io/api/arax/v1.3 x-maturity: production - description: ARAX TRAPI 1.3 endpoint - production url: https://arax.ncats.io/api/arax/v1.3 x-maturity: production -- description: ARAX TRAPI 1.3 endpoint - testing - url: https://arax.test.transltr.io/api/arax/v1.3 - x-maturity: testing - description: ARAX TRAPI 1.3 endpoint - staging url: https://arax.ci.transltr.io/api/arax/v1.3 x-maturity: staging @@ -74,6 +71,9 @@ servers: - description: ARAX TRAPI 1.3 endpoint - development url: https://arax.ncats.io/test/api/arax/v1.3 x-maturity: development +- description: ARAX TRAPI 1.3 endpoint - development + url: https://arax.ncats.io/devED/api/arax/v1.3 + x-maturity: development - description: ARAX TRAPI 1.3 endpoint - development url: https://arax.ncats.io/devLM/api/arax/v1.3 x-maturity: development From 56b8c762a9ede7e83302f5ec1d4c2c53a97bc59e Mon Sep 17 00:00:00 2001 From: Eric Deutsch Date: Wed, 5 Apr 2023 16:23:54 +0000 Subject: [PATCH 56/66] switch config to production --- .../python-flask-server/openapi_server/openapi/openapi.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml b/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml index 681bb5241..93438514e 100644 --- a/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml +++ b/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml @@ -54,15 +54,15 @@ externalDocs: description: Documentation for the NCATS Biomedical Translator Reasoners web services url: https://github.com/NCATSTranslator/ReasonerAPI servers: -- description: ARAX TRAPI 1.3 endpoint - testing - url: https://arax.test.transltr.io/api/arax/v1.3 - x-maturity: testing - description: ARAX TRAPI 1.3 endpoint - production url: https://arax.transltr.io/api/arax/v1.3 x-maturity: production - description: ARAX TRAPI 1.3 endpoint - production url: https://arax.ncats.io/api/arax/v1.3 x-maturity: production +- description: ARAX TRAPI 1.3 endpoint - testing + url: https://arax.test.transltr.io/api/arax/v1.3 + x-maturity: testing - description: ARAX TRAPI 1.3 endpoint - staging url: https://arax.ci.transltr.io/api/arax/v1.3 x-maturity: staging From 382ad80ef84340a31916da1ccef0ea87348627e1 Mon Sep 17 00:00:00 2001 From: Eric Deutsch Date: Thu, 18 May 2023 04:35:23 +0000 Subject: [PATCH 57/66] update to partial TRAPI 1.4 rollout state --- .../openapi_server/openapi/openapi.yaml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml b/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml index 93438514e..54f2de1b7 100644 --- a/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml +++ b/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml @@ -55,29 +55,20 @@ externalDocs: url: https://github.com/NCATSTranslator/ReasonerAPI servers: - description: ARAX TRAPI 1.3 endpoint - production - url: https://arax.transltr.io/api/arax/v1.3 + url: https://arax.ncats.io/api/arax/v1.3 x-maturity: production - description: ARAX TRAPI 1.3 endpoint - production - url: https://arax.ncats.io/api/arax/v1.3 + url: https://arax.transltr.io/api/arax/v1.3 x-maturity: production - description: ARAX TRAPI 1.3 endpoint - testing url: https://arax.test.transltr.io/api/arax/v1.3 x-maturity: testing - description: ARAX TRAPI 1.3 endpoint - staging - url: https://arax.ci.transltr.io/api/arax/v1.3 + url: https://arax.ncats.io/beta/api/arax/v1.3 x-maturity: staging - description: ARAX TRAPI 1.3 endpoint - development url: https://arax.ncats.io/beta/api/arax/v1.3 x-maturity: development -- description: ARAX TRAPI 1.3 endpoint - development - url: https://arax.ncats.io/test/api/arax/v1.3 - x-maturity: development -- description: ARAX TRAPI 1.3 endpoint - development - url: https://arax.ncats.io/devED/api/arax/v1.3 - x-maturity: development -- description: ARAX TRAPI 1.3 endpoint - development - url: https://arax.ncats.io/devLM/api/arax/v1.3 - x-maturity: development tags: - description: Retrieve the meta knowledge graph representation of this TRAPI web service. KPs MUST provide all subject category - predicate - object category triplets From 9e2520406e7dba28479bfe8101e362e058f4edc9 Mon Sep 17 00:00:00 2001 From: Eric Deutsch Date: Thu, 18 May 2023 04:40:44 +0000 Subject: [PATCH 58/66] readjust staging --- .../python-flask-server/KG2/openapi_server/openapi/openapi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml b/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml index 323e7bb99..0a7e5bf83 100644 --- a/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml +++ b/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml @@ -48,7 +48,7 @@ servers: url: https://kg2.test.transltr.io/api/rtxkg2/v1.3 x-maturity: testing - description: RTX-KG2 TRAPI 1.3 endpoint - ITRB staging - url: https://kg2.ci.transltr.io/api/rtxkg2/v1.3 + url: https://arax.ncats.io/api/rtxkg2/v1.3 x-maturity: staging - description: RTX-KG2 TRAPI 1.3 endpoint - development url: https://arax.ncats.io/beta/api/rtxkg2/v1.3 From 38f7715e9bc31169c1d0cdec27ea2c58c8acbd78 Mon Sep 17 00:00:00 2001 From: Eric Deutsch Date: Thu, 1 Jun 2023 11:49:50 -0700 Subject: [PATCH 59/66] remove 1.3 instances --- .../openapi_server/openapi/openapi.yaml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml b/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml index 54f2de1b7..5f108ce86 100644 --- a/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml +++ b/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml @@ -60,15 +60,6 @@ servers: - description: ARAX TRAPI 1.3 endpoint - production url: https://arax.transltr.io/api/arax/v1.3 x-maturity: production -- description: ARAX TRAPI 1.3 endpoint - testing - url: https://arax.test.transltr.io/api/arax/v1.3 - x-maturity: testing -- description: ARAX TRAPI 1.3 endpoint - staging - url: https://arax.ncats.io/beta/api/arax/v1.3 - x-maturity: staging -- description: ARAX TRAPI 1.3 endpoint - development - url: https://arax.ncats.io/beta/api/arax/v1.3 - x-maturity: development tags: - description: Retrieve the meta knowledge graph representation of this TRAPI web service. KPs MUST provide all subject category - predicate - object category triplets From 6c990d9d5520ced43536c500f633713c548f2f17 Mon Sep 17 00:00:00 2001 From: Eric Deutsch Date: Thu, 1 Jun 2023 11:50:35 -0700 Subject: [PATCH 60/66] remove 1.3 instances --- .../KG2/openapi_server/openapi/openapi.yaml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml b/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml index 0a7e5bf83..43ca018aa 100644 --- a/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml +++ b/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml @@ -44,15 +44,6 @@ servers: - description: RTX-KG2 TRAPI 1.3 endpoint - production url: https://arax.ncats.io/api/rtxkg2/v1.3 x-maturity: production -- description: RTX-KG2 TRAPI 1.3 endpoint - ITRB testing - url: https://kg2.test.transltr.io/api/rtxkg2/v1.3 - x-maturity: testing -- description: RTX-KG2 TRAPI 1.3 endpoint - ITRB staging - url: https://arax.ncats.io/api/rtxkg2/v1.3 - x-maturity: staging -- description: RTX-KG2 TRAPI 1.3 endpoint - development - url: https://arax.ncats.io/beta/api/rtxkg2/v1.3 - x-maturity: development tags: - description: Retrieve the meta knowledge graph representation of this TRAPI web service. KPs MUST provide all subject category - predicate - object category triplets From 3010e1ee1544de0dc25b33f20bab243e8810f03c Mon Sep 17 00:00:00 2001 From: Eric Deutsch Date: Wed, 19 Jul 2023 15:52:01 +0000 Subject: [PATCH 61/66] remove conflicts --- .../openapi_server/openapi/openapi.yaml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml b/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml index 806c17a86..5a68312b0 100644 --- a/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml +++ b/code/UI/OpenAPI/python-flask-server/openapi_server/openapi/openapi.yaml @@ -54,7 +54,6 @@ externalDocs: description: Documentation for the NCATS Biomedical Translator Reasoners web services url: https://github.com/NCATSTranslator/ReasonerAPI servers: -<<<<<<< HEAD - description: ARAX TRAPI 1.4 endpoint - production url: https://arax.transltr.io/api/arax/v1.4 x-maturity: production @@ -79,14 +78,6 @@ servers: - description: ARAX TRAPI 1.4 endpoint - development url: https://arax.ncats.io/devLM/api/arax/v1.4 x-maturity: development -======= -- description: ARAX TRAPI 1.3 endpoint - production - url: https://arax.ncats.io/api/arax/v1.3 - x-maturity: production -- description: ARAX TRAPI 1.3 endpoint - production - url: https://arax.transltr.io/api/arax/v1.3 - x-maturity: production ->>>>>>> 6c990d9d5520ced43536c500f633713c548f2f17 tags: - description: Retrieve the meta knowledge graph representation of this TRAPI web service. KPs MUST provide all subject category - predicate - object category triplets From 138237d85d3c631e51ee66c0971814ead5eef3d8 Mon Sep 17 00:00:00 2001 From: edeutsch Date: Wed, 19 Jul 2023 16:04:10 +0000 Subject: [PATCH 62/66] update for all current 1.4 instances --- .../KG2/openapi_server/openapi/openapi.yaml | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml b/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml index a7a4cd6d0..967ed41a5 100644 --- a/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml +++ b/code/UI/OpenAPI/python-flask-server/KG2/openapi_server/openapi/openapi.yaml @@ -38,18 +38,21 @@ externalDocs: description: Documentation for the NCATS Biomedical Translator Reasoners web services url: https://github.com/NCATSTranslator/ReasonerAPI servers: -<<<<<<< HEAD -- description: RTX-KG2 TRAPI 1.4 endpoint - development - url: https://arax.ncats.io/api/rtxkg2/v1.4 - x-maturity: development -======= -- description: RTX-KG2 TRAPI 1.3 endpoint - ITRB production - url: https://kg2.transltr.io/api/rtxkg2/v1.3 +- description: RTX-KG2 TRAPI 1.4 endpoint - ITRB production + url: https://kg2.transltr.io/api/rtxkg2/v1.4 x-maturity: production -- description: RTX-KG2 TRAPI 1.3 endpoint - production - url: https://arax.ncats.io/api/rtxkg2/v1.3 +- description: RTX-KG2 TRAPI 1.4 endpoint - production + url: https://arax.ncats.io/api/rtxkg2/v1.4 x-maturity: production ->>>>>>> 6c990d9d5520ced43536c500f633713c548f2f17 +- description: RTX-KG2 TRAPI 1.4 endpoint - testing + url: https://kg2.test.transltr.io/api/rtxkg2/v1.4 + x-maturity: testing +- description: RTX-KG2 TRAPI 1.4 endpoint - staging + url: https://kg2.ci.transltr.io/api/rtxkg2/v1.4 + x-maturity: staging +- description: RTX-KG2 TRAPI 1.4 endpoint - development + url: https://arax.ncats.io/beta/api/rtxkg2/v1.4 + x-maturity: development tags: - description: Retrieve the meta knowledge graph representation of this TRAPI web service. KPs MUST provide all subject category - predicate - object category triplets From 829bb7e755f19bb4dad7651edab10e10bd026fe6 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Thu, 3 Aug 2023 12:10:16 -0400 Subject: [PATCH 63/66] Update Jenkinsfile-prod --- deploy/arax/Jenkinsfile-prod | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/deploy/arax/Jenkinsfile-prod b/deploy/arax/Jenkinsfile-prod index 567350480..0dbd7f3ce 100644 --- a/deploy/arax/Jenkinsfile-prod +++ b/deploy/arax/Jenkinsfile-prod @@ -46,7 +46,7 @@ pipeline { stage('Build and Push Docker Image') { when { expression { return env.BUILD == 'true' }} environment { - ENV_BUILD_BRANCH= sh (returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim() + ENV_BUILD_BRANCH='production' } steps { script { @@ -81,10 +81,5 @@ pipeline { } } } - stage('Clean Up') { - steps { - cleanWs() - } - } } -} \ No newline at end of file +} From 99ba2c989b3fe660425f78d2f399fd2fa311f08e Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Wed, 11 Oct 2023 18:44:02 -0400 Subject: [PATCH 64/66] Update values.yaml with new resources --- deploy/arax/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/arax/values.yaml b/deploy/arax/values.yaml index 8dd8987a3..25982e614 100644 --- a/deploy/arax/values.yaml +++ b/deploy/arax/values.yaml @@ -73,8 +73,8 @@ affinity: resources: requests: - memory: 50Gi - cpu: 10000m + memory: 48Gi + cpu: 8000m limits: memory: 58Gi cpu: 14000m From c29b57e916dfaae65cc7f12577a889a7ad6a3f25 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Thu, 2 Nov 2023 17:40:49 -0400 Subject: [PATCH 65/66] Update values.yaml with new node group --- deploy/kg2/values.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/deploy/kg2/values.yaml b/deploy/kg2/values.yaml index 53a23797e..d2222545e 100644 --- a/deploy/kg2/values.yaml +++ b/deploy/kg2/values.yaml @@ -1,6 +1,6 @@ # Default values for kg2. -replicaCount: 2 +replicaCount: 1 initContainer: image: @@ -45,7 +45,7 @@ ingress: # toleration to node taint such that this deployment can be scheduled on the tainted node while others without the toleration can not tolerations: - key : "rtx" - value : "kg2" + value : "managed-app" operator : "Equal" effect : "NoSchedule" @@ -59,7 +59,7 @@ affinity: - key: application operator: In values: - - kg2 + - managed-app # this ensures only ONE pod will run on each node podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: @@ -68,7 +68,7 @@ affinity: - key: app.kubernetes.io/name operator: In values: - - kg2 + - managed-app topologyKey: "kubernetes.io/hostname" storageClassName: @@ -80,8 +80,8 @@ storage: resources: requests: - memory: 56Gi - cpu: 13000m + memory: 50Gi + cpu: 10000m limits: memory: 58Gi - cpu: 14000m \ No newline at end of file + cpu: 14000m From 69d79f72755bbcfb26f39126c1d3a40e995213b0 Mon Sep 17 00:00:00 2001 From: Pouyan Ahmadi <70242801+pahmadi8740@users.noreply.github.com> Date: Thu, 2 Nov 2023 17:56:57 -0400 Subject: [PATCH 66/66] Update values.yaml with new resources number --- deploy/kg2/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/kg2/values.yaml b/deploy/kg2/values.yaml index d2222545e..7952dfe51 100644 --- a/deploy/kg2/values.yaml +++ b/deploy/kg2/values.yaml @@ -80,8 +80,8 @@ storage: resources: requests: - memory: 50Gi - cpu: 10000m + memory: 48Gi + cpu: 8000m limits: memory: 58Gi cpu: 14000m