All Products
Document Center

Use App

Last Updated: May 11, 2018

The App is a new function released for Batch Compute. It allows you to encapsulate third-party software into an App for other users. App is a template used for resource allocation in Batch Compute, including image descriptions to be used, instance type, the number of VMs, and so on.

This article describes command line tools for Batch Compute, how to support operations such as adding, deleting, modifying, and querying an App, and how to submit an App job.

Add, delete, modify, and query an App

1. View an App

Obtain an App list

  1. bcs a

Obtain an App parameter

  1. bcs a :cromwell # View details
  2. bcs a 1 # Use the serial number to view details.

View App details

Only details about private (self-created) Apps can be viewed. The details include information about running command lines and images used by the software.

  1. bcs a my-app 0 # View details about the 0th version

2. Create a private App

Run the create_app|ca command to create a private App.


  1. bcs create_app|ca <app_name> <cmd> [option]

You can add -h to view the help for bcs ca -h.

Following is the simplest method for creating an App

  1. bcs ca my_app "echo 123" -i img-ubuntu

You can directly use an App description file to submit it:

Firstly, prepare an App description file: ./myapp.json.

  1. {
  2. "Name": "myapp",
  3. "EnvVars": {},
  4. "Description": "",
  5. "CommandLine": "echo 123",
  6. "OutputParameters": {},
  7. "VM": {
  8. "ECSImageId": "img-ubuntu"
  9. },
  10. "Daemonize": false,
  11. "InputParameters": {},
  12. "Config": {
  13. "InstanceCount": {
  14. "Default": 1,
  15. "Description": "",
  16. "Overwritable": true
  17. },
  18. "ResourceType": {
  19. "Default": "OnDemand",
  20. "Description": "",
  21. "Overwritable": true
  22. },
  23. "DiskType": {
  24. "Default": "ephemeral",
  25. "Description": "",
  26. "Overwritable": true
  27. },
  28. "MaxRetryCount": {
  29. "Default": 0,
  30. "Description": "",
  31. "Overwritable": true
  32. },
  33. "Timeout": {
  34. "Default": 86400,
  35. "Description": "",
  36. "Overwritable": true
  37. },
  38. "MinDiskSize": {
  39. "Default": 40,
  40. "Description": "",
  41. "Overwritable": true
  42. },
  43. "InstanceType": {
  44. "Default": "",
  45. "Description": "",
  46. "Overwritable": true
  47. }
  48. }
  49. }

Then, run the following command to submit it:

  1. bcs ca --file myapp.json

You can specify an option to overwrite the configurations in app.json:

  1. bcs ca --file myapp.json -t ecs.s3.large

3. Modify or delete an App

Use the following command to modify and delete an app respectively.

  1. bcs ua -h # Modify description of a custom App.
  2. bcs da -h # Delete description of a custom App.

Use -h to see Help.

Submit an App job

Currently only AutoCluster jobs are supported.

Use the asub command to quickly use the App to submit a job.

  1. bcs asub <app_name> -h # View parameters of a specified App submission job. The parameters are different for each App.

For example: bcs asub cromwell -h

  • Options starting with —input is used to specify input parameters for an App. You can also change it to start with —input-from-file. If the parameter value is a correct local file path, the file is automatically uploaded to the default OSS path.

  • Options starting with —output_ is used to specify output parameters for an App.

Support for the cromwell workflow engine and WDL

BatchCompute provides public App: cromwell to support the workflow of WDL writing.

Use a gen command to quickly create specified module code. Currently, two templates are supported: WDL and GATK.


  1. bcs gen ./demo -t wdl

This command is run to create a demo directory in the current directory, and generate a simple WDL workflow code.

  1. demo
  2. |-- src
  3. |-- hello.wdl
  4. |-- inputs.json
  5. |-- options.json
  6. |-- # Command for submitting an App job
  7. |-- # Beginner's guide

To submit the job, modify the OSS paths in hello.wdl and, and run

GATK is supported in the similar way.

Run the following command to create a GATK engineering demo:

  1. bcs gen ./demo -t gatk

For more information, see GATK support.