/minirun

Minimal skeleton scripts and example for simple management of distributed programs.

Primary LanguageShell

How to Use MiniRun Template

The files that need to be configured according to your setup:

  • group_vars/all.yml -- configuration applied to all nodes
  • group_vars/nodes_special.yml -- configuration only applied to special nodes

NOTE: see app/run.yml for all available options passed to the app

  • nodes.ini

    • nodes_setup section: list the distinct machines that are used to host nodes
    • nodes section: list the regular nodes
    • nodes_special section: list the special nodes (you can customize your own)
  • nodes.yml is the yaml version of nodes.ini, not used by default

    NOTE: the same machine could host multiple nodes at the same time, to allow such multi-node hosts, use an unique host_idx= to distinguish them

Then install/setup the required environment on all machines (assuming the ssh info in group_vars/all.yml has sudo permision without password, such as ubuntu user in an AWS instance).

./run.sh setup

Start a run of all nodes named deployment1:

./run.sh new deployment1

Check whether all nodes are up and running:

./run.sh check deployment1

Stop an existing run:

./run.sh stop deployment1

Fetch the outputs generated by the nodes:

./run.sh fetch deployment1

The outputs will be in deployment1/remote

Start the same run again (after stopping it):

./run.sh start deployment1

Reset the run (database, logs and rebuild):

./run.sh reset deployment1