Applications specify the input parameters and invocation of a software package.
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.
An application type, defining how the user interacts with it. For example: Batch, web and remote desktop (VNC).
⚠️ 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
/* Applications contain quite a lot of information. The most important pieces of information aresummarized below:- This Job will run a `BATCH` application - See `invocation.applicationType`- The application should launch the `acme/batch:1.0.0` container - `invocation.tool.tool.description.backend` - `invocation.tool.tool.description.image`- The command-line invocation will look like this: `acme-batch --debug "Hello, World!"`. - The invocation is created from `invocation.invocation` - With parameters defined in `invocation.parameters` */AppStore.findByNameAndVersion.call(FindApplicationAndOptionalDependencies( appName ="acme-batch", appVersion ="1.0.0", ), user).orThrow()/*ApplicationWithFavoriteAndTags( favorite = false, invocation = ApplicationInvocationDescription( allowAdditionalMounts = null, allowAdditionalPeers = null, allowMultiNode = false, allowPublicIp = false, allowPublicLink = null, applicationType = ApplicationType.BATCH, container = null, environment = null, fileExtensions = emptyList(), invocation = listOf(WordInvocationParameter( word = "acme-batch", ), VariableInvocationParameter( isPrefixVariablePartOfArg = false, isSuffixVariablePartOfArg = false, prefixGlobal = "--debug ", prefixVariable = "", suffixGlobal = "", suffixVariable = "", variableNames = listOf("debug"), ), VariableInvocationParameter( isPrefixVariablePartOfArg = false, isSuffixVariablePartOfArg = false, prefixGlobal = "", prefixVariable = "", suffixGlobal = "", suffixVariable = "", variableNames = listOf("value"), )), licenseServers = emptyList(), modules = null, outputFileGlobs = listOf("*"), parameters = listOf(ApplicationParameter.Bool( defaultValue = null, description = "Should debug be enabled?", falseValue = "false", name = "debug", optional = false, title = "", trueValue = "true", ), ApplicationParameter.Text( defaultValue = null, description = "The value for the batch application", name = "value", optional = false, title = "", )), shouldAllowAdditionalMounts = false, shouldAllowAdditionalPeers = true, ssh = null, tool = ToolReference( name = "acme-batch", tool = Tool( createdAt = 1633329776235, description = NormalizedToolDescription( authors = listOf("UCloud"), backend = ToolBackend.DOCKER, container = null, defaultNumberOfNodes = 1, defaultTimeAllocation = SimpleDuration( hours = 1, minutes = 0, seconds = 0, ), description = "An example 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", ), version = "1.0.0", ), vnc = null, web = null, ), metadata = ApplicationMetadata( authors = listOf("UCloud"), description = "An example application", flavorName = null, group = ApplicationGroup( defaultApplication = null, description = null, id = 0, tags = emptyList(), title = "Test Group", ), isPublic = true, name = "acme-batch", public = true, title = "Acme batch", version = "1.0.0", website = null, ), tags = emptyList(), )*/
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# ------------------------------------------------------------------------------------------------------# Applications contain quite a lot of information. The most important pieces of information are# summarized below:# # - This Job will run a `BATCH` application# - See `invocation.applicationType`# # - The application should launch the `acme/batch:1.0.0` container# - `invocation.tool.tool.description.backend`# - `invocation.tool.tool.description.image`# # - The command-line invocation will look like this: `acme-batch --debug "Hello, World!"`. # - The invocation is created from `invocation.invocation`# - With parameters defined in `invocation.parameters`# Authenticated as usercurl -XGET -H "Authorization: Bearer $accessToken" "$host/api/hpc/apps/byNameAndVersion?appName=acme-batch&appVersion=1.0.0"
# {# "metadata": {# "name": "acme-batch",# "version": "1.0.0",# "authors": [# "UCloud"# ],# "title": "Acme batch",# "description": "An example application",# "website": null,# "public": true,# "flavorName": null,# "group": {# "id": 0,# "title": "Test Group",# "description": null,# "defaultApplication": null,# "tags": [# ]# }# },# "invocation": {# "tool": {# "name": "acme-batch",# "version": "1.0.0",# "tool": {# "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": [# "UCloud"# ],# "title": "Acme batch",# "description": "An example tool",# "backend": "DOCKER",# "license": "None",# "image": "acme/batch:1.0.0",# "supportedProviders": null# }# }# },# "invocation": [# {# "type": "word",# "word": "acme-batch"# },# {# "type": "var",# "variableNames": [# "debug"# ],# "prefixGlobal": "--debug ",# "suffixGlobal": "",# "prefixVariable": "",# "suffixVariable": "",# "isPrefixVariablePartOfArg": false,# "isSuffixVariablePartOfArg": false# },# {# "type": "var",# "variableNames": [# "value"# ],# "prefixGlobal": "",# "suffixGlobal": "",# "prefixVariable": "",# "suffixVariable": "",# "isPrefixVariablePartOfArg": false,# "isSuffixVariablePartOfArg": false# }# ],# "parameters": [# {# "type": "boolean",# "name": "debug",# "optional": false,# "defaultValue": null,# "title": "",# "description": "Should debug be enabled?",# "trueValue": "true",# "falseValue": "false"# },# {# "type": "text",# "name": "value",# "optional": false,# "defaultValue": null,# "title": "",# "description": "The value for the batch application"# }# ],# "outputFileGlobs": [# "*"# ],# "applicationType": "BATCH",# "vnc": null,# "web": null,# "ssh": null,# "container": null,# "environment": null,# "allowAdditionalMounts": null,# "allowAdditionalPeers": null,# "allowMultiNode": false,# "allowPublicIp": false,# "allowPublicLink": null,# "fileExtensions": [# ],# "licenseServers": [# ],# "modules": null# },# "favorite": false,# "tags": [# ]# }
Communication Flow: Visual
Example: Simple virtual machine
Frequency of use
Common
Actors
An authenticated user (user)
Communication Flow: Kotlin
/* This example shows an Application encoding a virtual machine. It will use the"acme-operating-system" as its base image, as defined in the Tool. */AppStore.findByNameAndVersion.call(FindApplicationAndOptionalDependencies( appName ="acme-os", appVersion ="1.0.0", ), user).orThrow()/*ApplicationWithFavoriteAndTags( favorite = false, invocation = ApplicationInvocationDescription( allowAdditionalMounts = null, allowAdditionalPeers = null, allowMultiNode = false, allowPublicIp = false, allowPublicLink = null, applicationType = ApplicationType.BATCH, container = null, environment = null, fileExtensions = emptyList(), invocation = emptyList(), licenseServers = emptyList(), modules = null, outputFileGlobs = listOf("*"), parameters = emptyList(), shouldAllowAdditionalMounts = false, shouldAllowAdditionalPeers = true, ssh = null, tool = ToolReference( name = "acme-os", tool = Tool( createdAt = 1633329776235, description = NormalizedToolDescription( authors = listOf("UCloud"), backend = ToolBackend.VIRTUAL_MACHINE, container = null, defaultNumberOfNodes = 1, defaultTimeAllocation = SimpleDuration( hours = 1, minutes = 0, seconds = 0, ), description = "An example tool", image = "acme-operating-system", info = NameAndVersion( name = "acme-os", version = "1.0.0", ), license = "None", requiredModules = emptyList(), supportedProviders = null, title = "Acme os", ), modifiedAt = 1633329776235, owner = "_ucloud", ), version = "1.0.0", ), vnc = null, web = null, ), metadata = ApplicationMetadata( authors = listOf("UCloud"), description = "An example application", flavorName = null, group = ApplicationGroup( defaultApplication = null, description = null, id = 0, tags = emptyList(), title = "Test Group", ), isPublic = true, name = "acme-os", public = true, title = "Acme os", version = "1.0.0", website = null, ), tags = emptyList(), )*/
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 shows an Application encoding a virtual machine. It will use the# "acme-operating-system" as its base image, as defined in the Tool. # Authenticated as usercurl -XGET -H "Authorization: Bearer $accessToken" "$host/api/hpc/apps/byNameAndVersion?appName=acme-os&appVersion=1.0.0"
# {# "metadata": {# "name": "acme-os",# "version": "1.0.0",# "authors": [# "UCloud"# ],# "title": "Acme os",# "description": "An example application",# "website": null,# "public": true,# "flavorName": null,# "group": {# "id": 0,# "title": "Test Group",# "description": null,# "defaultApplication": null,# "tags": [# ]# }# },# "invocation": {# "tool": {# "name": "acme-os",# "version": "1.0.0",# "tool": {# "owner": "_ucloud",# "createdAt": 1633329776235,# "modifiedAt": 1633329776235,# "description": {# "info": {# "name": "acme-os",# "version": "1.0.0"# },# "container": null,# "defaultNumberOfNodes": 1,# "defaultTimeAllocation": {# "hours": 1,# "minutes": 0,# "seconds": 0# },# "requiredModules": [# ],# "authors": [# "UCloud"# ],# "title": "Acme os",# "description": "An example tool",# "backend": "VIRTUAL_MACHINE",# "license": "None",# "image": "acme-operating-system",# "supportedProviders": null# }# }# },# "invocation": [# ],# "parameters": [# ],# "outputFileGlobs": [# "*"# ],# "applicationType": "BATCH",# "vnc": null,# "web": null,# "ssh": null,# "container": null,# "environment": null,# "allowAdditionalMounts": null,# "allowAdditionalPeers": null,# "allowMultiNode": false,# "allowPublicIp": false,# "allowPublicLink": null,# "fileExtensions": [# ],# "licenseServers": [# ],# "modules": null# },# "favorite": false,# "tags": [# ]# }
Communication Flow: Visual
Example: Simple web application
Frequency of use
Common
Actors
An authenticated user (user)
Communication Flow: Kotlin
/* This example shows an Application with a graphical web interface. The web server, hosting the interface, runs on port 8080 as defined in the `invocation.web` section. */AppStore.findByNameAndVersion.call(FindApplicationAndOptionalDependencies( appName ="acme-web", appVersion ="1.0.0", ), user).orThrow()/*ApplicationWithFavoriteAndTags( favorite = false, invocation = ApplicationInvocationDescription( allowAdditionalMounts = null, allowAdditionalPeers = null, allowMultiNode = false, allowPublicIp = false, allowPublicLink = null, applicationType = ApplicationType.WEB, container = null, environment = null, fileExtensions = emptyList(), invocation = listOf(WordInvocationParameter( word = "web-server", )), licenseServers = emptyList(), modules = null, outputFileGlobs = listOf("*"), parameters = emptyList(), shouldAllowAdditionalMounts = true, shouldAllowAdditionalPeers = true, ssh = null, tool = ToolReference( name = "acme-web", tool = Tool( createdAt = 1633329776235, description = NormalizedToolDescription( authors = listOf("UCloud"), backend = ToolBackend.DOCKER, container = null, defaultNumberOfNodes = 1, defaultTimeAllocation = SimpleDuration( hours = 1, minutes = 0, seconds = 0, ), description = "An example tool", image = "acme/web:1.0.0", info = NameAndVersion( name = "acme-web", version = "1.0.0", ), license = "None", requiredModules = emptyList(), supportedProviders = null, title = "Acme web", ), modifiedAt = 1633329776235, owner = "_ucloud", ), version = "1.0.0", ), vnc = null, web = WebDescription( port = 8080, ), ), metadata = ApplicationMetadata( authors = listOf("UCloud"), description = "An example application", flavorName = null, group = ApplicationGroup( defaultApplication = null, description = null, id = 0, tags = emptyList(), title = "Test Group", ), isPublic = true, name = "acme-web", public = true, title = "Acme web", version = "1.0.0", website = null, ), tags = emptyList(), )*/
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 shows an Application with a graphical web interface. The web server, hosting the # interface, runs on port 8080 as defined in the `invocation.web` section.# Authenticated as usercurl -XGET -H "Authorization: Bearer $accessToken" "$host/api/hpc/apps/byNameAndVersion?appName=acme-web&appVersion=1.0.0"
# {# "metadata": {# "name": "acme-web",# "version": "1.0.0",# "authors": [# "UCloud"# ],# "title": "Acme web",# "description": "An example application",# "website": null,# "public": true,# "flavorName": null,# "group": {# "id": 0,# "title": "Test Group",# "description": null,# "defaultApplication": null,# "tags": [# ]# }# },# "invocation": {# "tool": {# "name": "acme-web",# "version": "1.0.0",# "tool": {# "owner": "_ucloud",# "createdAt": 1633329776235,# "modifiedAt": 1633329776235,# "description": {# "info": {# "name": "acme-web",# "version": "1.0.0"# },# "container": null,# "defaultNumberOfNodes": 1,# "defaultTimeAllocation": {# "hours": 1,# "minutes": 0,# "seconds": 0# },# "requiredModules": [# ],# "authors": [# "UCloud"# ],# "title": "Acme web",# "description": "An example tool",# "backend": "DOCKER",# "license": "None",# "image": "acme/web:1.0.0",# "supportedProviders": null# }# }# },# "invocation": [# {# "type": "word",# "word": "web-server"# }# ],# "parameters": [# ],# "outputFileGlobs": [# "*"# ],# "applicationType": "WEB",# "vnc": null,# "web": {# "port": 8080# },# "ssh": null,# "container": null,# "environment": null,# "allowAdditionalMounts": null,# "allowAdditionalPeers": null,# "allowMultiNode": false,# "allowPublicIp": false,# "allowPublicLink": null,# "fileExtensions": [# ],# "licenseServers": [# ],# "modules": null# },# "favorite": false,# "tags": [# ]# }
Communication Flow: Visual
Example: Simple remote desktop application (VNC)
Frequency of use
Common
Actors
An authenticated user (user)
Communication Flow: Kotlin
/* This example shows an Application with a graphical web interface. The VNC server, hosting the interface, runs on port 5900 as defined in the `invocation.vnc` section. */AppStore.findByNameAndVersion.call(FindApplicationAndOptionalDependencies( appName ="acme-remote-desktop", appVersion ="1.0.0", ), user).orThrow()/*ApplicationWithFavoriteAndTags( favorite = false, invocation = ApplicationInvocationDescription( allowAdditionalMounts = null, allowAdditionalPeers = null, allowMultiNode = false, allowPublicIp = false, allowPublicLink = null, applicationType = ApplicationType.VNC, container = null, environment = null, fileExtensions = emptyList(), invocation = listOf(WordInvocationParameter( word = "vnc-server", )), licenseServers = emptyList(), modules = null, outputFileGlobs = listOf("*"), parameters = emptyList(), shouldAllowAdditionalMounts = true, shouldAllowAdditionalPeers = true, ssh = null, tool = ToolReference( name = "acme-remote-desktop", tool = Tool( createdAt = 1633329776235, description = NormalizedToolDescription( authors = listOf("UCloud"), backend = ToolBackend.DOCKER, container = null, defaultNumberOfNodes = 1, defaultTimeAllocation = SimpleDuration( hours = 1, minutes = 0, seconds = 0, ), description = "An example tool", image = "acme/remote-desktop:1.0.0", info = NameAndVersion( name = "acme-remote-desktop", version = "1.0.0", ), license = "None", requiredModules = emptyList(), supportedProviders = null, title = "Acme remote desktop", ), modifiedAt = 1633329776235, owner = "_ucloud", ), version = "1.0.0", ), vnc = VncDescription( password = null, port = 5900, ), web = null, ), metadata = ApplicationMetadata( authors = listOf("UCloud"), description = "An example application", flavorName = null, group = ApplicationGroup( defaultApplication = null, description = null, id = 0, tags = emptyList(), title = "Test Group", ), isPublic = true, name = "acme-remote-desktop", public = true, title = "Acme remote desktop", version = "1.0.0", website = null, ), tags = emptyList(), )*/
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 shows an Application with a graphical web interface. The VNC server, hosting the # interface, runs on port 5900 as defined in the `invocation.vnc` section.# Authenticated as usercurl -XGET -H "Authorization: Bearer $accessToken" "$host/api/hpc/apps/byNameAndVersion?appName=acme-remote-desktop&appVersion=1.0.0"
# {# "metadata": {# "name": "acme-remote-desktop",# "version": "1.0.0",# "authors": [# "UCloud"# ],# "title": "Acme remote desktop",# "description": "An example application",# "website": null,# "public": true,# "flavorName": null,# "group": {# "id": 0,# "title": "Test Group",# "description": null,# "defaultApplication": null,# "tags": [# ]# }# },# "invocation": {# "tool": {# "name": "acme-remote-desktop",# "version": "1.0.0",# "tool": {# "owner": "_ucloud",# "createdAt": 1633329776235,# "modifiedAt": 1633329776235,# "description": {# "info": {# "name": "acme-remote-desktop",# "version": "1.0.0"# },# "container": null,# "defaultNumberOfNodes": 1,# "defaultTimeAllocation": {# "hours": 1,# "minutes": 0,# "seconds": 0# },# "requiredModules": [# ],# "authors": [# "UCloud"# ],# "title": "Acme remote desktop",# "description": "An example tool",# "backend": "DOCKER",# "license": "None",# "image": "acme/remote-desktop:1.0.0",# "supportedProviders": null# }# }# },# "invocation": [# {# "type": "word",# "word": "vnc-server"# }# ],# "parameters": [# ],# "outputFileGlobs": [# "*"# ],# "applicationType": "VNC",# "vnc": {# "password": null,# "port": 5900# },# "web": null,# "ssh": null,# "container": null,# "environment": null,# "allowAdditionalMounts": null,# "allowAdditionalPeers": null,# "allowMultiNode": false,# "allowPublicIp": false,# "allowPublicLink": null,# "fileExtensions": [# ],# "licenseServers": [# ],# "modules": null# },# "favorite": false,# "tags": [# ]# }
Communication Flow: Visual
Example: Registering a file handler
Frequency of use
Common
Actors
An authenticated user (user)
Communication Flow: Kotlin
/* This example shows an Application with a graphical web interface. The web server, hosting the interface, runs on port 8080 as defined in the `invocation.web` section. *//* The Application also registers a file handler of all files with the `*.c` extension. This is used asa hint for the frontend that files with this extension can be opened with this Application. Whenopened like this, the file's parent folder will be mounted as a resource. */AppStore.findByNameAndVersion.call(FindApplicationAndOptionalDependencies( appName ="acme-web", appVersion ="1.0.0", ), user).orThrow()/*ApplicationWithFavoriteAndTags( favorite = false, invocation = ApplicationInvocationDescription( allowAdditionalMounts = null, allowAdditionalPeers = null, allowMultiNode = false, allowPublicIp = false, allowPublicLink = null, applicationType = ApplicationType.WEB, container = null, environment = null, fileExtensions = listOf(".c"), invocation = listOf(WordInvocationParameter( word = "web-server", )), licenseServers = emptyList(), modules = null, outputFileGlobs = listOf("*"), parameters = emptyList(), shouldAllowAdditionalMounts = true, shouldAllowAdditionalPeers = true, ssh = null, tool = ToolReference( name = "acme-web", tool = Tool( createdAt = 1633329776235, description = NormalizedToolDescription( authors = listOf("UCloud"), backend = ToolBackend.DOCKER, container = null, defaultNumberOfNodes = 1, defaultTimeAllocation = SimpleDuration( hours = 1, minutes = 0, seconds = 0, ), description = "An example tool", image = "acme/web:1.0.0", info = NameAndVersion( name = "acme-web", version = "1.0.0", ), license = "None", requiredModules = emptyList(), supportedProviders = null, title = "Acme web", ), modifiedAt = 1633329776235, owner = "_ucloud", ), version = "1.0.0", ), vnc = null, web = WebDescription( port = 8080, ), ), metadata = ApplicationMetadata( authors = listOf("UCloud"), description = "An example application", flavorName = null, group = ApplicationGroup( defaultApplication = null, description = null, id = 0, tags = emptyList(), title = "Test Group", ), isPublic = true, name = "acme-web", public = true, title = "Acme web", version = "1.0.0", website = null, ), tags = emptyList(), )*/
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 shows an Application with a graphical web interface. The web server, hosting the # interface, runs on port 8080 as defined in the `invocation.web` section.# The Application also registers a file handler of all files with the `*.c` extension. This is used as# a hint for the frontend that files with this extension can be opened with this Application. When# opened like this, the file's parent folder will be mounted as a resource.# Authenticated as usercurl -XGET -H "Authorization: Bearer $accessToken" "$host/api/hpc/apps/byNameAndVersion?appName=acme-web&appVersion=1.0.0"
# {# "metadata": {# "name": "acme-web",# "version": "1.0.0",# "authors": [# "UCloud"# ],# "title": "Acme web",# "description": "An example application",# "website": null,# "public": true,# "flavorName": null,# "group": {# "id": 0,# "title": "Test Group",# "description": null,# "defaultApplication": null,# "tags": [# ]# }# },# "invocation": {# "tool": {# "name": "acme-web",# "version": "1.0.0",# "tool": {# "owner": "_ucloud",# "createdAt": 1633329776235,# "modifiedAt": 1633329776235,# "description": {# "info": {# "name": "acme-web",# "version": "1.0.0"# },# "container": null,# "defaultNumberOfNodes": 1,# "defaultTimeAllocation": {# "hours": 1,# "minutes": 0,# "seconds": 0# },# "requiredModules": [# ],# "authors": [# "UCloud"# ],# "title": "Acme web",# "description": "An example tool",# "backend": "DOCKER",# "license": "None",# "image": "acme/web:1.0.0",# "supportedProviders": null# }# }# },# "invocation": [# {# "type": "word",# "word": "web-server"# }# ],# "parameters": [# ],# "outputFileGlobs": [# "*"# ],# "applicationType": "WEB",# "vnc": null,# "web": {# "port": 8080# },# "ssh": null,# "container": null,# "environment": null,# "allowAdditionalMounts": null,# "allowAdditionalPeers": null,# "allowMultiNode": false,# "allowPublicIp": false,# "allowPublicLink": null,# "fileExtensions": [# ".c"# ],# "licenseServers": [# ],# "modules": null# },# "favorite": false,# "tags": [# ]# }
Communication Flow: Visual
Example: An Application with default values
Frequency of use
Common
Actors
An authenticated user (user)
Communication Flow: Kotlin
/* This example shows an Application which has a single input parameter. The parameter contains a textual value. If the user does not provide a specific value, it will default to 'hello'. UCloud passes this value as the first argument on the command-line. */AppStore.findByNameAndVersion.call(FindApplicationAndOptionalDependencies( appName ="acme-web", appVersion ="1.0.0", ), user).orThrow()/*ApplicationWithFavoriteAndTags( favorite = false, invocation = ApplicationInvocationDescription( allowAdditionalMounts = null, allowAdditionalPeers = null, allowMultiNode = false, allowPublicIp = false, allowPublicLink = null, applicationType = ApplicationType.WEB, container = null, environment = null, fileExtensions = emptyList(), invocation = listOf(WordInvocationParameter( word = "web-server", ), VariableInvocationParameter( isPrefixVariablePartOfArg = false, isSuffixVariablePartOfArg = false, prefixGlobal = "", prefixVariable = "", suffixGlobal = "", suffixVariable = "", variableNames = listOf("variable"), )), licenseServers = emptyList(), modules = null, outputFileGlobs = listOf("*"), parameters = listOf(ApplicationParameter.Text( defaultValue = JsonObject(mapOf("type" to JsonLiteral( coerceToInlineType = null, content = "text", isString = true, )),"value" to JsonLiteral( coerceToInlineType = null, content = "hello", isString = true, )),)), description = "A variable passed to the Application (default = 'hello')", name = "variable", optional = true, title = "My Variable", )), shouldAllowAdditionalMounts = true, shouldAllowAdditionalPeers = true, ssh = null, tool = ToolReference( name = "acme-web", tool = Tool( createdAt = 1633329776235, description = NormalizedToolDescription( authors = listOf("UCloud"), backend = ToolBackend.DOCKER, container = null, defaultNumberOfNodes = 1, defaultTimeAllocation = SimpleDuration( hours = 1, minutes = 0, seconds = 0, ), description = "An example tool", image = "acme/web:1.0.0", info = NameAndVersion( name = "acme-web", version = "1.0.0", ), license = "None", requiredModules = emptyList(), supportedProviders = null, title = "Acme web", ), modifiedAt = 1633329776235, owner = "_ucloud", ), version = "1.0.0", ), vnc = null, web = WebDescription( port = 8080, ), ), metadata = ApplicationMetadata( authors = listOf("UCloud"), description = "An example application", flavorName = null, group = ApplicationGroup( defaultApplication = null, description = null, id = 0, tags = emptyList(), title = "Test Group", ), isPublic = true, name = "acme-web", public = true, title = "Acme web", version = "1.0.0", website = null, ), tags = emptyList(), )*/
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 shows an Application which has a single input parameter. The parameter contains a # textual value. If the user does not provide a specific value, it will default to 'hello'. UCloud # passes this value as the first argument on the command-line.# Authenticated as usercurl -XGET -H "Authorization: Bearer $accessToken" "$host/api/hpc/apps/byNameAndVersion?appName=acme-web&appVersion=1.0.0"
# {# "metadata": {# "name": "acme-web",# "version": "1.0.0",# "authors": [# "UCloud"# ],# "title": "Acme web",# "description": "An example application",# "website": null,# "public": true,# "flavorName": null,# "group": {# "id": 0,# "title": "Test Group",# "description": null,# "defaultApplication": null,# "tags": [# ]# }# },# "invocation": {# "tool": {# "name": "acme-web",# "version": "1.0.0",# "tool": {# "owner": "_ucloud",# "createdAt": 1633329776235,# "modifiedAt": 1633329776235,# "description": {# "info": {# "name": "acme-web",# "version": "1.0.0"# },# "container": null,# "defaultNumberOfNodes": 1,# "defaultTimeAllocation": {# "hours": 1,# "minutes": 0,# "seconds": 0# },# "requiredModules": [# ],# "authors": [# "UCloud"# ],# "title": "Acme web",# "description": "An example tool",# "backend": "DOCKER",# "license": "None",# "image": "acme/web:1.0.0",# "supportedProviders": null# }# }# },# "invocation": [# {# "type": "word",# "word": "web-server"# },# {# "type": "var",# "variableNames": [# "variable"# ],# "prefixGlobal": "",# "suffixGlobal": "",# "prefixVariable": "",# "suffixVariable": "",# "isPrefixVariablePartOfArg": false,# "isSuffixVariablePartOfArg": false# }# ],# "parameters": [# {# "type": "text",# "name": "variable",# "optional": true,# "defaultValue": {# "type": "text",# "value": "hello"# },# "title": "My Variable",# "description": "A variable passed to the Application (default = 'hello')"# }# ],# "outputFileGlobs": [# "*"# ],# "applicationType": "WEB",# "vnc": null,# "web": {# "port": 8080# },# "ssh": null,# "container": null,# "environment": null,# "allowAdditionalMounts": null,# "allowAdditionalPeers": null,# "allowMultiNode": false,# "allowPublicIp": false,# "allowPublicLink": null,# "fileExtensions": [# ],# "licenseServers": [# ],# "modules": null# },# "favorite": false,# "tags": [# ]# }
Communication Flow: Visual
Remote Procedure Calls
advancedSearch
Searches in the Application catalog using more advanced parameters
The metadata describes information mostly useful for presentation purposes. The only exception are name and version which are (also) used as identifiers.
Properties
ApplicationInvocationDescription
The specification for how to invoke an Application
All Applications require a tool. The Tool specify the concrete computing environment. With the tool we get the required software packages and configuration.
In this environment, we must start some software. Any Job launched with this Application will only run for as long as the software runs. You can specify the command-line invocation through the invocation property. Each element in this list produce zero or more arguments for the actual invocation. These InvocationParameters can reference the input parameters of the Application. In addition, you can set the environment variables through the same mechanism.
All Applications have an ApplicationType associated with them. This type determines how the user interacts with your Application. We support the following types:
BATCH: A non-interactive Application which runs without user input
VNC: An interactive Application exposing a remote desktop interface
WEB: An interactive Application exposing a graphical web interface
The Application must expose information about how to access interactive services. It can do so by setting vnc and web. Providers must use this information when opening an interactive session.
Users can launch a Job with additional resources, such as IP addresses and files. The Application author specifies the supported resources through the allowXXX properties.
Properties
ApplicationType
The ApplicationType determines how user's interact with an Application
enumclassApplicationType { BATCH, VNC, WEB,}
BATCH: A non-interactive Application which runs without user input
VNC: An interactive Application exposing a remote desktop interface
WEB: An interactive Application exposing a graphical web interface
Properties
VncDescription
Information to the Provider about how to reach the VNC services
All ApplicationParameters contain metadata used for the presentation in the frontend. This metadata includes a title and help-text. This allows UCloud to create a rich user-interface with widgets which are easy to use.
When the user requests the creation of a Job, they supply a lot of information. This includes a reference to the Application and a set of AppParameterValues. The user must supply a value for every mandatory ApplicationParameter. Every parameter has a type associated with it. This type controls the set of valid AppParameterValues it can take.
Properties
ApplicationParameter.TextArea
An ApplicationParameter describe a single input parameter to an Application.
All ApplicationParameters contain metadata used for the presentation in the frontend. This metadata includes a title and help-text. This allows UCloud to create a rich user-interface with widgets which are easy to use.
When the user requests the creation of a Job, they supply a lot of information. This includes a reference to the Application and a set of AppParameterValues. The user must supply a value for every mandatory ApplicationParameter. Every parameter has a type associated with it. This type controls the set of valid AppParameterValues it can take.
Properties
ApplicationParameter.Bool
An input parameter which accepts any boolean value
Each value type can is type-compatible with one or more ApplicationParameters. The effect of a specific value depends on its use-site, and the type of its associated parameter.
ApplicationParameters have the following usage sites:
Invocation: This affects the command line arguments passed to the software.
Environment variables: This affects the environment variables passed to the software.
Resources: This only affects the resources which are imported into the software environment. Not all values can be used as a resource.
AppParameterValue.BlockStorage
A reference to block storage (Not yet implemented)
Side effects: Configures an HTTP ingress for the application's interactive web interface. This interface should not perform any validation, that is, the application should be publicly accessible.
Command line argument: Produces zero or more arguments for the command-line
Environment variable: Produces exactly one value.
For each of the InvocationParameter types, we will describe the value(s) they produce. We will also highlight notable differences between CLI args and environment variables.
The parameter referenced by variableName must be of type ApplicationParameter.Bool, and the value must be AppParamValue.Bool. This invocation parameter will produce the flag if the variable's value is true. Otherwise, it will produce no values.
Produces an environment variable (TODO Documentation)
data class EnvironmentVariableParameter(
val variable: String,
val type: String /* "env" */,
)
Properties
VariableInvocationParameter
An InvocationParameter which produces value(s) from parameters.
data class VariableInvocationParameter(
val variableNames: List<String>,
val prefixGlobal: String?,
val suffixGlobal: String?,
val prefixVariable: String?,
val suffixVariable: String?,
val isPrefixVariablePartOfArg: Boolean?,
val isSuffixVariablePartOfArg: Boolean?,
val type: String /* "var" */,
)
The parameter receives a list of variableNames. Each must reference an ApplicationParameter. It is valid to reference both optional and mandatory parameters. This invocation will produce zero values if all the parameters have no value. This is regardless of the prefixes and suffixes.
The invocation accepts prefixes and suffixes. These will alter the values produced. The global affixes always produce one value each, if supplied. The variable specific affixes produce their own value if isXVariablePartOfArg.
Applications specify the input parameters and invocation of a software package.
data class ApplicationWithFavoriteAndTags(
val metadata: ApplicationMetadata,
val invocation: ApplicationInvocationDescription,
val favorite: Boolean,
val tags: List<String>,
)
data class DetailedAccessEntity(
val user: String?,
val project: Project?,
val group: Project?,
)
Properties
DetailedEntityWithPermission
data class DetailedEntityWithPermission(
val entity: DetailedAccessEntity,
val permission: ApplicationAccessRight,
)
Properties
FindApplicationAndOptionalDependencies
data class FindApplicationAndOptionalDependencies(
val appName: String,
val appVersion: String?,
)
Properties
FindBySupportedFileExtension
The base type for requesting paginated content.
data class FindBySupportedFileExtension(
val files: List<String>,
val itemsPerPage: Int?,
val next: String?,
val consistency: PaginationRequestV2Consistency?,
val itemsToSkip: Long?,
)
Paginated content can be requested with one of the following consistency guarantees, this greatly changes the semantics of the call:
Consistency
Description
PREFER
Consistency is preferred but not required. An inconsistent snapshot might be returned.
REQUIRE
Consistency is required. A request will fail if consistency is no longer guaranteed.
The consistency refers to if collecting all the results via the pagination API are consistent. We consider the results to be consistent if it contains a complete view at some point in time. In practice this means that the results must contain all the items, in the correct order and without duplicates.
If you use the PREFER consistency then you may receive in-complete results that might appear out-of-order and can contain duplicate items. UCloud will still attempt to serve a snapshot which appears mostly consistent. This is helpful for user-interfaces which do not strictly depend on consistency but would still prefer something which is mostly consistent.
The results might become inconsistent if the client either takes too long, or a service instance goes down while fetching the results. UCloud attempts to keep each next token alive for at least one minute before invalidating it. This does not mean that a client must collect all results within a minute but rather that they must fetch the next page within a minute of the last page. If this is not feasible and consistency is not required then PREFER should be used.
📝 NOTE: Services are allowed to ignore extra criteria of the request if the next token is supplied. This is needed in order to provide a consistent view of the results. Clients should provide the same criterion as they paginate through the results.
Properties
ModulesSection
Section describing the module capabilities of an application
data class ModulesSection(
val mountPath: String,
val optional: List<String>,
)
Properties
Project
data class Project(
val id: String,
val title: String,
)
Properties
SshDescription
Information to the provider about the SSH capabilities of this application
data class SshDescription(
val mode: SshDescription.Mode?,
)
Providers must use this information, if SSH is supported, to correctly configure applications with the appropriate keys. See /docs/reference/jobs.control.browseSshKeys.md for more information.
Properties
SshDescription.Mode
enum class Mode {
DISABLED,
OPTIONAL,
MANDATORY,
}
Properties
ToolReference
A reference to a Tool
data class ToolReference(
val name: String,
val version: String,
val tool: Tool?,
)
Properties
ACLEntryRequest
data class ACLEntryRequest(
val entity: AccessEntity,
val rights: ApplicationAccessRight,
val revoke: Boolean?,
)
Properties
AdvancedSearchRequest
data class AdvancedSearchRequest(
val query: String?,
val tags: List<String>?,
val showAllVersions: Boolean,
val itemsPerPage: Int?,
val page: Int?,
)
Properties
AppSearchRequest
data class AppSearchRequest(
val query: String,
val itemsPerPage: Int?,
val page: Int?,
)
Properties
AppStoreSectionsRequest
data class AppStoreSectionsRequest(
val page: AppStorePageType,
)
Properties
CreateGroupRequest
data class CreateGroupRequest(
val title: String,
)
Properties
CreateTagsRequest
data class CreateTagsRequest(
val tags: List<String>,
val groupId: Int,
)
Properties
DeleteAppRequest
data class DeleteAppRequest(
val appName: String,
val appVersion: String,
)
Properties
DeleteGroupRequest
data class DeleteGroupRequest(
val id: Int,
)
Properties
DevImportRequest
data class DevImportRequest(
val endpoint: String,
val checksum: String,
)
Properties
FavoriteRequest
data class FavoriteRequest(
val appName: String,
)
Properties
FindLatestByToolRequest
data class FindLatestByToolRequest(
val tool: String,
val itemsPerPage: Int?,
val page: Int?,
)
Properties
HasPermissionRequest
data class HasPermissionRequest(
val appName: String,
val appVersion: String,
val permission: List<ApplicationAccessRight>,
)
Properties
IsPublicRequest
data class IsPublicRequest(
val applications: List<NameAndVersion>,
)
Properties
ListAclRequest
data class ListAclRequest(
val appName: String,
)
Properties
RetrieveGroupRequest
data class RetrieveGroupRequest(
val id: Int?,
val name: String?,
)
Properties
SetGroupRequest
data class SetGroupRequest(
val groupId: Int?,
val applicationName: String,
)
Properties
SetPublicRequest
data class SetPublicRequest(
val appName: String,
val appVersion: String,
val public: Boolean,
)
Properties
TagSearchRequest
data class TagSearchRequest(
val query: String,
val excludeTools: String?,
val itemsPerPage: Int?,
val page: Int?,
)
Properties
UpdateAclRequest
data class UpdateAclRequest(
val applicationName: String,
val changes: List<ACLEntryRequest>,
)
Properties
UpdateFlavorRequest
data class UpdateFlavorRequest(
val applicationName: String,
val flavorName: String,
)
Properties
UpdateGroupRequest
data class UpdateGroupRequest(
val id: Int,
val title: String,
val logo: List<Byte>?,
val description: String?,
val defaultApplication: String?,
)
Properties
AppStoreSectionsResponse
data class AppStoreSectionsResponse(
val sections: List<AppStoreSection>,
)
Properties
CreateGroupResponse
data class CreateGroupResponse(
val id: Int,
)
Properties
IsPublicResponse
data class IsPublicResponse(
val public: JsonObject,
)
Properties
RetrieveGroupResponse
data class RetrieveGroupResponse(
val group: ApplicationGroup,
val applications: List<ApplicationSummary>,
)