UCloud logo UCloud logo UCloud
v2025.1.0
  1. UCloud/Core
  2. 1. Introduction
  3. 2. Projects
  4. 3. Accounting
  5. 4. Orchestration
  6. UCloud/IM for Slurm-based HPC
  7. 5. Installation
  8. 6. Architecture and Networking
  9. 7. User and Project Management
  10. 8. Filesystem Integration
    1. 8.1. Inter-provider file transfers
  11. 9. Slurm Integration
    1. 9.1. Application Management
    2. 9.2. Built-in Applications
  12. 10. Reference
    1. 10.1. Configuration
    2. 10.2. CLI
  13. 11. Appendix
    1. 11.1. Built-in Application Index
  14. UCloud/IM for Kubernetes
  15. 12. Installation
  16. 13. Architecture and Networking
  17. 14. Filesystem Integration
  18. 15. Compute Jobs
    1. 15.1. Public Links
    2. 15.2. Public IPs
    3. 15.3. License Servers
    4. 15.4. SSH Servers
  19. 16. Integrated applications
    1. 16.1. Syncthing
    2. 16.2. Integrated terminal
  20. 17. Reference
    1. 17.1. Configuration
  21. H: Procedures
  22. 18. H: Procedures
  23. 19. H: Introduction
  24. 20. H: Auditing
  25. 21. H: Auditing scenario
  26. 22. H: GitHub actions
  27. 23. H: Deployment
  28. 24. H: 3rd party dependencies (risk assesment)
  1. Links
  2. Source Code
  3. Releases

CLI

The UCloud Integration Module ships with a Command-Line Interface (CLI) which makes some management tasks more trivial. This page will serve as the manual.

The CLI is invoked from a terminal on the node where the UCloud Integration Module is installed, and where the ucloud binary is in your PATH. Commands are invoked in the following format:

$ ucloud <command> <subcommand> [parameters]

where <command> and <subcommand> can be any of the options described in the following sections. For example you can list the UCloud projects on your system and their corresponding local ID with

$ ucloud projects ls

Additional parameters or options can be given to some subcommands. For example, if you want the list only to contain projects with the name test in the name, you can use the --ucloud-name option:

$ ucloud projects ls --ucloud-name test

Since --ucloud-name is a query parameter that supports regex, it acts as a fuzzy search that returns all projects that contains the word test in its name.

Commands

allocations

Subcommand Description

ls, list

List allocations on the system.

Optional parameters

--ucloud-project-id <string>

Query by UCloud project ID. Supports regex.

--local-user <string>

Query by local user name. Supports regex.

--local-group <string>

Query by the local group name. Supports regex.

--local-uid <string>

Query by local user ID. Supports regex.

--local-gid <string>

Query by local ID (GID). Supports regex.

--category <string>

Query by product category (Product). Supports regex.

get, retrieve, stat, view

View details about allocations on the system.

Optional parameters

--ucloud-project-id <string>

Query by UCloud project ID. Supports regex.

--local-user <string>

Query by local user name. Supports regex.

--local-group <string>

Query by the local group name. Supports regex.

--local-uid <string>

Query by local user ID. Supports regex.

--local-gid <string>

Query by local ID (GID). Supports regex.

--category <string>

Query by product category (Product). Supports regex.

drives

Subcommand Description

ls, list

List all drives.

Optional parameters

--ucloud-id <string>

Query by the UCloud ID of the drive. Supports regex.

--ucloud-project-id <string>

Query by the UCloud project ID of the owner of the drive. Supports regex.

--local-user <string>

Query by the local user name that owns the drive. Supports regex.

--local-group <string>

Query by the local group (GID) that owns the drive. Supports regex.

--local-uid <string>

Query by the local UID of the user that owns the drive. Supports regex.

--local-gid <string>

Query by the local GID of the user that own the drive. Supports regex.

--ucloud-path <path>

Query by the path to the drive on UCloud. Does not support regex.

--local-path <path>

Query by the local path on your system. Does not support regex.

get, retrieve, stat, view

Get detailed information about drives.

Optional parameters

--ucloud-id <string>

Query by the UCloud ID of the drive. Supports regex.

--ucloud-project-id <string>

Query by the UCloud project ID of the owner of the drive. Supports regex.

--local-user <string>

Query by the local user name that owns the drive. Supports regex.

--local-group <string>

Query by the local group (GID) that owns the drive. Supports regex.

--local-uid <string>

Query by the local UID of the user that owns the drive. Supports regex.

--local-gid <string>

Query by the local GID of the user that own the drive. Supports regex.

--ucloud-path <path>

Query by the path to the drive on UCloud. Does not support regex.

--local-path <path>

Query by the local path on your system. Does not support regex.

jobs

Subcommand Description

get, retrieve, stat, view

Get detailed information about jobs

ls, list

List jobs.

projects

Subcommand Description

ls, list

List UCloud projects with a mapping to your system.

Optional parameters

--ucloud-name <string>

Query by UCloud name. Supports regex.

--ucloud-id <string>

Query by UCloud ID. Supports regex.

--local-name <string>

Query by local name. Supports regex.

--local-id <string>

Query by local ID. Supports regex.

replace

Replaces the local ID (GID) of the project with the current local ID old-id, with the new local ID new-id. This changes the mapping of the UCloud project to a new local project. It is also possible to replace the mapping of one project mapping with another through this command.

Parameters

--old-id <number>

The old GID of the project to replace.

--new-id <number>

The new GID of the project to replace.

Examples

$ ucloud projects ls

scripts

Subcommand Description

ls, list

List log of previously run tasks

Optional parameters

--query=<string>

Search log entries where <string> exists in stdout, stderr, request or script path.

--failures

Show only failed scripts.

--script=<path>

Show only entries from the script located at the path <path>.

--before-relative=<string>

Show entries older than <string>, e.g. --before-relative="1 hour" shows entries older than 1 hour.

--after-relative=<time>

Show entries newer than <time>, e.g. --after-relative="1 hour" shows entries from the past hour.

get, retrieve, stat, view

Get detailed information about script with a specific ID.

Example

To get detailed information about the script log with ID 1234.

$ ucloud scripts get 1234

delete, del, rm, remove

Delete script log entry with a specific ID.

Example

To delete the script log with ID 1234.

$ ucloud scripts rm 1234

clear

Deletes all script log entries.

help

Prints information about parameters for the `script` command.

slurm-accounts

Subcommand Description

add

Add a new mapping between a Slurm account, machine type and local user, i.e. an allocation for a user.

Parameters

--local-name <string>

The name of the user/group on the local system.

--category <string>

The name of the machine type (product category).

--account-name <string>

The name of the Slurm account.

ls, list

List allocations on the system.

Optional parameters

--ucloud-name <string>

Query by UCloud name. Supports regex.

--account-name <string>

Query by Slurm account name. Supports regex.

--local-name <string>

Query by local user/group name. Supports regex.

--category

Query by machine type/category name. Supports regex.

delete, del, rm, remove

Delete allocations on the system. At least one parameter is required, and note that parameters function as search queries.

Optional parameters

--ucloud-name <string>

Query by UCloud name. Supports regex.

--account-name <string>

Query by Slurm account name. Supports regex.

--local-name <string>

Query by local user/group name. Supports regex.

--category

Query by machine type/category name. Supports regex.

tasks

Subcommand Description

kill-all

Kills all long-running tasks on the system, such as a file copy, empty trash or file transfer.

users

Subcommand Description

add

Creates a new mapping between UCloud user with user name ucloud-name and the local user local-name.

Note that it is not possible to change the uid which a UCloud user maps to, ever. Doing this through the CLI or through the interface is not possible. If you must change which uid a UCloud maps to, then you must manually do the following steps:

  1. Manually clean up any users and other resources if needed
  2. Connect directly with the IM database and remove the relevant row from public.connections
  3. If needed, contact UCloud support with help in removing incorrectly registered resources (such as drives)

Parameters

--ucloud-name <string>

The users name/ID on UCloud

--local-name <string>

The users name on the system.

Example

$ ucloud users add --ucloud-name AliceAndersen#1234 --local-name aandersen01

delete, del, rm, remove

Deletes a mapping between a UCloud user and a user on the local system. Note that the parameters functions as search queries, and at least one is required.

Optional parameters

--ucloud-name <string>

The users name/ID on UCloud.

--local-name <string>

The users name on the local system.

--local-uid <number>

The users ID on the local system.

ls, list

List user mappings between UCloud users and users on the local system.

Optional parameters

--ucloud-name <string>

Query by UCloud user names.

--local-name <string>

Query by the user name on the local system.

--local-uid <number>

Query by the UID on the local system.

Examples

$ ucloud users ls
Previous Configuration
Next Appendix