cloudos-cli 2.23.0__tar.gz → 2.24.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/PKG-INFO +70 -60
  2. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/README.md +69 -59
  3. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/cloudos_cli/__main__.py +28 -4
  4. cloudos_cli-2.24.0/cloudos_cli/_version.py +1 -0
  5. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/cloudos_cli/jobs/job.py +32 -2
  6. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/cloudos_cli.egg-info/PKG-INFO +70 -60
  7. cloudos_cli-2.23.0/cloudos_cli/_version.py +0 -1
  8. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/LICENSE +0 -0
  9. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/cloudos_cli/__init__.py +0 -0
  10. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/cloudos_cli/clos.py +0 -0
  11. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/cloudos_cli/configure/__init__.py +0 -0
  12. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/cloudos_cli/configure/configure.py +0 -0
  13. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/cloudos_cli/jobs/__init__.py +0 -0
  14. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/cloudos_cli/queue/__init__.py +0 -0
  15. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/cloudos_cli/queue/queue.py +0 -0
  16. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/cloudos_cli/utils/__init__.py +0 -0
  17. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/cloudos_cli/utils/errors.py +0 -0
  18. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/cloudos_cli/utils/requests.py +0 -0
  19. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/cloudos_cli.egg-info/SOURCES.txt +0 -0
  20. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/cloudos_cli.egg-info/dependency_links.txt +0 -0
  21. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/cloudos_cli.egg-info/entry_points.txt +0 -0
  22. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/cloudos_cli.egg-info/requires.txt +0 -0
  23. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/cloudos_cli.egg-info/top_level.txt +0 -0
  24. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/setup.cfg +0 -0
  25. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/setup.py +0 -0
  26. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/tests/__init__.py +0 -0
  27. {cloudos_cli-2.23.0 → cloudos_cli-2.24.0}/tests/functions_for_pytest.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudos_cli
3
- Version: 2.23.0
3
+ Version: 2.24.0
4
4
  Summary: Python package for interacting with CloudOS
5
5
  Home-page: https://github.com/lifebit-ai/cloudos-cli
6
6
  Author: David Piñeyro
@@ -193,65 +193,75 @@ own subcommands with its own `--help`:
193
193
  cloudos job run --help
194
194
  ```
195
195
  ```console
196
- Usage: cloudos job run [OPTIONS]
197
-
198
- Submit a job to CloudOS.
199
-
200
- ╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
201
- │ * --apikey -k TEXT Your CloudOS API key [required]
202
- │ --cloudos-url -c TEXT The CloudOS url you are trying to access to. Default=https://cloudos.lifebit.ai.
203
- * --workspace-id TEXT The specific CloudOS workspace id. [required]
204
- │ * --project-name TEXT The name of a CloudOS project. [required]
205
- │ * --workflow-name TEXT The name of a CloudOS workflow or pipeline. [required]
206
- --job-config TEXT A config file similar to a nextflow.config file, but only with the parameters to
207
- use with your job.
208
- --parameter -p TEXT A single parameter to pass to the job call. It should be in the following form:
209
- parameter_name=parameter_value. E.g.: -p input=s3://path_to_my_file. You can use
210
- this option as many times as parameters you want to include.
211
- --nextflow-profile TEXT A comma separated string indicating the nextflow profile/s to use with your job.
212
- --nextflow-version [22.10.8|24.04.4|22.11.1-edge|latest] Nextflow version to use when executing the workflow in CloudOS. Default=22.10.8.
213
- │ --git-commit TEXT The git commit hash to run for the selected pipeline. If not specified it
214
- defaults to the last commit of the default branch.
215
- │ --git-tag TEXT The tag to run for the selected pipeline. If not specified it defaults to the
216
- last commit of the default branch.
217
- │ --git-branch TEXT The branch to run for the selected pipeline. If not specified it defaults to the
218
- │ last commit of the default branch.
219
- │ --job-name TEXT The name of the job. Default=new_job.
220
- --resumable Whether to make the job able to be resumed or not.
221
- │ --do-not-save-logs Avoids process log saving. If you select this option, your job process logs will
222
- not be stored.
223
- │ --job-queue TEXT Name of the job queue to use with a batch job.
224
- │ --instance-type TEXT The type of execution platform compute instance to use.
225
- Default=c5.xlarge(aws)|Standard_D4as_v4(azure).
226
- --instance-disk INTEGER The amount of disk storage to configure. Default=500.
227
- │ --storage-mode TEXT Either 'lustre' or 'regular'. Indicates if the user wants to select regular or
228
- lustre storage. Default=regular.
229
- --lustre-size INTEGER The lustre storage to be used when --storage-mode=lustre, in GB. It should be
230
- 1200 or a multiple of it. Default=1200.
231
- │ --wait-completion Whether to wait to job completion and report final job status.
232
- --wait-time INTEGER Max time to wait (in seconds) to job completion. Default=3600.
233
- │ --wdl-mainfile TEXT For WDL workflows, which mainFile (.wdl) is configured to use.
234
- --wdl-importsfile TEXT For WDL workflows, which importsFile (.zip) is configured to use.
235
- │ --cromwell-token -t TEXT Specific Cromwell server authentication token. Currently, not necessary as
236
- apikey can be used instead, but maintained for backwards compatibility.
237
- │ --repository-platform TEXT Name of the repository platform of the workflow. Default=github.
238
- │ --execution-platform [aws|azure|hpc] Name of the execution platform implemented in your CloudOS. Default=aws. │
239
- │ --hpc-id TEXT ID of your HPC, only applicable when --execution-platform=hpc.
240
- Default=660fae20f93358ad61e0104b
241
- --cost-limit FLOAT Add a cost limit to your job. Default=30.0 (For no cost limit please use -1).
242
- │ --accelerate-file-staging Enables AWS S3 mountpoint for quicker file staging.
243
- │ --use-private-docker-repository Allows to use private docker repository for running jobs. The Docker user
244
- account has to be already linked to CloudOS.
245
- --verbose Whether to print information messages or not.
246
- │ --request-interval INTEGER Time interval to request (in seconds) the job status. For large jobs is
247
- important to use a high number to make fewer requests so that is not considered
248
- spamming by the API. Default=30.
249
- │ --disable-ssl-verification Disable SSL certificate verification. Please, remember that this option is not
250
- generally recommended for security reasons.
251
- --ssl-cert TEXT Path to your SSL certificate file.
252
- │ --profile TEXT Profile to use from the config file
253
- │ --help Show this message and exit.
254
- ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
196
+ Usage: cloudos job run [OPTIONS]
197
+
198
+ Submit a job to CloudOS.
199
+
200
+ ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
201
+ │ * --apikey -k TEXT Your CloudOS API key [required]
202
+ │ --cloudos-url -c TEXT The CloudOS url you are trying to access to.
203
+ Default=https://cloudos.lifebit.ai.
204
+ │ * --workspace-id TEXT The specific CloudOS workspace id. [required]
205
+ │ * --project-name TEXT The name of a CloudOS project. [required]
206
+ * --workflow-name TEXT The name of a CloudOS workflow or pipeline. [required]
207
+ --job-config TEXT A config file similar to a nextflow.config file, but only with the
208
+ parameters to use with your job.
209
+ --parameter -p TEXT A single parameter to pass to the job call. It should be in the following
210
+ form: parameter_name=parameter_value. E.g.: -p
211
+ input=s3://path_to_my_file. You can use this option as many times as
212
+ parameters you want to include.
213
+ │ --nextflow-profile TEXT A comma separated string indicating the nextflow profile/s to use with
214
+ your job.
215
+ │ --nextflow-version [22.10.8|24.04.4|22.11.1-edge|latest] Nextflow version to use when executing the workflow in CloudOS.
216
+ Default=22.10.8.
217
+ │ --git-commit TEXT The git commit hash to run for the selected pipeline. If not specified it │
218
+ defaults to the last commit of the default branch.
219
+ │ --git-tag TEXT The tag to run for the selected pipeline. If not specified it defaults to
220
+ the last commit of the default branch.
221
+ │ --git-branch TEXT The branch to run for the selected pipeline. If not specified it defaults
222
+ to the last commit of the default branch.
223
+ │ --job-name TEXT The name of the job. Default=new_job.
224
+ │ --resumable Whether to make the job able to be resumed or not.
225
+ --do-not-save-logs Avoids process log saving. If you select this option, your job process
226
+ logs will not be stored.
227
+ │ --job-queue TEXT Name of the job queue to use with a batch job.
228
+ --instance-type TEXT The type of compute instance to use as master node.
229
+ Default=c5.xlarge(aws)|Standard_D4as_v4(azure).
230
+ --instance-disk INTEGER The disk space of the master node instance, in GB. Default=500.
231
+ │ --storage-mode TEXT Either 'lustre' or 'regular'. Indicates if the user wants to select
232
+ regular or lustre storage. Default=regular.
233
+ │ --lustre-size INTEGER The lustre storage to be used when --storage-mode=lustre, in GB. It
234
+ should be 1200 or a multiple of it. Default=1200.
235
+ │ --wait-completion Whether to wait to job completion and report final job status.
236
+ --wait-time INTEGER Max time to wait (in seconds) to job completion. Default=3600.
237
+ │ --wdl-mainfile TEXT For WDL workflows, which mainFile (.wdl) is configured to use.
238
+ │ --wdl-importsfile TEXT For WDL workflows, which importsFile (.zip) is configured to use. │
239
+ │ --cromwell-token -t TEXT Specific Cromwell server authentication token. Currently, not necessary
240
+ as apikey can be used instead, but maintained for backwards
241
+ compatibility.
242
+ │ --repository-platform TEXT Name of the repository platform of the workflow. Default=github.
243
+ │ --execution-platform [aws|azure|hpc] Name of the execution platform implemented in your CloudOS. Default=aws.
244
+ --hpc-id TEXT ID of your HPC, only applicable when --execution-platform=hpc.
245
+ Default=660fae20f93358ad61e0104b
246
+ │ --azure-worker-instance-type TEXT The worker node instance type to be used in azure.
247
+ Default=Standard_D4as_v4
248
+ --azure-worker-instance-disk INTEGER The disk size in GB for the worker node to be used in azure. Default=100
249
+ │ --azure-worker-instance-spot Whether the azure worker nodes have to be spot instances or not.
250
+ --cost-limit FLOAT Add a cost limit to your job. Default=30.0 (For no cost limit please use
251
+ -1).
252
+ │ --accelerate-file-staging Enables AWS S3 mountpoint for quicker file staging.
253
+ │ --use-private-docker-repository Allows to use private docker repository for running jobs. The Docker user
254
+ │ account has to be already linked to CloudOS. │
255
+ │ --verbose Whether to print information messages or not. │
256
+ │ --request-interval INTEGER Time interval to request (in seconds) the job status. For large jobs is │
257
+ │ important to use a high number to make fewer requests so that is not │
258
+ │ considered spamming by the API. Default=30. │
259
+ │ --disable-ssl-verification Disable SSL certificate verification. Please, remember that this option │
260
+ │ is not generally recommended for security reasons. │
261
+ │ --ssl-cert TEXT Path to your SSL certificate file. │
262
+ │ --profile TEXT Profile to use from the config file │
263
+ │ --help Show this message and exit. │
264
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
255
265
  ```
256
266
 
257
267
  #### Send a job to CloudOS
@@ -158,65 +158,75 @@ own subcommands with its own `--help`:
158
158
  cloudos job run --help
159
159
  ```
