Tools define bundles of software binaries and other assets (e.g. container and virtual machine base-images).
Rationale
All Applications in UCloud consist of two components: the Tool and the Application The Tool defines the computational environment. This includes software packages and other assets (e.g. configuration). A typical example would be a base-image for a container or a virtual machine. The Application describes how to invoke the Tool. This includes specifying the input parameters and command-line invocation for the Tool.
⚠️ WARNING: The API listed on this page will likely change to conform with our API conventions. Be careful when building integrations. The following changes are expected:
RPC names will change to conform with the conventions
RPC request and response types will change to conform with the conventions
RPCs which return a page will be collapsed into a single browse endpoint
Some property names will change to be consistent with Resources
/* This example show an example Tool which uses a container backend. This Tool specifies that the container image is "acme/batch:1.0.0". The provider decides how to retrieve these images. We recommend that you follow the standard defined by Docker. */ToolStore.findByNameAndVersion.call(FindByNameAndVersion( name ="acme-batch", version ="1.0.0", ), user).orThrow()/*Tool( createdAt = 1633329776235, description = NormalizedToolDescription( authors = listOf("Acme Inc."), backend = ToolBackend.DOCKER, container = null, defaultNumberOfNodes = 1, defaultTimeAllocation = SimpleDuration( hours = 1, minutes = 0, seconds = 0, ), description = "A batch tool", image = "acme/batch:1.0.0", info = NameAndVersion( name = "acme-batch", version = "1.0.0", ), license = "None", requiredModules = emptyList(), supportedProviders = null, title = "Acme Batch", ), modifiedAt = 1633329776235, owner = "_ucloud", )*/
Communication Flow: Curl
# ------------------------------------------------------------------------------------------------------# $host is the UCloud instance to contact. Example: 'http://localhost:8080' or 'https://cloud.sdu.dk'# $accessToken is a valid access-token issued by UCloud# ------------------------------------------------------------------------------------------------------# This example show an example Tool which uses a container backend. This Tool specifies that the # container image is "acme/batch:1.0.0". The provider decides how to retrieve these images. We # recommend that you follow the standard defined by Docker.# Authenticated as usercurl -XGET -H "Authorization: Bearer $accessToken" "$host/api/hpc/tools/byNameAndVersion?name=acme-batch&version=1.0.0"
# {# "owner": "_ucloud",# "createdAt": 1633329776235,# "modifiedAt": 1633329776235,# "description": {# "info": {# "name": "acme-batch",# "version": "1.0.0"# },# "container": null,# "defaultNumberOfNodes": 1,# "defaultTimeAllocation": {# "hours": 1,# "minutes": 0,# "seconds": 0# },# "requiredModules": [# ],# "authors": [# "Acme Inc."# ],# "title": "Acme Batch",# "description": "A batch tool",# "backend": "DOCKER",# "license": "None",# "image": "acme/batch:1.0.0",# "supportedProviders": null# }# }
Communication Flow: Visual
Example: Retrieve a virtual machine based Tool
Frequency of use
Common
Actors
An authenticated user (user)
Communication Flow: Kotlin
/* This example show an example Tool which uses a virtual machine backend. The Tool specifies that the base image is "acme-operating-system". The provider decides how to retrieve these images. For virtual machines, this is likely so dependant on the provider. As a result, we recommend using the supportedProviders property. */ToolStore.findByNameAndVersion.call(FindByNameAndVersion( name ="acme-os", version ="1.0.0", ), user).orThrow()/*Tool( createdAt = 1633329776235, description = NormalizedToolDescription( authors = listOf("Acme Inc."), backend = ToolBackend.VIRTUAL_MACHINE, container = null, defaultNumberOfNodes = 1, defaultTimeAllocation = SimpleDuration( hours = 1, minutes = 0, seconds = 0, ), description = "A virtual machine tool", image = "acme-operating-system", info = NameAndVersion( name = "acme-batch", version = "1.0.0", ), license = "None", requiredModules = emptyList(), supportedProviders = listOf("example"), title = "Acme Operating System", ), modifiedAt = 1633329776235, owner = "_ucloud", )*/
Communication Flow: Curl
# ------------------------------------------------------------------------------------------------------# $host is the UCloud instance to contact. Example: 'http://localhost:8080' or 'https://cloud.sdu.dk'# $accessToken is a valid access-token issued by UCloud# ------------------------------------------------------------------------------------------------------# This example show an example Tool which uses a virtual machine backend. The Tool specifies that # the base image is "acme-operating-system". The provider decides how to retrieve these images. For # virtual machines, this is likely so dependant on the provider. As a result, we recommend using the # supportedProviders property. # Authenticated as usercurl-XGET-H"Authorization: Bearer $accessToken""$host/api/hpc/tools/byNameAndVersion?name=acme-os&version=1.0.0"# {# "owner": "_ucloud",# "createdAt": 1633329776235,# "modifiedAt": 1633329776235,# "description": {# "info": {# "name": "acme-batch",# "version": "1.0.0"# },# "container": null,# "defaultNumberOfNodes": 1,# "defaultTimeAllocation": {# "hours": 1,# "minutes": 0,# "seconds": 0# },# "requiredModules": [# ],# "authors": [# "Acme Inc."# ],# "title": "Acme Operating System",# "description": "A virtual machine tool",# "backend": "VIRTUAL_MACHINE",# "license": "None",# "image": "acme-operating-system",# "supportedProviders": [# "example"# ]# }# }