Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explore the ability to support dynamic configurations #647

Closed
kevin-bates opened this issue Apr 25, 2019 · 3 comments · Fixed by #748
Closed

Explore the ability to support dynamic configurations #647

kevin-bates opened this issue Apr 25, 2019 · 3 comments · Fixed by #748

Comments

@kevin-bates
Copy link
Member

Use case: As an admin or dev ops engineer, I need the ability to change configuration parameters without restarting Enterprise Gateway.

Because Enterprise Gateway is a true multi-tenant environment, potentially hosting hundreds of users, it would be good to provide the ability to change configuration options without having to restart Enterprise Gateway.

Examples include adjusting the remote-hosts used by the DistributedProcessProxy, updating the unauthorized-users list, adjusting the culling timeout value, adding a kernel to the whitelist, etc.

From this comment:

Via a debugger I found that if I load the configuration after startup (and after making a change), I see the updated value reflected in the member (traitlet) variable. This implies that you could have a PeriodicCallback that simply refreshes the configuration (although this is another case where 'watching' is better). So things like remote-hosts, authorized-users, or whitelists could (in theory) be updated without having to restart EG.

@SolarisYan
Copy link
Contributor

That's a practical feature

@kevin-bates
Copy link
Member Author

I have an implementation ready. I think I'd like to wait a couple days to see how traitlets PR 521 unfolds. If it may take awhile for a release to occur, we can use temporary code that resides in EG.

@kevin-bates
Copy link
Member Author

Update: We should be able to move forward with more "client-side" code once ipython/traitlets#522 is available in a release. This PR enables the ability to reload configuration files and, although not as fully baked in as we'd like (see ipython/traitlets#521), we can have that "driver code" in the application itself.

kevin-bates added a commit to kevin-bates/enterprise_gateway that referenced this issue Nov 12, 2019
This change leverages a recent update to the traitlets library
that exposes an application's loaded configuration files.  When enabled
(via a positive value for `dynamic_config_interval`) it periodically
checks the loaded configuration files for updates (via file modification
times).  If updates are detected, the registered configurables are
updated with the contents of the files.  See documentation for more details.

Fixes jupyter-server#647
kevin-bates added a commit that referenced this issue Jan 2, 2020
This change leverages a recent update to the traitlets library
that exposes an application's loaded configuration files.  When enabled
(via a positive value for `dynamic_config_interval`) it periodically
checks the loaded configuration files for updates (via file modification
times).  If updates are detected, the registered configurables are
updated with the contents of the files.  See documentation for more details.

Fixes #647
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants