- Authors: Jones, Matthew (https://orcid.org/0000-0003-0077-4738); Gill, Darian ()
- License: Apache 2
- Package source code on GitHub
- Submit Bugs and feature requests
- Contact us: [email protected]
A Helm chart to build and deploy a Shiny application on the rocker/shiny-verse image.
The chart includes configuration options to modify the overall Shiny configuration through a ConfgMap,
and includes an example app in the app directory which illustrates access to the VegBank API.
VegBank is an open source, community project. We welcome contributions in many forms, including code, graphics, documentation, bug reports, testing, etc.
For the Shiny app to run, it's dependencies must be satisfied by the image that is run. The current Dockerfile provides the dependencies needed for the sample app, installing both apt packages and R packages that are needed.
Build the Docker image with:
docker build -t vbshiny:0.0.1 .
Then publish the image to a public image repository.
In the future, a more extensible approach would be to build the base image, and then use a package DESCRIPTION file or other mechanism to list runtime R dependencies to be installed in the image. This would allow the Shiny image to be reused for a larger set of applications, at the expense of startup time as packages get installed.
Deploy by providing a custom values file and installing with helm:
helm upgrade --install -n <namespace> <release> .
By default, 3 replicas of the shiny deployment are created, each can serve the application to
multiple users. Change the horizontal scale of the application with kubectl scale.
- Shiny is a webapp that opens a persistent websocket to communicate from the browser to
the backend shiny server. Under kubernetes, this web socket will be prematurely closed
unless particular configuration steps are taken, as done in this chart:
- Ensure the proxy headers are set correctly by setting
$connection_upgradeproperly. The default nginx has most of the required proxy headers set correctly, with the small tweak provided in the nginx configuration snippet - Ensure repeated requests from clients are handled by the same pod via setting a session affinity cookie
- Ensure the proxy headers are set correctly by setting
Copyright [2024] [Regents of the University of California]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Work on this package was supported by:
- California Department of Fish and Wildlife
- The ESA Panel on Vegetation Classification
Additional support was provided for collaboration by the National Center for Ecological Analysis and Synthesis, a Center funded by the University of California, Santa Barbara, and the State of California.
