Comments (6)
Hi @LEDfan. Thanks a lot for this!
I'm wondering if this is possible to trigger programmatically from the machine shinyproxy is running on and how that works with authenticating as an admin? (I'm using an Auth0 openid setup)
Example use case: I have a scheduled task running on the server that updates the data for a shinyproxy app. Once this process is done I want to trigger the stop delegate proxy API call on the specID of the app as part of the scheduled task without my input... is this possible?
from shinyproxy.
Thanks for opening this issue. We are currently looking for ways to restart the underlying containers. On Kubernetes this can be done by updating the configuration, which will launch a new ShinyProxy, which then takes care of restarting the containers. We are aware using Kubernetes is not possible for all deployments and will provide a way to restart the containers on Docker & Docker swarm.
from shinyproxy.
The containers seem to restart fine, they just don't seem to get recognized by ShinyProxy, but ShinyProxy doesn't launch a new seat. I feel it may be a slightly broader issue. EG what happens when a container fails, for other reasons, R code error DB connection etc. ShinyProxy should at least realize at some point that it had to launch a container from scratch then reload a seat.
This functionality is already available to some degree in Docker. EG it's possible to configure health checks for the containers, so that the web servers can be pinged periodically to determine when they are up.
from shinyproxy.
We just released ShinyProxy 3.1.1 that includes an API endpoint to restart the (physical) containers used by pre-initialization. This endpoint can only be called by admin users. See: https://shinyproxy.io/downloads/swagger/#/ShinyProxy/stopDelegateProxies
Note that this is an asynchronous endpoint, it will immediately respond, and start replacing the containers in the background.
For example, to restart all containers:
curl -X DELETE -u jack:password 'https://k8s.h.ledfan.be/none/admin/delegate-proxy'
or to restart only containers of the 01_hello
spec:
curl -X DELETE -u jack:password 'http://localhost:8080/admin/delegate-proxy?specId=01_hello
If you wish, you can enable the Swagger UI by adding the following configuration:
springdoc:
api-docs:
enabled: true
swagger-ui:
enabled: true
Next, you can go to the http://localhost:8080/swagger-ui/index.html
, scroll to the /admin/delegate-proxy
endpoint, click on Try out
and click on Execute
.
We are planning on integrating this endpoint into the admin panel. The admin panel will then also list all physical containers and how they are being used by users.
Since I believe this should fix your problem, I'm going to close this issue. Nevertheless, feedback is welcome here or in a new issue.
from shinyproxy.
@LEDfan, @PaulC91 my use case is essentially the same. Basically, refresh containers nightly. If I understand correctly this could be done via a crontab either run in a shell script at launch or in another docker container.
I see you have a used localhost. Will this work with internal-networking: true , or do we need to get the network ID?
from shinyproxy.
I've got around to testing this. The changes to pre-initialized containers are substantial. ShinyProxy handles killed/dead containers much more gracefully for sure. Though the rest api doesn't address the need to programmatically restart seats very well, because the admin has to login. There may be a way around that with tokens, I'm not sure, but we aren't using the admin panel at all. I feel like it would be easier just to restart the entire ShinyProxy stack after the data are processed.
from shinyproxy.
Related Issues (20)
- ShinyProxy pod spin up in Kubernetes cannot be drained HOT 3
- ShinyProxy Logos not displayed when using CSS Template (3.1.0) HOT 2
- Multiple ShinyProxy Servers estart HOT 4
- How to use the main address after setting context-path HOT 1
- Invalid Groups-Expression in Web Service
- Invalid Groups-Expression in Web Service HOT 2
- Configuration files inside docker volume HOT 6
- Shinyproxy doesn't shut the containers HOT 1
- Container restart policy
- unable to logout HOT 1
- Container stops intermittently - Disruptive behaviour HOT 4
- grafana dashboard empty but prometheus metrics available HOT 5
- Scrolling Issue with reactable in Shiny Application Deployed on ShinyProxy HOT 1
- "Default" added to thge app name in browser tab HOT 2
- Modular Application Loading Preinitialized Containers
- Uptime/Failure Monitoring
- Reactable elements not loading HOT 2
- Shinyproxy arm issue
- integrating web application sqlpad result as blank page HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shinyproxy.