agent icon indicating copy to clipboard operation
agent copied to clipboard

thoughts about dev script

Open chiptus opened this issue 5 years ago • 1 comments

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:

  1. separating to different scripts: compile, build_local, build_swarm, run_local, and run_swarm, clean.
  2. 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)
  3. build can get the image name as an argument (with a default)
  4. build_swarm can get a list of IPs to handle bigger swarms (not just manager/node as it is now).
  5. 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
  1. we should probably have a script that runs the whole chain (make swarm make local)

chiptus avatar May 07 '20 09:05 chiptus

Agree with switching to Makefile.

deviantony avatar May 07 '20 22:05 deviantony