New modular CRI to submit batch jobs to HPC clusters

Hi all!

We have released our code of a new container runtime interface (CRI) to submit batch jobs to HPC clusters. It is a modulable CRI for kubernetes which manages the pod lifecycle and allows to configure adapters for different container runtimes or resource managers such as SLURM. In addition, it provides multi-CRI for kubernetes, so different CRIs can be configured by setting the RuntimeClass pod attribute.

You can find the code here: https://github.com/atrioinc/multi-cri
We would like to have your feedback, thanks

Many thanks!
Jorge

1 Like

Hi all,
I had to rename our repository :frowning:.
I will be found in https://github.com/atrioinc/multi-cri

Hi @jorgesece I’ve recently came across multi-cri. I have just made an initial browse over the code. I have one big question: the project says that multi-cri is a modular cri. I’m pretty much interested in such a functionality for implementing an experimental cri provider. Now, is that generic part independent of slurm code? It seams that a large proportion of the code is slurm related. Thanks in advance

Hi Pablo!
You can add a new adapter by following the next steps:

  1. Implement a new adapter following the AdapterInterface for your runtime:
    https://github.com/atrioinc/multi-cri/blob/master/pkg/cri/adapters/adapter.go

  2. Add the new adapter class to the load adapter:
    https://github.com/atrioinc/multi-cri/blob/master/pkg/cri/runtime/service.go

    func loadAdapter(adapterName string) (adapters.AdapterInterface, error) {
    if adapterName == “fake” {
    return &FakeAdapter{fails: false}, nil
    } else if adapterName == “slurm” {
    return slurmAdapter.NewSlurmAdapter()
    } else {
    return nil, fmt.Errorf(“Adapter not found”)
    }
    }

I hope this helps you,
Cheers,
Jorge