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

Create a custom entrypoint that allows charon to auto do the dkg or run depending on what files are present #147

Open
OisinKyne opened this issue Jan 11, 2023 · 0 comments

Comments

@OisinKyne
Copy link
Contributor

🚀 Feature Request

Problem to be solved

We want to figure out how to simplify the node creation process for something like dappnode. Right now we have two commands dkg and run. We also have the keymanager simplification as another improvement.

We asked Edu how he works around pre-requisites for container booting in other projects that integrate with dappnode, he said the easiest thing is usually to write a custom entrypoint script that does most of the prep, and then kicks off the normal entrypoint script/command. We might have an attempt at writing something like that to make the dappnode integration easier.

Proposed Solution

Write an entrypoint script that can be used in this repo with a flag override/yaml uncommenting. It should:
Check if a cluster-lock.yml is present where it expects, if so, jump into charon run

If not, it should maybe hit an if statement that runs a charon dkg command followed by a charon run command. This command may need to take values from the STDIN args, or maybe does another way to get the definition-file endpoint etc.

If neither of these if cases hit, we should probably exit with a non zero code.

We quite plausibly might need something like tini, a docker container process manager, to forward Ctrl^C signals from the outside of docker into the charon run that would be kicked off by the entrypoint script such that we can exit properly and not get stuck timing out and hard exiting.

Describe alternatives you've considered

Figuring out dappnode's package framework that allows triggering a docker container creation from a button/form field.

Out of Scope

Acutally doing the dappnode integration, this is a proof of concept one that we could use only in cdvn when we opt in and uncomment something.

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

No branches or pull requests

3 participants