160
160
  ```console
161
- Usage: cloudos job run [OPTIONS]
162
-
163
- Submit a job to CloudOS.
164
-
165
- ╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
166
- │ * --apikey -k TEXT Your CloudOS API key [required]
167
- │ --cloudos-url -c TEXT The CloudOS url you are trying to access to. Default=https://cloudos.lifebit.ai.
168
- * --workspace-id TEXT The specific CloudOS workspace id. [required]
169
- │ * --project-name TEXT The name of a CloudOS project. [required]
170
- │ * --workflow-name TEXT The name of a CloudOS workflow or pipeline. [required]
171
- --job-config TEXT A config file similar to a nextflow.config file, but only with the parameters to
172
- use with your job.
173
- --parameter -p TEXT A single parameter to pass to the job call. It should be in the following form:
174
- parameter_name=parameter_value. E.g.: -p input=s3://path_to_my_file. You can use
175
- this option as many times as parameters you want to include.
176
- --nextflow-profile TEXT A comma separated string indicating the nextflow profile/s to use with your job.
177
- --nextflow-version [22.10.8|24.04.4|22.11.1-edge|latest] Nextflow version to use when executing the workflow in CloudOS. Default=22.10.8.
178
- │ --git-commit TEXT The git commit hash to run for the selected pipeline. If not specified it
179
- defaults to the last commit of the default branch.
180
- │ --git-tag TEXT The tag to run for the selected pipeline. If not specified it defaults to the
181
- last commit of the default branch.
182
- │ --git-branch TEXT The branch to run for the selected pipeline. If not specified it defaults to the
183
- │ last commit of the default branch.
184
- │ --job-name TEXT The name of the job. Default=new_job.
185
- --resumable Whether to make the job able to be resumed or not.
186
- │ --do-not-save-logs Avoids process log saving. If you select this option, your job process logs will
187
- not be stored.
188
- │ --job-queue TEXT Name of the job queue to use with a batch job.
189
- │ --instance-type TEXT The type of execution platform compute instance to use.
190
- Default=c5.xlarge(aws)|Standard_D4as_v4(azure).
191
- --instance-disk INTEGER The amount of disk storage to configure. Default=500.
192
- │ --storage-mode TEXT Either 'lustre' or 'regular'. Indicates if the user wants to select regular or
193
- lustre storage. Default=regular.
194
- --lustre-size INTEGER The lustre storage to be used when --storage-mode=lustre, in GB. It should be
195
- 1200 or a multiple of it. Default=1200.
196
- │ --wait-completion Whether to wait to job completion and report final job status.
197
- --wait-time INTEGER Max time to wait (in seconds) to job completion. Default=3600.
198
- │ --wdl-mainfile TEXT For WDL workflows, which mainFile (.wdl) is configured to use.
199
- --wdl-importsfile TEXT For WDL workflows, which importsFile (.zip) is configured to use.
200
- │ --cromwell-token -t TEXT Specific Cromwell server authentication token. Currently, not necessary as
201
- apikey can be used instead, but maintained for backwards compatibility.
202
- │ --repository-platform TEXT Name of the repository platform of the workflow. Default=github.
203
- │ --execution-platform [aws|azure|hpc] Name of the execution platform implemented in your CloudOS. Default=aws. │
204
- │ --hpc-id TEXT ID of your HPC, only applicable when --execution-platform=hpc.
205
- Default=660fae20f93358ad61e0104b
206
- --cost-limit FLOAT Add a cost limit to your job. Default=30.0 (For no cost limit please use -1).
207
- │ --accelerate-file-staging Enables AWS S3 mountpoint for quicker file staging.
208
- │ --use-private-docker-repository Allows to use private docker repository for running jobs. The Docker user
209
- account has to be already linked to CloudOS.
210
- --verbose Whether to print information messages or not.
211
- │ --request-interval INTEGER Time interval to request (in seconds) the job status. For large jobs is
212
- important to use a high number to make fewer requests so that is not considered
213
- spamming by the API. Default=30.
214
- │ --disable-ssl-verification Disable SSL certificate verification. Please, remember that this option is not
215
- generally recommended for security reasons.
216
- --ssl-cert TEXT Path to your SSL certificate file.
217
- │ --profile TEXT Profile to use from the config file
218
- │ --help Show this message and exit.
219
- ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
161
+ Usage: cloudos job run [OPTIONS]
162
+
163
+ Submit a job to CloudOS.
164
+
165
+ ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
166
+ │ * --apikey -k TEXT Your CloudOS API key [required]
167
+ │ --cloudos-url -c TEXT The CloudOS url you are trying to access to.
168
+ Default=https://cloudos.lifebit.ai.
169
+ │ * --workspace-id TEXT The specific CloudOS workspace id. [required]
170
+ │ * --project-name TEXT The name of a CloudOS project. [required]
171
+ * --workflow-name TEXT The name of a CloudOS workflow or pipeline. [required]
172
+ --job-config TEXT A config file similar to a nextflow.config file, but only with the
173
+ parameters to use with your job.
174
+ --parameter -p TEXT A single parameter to pass to the job call. It should be in the following
175
+ form: parameter_name=parameter_value. E.g.: -p
176
+ input=s3://path_to_my_file. You can use this option as many times as
177
+ parameters you want to include.
178
+ │ --nextflow-profile TEXT A comma separated string indicating the nextflow profile/s to use with
179
+ your job.
180
+ │ --nextflow-version [22.10.8|24.04.4|22.11.1-edge|latest] Nextflow version to use when executing the workflow in CloudOS.
181
+ Default=22.10.8.
182
+ │ --git-commit TEXT The git commit hash to run for the selected pipeline. If not specified it │
183
+ defaults to the last commit of the default branch.
184
+ │ --git-tag TEXT The tag to run for the selected pipeline. If not specified it defaults to
185
+ the last commit of the default branch.
186
+ │ --git-branch TEXT The branch to run for the selected pipeline. If not specified it defaults
187
+ to the last commit of the default branch.
188
+ │ --job-name TEXT The name of the job. Default=new_job.
189
+ │ --resumable Whether to make the job able to be resumed or not.
190
+ --do-not-save-logs Avoids process log saving. If you select this option, your job process
191
+ logs will not be stored.
192
+ │ --job-queue TEXT Name of the job queue to use with a batch job.
193
+ --instance-type TEXT The type of compute instance to use as master node.
194
+ Default=c5.xlarge(aws)|Standard_D4as_v4(azure).
195
+ --instance-disk INTEGER The disk space of the master node instance, in GB. Default=500.
196
+ │ --storage-mode TEXT Either 'lustre' or 'regular'. Indicates if the user wants to select
197
+ regular or lustre storage. Default=regular.
198
+ │ --lustre-size INTEGER The lustre storage to be used when --storage-mode=lustre, in GB. It
199
+ should be 1200 or a multiple of it. Default=1200.
200
+ │ --wait-completion Whether to wait to job completion and report final job status.
201
+ --wait-time INTEGER Max time to wait (in seconds) to job completion. Default=3600.
202
+ │ --wdl-mainfile TEXT For WDL workflows, which mainFile (.wdl) is configured to use.
203
+ │ --wdl-importsfile TEXT For WDL workflows, which importsFile (.zip) is configured to use. │
204
+ │ --cromwell-token -t TEXT Specific Cromwell server authentication token. Currently, not necessary
205
+ as apikey can be used instead, but maintained for backwards
206
+ compatibility.
207
+ │ --repository-platform TEXT Name of the repository platform of the workflow. Default=github.
208
+ │ --execution-platform [aws|azure|hpc] Name of the execution platform implemented in your CloudOS. Default=aws.
209
+ --hpc-id TEXT ID of your HPC, only applicable when --execution-platform=hpc.
210
+ Default=660fae20f93358ad61e0104b
211
+ │ --azure-worker-instance-type TEXT The worker node instance type to be used in azure.
212
+ Default=Standard_D4as_v4
213
+ --azure-worker-instance-disk INTEGER The disk size in GB for the worker node to be used in azure. Default=100
214
+ │ --azure-worker-instance-spot Whether the azure worker nodes have to be spot instances or not.
215
+ --cost-limit FLOAT Add a cost limit to your job. Default=30.0 (For no cost limit please use
216
+ -1).
217
+ │ --accelerate-file-staging Enables AWS S3 mountpoint for quicker file staging.
218
+ │ --use-private-docker-repository Allows to use private docker repository for running jobs. The Docker user
219
+ │ account has to be already linked to CloudOS. │
220
+ │ --verbose Whether to print information messages or not. │
221
+ │ --request-interval INTEGER Time interval to request (in seconds) the job status. For large jobs is │
222
+ │ important to use a high number to make fewer requests so that is not │
223
+ │ considered spamming by the API. Default=30. │
224
+ │ --disable-ssl-verification Disable SSL certificate verification. Please, remember that this option │
225
+ │ is not generally recommended for security reasons. │
226
+ │ --ssl-cert TEXT Path to your SSL certificate file. │
227
+ │ --profile TEXT Profile to use from the config file │
228
+ │ --help Show this message and exit. │
229
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
220
230
  ```
