Skip to content

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

Open
@OisinKyne

Description

@OisinKyne

🚀 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions