Git Product home page Git Product logo

squash-bokeh's Introduction

squash-bokeh

The SQuaSH Bokeh serves the squash-bokeh apps, we use the Bokeh plotting library for rich interactive visualizations. You can learn more about SQuaSH at SQR-009.

Build Status

Requirements

squash-bokeh requires the squash-restful-api microservice.

Kubernetes deployment

Assuming you have kubectl configured to access your GCE cluster, you can deploy squash-bokeh using:

TAG=latest make deployment

NOTE: the bokeh apps to be deployed can be configured by setting the following variable:

export SQUASH_BOKEH_APPS="code_changes AMx"

the default is to deploy all the bokeh apps in the /app folder.

Also, it must be consistent with the bokeh apps configured in the squash deployment.

Debugging

You can inspect the deployment using:

kubectl describe deployment squash-bokeh

and view the container logs using:

kubectl logs deployment/squash-bokeh nginx
kubectl logs deployment/squash-bokeh bokeh

Run an interactive shell inside the bokeh container with:

kubectl exec -it <TAB> -c bokeh /bin/bash

Rolling out updates

Check the update history with:

kubectl rollout history deployment squash-bokeh

Modify the squash-bokeh image and then apply the new configuration for the kubernetes deployment:

TAG=latest make build push update

Check the deployment changes:

kubectl describe deployments squash-bokeh

Scaling up the squash-bokeh microservice

Use the kubectl get replicasets command to view the current set of replicas.

kubectl get replicasets

Use the kubectl scale command to scale the squash-bokeh deployment:

kubectl scale deployments squash-bokeh --replicas=3

or change the squash-bokeh-deployment.yaml configuration file and apply the new configuration:

kubectl apply -f squash-bokeh-deployment.yaml

Check the deployment changes:

kubectl describe deployments squash-bokeh
kubectl get pods
kubectl get replicasets

Development workflow

You can install the dependencies and run squash-bokeh locally for development

  1. Install the software dependencies
git clone  https://github.com/lsst-sqre/squash-bokeh.git

cd squash-bokeh

virtualenv env -p python3
source env/bin/activate
pip install -r requirements.txt
  1. Create a new bokeh app
mkdir app/<new app>

you can follow the structrure used in one of the existing apps, e.g. app/monitor.

  1. Run the squash-bokeh app
export SQUASH_API_URL=<squash-api url>  # you can use one of the deployed SQuaSH APIs e.g. export SQUASH_API_URL=http://squash-restful-api-sandbox.lsst.codes/
bokeh serve --log-level debug <path to app 1> [<path to app 2>] # e.g.  bokeh serve --log-level debug app/monitor

when you point to the app directory, the file that is called by the bokeh server is always the main.py.

The app(s) will run at http://localhost:5006.

squash-bokeh's People

Contributors

afausti avatar simonkrughoff avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

simonkrughoff

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.