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 |
|
|
List allocations on the system.
Optional parameters
Query by UCloud project ID. Supports regex.
Query by local user name. Supports regex.
Query by the local group name. Supports regex.
Query by local user ID. Supports regex.
Query by local ID (GID). Supports regex.
Query by product category (Product). Supports regex. |
|
|
View details about allocations on the system.
Optional parameters
Query by UCloud project ID. Supports regex.
Query by local user name. Supports regex.
Query by the local group name. Supports regex.
Query by local user ID. Supports regex.
Query by local ID (GID). Supports regex.
Query by product category (Product). Supports regex. |
drives
| Subcommand | Description |
|
|
List all drives.
Optional parameters
Query by the UCloud ID of the drive. Supports regex.
Query by the UCloud project ID of the owner of the drive. Supports regex.
Query by the local user name that owns the drive. Supports regex.
Query by the local group (GID) that owns the drive. Supports regex.
Query by the local UID of the user that owns the drive. Supports regex.
Query by the local GID of the user that own the drive. Supports regex.
Query by the path to the drive on UCloud. Does not support regex.
Query by the local path on your system. Does not support regex. |
|
|
Get detailed information about drives.
Optional parameters
Query by the UCloud ID of the drive. Supports regex.
Query by the UCloud project ID of the owner of the drive. Supports regex.
Query by the local user name that owns the drive. Supports regex.
Query by the local group (GID) that owns the drive. Supports regex.
Query by the local UID of the user that owns the drive. Supports regex.
Query by the local GID of the user that own the drive. Supports regex.
Query by the path to the drive on UCloud. Does not support regex.
Query by the local path on your system. Does not support regex. |
jobs
| Subcommand | Description |
|
|
Get detailed information about jobs |
|
|
List jobs. |
projects
| Subcommand | Description |
|
|
List UCloud projects with a mapping to your system.
Optional parameters
Query by UCloud name. Supports regex.
Query by UCloud ID. Supports regex.
Query by local name. Supports regex.
Query by local ID. Supports regex. |
|
|
Replaces the local ID (GID) of the project with the current local ID Parameters
The old GID of the project to replace.
The new GID of the project to replace. |
Examples
$ ucloud projects ls
scripts
| Subcommand | Description |
|
|
List log of previously run tasks
Optional parameters
Search log entries where
Show only failed scripts.
Show only entries from the script located at the path
Show entries older than
Show entries newer than |
|
|
Get detailed information about script with a specific ID.
ExampleTo get detailed information about the script log with ID 1234.
|
|
|
Delete script log entry with a specific ID.
ExampleTo delete the script log with ID 1234.
|
|
|
Deletes all script log entries. |
|
|
Prints information about parameters for the `script` command. |
slurm-accounts
| Subcommand | Description |
|
|
Add a new mapping between a Slurm account, machine type and local user, i.e. an allocation for a user. Parameters
The name of the user/group on the local system.
The name of the machine type (product category).
The name of the Slurm account. |
|
|
List allocations on the system.
Optional parameters
Query by UCloud name. Supports regex.
Query by Slurm account name. Supports regex.
Query by local user/group name. Supports regex.
Query by machine type/category name. Supports regex. |
|
|
Delete allocations on the system. At least one parameter is required, and note that parameters function as search queries. Optional parameters
Query by UCloud name. Supports regex.
Query by Slurm account name. Supports regex.
Query by local user/group name. Supports regex.
Query by machine type/category name. Supports regex. |
tasks
| Subcommand | Description |
|
|
Kills all long-running tasks on the system, such as a file copy, empty trash or file transfer. |
users
| Subcommand | Description |
|
|
Creates a new mapping between UCloud user with user 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:
Parameters
The users name/ID on UCloud
The users name on the system. Example
|
|
|
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
The users name/ID on UCloud.
The users name on the local system.
The users ID on the local system. |
|
|
List user mappings between UCloud users and users on the local system.
Optional parameters
Query by UCloud user names.
Query by the user name on the local system.
Query by the UID on the local system. |
Examples
$ ucloud users ls
UCloud