This Helm chart can in principle be used to deploy any container image built on top of rocker/rstudio
, but is notably pre-configured for Bioconductor's bioconductor_docker
image.
In order to use this Helm chart, you will need kubectl
(how to install)
and Helm
(how to install) installed.
A packaged version of this chart can be found in the Bioconductor Helm Charts repository.
For all below examples, this helm chart can be deployed from source:
git clone https://github.com/bioconductor/bioconductor-helm
helm install myrelease ./bioconductor-helm/bioconductor
Or from the packaged repository:
helm repo add bioc https://github.com/Bioconductor/helm-charts/raw/devel
helm install myrelease bioc/bioconductor
For more information on helm install
options, see the Helm documentation.
This Helm chart can theoretically be run on any Kubernetes cluster. Below are a few tested example deployments.
Example deployments |
---|
Local minikube |
MS Azure AKS |
Google Kubernetes Engine |
Amazon Web Services' Elastic Kubernetes Service |
Follow the minikube documentation to install minikube for your operating system.
- Start
minikube
cluster
minikube start
- Helm install chart with example configuration file
Note: This configuration notably has RStudio running with no authentication, and no persistence; it is therefore only recommended for transient local installations and development.
helm install mybioc bioconductor-helm/bioconductor -f bioconductor-helm/examples/minikube-vals.yaml
- Check status of pods and wait until it is up and healthy
If this is your first time running the chart, keep in mind that it will take a few minutes for the container images to be pulled and extracted.
# See pods status
kubectl get pods
# See recent events
kubectl get events
# Wait until the deployment is ready
kubectl wait --for=condition=available --timeout=600s deployment/mybioc-bioconductor
- Print
minikube
IP and exposed port
Once the deployment is ready, you can now access RStudio at the minikube IP.
echo $(minikube ip):$(kubectl get -o jsonpath="{.spec.ports[0].nodePort}" services mybioc-bioconductor)
- Access the local IP address and port in a web browser
RStudio should be running at the local IP address and port printed by the command above.
- Delete Helm release
helm delete mybioc
- Stop minikube
minikube stop
This assumes that you have the Azure CLI
installed (how to install), that you are authenticated (how to authenticate), and have proper permissions.
- Start
AKS
cluster
If you prefer to launch the AKS cluster from the web portal, or already have an existing cluster, you can skip to step 2.
az aks create --resource-group mypersonalrg --name my-aks-cluster --node-count 1
- Point the kubeconfig context to the AKS cluster
az aks get-credentials --resource-group mypersonalrg --name my-aks-cluster
- Helm install chart with example configuration file
This configuration notably has RStudio running with a hardcoded password. Since your cluster will be publicly available on the internet, it is recommended you change the password in this file.
This example also uses a 10Gi Azure standard SSD disk for persistence. This solution will not work well with multi-node clusters, as it is a ReadWriteOnce
storage class, but will work on single-node clusters as is the one launched in this example.
helm install mybioc bioconductor-helm/bioconductor -f bioconductor-helm/examples/aks-vals.yaml
- Check status of pods and wait until it is up and healthy
If this is your first time running the chart, keep in mind that it will take a few minutes for the container images to be pulled and extracted.
# See pods status
kubectl get pods
# See recent events
kubectl get events
# Wait until the deployment is ready
kubectl wait --for=condition=available --timeout=600s deployment/mybioc-bioconductor
- Print LoadBalancer IP
Once the deployment is ready, you can now access RStudio at the LoadBalancer IP.
echo $(kubectl get svc mybioc-bioconductor --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")
- Access the public IP address in a web browser
RStudio should be running at the public IP address printed by the command above.
By default, you can login with user rstudio
and the password you provided in the values file.
- Delete Helm release
helm delete mybioc
- Delete the AKS cluster
Note: You will be prompted for confirmation. Also keep in mind that the default
storage class in AKS sets disks to be deleted with their corresponding persistent volumes in AKS, so all your data will be deleted.
az aks delete --resource-group mypersonalrg --name my-aks-cluster
This assumes that you have the Google Cloud SDK
installed (how to install), that you are authenticated (how to authenticate), and have proper permissions.
- Start
GKE
cluster
If you prefer to launch the GKE cluster from the web portal, or already have an existing cluster, you can skip to step 2.
gcloud container clusters create my-gke-cluster --disk-size=100 --num-nodes=1 --machine-type=e2-medium --zone us-east1-b
- Point the kubeconfig context to the GKE cluster (if you launched the cluster in the CLI, the Google Cloud SDK will have already switched the context)
gcloud container clusters get-credentials my-gke-cluster --zone us-east1-b
- Helm install chart with example configuration file
This configuration notably has RStudio running with a hardcoded password. Since your cluster will be publicly available on the internet, it is recommended you change the password in this file.
This example also uses a 10Gi Google standard SSD disk for persistence. This solution will not work well with multi-node clusters, as it is a ReadWriteOnce
storage class, but will work on single-node clusters as is the one launched in this example.
helm install mybioc bioconductor-helm/bioconductor -f bioconductor-helm/examples/gke-vals.yaml
- Check status of pods and wait until it is up and healthy
If this is your first time running the chart, keep in mind that it will take a few minutes for the container images to be pulled and extracted.
# See pods status
kubectl get pods
# See recent events
kubectl get events
# Wait until the deployment is ready
kubectl wait --for=condition=available --timeout=600s deployment/mybioc-bioconductor
- Print LoadBalancer IP
Once the deployment is ready, you can now access RStudio at the LoadBalancer IP.
echo $(kubectl get svc mybioc-bioconductor --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")
- Access the public IP address in a web browser
RStudio should be running at the public IP address printed by the command above.
By default, you can login with user rstudio
and the password you provided in the values file.
- Delete Helm release
helm delete mybioc
- Delete the GKE cluster
Note: You will be prompted for confirmation. Also keep in mind that the default
storage class in GKE sets disks to be deleted with their corresponding persistent volumes in GKE, so all your data will be deleted.
gcloud container clusters delete my-gke-cluster --zone us-east1-b
This assumes that you have eksctl
installed (how to install), and that you have proper IAM permissions.
- Start
EKS
cluster
If you prefer to launch the EKS cluster from the web portal, or already have an existing cluster, you can skip to step 2.
eksctl create cluster --name=my-cluster --nodes=1 --node-volume-size=100
- Point the kubeconfig context to the EKS cluster (if you launched the cluster in the CLI, the context should have been switched by the create command)
eksctl utils write-kubeconfig --cluster=my-cluster
- Helm install chart with example configuration file
This configuration notably has RStudio running with a hardcoded password. Since your cluster will be publicly available on the internet, it is recommended you change the password in this file.
This example also uses a 10Gi Google standard SSD disk for persistence. This solution will not work well with multi-node clusters, as it is a ReadWriteOnce
storage class, but will work on single-node clusters as is the one launched in this example.
helm install mybioc bioconductor-helm/bioconductor -f bioconductor-helm/examples/eks-vals.yaml
- Check status of pods and wait until it is up and healthy
If this is your first time running the chart, keep in mind that it will take a few minutes for the container images to be pulled and extracted.
# See pods status
kubectl get pods
# See recent events
kubectl get events
# Wait until the deployment is ready
kubectl wait --for=condition=available --timeout=600s deployment/mybioc-bioconductor
- Print LoadBalancer IP
Once the deployment is ready, you can now access RStudio at the LoadBalancer IP.
echo $(kubectl get svc mybioc-bioconductor --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")
- Access the public IP address in a web browser
RStudio should be running at the public IP address printed by the command above.
By default, you can login with user rstudio
and the password you provided in the values file.
- Delete Helm release
helm delete mybioc
- Delete the EKS cluster
eksctl delete cluster --name=my-cluster