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.

Add a preStart hook

See original GitHub issue

This would be similar to postBuild, but would be run at runtime, before execution of the actual notebook. This easily allows things such as:

  1. setting environment variables at runtime
  2. Minor adjustments that can’t be performed at build time
  3. New things we haven’t thought of yet!
  4. Custom parameters for notebooks / other applications

To prevent people from putting too many things here, it should have a default short timeout (5s?) to start.

The requirements for this script should be:

  1. Be marked executable, can be in any language
  2. Receives as parameters arguments to exec that it must perform as a final line to actually start the process we want (we will provide templates for this in various languages)
  3. Not run for more than x seconds.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
choldgrafcommented, Mar 6, 2018

ping on this issue as a few people brought up a use-case @ the binder/jupyterhub talk here in Paris today:

many folks want to decouple the “content” of the repository from the “environment” needed to run that content (e.g. they want to be able to have notebooks live online independently of a Binder repo, and use the repo just to define the environment needed. Then they could update notebooks without needing to re-build the Binder image each time. This could be accomplished with a script such as this one by using gitpull or something like this to pull in content after the server starts.

1reaction
choldgrafcommented, Jul 24, 2018

I think this PR is firmly in the territory of “the project is 👍 on seeing this happen, it’s just a question of somebody having the time to submit a PR!”

Read more comments on GitHub >

github_iconTop Results From Across the Web

add prestart hook support by terinjokes · Pull Request #2044
This changeset adds support for adding prestart hooks to controller-runtime's manager implementation. This hook runs after the manager has ...
Read more >
Container Lifecycle Hooks - Learn Cloud Native
How about the preStart hook? ... The concept of hooks is well-known in the tech world. Events usually trigger hooks, and they allow...
Read more >
Why K8S don't support PreStart Hook - Stack Overflow
And l am actually writing a controller, l want to hijack the pod creation event and insert a command before the main pod...
Read more >
Adding SCCM PreStart media hook to MDT boot media
1. In SCCM console go to Operating system- boot images , Right click and select create a boot image using MDT · 2....
Read more >
Files · add-prestart-hook-to-update-structure · xivo.solutions / docker ...
This is the Git repo of the Docker "Official Image" for postgres (not to be confused with any official postgres image provided by...
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