-
Notifications
You must be signed in to change notification settings - Fork 0
KT Sessions
- https://github.com/globaldothealth (Contains all repositories)
- https://github.com/globaldothealth/turnkey-curator-portal (Curator UI server, Curator API server, Data Server)
- https://github.com/globaldothealth/outbreak-viz-template (Used to display map UI and contains the template for any outbreak’s visualization map)
- Each outbreak (Non turnkey curator portal ) seems to have these 2 repo's
- https://github.com/globaldothealth/monkeypox-viz (Visualization for monkey pox map)
- https://github.com/globaldothealth/monkeypox.git (Contains batch jobs code to ingest google spreadsheet data into Mongo DB etc.)
- https://github.com/globaldothealth/terraform (Majority of AWS infrastructure code, minus EKS Fargate scripts)
- https://github.com/globaldothealth/eks-fargate (Used for standing up and updating EKS cluster/pods/ingress setup only; Code updates to EKS pods are handled via GitHub actions separately)
-
https://612888738066.signin.aws.amazon.com/console
- Reach out to current team member to get access
- Login and create new access key and secret for you IAM user.
- https://account.mongodb.com/account/login (Ask one of the existing team member to invite yourself)
- Once logged-in to cloud, Create yourself a DB user with appropriate role. These credentials will be used to access actual mongo DB/collections (If don't have privilege, reach out to existing tem member)
- For export and curator service there are a few deployment user accounts like
curatorservice
andexportservice
. Passwords for these are in EKS Pod's as env vars. - Use Mongo compass or shell to connect to Mongo DB using mongodb+srv://
username
:password
@cluster0.vwhx6.mongodb.net/ (Example for covid19 DB) - NOTE: Other DB's on this cluster will each need their own credential
- https://account.mongodb.com/account/login
- Credentials at - https://my.1password.com/app#/5cu5nkr3nfaxzmcoqnvhfsn24e/AllItems/5cu5nkr3nfaxzmcoqnvhfsn24ekmzylgqpmna25mkokeabyzugru
- Once logged-in to cloud, Create yourself a DB user with appropriate role. These credentials will be used to access actual mongo DB/collections (If don't have privilege, reach out to existing team member)
- Use Mongo compass or shell to connect to Mongo DB using mongodb+srv://
username
:password
@covid19-map-cluster01.sc7u9.mongodb.net/ (Example for covid19 DB) - NOTE: Other DB's on this cluster will each need their own credential
-
Non curator portal related outbreaks like Marburg, Ebola process
- Login to Mongo Cloud
- Create database manually
- To create collections , Run DB.insert() and mongo will create collection
- No automated scripts as yet
-
Curator portal related outbreaks like Covid19
- Login to Mongo Cloud
- Create database manually
- Collections are probably (?) created when BE server is reached for first request
- Scripts in this folder are used to run migrations-
data-serving/scripts/setup-db
- Follow the readme at https://github.com/globaldothealth/turnkey-curator-portal/blob/main/dev/README.md
- Reach out to current team member to get an valid
.env
file - Docker file will setup all services - Curator UI server, Curator API server, Data Server, Mongo Database.
- Note : If we want to retain data from our docker container MongoDB remove
--force-recreate
option from./dev/run_stack.sh
. Without this option every stop and start of docker compose will create fresh MongoDB (which is needed for running E2E tests) - To make yourself admin with all roles
- Run
./dev/make_superuser.sh mpox <YOUR_EMAIL_ADDRESS>
. Note: Our.env
hasMONGO_DB_NAME
andDISEASE_NAME
asmpox
- Prior to this, update
./dev/make_superuser.sh
and addjunior curator
to roles array (if you want it) Note: - Currently the Curator UI server, Curator API server are not used. Its still work-in-progress to help ease the case creations
- For now Google sheets are being used, which are manually converted to xls and uploaded to S3 bucket for visualization. (This statement is true only for recent influenza cases as it was to feasible to setup the entire AWS processes)
- Run
-
Add following to
~/.aws/credentials
file[GLOBAL-HEALTH] aws_access_key_id=<YOUR_KEY> aws_secret_access_key=<YOUR_SECRET> region = eu-central-1
-
Run following commands to add DEV cluster to lens
export AWS_PROFILE=GLOBAL-HEALTH aws eks update-kubeconfig --name gh-dev --alias gh-dev
-
Run following commands to add QA cluster to lens
export AWS_PROFILE=GLOBAL-HEALTH aws eks update-kubeconfig --name gh-qa --alias gh-qa
-
Run following commands to add PROD cluster to lens
export AWS_PROFILE=GLOBAL-HEALTH aws eks update-kubeconfig --name gh-prod --alias gh-prod
- Follow readme at https://github.com/globaldothealth/monkeypox-viz/blob/main/README.md
- nodeJS version appears to be 18 or above
- Reach out to current team member to get an valid
.env
file - Server starts at
http://localhost:3000/
(Make sure port 3000 is not already inuse)
- 24 hour outbreak plan for Curator Portal - https://docs.google.com/document/d/1NvlJlKjk0_QzH61GMZOo-M2X5maQ_blfb8KsKnugqZk/edit?usp=sharing
- Geolocation System for Map Visualization - https://docs.google.com/document/d/1ZbGscCnhZIzaO1IULq2e2Tmc3zYSYswNWE-SoWbBQbg/edit?usp=sharing
- The WordPress site and can be reached at https://global.health/
- This site will have links to all outbreaks such as COVID-19, Mpox, Ebola, Marburg.
- Clicking on
Map
link under each outbreak will redirect to following customized visualization frontend- Example: For monkey pox it will be
https://map.mpox.global.health/
- Example: For monkey pox it will be
- Clicking on
Briefing Report
link under each outbreak will redirect tohttps://www.monkeypox.global.health/
- Get access to Wordpress admin site by reaching out to current team member. URL is https://dev-globalhealth.pantheonsite.io/wp-login.php
-
Same Dev Wordpress site is promoted to Test(QA), validated, and then promoted to live (PROD).
- Dev URL - https://dev-globalhealth.pantheonsite.io/
- Test(QA) URL - https://test-globalhealth.pantheonsite.io/
- PROD URL - https://global.health/
- Is a
nodeJS
(18.18.0)/ReactJS
(17.02) app - For any new outbreak, this template is cloned from repo - https://github.com/globaldothealth/outbreak-viz-template
- Example: For monkey pox we have monkeypox-viz (https://github.com/globaldothealth/monkeypox-viz)
- For
Map
, each outbreak has its own frontend UI hosted on CloudFront and backed by static S3 site using S3 bucket- Example: For monkey pox, CloudFront has alternate domain of
map.mpox.global.health
and S3 bucket ismap.monkeypox.global.health.s3.eu-central-1.amazonaws.com
. This S3 bucket in turn uses overnight, pre-populated data stored in another S3 bucket calledmonkeypox-aggregates
.
- Example: For monkey pox, CloudFront has alternate domain of
- Note: Visualization data is pre-populated by an AWS Batch job that runs nightly(?)
- Sample URL's
- Dev URL - https://dev-map.monkeypox.global.health
- Test(QA) URL -
- PROD URL - https://map.monkeypox.global.health
- For
Briefing Report
, each outbreak has its own frontend UI hosted on CloudFront and backed by static S3 site using S3 bucket- Example: For monkey pox, CloudFront has alternate domain of
www.monkeypox.global.health
and S3 bucket iswww.monkeypox.global.health.s3-website.eu-central-1.amazonaws.com
Repo is https://github.com/globaldothealth/monkeypox-report - Example: For Marburg, Repo is https://github.com/globaldothealth/marburg.git and code base is
/scripts/report
- Example: For monkey pox, CloudFront has alternate domain of
- Briefing report is a entire HTML site generated by job.
- Not every outbreak has briefing report.
-
Marburg Briefing report has folder called
s3_ui
- On the Marburg report page (https://www.marburg.global.health/) there is a link on the top of the page Data (https://l66noa47nk.execute-api.eu-central-1.amazonaws.com/web) which contains this s3_ui (line 24 of scripts/report/index_template.html).
- It is used to show the files in the s3 bucket for marburg outbreak.
- This service runs on AWS Lambda in a Docker container and used API Gateway.
- Similar logic applies to monkey pox
s3_ui
folder.
- Each disease outbreak has its own set of Curator UI/API/Data server/Mongo DB
-
Not every outbreak has curator portal setup (Like mpox, Ebola, Influenza dosen't have it)
- For these outbreaks, Google spreadsheet data is ingested into MongoDB and nightly process creates map data in S3 bucket
- Curator user credentials are managed as collection in MongoDB
- Steps for new outbreak infra creation
- Repo - Global-Health/
terraform
/NEW-PATHOGEN.md
- Repo - Global-Health/
- For outbreaks like covid19, we have following curator URL's
- DEV URL - https://dev-data.covid-19.global.health/
- Test(QA) - https://qa-data.covid-19.global.health/
- PROD URL - https://data.covid-19.global.health/
-
nodeJS/Mongoose data-service
is used.python/pymongo reusable-data-service
is NOT used.
- Is a
Python
app running onFlask
web framework - Run on port
8080
(as mentioned in src/app/main.py); Docker maps3003
to8080
- Accessible at http://localhost:3003/geocode/suggest?q=Addis%20Ababa http://localhost:3003/geocode/admin1?admin0=USA http://localhost:3003/geocode/countryName?c=CR
- Used to map lat/long to a location on earths surface
- Uses
poetry
for package management
-
Is a
nodeJS
(18.18.0)/Express
app -
Runs on port
3001
; Docker maps3001
:3001
-
Accessible at http://localhost:3001/api/cases?page=1&limit=10&count_limit=10000 http://localhost:3001/api/cases/1
-
Used as BE for Curator UI
-
Any API's with
/geocode
are proxied into above "geocoding" python app running at 8080; Docker file has LOCATION_SERVICE_URL: "http://geocoding:8080" -
Any CRUD's are forwarded to "data-serving" layer via DATASERVER_URL: "http://data:3000"
-
turnkey-curator-portal/verification/curator-service/api/src/model - Some of these were used for automated ingestion during Covid. Ticket is created to research what of these are used.
-
AwsBatchClient - Links source created to automated ingestion process (More info 26:00 to 30:00 https://drive.google.com/file/d/1H77Eya-MWvdEzP-KgcIZmEUFL5r00hBj/view?usp=sharing)
-
To run any API
- (1) If you don't have user on the system yet
POST (using postman) to http://localhost:3001/auth/register (Note: no /api here) { "allOf": { "roles": [ "admin" ] }, "name": "John Doe", "email": "foo@bar.com", "googleID": "string" }
This will create a user and from API response get the "apikey" Run any api (using postman/curl) by passing header "apikey" above as X-API-Key
- (2) If you have a user on system
Login to the admin UI at
Note the cookie (
connect.sid
) in Browser -> Application -> Storage Run any api (by setting postman cookie) that we got from above
- Is a
nodeJS(18.18.0)
/Express
app - Runs on port
3002
; Docker maps3002
:3002
-
Pivot tables
menu on Curator UI is make sure uploaded google spreadsheet data matches to what's being imported in MongoDB
-
Contains list of symptoms and occupations that are used to pre-fill UI
-
For example - turnkey-curator-portal/verification/curator-service/ui/src/components/new-case-form-fields/Demographics.tsx uses
optionsLocation="https://raw.githubusercontent.com/globaldothealth/list/main/suggest/occupations.txt"
turnkey-curator-portal/verification/curator-service/ui/src/components/new-case-form-fields/Symptoms.tsx uses
optionsLocation="https://raw.githubusercontent.com/globaldothealth/list/main/suggest/symptoms.txt"
-
Currently these suggestions are used from list repo, but ticket created to use them from turnkey-curator-portal/suggest
- Thin wrapper that allows clients to download curator portal data by country using API KEY
- There's no deployment for this. Code is copied on to clients machine, dependencies are installed followed by actually running the code
- This readme has more detailed information -
turnkey-curator-portal/api/README.md
- Admin
- Curator
- Junior Curator
- All the .env files needed for terraform and EKS Fargate are located at S3 bucket named
terraform-secrets
-
Mostly follow readme located at https://github.com/globaldothealth/eks-fargate/blob/main/README.md
-
Clone the
eks-fargate
repository which contains the Terraform infrastructure code for the clusters -
Download the environment file from
terraform-secrets
S3 bucket and place it in the root of the repository -
Once the upgrade is complete, update the
TF_VAR_k8s_version
variable to match the new version in the console. -
Run the plan script to verify the changes:
./plan.sh $ENV
-
If the changes only affect the node groups, proceed to apply the changes:
./run.sh $ENV
-
If the changes are more extensive, verify them thoroughly before applying.
-
Check the
kube-proxy
image version:kubectl describe daemonset kube-proxy -n kube-system | grep Image
-
If the image version does not match the current Kubernetes version, refer to AWS EKS Documentation for the correct image tag: https://docs.aws.amazon.com/eks/latest/userguide/managing-kube-proxy.html
-
Upgrade the
kube-proxy
image:kubectl set image daemonset.apps/kube-proxy -n kube-system kube-proxy=<AWS_ACCOUNT>.dkr.ecr.eu-central-1.amazonaws.com/eks/kube-proxy:<TAG>
-
Verify the update:
kubectl describe daemonset kube-proxy -n kube-system | grep Image
-
Run the script to restart deployments:
./restart-deployments.sh
-
Ensure all nodes are on the latest EKS version:
kubectl get nodes
-
Provide access to AWS
-
Provide access to repositories
-
Provide
.env
file for curator UI/API -
Provide
.env
file for Visualization UI (for any outbreak) -
Share google document with curator portal and Visualization information
-
Add us to the EKS user groups for QA and PROD clusters (just like we did for DEV cluster)
-
Main WordPress site
- Code is online as it is a WordPress site
- Credentials for WordPress admin site login (https://dev-globalhealth.pantheonsite.io/wp-login.php)
- Is there a separate credential for QA and PROD WordPress site or the same following works - https://dev-globalhealth.pantheonsite.io/wp-login.php
- Is there a DEV and QA version of https://global.health/
-
Go over AWS infrastructure, docker file and deploy of
- Curator UI server
- Curator API server
- Data Server
- Location server
- Is this the DEV curator UI - https://dev-data.covid-19.global.health/ ? We understand each disease outbreak will have its own set of Curator UI/API/Data server/MongoDB?
- Do we have steps documented to deploy code changes to EKS
-
turnkey-curator-portal/data-serving
- What is difference between
nodeJS/Mongoose data-service
VSpython/pymongo reusable-data-service
? Are both used? - Docker file appears to use nodeJS version, But the readme suggest "Any new outbreak that is tracked by Global.health will use the
reusable-data-service
for CRUD operations"
- What is difference between
-
Review Curator UI/API deploy architecture diagram
- Where are Curator user credentials managed (like in AWS Cognito? Or DB?)
-
Review map/briefing report deploy architecture diagram
- For mpox aggregator run.py code, where is it fetching data from google sheets?
- For mpox , where is briefing report generated?
- Briefing Report
- Repo location
- Does Briefing report has all its required content in www.monkeypox.global.health (for monkey pox) or does it also go to some other aggregate S3 bucket?
- Deep dive in this, including scripts, s3 buckets etc.
- Briefing Report
-
Access
- Share Dev/Prod/QA Atlas MongoDB credentials.
- Google Cloud service account (Where Google spreadsheets are stored)
-
Go over current google sheet process - code, AWS s3 bucket, AWS cloud front, batch jobs or manual process to be run
- local influenza
-
turnkey-curator-portal/geocoding
- What is the relevance of geocoding/location-service/data/
adm1_parsed_data.json
,adm2_parsed_data.json
,adm3_parsed_data.json
- Reason for geocoding API's not needing authentication?
- Go over Swagger API's for geocoding
- What is the relevance of geocoding/location-service/data/
-
CSV option on main site functions
- Repo location?
- How does CSV option function
-
How is initial MongoDB created for an outbreak? or where are the scripts that create DB
-
Outbreak visualization template
- AWS Infrastructure
- Docker file
- How are all the various CloudFront's deployed in case of code updates? Manually or via scripts?
- Go over contents of aggregate bucket
-
What is
s3_ui
folder in Marburg?- What are all those lambda's?
-
Go over entire process in case of new outbreak.
-
GitHub Wiki - Add this documentation to GitHub wiki page
-
PR review
-
turnkey-curator-portal/verification/curator-service/api/src/model
- Are Mongoose data models not used anymore (as we have data-serving)? If so, can we delete those from codebase?
-
turnkey-curator-portal/suggest
- what is the purpose, usage and deployment?
-
turnkey-curator-portal/api (Python/R)
- what is the purpose, usage and deployment?
-
Explain more about following and its usage via API calls (
verification/curator-service/api/src/index.ts
)- AwsBatchClient
- AwsLambdaClient
- EmailClient
-
Go over screen details for each of the following.
-
Create GitHub tickets for ToDo items
-
Go over other 2 remaining projects in
scripts
dir - usage, deployment etc. -
DevOps
- Why are Load Balancer target listeners EC2? instead of Fargate nodes
- Due to predefined EC2's as t3-large, Will it limit auto scaling
- Give ourselves role of Admin, curator, junior curator etc.
- Create sample case.
- Setup Lens locally to monitor EKS cluster
- Setup local map visualization repo for any outbreak
- Upgrade DEV, QA, PROD EKS cluster (Initially look at repo for any scripts https://github.com/globaldothealth/eks-fargate )
- Note: Based on discussions - It is OK to have downtime, even for PROD EKS upgrade. Also, We'll do in-place upgrade instead of Blue-green deployment as we don't have much context yet
- WordPress website cannot be setup locally, its all online.
- Go over API that creates cases and dig some more in various aspects of codebase.
- Create Deploy/Architecture diagrams
- GitHub ticket https://github.com/globaldothealth/turnkey-curator-portal/issues/145
-
reusable-data-service
is NOT used. Delete folder https://github.com/globaldothealth/turnkey-curator-portal/tree/main/data-serving/reusable-data-service - Delete unused GitHub actions from https://github.com/globaldothealth/turnkey-curator-portal/tree/main/.github/workflows
- Remove
data-serving/scripts/convert-covid19-data
folder, if not used by turnkey portal
-
- GitHub ticket following https://github.com/globaldothealth/turnkey-curator-portal/issues/146
- Clear clutter from AWS infrastructure by deleting
- Unused Route 53
- Unused S3 buckets
- Unused Batch jobs
- Unused Event Bridge rules
- Unused EKS Pods
- Unused ECR
- Basically tear-down infra that are post 100 days and unused
- Clear clutter from AWS infrastructure by deleting
- Github ticket https://github.com/globaldothealth/turnkey-curator-portal/issues/147
- Research which of these models are used (for automated ingestion) and/or delete entire model folder - turnkey-curator-portal/verification/curator-service/api/src/model
- Github ticket https://github.com/globaldothealth/turnkey-curator-portal/issues/148
- Currently suggestions are used from list repo, but create ticket to use them from turnkey-curator-portal/suggest
- Github ticket https://github.com/globaldothealth/turnkey-curator-portal/issues/149
- Split AWS infrastructure in its own sub accounts for DEV, QA, PROD environment
- Add MFA to AWS account login
- Github ticket https://github.com/globaldothealth/turnkey-curator-portal/issues/150
- Move
ghcr.io
containers toECS
? (So all container images will be in one place)
- Move
- Store relevant information to 1Password