praiskup / resalloc

Allocator and manager for (expensive) resources
GNU General Public License v2.0
7 stars 7 forks source link

Agent Spawner daemon #125

Closed praiskup closed 11 months ago

praiskup commented 1 year ago

Relates to #123

siteshwar commented 1 year ago

The process of starting a new osh worker is as follows:

The last 3 steps should be done after the hostname is known and probably belong to a separate post_call_take() hook.

praiskup commented 1 year ago

The last 3 steps should be done after the hostname is known and probably belong to a separate post_call_take() hook.

We can have two hooks, but if they can be logically merged - the API would be simpler.

praiskup commented 11 months ago

@siteshwar what do you think about the current variant? It seems to be working with this configuration:

agent_groups:
  osh_workers:
    cmd_prepare: /bin/true
    cmd_terminate: echo noop
    cmd_converge_to: echo 5
    cmd_check_finished: exit $(( RANDOM % 15 ))
    cmd_try_release: exit $(( RANDOM % 5 ))
    tags:
      - kobo_worker

Of course you must be running resalloc server on a normal port, and have some pool defind with kobo_worker tag.