For deploying a pipeline in a cluster environment or a cloud, we need to add some information in the nextflow.config file.
In particular we need to indicate the kind of executor should be used.
In the Nextflow framework architecture, the executor indicates which is the batch-queuing system to use to submit jobs to the HPC or to the cloud.
The executor is completely abstracted, so you can switch from SGE to SLURM just by changing this parameter in the configuration file.
You can group different classes of configuration or profiles within a single nextflow.config file. In this way that you can indicate at run time which executor and resources to use for a pipeline execution.
Let’s inspect the nextflow.config file in test3 folder. We can look at three different profiles:
The first one indicates the resources needed for running the pipeline locally. They are quite small since we have little power and CPUs on the test node.
As you can see we indicate explicitly the local executor. So this will be the default when running the pipeline indicating without specifying a profiles.
The second one is cluster:
This indicates that the system uses Sun Grid Engine as job scheduler and that we have different queues for small jobs and more intensive ones.