mercredi 8 juillet 2020

How to define multiple instances in molecule which differ only in name?

I've got a molecule.yml which looks a bit like this:

dependency:
  name: galaxy
driver:
  name: docker
platforms:
  - name: testohpc-compute-0
    image: docker.io/pycontribs/centos:7
    pre_build_image: true
    groups:
      - testohpc_compute
    command: /sbin/init
    tmpfs:
      - /run
      - /tmp
    volumes:
      - /sys/fs/cgroup:/sys/fs/cgroup:ro
    networks:
      - name: net1

How can I define another instance, say testohpc-compute-2 which is exactly the same except for name? Do I really need to copy all the definition from -1 again?

Furthermore, if there's a way of reusing an instance definition, can I share it between scenarios?

Aucun commentaire:

Enregistrer un commentaire