Skip to content

Commit

Permalink
Add MSK database migration documentation (cBioPortal#10115)
Browse files Browse the repository at this point in the history
Co-authored-by: Ino de Bruijn <[email protected]>
  • Loading branch information
2 people authored and jagnathan committed Nov 8, 2023
1 parent 283bfe8 commit 5a3479b
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
70 changes: 70 additions & 0 deletions docs/MSK-Maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# MSK Maintenance (In Progress)
We provide our cBioPortal's maintenance page publicly in the hope that it may be useful to others

## Database Migration
In the database migration process, we are going to have two main steps: building importers and updating database scheme.

### Building Importers
- Codebases:
- [cbioportal](https://github.com/cBioPortal/cbioportal)
- [genome nexus annotation pipeline](https://github.com/genome-nexus/genome-nexus-annotation-pipeline)
- [pipelines](https://github.com/knowledgesystems/pipelines)
- Building single importer:
- Take the cbioportal hash and add it to genome nexus annotation pipeline POM -> push to fork
- Take the cbioportal hash and new genome nexus annotation pipeline hash (from above) and propagate to pipelines POM; also update db version if db migration is part of change
- Login to pipelines server
- Sets general env variables needed for building
- Run `sh /data/portal-con/scripts/automation-environment.sh`
- Specific to cbioportal build, looks for properties and xml files off of $PORTAL_HOME
- Run `export PORTAL_HOME=/data/portal-cron/git-repos/cbioportal`
- Make sure the local cbioportal codebase is on the correct git hash at `/data/portal-cron/git-repos/cbioportal`
- Specify importer to be build
- Copy importer properties to `/data/portal-con-git-repos/cbioportal/src/main/resources` (e.g. triage `/data/portal-cron/git-repos/pipelines-configuration/properties/import-triage/*`)
- Navigate to pipelines folder
- `cd /data/portal-con/git-repos/pipelines`
- Build importer
- mvn clean install -DskipTests
- Build multiple importers
- Take the cbioportal hash and add it to genome nexus annotation pipeline POM -> push to fork
- Take the cbioportal hash and new genome nexus annotation pipeline hash (from above) and propagate to pipelines POM; also update db version if db migration is part of change
- Login to pipelines server
- Sets general env variables needed for building
- Run `sh /data/portal-con/scripts/automation-environment.sh`
- Specific to cbioportal build, looks for properties and xml files off of $PORTAL_HOME
- Run `export PORTAL_HOME=/data/portal-cron/git-repos/cbioportal`
- Make sure the local cbioportal codebase is on the correct git hash at `/data/portal-cron/git-repos/cbioportal`
- Go to build importer jars folder
- `cd /data/portal-cron/git-repo/pipelines-configuration/build-importer-jars`
- (Optional) Remove existing jars
- `rm *.jar`
- Build all importers at once (build all importers except cmo-pipelines)
- `sh buildproductionjars.sh -sd=true -sgp=true -b=importers`
- Available parameters:
- [--cbioportal-git-hash|-cgh=<cbioportal_commit_hash>]
- [--skip-deployment|-sd=<true|false>]
- [--skip-git-pull|-sgp=<true|false>]
- [--build|-b=<build_specifier>], build_specifier should be one of the following
- all (build for all artifacts)
- importers (all importers except cmo-pipelines)
- cmo-pipelines (cmo-pipelines artifacts only)
- triage-cmo-importer
- msk-dmp-importer
- msk-cmo-importer
- public-importer
- genie-aws-importer
- genie-archive-importer
- hgnc-importer

### Updating Database Scheme
Database needs to be updated one by one, we have four main databases: triage, private, genie, and public. Take triage database as an example.
- Migrate one database (e.g. triage)
- SSH into pipeline server
- Checkout to the commit that contains the latest database scheme
- Check if property sets up correctly to the right database (triage)
- `vi /data/portal-con-git-repos/cbioportal/src/main/resources/portal.properties`
- Move to directory
- `cd /data/portal-con-git-repos/cbioportal`
- Run database migration using script:
- `python3 core/src/main/scripts/migrate_db.py --properties-file src/main/resources/portal.properties --sql db-scripts/src/main/resources/migration.sql`
- Monitor the DB migration process and look for possible errors
- Access database and verify the DB scheme is updated
1 change: 1 addition & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
* [Updating your cBioPortal Database Scheme](Updating-your-cBioPortal-installation.md)
* [Update genes and gene aliases](Updating-gene-and-gene_alias-tables.md)
* [Migration Guide](Migration-Guide.md)
* [MSK Maintenance](MSK-Maintenance.md)
* [Development](documentation/docs/README.md)
* [Feature Development Guide](feature-development-guide.md)
* [cBioPortal Entity-relationship Diagram](cBioPortal-ER-Diagram.md)
Expand Down

0 comments on commit 5a3479b

Please sign in to comment.