221
231
 
222
232
  #### Send a job to CloudOS
@@ -266,11 +266,11 @@ def configure(ctx, profile, make_default):
266
266
  @click.option('--job-queue',
267
267
  help='Name of the job queue to use with a batch job.')
268
268
  @click.option('--instance-type',
269
- help=('The type of execution platform compute instance to use. ' +
269
+ help=('The type of compute instance to use as master node. ' +
270
270
  'Default=c5.xlarge(aws)|Standard_D4as_v4(azure).'),
271
271
  default='NONE_SELECTED')
272
272
  @click.option('--instance-disk',
273
- help='The amount of disk storage to configure. Default=500.',
273
+ help='The disk space of the master node instance, in GB. Default=500.',
274
274
  type=int,
275
275
  default=500)
276
276
  @click.option('--storage-mode',
@@ -309,6 +309,17 @@ def configure(ctx, profile, make_default):
309
309
  help=('ID of your HPC, only applicable when --execution-platform=hpc. ' +
310
310
  'Default=660fae20f93358ad61e0104b'),
311
311
  default='660fae20f93358ad61e0104b')
312
+ @click.option('--azure-worker-instance-type',
313
+ help=('The worker node instance type to be used in azure. ' +
314
+ 'Default=Standard_D4as_v4'),
315
+ default='Standard_D4as_v4')
316
+ @click.option('--azure-worker-instance-disk',
317
+ help='The disk size in GB for the worker node to be used in azure. Default=100',
318
+ type=int,
319
+ default=100)
320
+ @click.option('--azure-worker-instance-spot',
321
+ help='Whether the azure worker nodes have to be spot instances or not.',
322
+ is_flag=True)
312
323
  @click.option('--cost-limit',
313
324
  help='Add a cost limit to your job. Default=30.0 (For no cost limit please use -1).',
314
325
  type=float,
@@ -366,6 +377,9 @@ def run(ctx,
366
377
  repository_platform,
367
378
  execution_platform,
368
379
  hpc_id,
380
+ azure_worker_instance_type,
381
+ azure_worker_instance_disk,
382
+ azure_worker_instance_spot,
369
383
  cost_limit,
370
384
  accelerate_file_staging,
371
385
  use_private_docker_repository,
@@ -508,6 +522,12 @@ def run(ctx,
508
522
  'is a CloudOS module. CloudOS modules only work with ' +
509
523
  'Nextflow version 22.10.8. Switching to use 22.10.8')
510
524
  nextflow_version = '22.10.8'
525
+ if execution_platform == 'azure':
526
+ print(f'[Message] The selected worflow \'{workflow_name}\' ' +
527
+ 'is a CloudOS module. For these workflows, worker nodes '+
528
+ 'are managed internally. For this reason, the options '+
529
+ 'azure-worker-instance-type, azure-worker-instance-disk and '+
530
+ 'azure-worker-instance-spot are not taking effect.')
511
531
  else:
512
532
  queue = Queue(cloudos_url=cloudos_url, apikey=apikey, cromwell_token=cromwell_token,
513
533
  workspace_id=workspace_id, verify=verify_ssl)
@@ -563,6 +583,7 @@ def run(ctx,
563
583
  print(f'\tNextflow version: {nextflow_version}')
564
584
  j_id = j.send_job(job_config=job_config,
565
585
  parameter=parameter,
586
+ is_module =is_module,
566
587
  git_commit=git_commit,
567
588
  git_tag=git_tag,
568
589
  git_branch=git_branch,
@@ -581,6 +602,9 @@ def run(ctx,
581
602
  hpc_id=hpc_id,
582
603
  workflow_type=workflow_type,
583
604
  cromwell_id=cromwell_id,
605
+ azure_worker_instance_type=azure_worker_instance_type,
606
+ azure_worker_instance_disk=azure_worker_instance_disk,
607
+ azure_worker_instance_spot=azure_worker_instance_spot,
584
608
  cost_limit=cost_limit,
585
609
  use_mountpoints=use_mountpoints,
586
610
  docker_login=docker_login,
@@ -1611,11 +1635,11 @@ def remove_profile(ctx, profile):
1611
1635
  @click.option('--job-queue',
1612
1636
  help='Name of the job queue to use with a batch job.')
1613
1637
  @click.option('--instance-type',
1614
- help=('The type of execution platform compute instance to use. ' +
1638
+ help=('The type of compute instance to use as master node. ' +
1615
1639
  'Default=c5.xlarge(aws)|Standard_D4as_v4(azure).'),
1616
1640
  default='NONE_SELECTED')
1617
1641
  @click.option('--instance-disk',
1618
- help='The amount of disk storage to configure. Default=500.',
1642
+ help='The disk space of the master node instance, in GB. Default=500.',
1619
1643
  type=int,
1620
1644
  default=500)
1621
1645
  @click.option('--cpus',
@@ -0,0 +1 @@
1
+ __version__ = '2.24.0'
@@ -174,6 +174,7 @@ class Job(Cloudos):
174
174
  def convert_nextflow_to_json(self,
175
175
  job_config,
176
176
  parameter,
177
+ is_module,
177
178
  example_parameters,
178
179
  git_commit,
179
180
  git_tag,
@@ -195,6 +196,9 @@ class Job(Cloudos):
195
196
  hpc_id,
196
197
  workflow_type,
197
198
  cromwell_id,
199
+ azure_worker_instance_type,
200
+ azure_worker_instance_disk,
201
+ azure_worker_instance_spot,
198
202
  cost_limit,
199
203
  use_mountpoints,
200
204
  docker_login,
@@ -245,7 +249,7 @@ class Job(Cloudos):
245
249
  instance_type : string
246
250
  Name of the instance type to be used for the job master node, for example for AWS EC2 c5.xlarge
247
251
  instance_disk : int
248
- The disk space of the instance, in GB.
252
+ The disk space of the master node instance, in GB.
249
253
  storage_mode : string
250
254
  Either 'lustre' or 'regular'. Indicates if the user wants to select regular
251
255
  or lustre storage.
@@ -260,6 +264,12 @@ class Job(Cloudos):
260
264
  The type of workflow to run. It could be 'nextflow', 'wdl' or 'docker'.
261
265
  cromwell_id : str
262
266
  Cromwell server ID.
267
+ azure_worker_instance_type: str
268
+ The worker node instance type to be used in azure.
269
+ azure_worker_instance_disk: int
270
+ The disk size in GB for the worker node to be used in azure.
271
+ azure_worker_instance_spot: bool
272
+ Whether the azure worker nodes have to be spot instances or not.
263
273
  cost_limit : float
264
274
  Job cost limit. -1 means no cost limit.
265
275
  use_mountpoints : bool
@@ -422,6 +432,12 @@ class Job(Cloudos):
422
432
  "enabled": batch,
423
433
  "jobQueue": job_queue_id
424
434
  }
435
+ if execution_platform == 'azure' and not is_module:
436
+ params['azureBatch'] = {
437
+ "vmType": azure_worker_instance_type,
438
+ "spot": azure_worker_instance_spot,
439
+ "diskSizeInGb": azure_worker_instance_disk
440
+ }
425
441
  if workflow_type == 'docker':
426
442
  params['command'] = command
427
443
  params["resourceRequirements"] = {
@@ -449,6 +465,7 @@ class Job(Cloudos):
449
465
  def send_job(self,
450
466
  job_config=None,
451
467
  parameter=(),
468
+ is_module=False,
452
469
  example_parameters=[],
453
470
  git_commit=None,
454
471
  git_tag=None,
@@ -468,6 +485,9 @@ class Job(Cloudos):
468
485
  hpc_id=None,
469
486
  workflow_type='nextflow',
470
487
  cromwell_id=None,
488
+ azure_worker_instance_type='Standard_D4as_v4',
489
+ azure_worker_instance_disk=100,
490
+ azure_worker_instance_spot=False,
471
491
  cost_limit=30.0,
472
492
  use_mountpoints=False,
473
493
  docker_login=False,
@@ -515,7 +535,7 @@ class Job(Cloudos):
515
535
  instance_type : string
516
536
  Name of the instance type to be used for the job master node, for example for AWS EC2 c5.xlarge
517
537
  instance_disk : int
518
- The disk space of the instance, in GB.
538
+ The disk space of the master node instance, in GB.
519
539
  storage_mode : string
520
540
  Either 'lustre' or 'regular'. Indicates if the user wants to select regular
521
541
  or lustre storage.
@@ -530,6 +550,12 @@ class Job(Cloudos):
530
550
  The type of workflow to run. It could be 'nextflow', 'wdl' or 'docker'.
531
551
  cromwell_id : str
532
552
  Cromwell server ID.
553
+ azure_worker_instance_type: str
554
+ The worker node instance type to be used in azure.
555
+ azure_worker_instance_disk: int
556
+ The disk size in GB for the worker node to be used in azure.
557
+ azure_worker_instance_spot: bool
558
+ Whether the azure worker nodes have to be spot instances or not.
533
559
  cost_limit : float
534
560
  Job cost limit. -1 means no cost limit.
535
561
  use_mountpoints : bool
@@ -564,6 +590,7 @@ class Job(Cloudos):
564
590
  }
565
591
  params = self.convert_nextflow_to_json(job_config,
566
592
  parameter,
593
+ is_module,
567
594
  example_parameters,
568
595
  git_commit,
569
596
  git_tag,
@@ -585,6 +612,9 @@ class Job(Cloudos):
585
612
  hpc_id,
586
613
  workflow_type,
587
614
  cromwell_id,
615
+ azure_worker_instance_type,
616
+ azure_worker_instance_disk,
617
+ azure_worker_instance_spot,
588
618
  cost_limit,
589
619
  use_mountpoints,
590
620
  docker_login,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudos_cli
3
- Version: 2.23.0
3
+ Version: 2.24.0
4
4
  Summary: Python package for interacting with CloudOS
5
5
  Home-page: https://github.com/lifebit-ai/cloudos-cli
6
6
  Author: David Piñeyro
@@ -193,65 +193,75 @@ own subcommands with its own `--help`:
193
193
  cloudos job run --help
194
194
  ```
195
195
  ```console
196
- Usage: cloudos job run [OPTIONS]
197
-
198
- Submit a job to CloudOS.
199
-
200
- ╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
201
- │ * --apikey -k TEXT Your CloudOS API key [required]
202
- │ --cloudos-url -c TEXT The CloudOS url you are trying to access to. Default=https://cloudos.lifebit.ai.
203
- * --workspace-id TEXT The specific CloudOS workspace id. [required]
204
- │ * --project-name TEXT The name of a CloudOS project. [required]
205
- │ * --workflow-name TEXT The name of a CloudOS workflow or pipeline. [required]
206
- --job-config TEXT A config file similar to a nextflow.config file, but only with the parameters to
207
- use with your job.
208
- --parameter -p TEXT A single parameter to pass to the job call. It should be in the following form:
209
- parameter_name=parameter_value. E.g.: -p input=s3://path_to_my_file. You can use
210
- this option as many times as parameters you want to include.
211
- --nextflow-profile TEXT A comma separated string indicating the nextflow profile/s to use with your job.
212
- --nextflow-version [22.10.8|24.04.4|22.11.1-edge|latest] Nextflow version to use when executing the workflow in CloudOS. Default=22.10.8.
213
- │ --git-commit TEXT The git commit hash to run for the selected pipeline. If not specified it
214
- defaults to the last commit of the default branch.
215
- │ --git-tag TEXT The tag to run for the selected pipeline. If not specified it defaults to the
216
- last commit of the default branch.
217
- │ --git-branch TEXT The branch to run for the selected pipeline. If not specified it defaults to the
218
- │ last commit of the default branch.
219
- │ --job-name TEXT The name of the job. Default=new_job.
220
- --resumable Whether to make the job able to be resumed or not.
221
- │ --do-not-save-logs Avoids process log saving. If you select this option, your job process logs will
222
- not be stored.
223
- │ --job-queue TEXT Name of the job queue to use with a batch job.
224
- │ --instance-type TEXT The type of execution platform compute instance to use.
225
- Default=c5.xlarge(aws)|Standard_D4as_v4(azure).
226
- --instance-disk INTEGER The amount of disk storage to configure. Default=500.
227
- │ --storage-mode TEXT Either 'lustre' or 'regular'. Indicates if the user wants to select regular or
228
- lustre storage. Default=regular.
229
- --lustre-size INTEGER The lustre storage to be used when --storage-mode=lustre, in GB. It should be
230
- 1200 or a multiple of it. Default=1200.
231
- │ --wait-completion Whether to wait to job completion and report final job status.
232
- --wait-time INTEGER Max time to wait (in seconds) to job completion. Default=3600.
233
- │ --wdl-mainfile TEXT For WDL workflows, which mainFile (.wdl) is configured to use.
234
- --wdl-importsfile TEXT For WDL workflows, which importsFile (.zip) is configured to use.
235
- │ --cromwell-token -t TEXT Specific Cromwell server authentication token. Currently, not necessary as
236
- apikey can be used instead, but maintained for backwards compatibility.
237
- │ --repository-platform TEXT Name of the repository platform of the workflow. Default=github.
238
- │ --execution-platform [aws|azure|hpc] Name of the execution platform implemented in your CloudOS. Default=aws. │
239
- │ --hpc-id TEXT ID of your HPC, only applicable when --execution-platform=hpc.
240
- Default=660fae20f93358ad61e0104b
241
- --cost-limit FLOAT Add a cost limit to your job. Default=30.0 (For no cost limit please use -1).
242
- │ --accelerate-file-staging Enables AWS S3 mountpoint for quicker file staging.
243
- │ --use-private-docker-repository Allows to use private docker repository for running jobs. The Docker user
244
- account has to be already linked to CloudOS.
245
- --verbose Whether to print information messages or not.
246
- │ --request-interval INTEGER Time interval to request (in seconds) the job status. For large jobs is
247
- important to use a high number to make fewer requests so that is not considered
248
- spamming by the API. Default=30.
249
- │ --disable-ssl-verification Disable SSL certificate verification. Please, remember that this option is not
250
- generally recommended for security reasons.
251
- --ssl-cert TEXT Path to your SSL certificate file.
252
- │ --profile TEXT Profile to use from the config file
253
- │ --help Show this message and exit.
254
- ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
196
+ Usage: cloudos job run [OPTIONS]
197
+
198
+ Submit a job to CloudOS.
199
+
200
+ ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
201
+ │ * --apikey -k TEXT Your CloudOS API key [required]
202
+ │ --cloudos-url -c TEXT The CloudOS url you are trying to access to.
203
+ Default=https://cloudos.lifebit.ai.
204
+ │ * --workspace-id TEXT The specific CloudOS workspace id. [required]
205
+ │ * --project-name TEXT The name of a CloudOS project. [required]
206
+ * --workflow-name TEXT The name of a CloudOS workflow or pipeline. [required]
207
+ --job-config TEXT A config file similar to a nextflow.config file, but only with the
208
+ parameters to use with your job.
209
+ --parameter -p TEXT A single parameter to pass to the job call. It should be in the following
210
+ form: parameter_name=parameter_value. E.g.: -p
211
+ input=s3://path_to_my_file. You can use this option as many times as
212
+ parameters you want to include.
213
+ │ --nextflow-profile TEXT A comma separated string indicating the nextflow profile/s to use with
214
+ your job.
215
+ │ --nextflow-version [22.10.8|24.04.4|22.11.1-edge|latest] Nextflow version to use when executing the workflow in CloudOS.
216
+ Default=22.10.8.
217
+ │ --git-commit TEXT The git commit hash to run for the selected pipeline. If not specified it │
218
+ defaults to the last commit of the default branch.
219
+ │ --git-tag TEXT The tag to run for the selected pipeline. If not specified it defaults to
220
+ the last commit of the default branch.
221
+ │ --git-branch TEXT The branch to run for the selected pipeline. If not specified it defaults
222
+ to the last commit of the default branch.
223
+ │ --job-name TEXT The name of the job. Default=new_job.
224
+ │ --resumable Whether to make the job able to be resumed or not.
225
+ --do-not-save-logs Avoids process log saving. If you select this option, your job process
226
+ logs will not be stored.
227
+ │ --job-queue TEXT Name of the job queue to use with a batch job.
228
+ --instance-type TEXT The type of compute instance to use as master node.
229
+ Default=c5.xlarge(aws)|Standard_D4as_v4(azure).
230
+ --instance-disk INTEGER The disk space of the master node instance, in GB. Default=500.
231
+ │ --storage-mode TEXT Either 'lustre' or 'regular'. Indicates if the user wants to select
232
+ regular or lustre storage. Default=regular.
233
+ │ --lustre-size INTEGER The lustre storage to be used when --storage-mode=lustre, in GB. It
234
+ should be 1200 or a multiple of it. Default=1200.
235
+ │ --wait-completion Whether to wait to job completion and report final job status.
236
+ --wait-time INTEGER Max time to wait (in seconds) to job completion. Default=3600.
237
+ │ --wdl-mainfile TEXT For WDL workflows, which mainFile (.wdl) is configured to use.
238
+ │ --wdl-importsfile TEXT For WDL workflows, which importsFile (.zip) is configured to use. │
239
+ │ --cromwell-token -t TEXT Specific Cromwell server authentication token. Currently, not necessary
240
+ as apikey can be used instead, but maintained for backwards
241
+ compatibility.
242
+ │ --repository-platform TEXT Name of the repository platform of the workflow. Default=github.
243
+ │ --execution-platform [aws|azure|hpc] Name of the execution platform implemented in your CloudOS. Default=aws.
244
+ --hpc-id TEXT ID of your HPC, only applicable when --execution-platform=hpc.
245
+ Default=660fae20f93358ad61e0104b
246
+ │ --azure-worker-instance-type TEXT The worker node instance type to be used in azure.
247
+ Default=Standard_D4as_v4
248
+ --azure-worker-instance-disk INTEGER The disk size in GB for the worker node to be used in azure. Default=100
249
+ │ --azure-worker-instance-spot Whether the azure worker nodes have to be spot instances or not.
250
+ --cost-limit FLOAT Add a cost limit to your job. Default=30.0 (For no cost limit please use
251
+ -1).
252
+ │ --accelerate-file-staging Enables AWS S3 mountpoint for quicker file staging.
253
+ │ --use-private-docker-repository Allows to use private docker repository for running jobs. The Docker user
254
+ │ account has to be already linked to CloudOS. │
255
+ │ --verbose Whether to print information messages or not. │
256
+ │ --request-interval INTEGER Time interval to request (in seconds) the job status. For large jobs is │
257
+ │ important to use a high number to make fewer requests so that is not │
258
+ │ considered spamming by the API. Default=30. │
259
+ │ --disable-ssl-verification Disable SSL certificate verification. Please, remember that this option │
260
+ │ is not generally recommended for security reasons. │
261
+ │ --ssl-cert TEXT Path to your SSL certificate file. │
262
+ │ --profile TEXT Profile to use from the config file │
263
+ │ --help Show this message and exit. │
264
+ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
255
265
  ```
256
266
 
257
267
  #### Send a job to CloudOS
@@ -1 +0,0 @@
1
- __version__ = '2.23.0'
File without changes
File without changes
File without changes