Currently, AMoC does not allow telling :amoc_dist setting up a cluster dynamically - nodes are expected to be explicitly listed in the AMOC_NODES environment variable. The :amoc_cluster module and :amoc_dist don't expect clusters to be dynamic, the list of nodes should be static at startup when the :amoc_cluster genserver starts up.
With clusters that are created ad-hoc, and not ahead of time with known node names, it would be useful to allow telling :amoc_dist which nodes to run on and allow :amoc_cluster to enable building a dynamic cluster.
The current workaround that I've found is to run something like this:
# On each node to use as an amoc runner node
:pg.join(:amoc_runner_nodes, self())
# On the master node
runner_nodes = :pg.get_members(:amoc_runner_nodes)
## :amoc_cluster is marked as private and is undocumented
:ok = :amoc_cluster.connect_nodes(runner_nodes)
:amoc_dist.do(scenario, user_count, settings)
Ideally, the API for :amoc_dist would allow us to do something like:
:amoc_dist.do(scenario, user_count, settings, node_list)
which would allow a cluster to be dynamically created.
Currently, AMoC does not allow telling
:amoc_distsetting up a cluster dynamically - nodes are expected to be explicitly listed in theAMOC_NODESenvironment variable. The:amoc_clustermodule and:amoc_distdon't expect clusters to be dynamic, the list of nodes should be static at startup when the:amoc_clustergenserver starts up.With clusters that are created ad-hoc, and not ahead of time with known node names, it would be useful to allow telling
:amoc_distwhich nodes to run on and allow:amoc_clusterto enable building a dynamic cluster.The current workaround that I've found is to run something like this:
Ideally, the API for
:amoc_distwould allow us to do something like:which would allow a cluster to be dynamically created.