golemfactory / dapp-runner

GNU Lesser General Public License v3.0
5 stars 6 forks source link

support for multiple instances of a single service #21

Open shadeofblue opened 2 years ago

shadeofblue commented 2 years ago

e.g.

nodes:
  http:
    payload: "nginx"
    entrypoint:
        ...
    network:
      "default"
    http_proxy:
      ports:
        - "80"
    cardinality: 5

vs

nodes:
  http:
    payload: "nginx"
    entrypoint:
        ...
    network:
      "default"
    http_proxy:
      ports:
        - "80"
    parametrize:
      - foo: "val"
        bar: 5
      - foo: "val2"
        bar: 2
shadeofblue commented 2 years ago
nodes:
  http:
    payload: "nginx"
    entrypoint:
        ...
    network:
      "default"
    http_proxy:
      ports:
        - "80"
    ip:
      - "192.168.0.2"
      - "192.168.0.3"
shadeofblue commented 2 years ago

ah, okay, I only now noticed the instances parameter in the GAP examples @stranger80

shadeofblue commented 2 years ago

btw, an additional question: how should the ${services.db-service.network_node.ip} reference look if we wish to support multiple instances of services?

do we assume a single instance in the base form? do we (always?) add an index, e.g. ${services.db-service[0].network_node.ip} ?

@stranger80