Skip to content

Commit

Permalink
Use a remote config in kuberun (#2781) [ci fast]
Browse files Browse the repository at this point in the history
Signed-off-by: Lehmann-Fabian <fabian.lehmann@informatik.hu-berlin.de>

Co-authored-by: Paolo Di Tommaso <paolo.ditommaso@gmail.com>
  • Loading branch information
Lehmann-Fabian and pditommaso committed Apr 14, 2022
1 parent 78f5c10 commit 5485b69
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,10 @@ the :ref:`k8s-page` section.
+---------------------------+-------------+--------------------------------------------------------------------------------+
| -qs, -queue-size | | Max number of processes that can be executed in parallel by each executor. |
+---------------------------+-------------+--------------------------------------------------------------------------------+
| -remoteConfig | | Add the specified file from the K8s cluster to configuration set. |
+---------------------------+-------------+--------------------------------------------------------------------------------+
| -remoteProfile | | Choose a configuration profile in the remoteConfig. |
+---------------------------+-------------+--------------------------------------------------------------------------------+
| -resume | | Execute the script using the cached results, useful to continue executions that|
| | | was stopped by an error. |
+---------------------------+-------------+--------------------------------------------------------------------------------+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ class CmdKubeRun extends CmdRun {
@Parameter(names = '-head-memory', description = 'Specify amount of memory requested for the Nextflow pod')
String headMemory

@Parameter(names= '-remoteConfig', description = 'Add the specified file from the K8s cluster to configuration set', hidden = true )
List<String> runRemoteConfig

@Parameter(names=['-remoteProfile'], description = 'Choose a configuration profile in the remoteConfig')
String remoteProfile


@Override
String getName() { 'kuberun' }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ class K8sDriverLauncher {
.setProfile(cmd.profile)
.setCmdRun(cmd)

if( !interactive && !pipelineName.startsWith('/') ) {
if( !interactive && !pipelineName.startsWith('/') && !cmd.remoteProfile && !cmd.runRemoteConfig ) {
// -- check and parse project remote config
final pipelineConfig = new AssetManager(pipelineName, cmd) .getConfigFile()
builder.setUserConfigFiles(pipelineConfig)
Expand Down Expand Up @@ -463,6 +463,12 @@ class K8sDriverLauncher {
result << "-params-file $paramsFile"
}

if ( cmd.runRemoteConfig )
cmd.runRemoteConfig.forEach { result << "-config $it" }

if ( cmd.remoteProfile )
result << "-profile ${cmd.remoteProfile}"

if( cmd.process?.executor )
abort('process.executor')

Expand Down

0 comments on commit 5485b69

Please sign in to comment.