agent
agent copied to clipboard
thoughts about dev script
building for dev is starting to become cumbersome, need to enable/disable edge, provide edge keys, only running the image, skipping compile.
We introduced a boolean to skip compiling, but it can get messy to start supplying more arguments. Also running just part of the script requires adding more if/else inside the script.
I was thinking about:
- separating to different scripts: compile, build_local, build_swarm, run_local, and run_swarm, clean.
- maybe we can use a make file (I'm more comfortable with npm scripts, but it would be silly to add a dependency on yarn)
- build can get the image name as an argument (with a default)
- build_swarm can get a list of IPs to handle bigger swarms (not just manager/node as it is now).
- run can get a few parameters:
- swarm - a list of IPs
- edge - boolean - true if edge mode is enabled
- edge-id - string - required if edge is true
- edge-key - string
- we should probably have a script that runs the whole chain (
make swarmmake local)
Agree with switching to Makefile.