question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dynamic addition of specs post-startup

See original GitHub issue

Firstly, thanks for creating such an awesome platform - this looks like it satisfies almost all of my requirements!

One thing I’m looking for, though, is the ability to dynamically add specs post-startup, so that we don’t have to manually restart the server to add a new app.

I can see that ProxySpecs and ContainerSpecs (upon which ShinyProxy is based) offer support for this using a POST request, but that it is explicitly unsupported in ShinyProxy. Is there a specific reason for this? Is this something that you’d be open to adding?

ProxySpecs and ContainerSpecs may also be provided at runtime, via the body of a POST request. Note: ShinyProxy does not allow specs to be provided at runtime. Only specs from the application.yml file are accepted. Source

My plan is to deploy this on a server and permit specific people within the organisation to register new applications on behalf of their project teams, without me having to take ShinyProxy offline (even for a few seconds) to add a new application. Ideally, this management interface would exist within ShinyProxy, but I’m happy to build my own little dashboard to handle this.

I’m happy to contribute some time toward assisting with the development of this, if required - just wanted to check to see whether there was any specific reason why this is unsupported, and whether you’d be open to having this functionality.

I’ve had a look around at some of the older tickets and have read that one of the concerns with this is that some of the other server configuration cannot be hot-reloaded, but I wonder whether this could be worked around by adding a dynamic_specs attribute to the application.yml file, so that users can choose whether they want to support dynamic specs or manually-defined (but not necessarily both, if that introduces significant complexity from an architectural perspective)?

e.g.

proxy:
  port: 8080
  ...
  dynamic_specs: true
  specs: # Left blank, if `dynamic_specs` is true.

Thanks so much!

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
xtrasimplicitycommented, Oct 21, 2020

Hi @tverbeke, I’ve had a bit more of a read of ShinyProxy Operator and I think I’ve got my head around it.

Whilst it would solve most of my issues, it’d be nice to be able to delegate the addition of new apps to specific users who may otherwise not be familiar with editing config files, etc - or in situations where I don’t want to grant someone SSH access (in any form, no matter how restricted) to the server running ShinyProxy in order to edit the config file.

For this reason, it’d be great to be able to add new apps using the Admin UI.

Theoretically, and without having heavily reviewed the code, it should be as simple as:

  1. Adding the ability to fetch spec definitions from a database (sqlite should be sufficient?), in addition to from the config file.
  2. Updating the admin UI to support registering new spec definitions and storing them in the database.

Would you be open to a Pull-request adding such capabilities?

Thanks!

1reaction
tverbekecommented, Oct 21, 2020

Hi @xtrasimplicity, Thanks a lot for thinking along. We are working on a mechanism to delegate addition of new apps, but in a first stage it will probably be driven by a GitOps approach rather than through a user interface.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Attach Handlers to Container Lifecycle Events - Kubernetes
This page shows how to attach handlers to Container lifecycle events. Kubernetes supports the postStart and preStop events.
Read more >
6.3 Executing actions at container start-up and shutdown - 17哥
You can do this by adding lifecycle hooks to the container. ... hook apiVersion: v1 kind: Pod metadata: name: fortune-poststart #A spec: containers:...
Read more >
WorkbenchAdvisor (Eclipse Platform API Specification) - IBM
... lifecycle (all occur within the dynamic scope of the call to PlatformUI. ... postStartup - called third; after first window is opened;...
Read more >
Delaying application start until sidecar is ready | by Marko Lukša
spec : containers: - name: sidecar image: my-sidecar lifecycle: ... of Kubernetes in Action - http://kubernetes-in-action.com/second-edition.
Read more >
Specification - OpenShift Documentation
This can be used to allow adding an authentication proxy to a ThanosRuler pod or to change the behavior of an operator generated...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found