Create a custom entrypoint that allows charon to auto do the dkg or run
depending on what files are present
#147
Labels
run
depending on what files are present
#147
🚀 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
andrun
. 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 intocharon run
If not, it should maybe hit an if statement that runs a
charon dkg
command followed by acharon 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 thecharon 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.
The text was updated successfully, but these errors were encountered: