Skip to content

Commit

Permalink
Merge pull request #11232 from zainasir/helm-docs
Browse files Browse the repository at this point in the history
Add setup guide for Kubernetes deployment
  • Loading branch information
zainasir authored Nov 25, 2024
2 parents 4186384 + 14f99d4 commit aac4871
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,4 @@ Dockerfile.local
security.properties
*.crt
*.key
*~
2 changes: 1 addition & 1 deletion docs/Downloads.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ TCGA Provisional studies often contain many different data types. These are exce

#### Complete cBioPortal database

A MySQL database dump of the complete cbioportal.org database can be found here: http://download.cbioportal.org/mysql-snapshots/public-portal-dump.latest.sql.gz
A MySQL database dump of the complete cbioportal.org database can be found here: https://public-db-dump.assets.cbioportal.org/

#### Seed Database

Expand Down
1 change: 1 addition & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* [Importing the Seed Database](deployment/deploy-without-docker/Import-the-Seed-Database.md)
* [Deploying the Web Application](deployment/deploy-without-docker/Deploying.md)
* [Loading a Sample Study](deployment/deploy-without-docker/Load-Sample-Cancer-Study.md)
* [Deploy on Kubernetes](deployment/kubernetes/README.md)
* [Authorization and Authentication](deployment/authorization-and-authentication/README.md)
* [User Authorization](deployment/authorization-and-authentication/User-Authorization.md)
* [Authenticating Users via SAML](deployment/authorization-and-authentication/Authenticating-Users-via-SAML.md)
Expand Down
4 changes: 3 additions & 1 deletion docs/deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Private instances of cBioPortal are maintained by institutions and companies [ar

An instance can be deployed using Docker **(recommended)** or by building and deploying from source. The source code of cBioPortal is [available](https://github.com/cBioPortal/cbioportal) on GitHub under the terms of [Affero GPL V3](https://www.gnu.org/licenses/agpl-3.0.en.html).

This section contains instructions for both of these paths.
To deploy cBioPortal instance on a Kubernetes cluster, we also provide [official Helm charts](https://artifacthub.io/packages/search?org=cbioportal). You can follow the installation guide [here](./kubernetes/README.md).

This section contains instructions for all of the above paths.

Please note that installing a local version requires system administration skills; for example, installing and configuring Tomcat and MySQL. With limited resources, we cannot provide technical support on system administration.
71 changes: 71 additions & 0 deletions docs/deployment/kubernetes/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Deploy on Kubernetes

## Prerequisites

Official [cBioPortal Helm chart](https://artifacthub.io/packages/search?org=cbioportal) can be used to easily deploy an instance on a Kubernetes cluster. Make sure you meet the following prerequisites before continuing with the usage instructions:

- You have access to a cluster (e.g. Minikube or AWS EKS). We recommend [setting up a Minikube cluster](https://minikube.sigs.k8s.io/docs/start/) on your local machine for development purposes.
- You have installed [Helm](https://helm.sh/docs/intro/install/) on your system.
- You have read and write access to a mysql database server.

## Usage instructions


### Cluster & Database Setup

#### Step 1 - Add cBioPortal label to your cluster

Make sure your cluster is already set up and you have access to a node running on it. Instructions for this can vary, depending on your Kubernetes provider. Once your cluster is active, run the following command to add a label to the node on your cluster.

```
kubectl label nodes <your-node-name> node-group=cbioportal
```

#### Step 2 - Export database access credentials
cBioPortal needs access to a mysql database server hosting cancer study data. As mentioned in the prerequisites, you need access to a mysql database server for this. Instructions for this can vary, depending on your database server provider. Once you have a server available, download MSK's latest database dump [here](https://public-db-dump.assets.cbioportal.org/) and add the data to your database server. Then, continue with the instructions below using your mysql server credentials.

Create a new values file called _values.secret.yaml_ and add your database credential values.
```yaml
container:
env:
- name: DB_USER
value: <your-db-user>
- name: DB_PASSWORD
value: <your-db-password>
- name: DB_CONNECTION_STRING
value: <your-db-connection_string>
```
### Install cBioPortal
Now that your cluster and data sources have been successfully configured, you can install the cBioPortal helm chart.
#### Step 1 - Install Helm Chart
Add repository.
```
helm repo add cbioportal https://cbioportal.github.io/cbioportal-helm/
```

Install chart
```
helm install my-cbioportal cbioportal/cbioportal --version 0.1.6 -f path/to/values.secret.yaml
```

You should see something similar to this, indicating that the installation was successful.
```
NAME: my-cbioportal
LAST DEPLOYED: Thu Nov 14 14:15:18 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
```

#### Step 2 - Access cBioPortal through localhost
Run the following command to port-forward cBioPortal from the cluster to your local network.
```
kubectl port-forward deployment/cbioportal 10000:8080
```

cBioPortal should now be available at localhost on port 10000. Navigate to [http://localhost:10000](http://localhost:10000) in your browser to view it.

0 comments on commit aac4871

Please sign in to comment.