Giter VIP home page Giter VIP logo

shinyproxy's Introduction

Containerized ShinyProxy in a Kubernetes cluster

In this example, ShinyProxy will run inside a Kubernetes cluster. Shiny containers will also be spawned in the same cluster. To make the application accessible outside the cluster, a NodePort service is created.

How to run

  1. Build the docker image for kube-proxy-sidecar first and push it to container registry:

    sudo docker build -t ${registry_name}.azurecr.io/kube-proxy-sidecar:0.1.0 kube-proxy-sidecar/

    sudo docker push ${registry_name}.azurecr.io/kube-proxy-sidecar:0.1.0

  2. Create a new namespace as "shiny" in your kubernetes cluster. We will do deployments, service and authorization in the same namespace.

    kubectl create ns shiny

  3. Go to folder shinyproxy-application and replace ${SecretForDockerRegistry} and ${registry_name} in application.yml with your docker container registry secrets and it's name. On top I created Tom and Jon login users as admin and Guest user as non-admin user

    sudo docker build -t ${registry_name}.azurecr.io/shinyproxy-application:latest shinyproxy-application/ sudo docker push ${registry_name}.azurecr.io/shinyproxy-application:latest

  4. Run the below command to do a deployment which will create the pod having two containers 'shinyproxy-application' and 'kube-proxy-sidecar' in the namespace shiny:

    kubectl create -f sp-deployment.yaml

  5. Run the below command to grant full privileges to the 'default' service account which runs the above pod in namespace shiny:

    kubectl create -f sp-authorization.yaml

  6. Run the below command to expose the shinyproxy service as LoadBalancer which will assign a public ip and make the service available on port 80. If you don't want public ip for the service you can always use type as NodePort with port assign at nodePort (https://github.com/openanalytics/shinyproxy-config-examples/blob/master/03-containerized-kubernetes/sp-service.yaml)ย :

    kubectl create -f sp-service.yaml

  7. Once the service and pod is up and running, you can click on External Endpoints or use kube port-forward pod command

shinyproxy's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.