hydra
hydra copied to clipboard
Add tmux bootstraper for hydra demo
This change adds a simple tmux bootstraping command run-hydra-demo to the nix-shell -A demo:
I'm not sure if it is worth a merge - there are some rough edges and maintanance burden:
-
I have not implemented proper awaiting logic so instead of checking
cardano-nodesocket readiness I just wait an arbitrary 1 second before spawninghydra-node's (same goes forhydra-node->hydra-tui) -
I've used
Pythoninstead ofbashso it is another language in the stack (probably a bit better thanBash) -
I can create a small separate public repo which provides this as a separate example - of course it won't be nicely integrated :-(
@ch1bo This is minor somewhat related question. Do you think that we can parameterize ./prepare-devnet.sh so it can be run from different locations (even outside the hydra-poc):
if [ -n "$HYDRA_POC_SRC_DIR" ]; then
BASEDIR="$HYDRA_POC_SRC_DIR";
else
BASEDIR=...
?
Motivation:
We can then use the devnet setup during our devel flow without additional clonning hydra-poc demo but using the appropriate source from /nix/store.
@ch1bo This is minor somewhat related question. Do you think that we can parameterize
./prepare-devnet.shso it can be run from different locations (even outside thehydra-poc):if [ -n "$HYDRA_POC_SRC_DIR" ]; then BASEDIR="$HYDRA_POC_SRC_DIR"; else BASEDIR=...?
Motivation: We can then use the
devnetsetup during our devel flow without additional clonninghydra-pocdemo but using the appropriate source from/nix/store.
The BASEDIR should point to the source tree, wherever it is using the realpath and $0. What are you missing?
After a second thought, I think that I should just copy and create our own local version of bootstraping script for our project setup and treat ./prepare-devnet.sh as internal hydra-poc script. Sorry for spamming.
-
I've changed a bit the structure of the
./seed-devnet.shso I expect both (or none) to be passed as arguments:cardano-cliandhydra-node. If that change could stay then I'm going clean it up and update the docs. -
I've changed the structure of the
run-tmux.pyscript so it is easier to follow and I removed the config layer. -
I've updated the screencast in the first comment so I'm testing in it the latest version.
Manually merged this now.
