ND Client
The Nodeum Client nd
command line tool provides a modern set of commands to execute data movement operations with Nodeum. The nd
command line tool is built for compatibility with the Nodeum v2
for expected functionality and behavior.
nd
has the following syntax:
nd [GLOBALFLAGS] COMMAND --help
See Command Quick Reference for a list of supported commands.
Copyright
nd
is a property of Nodeum and its subsidaries, if any. The intellectual and technical concepts contained herein are proprietary to Nodeum and its subsidaries and may be covered by Belgium and Foreign Patents, patents in process, and are protected by trade secret or copyright law. Dissemination of this information or reproduction of this material is strictly forbidden unless prior written permission is obtained from Nodeum.
Related Version: ND-2.0.8
Quickstart
Install nd
Install the nd command line tool onto the host machine. Go in the section that corresponds to the host machine operating system or environment:
Linux
The following commands add a temporary extension to your system PATH for running the nd bash client. Defer to your operating system instructions for making permanent modifications to your system PATH.
Alternatively, execute nd by navigating to the parent folder and running ./nd --help
macOS
Windows
Open the following file in a browser:
https://get.nodeum.io/public/nd-2.0.7-windows-amd64
Once download, rename the file to nd.exe
and execute the file by double clicking on it, or by running the following in the command prompt or powershell:
\path\to\nd.exe --help
ND client installation (RPM example)
1. Access to the interface
2. Command Quick Reference
The following table lists nd commands:
Name | Shortcut | Description |
---|---|---|
admin | Access the administration commands | |
config | Configure the Nodeum client | |
copy | cp | Create a task to copy data between two storages |
move | mv | Create a task to move data between two storages |
task | List detailed information about created task | |
help | h | Displays a summary of command usage and parameters on the terminal |
Parameters
Syntax
The nd client provides a Bash completion mechanism to facilitate the search of commands.
Metadata key can't include an = character.
Global Parameters
Name | Shortcut | Description | Default |
---|---|---|---|
--json | Output as JSON | false | |
--config value | -C value | Path to configuration file | /home/nodeum01/ .config/.nd/ config.json |
--config-dir value | -C value | Path to configuration folder (default: "/home/nodeum01/.config/.nd") | |
--alias value | Alias in configuration file for authentication | default | |
--url value | URL of Nodeum | ||
--access-token value | for API authentication (1st authentication method) | ||
--refresh-token value | for API authentication (1st authentication method, not saved in config) | ||
--authorization-endpoint value | for Device Authorization Flow (2nd authentication method) | ||
--token-endpoint value | for Device Authorization Flow (2nd authentication method) | ||
--client-id value | for Device Authorization Flow (2nd authentication method) | ||
--scopes value | for Device Authorization Flow (2nd authentication method) | ||
--persist-session | persist Device Authorization session on disk for 1 hour | true | |
--persist-session-renew | if persist session is enabled, renew the token | false | |
--username value | for API authentication (3rd authentication method) | ||
--password value | for API authentication (3rd authentication method) | ||
--anonymous | no login | false | |
--help | -h | show help | false |
--version | -v | print the version | false |
Mandatory Parameters for OpenID integration
Parameters are available for each data movement task.
Name | Description | Value |
---|---|---|
--md project_name= | Name of project defined in OpenStack | string |
--md project_domain_name= | Name of the project's domain defined in OpenStack | string |
--md user_domain_name= | Name of the project's user defined in OpenStack | string |
--md region_name= | Name of the region's project defined in OpenStack | string |
Standard Parameters
Parameters are available for each data movement task.
Name | Shortcut | Description | Value | Default value |
---|---|---|---|---|
--help | -h | Show help | false | |
--no-run | Create a task and don't launch the task directly | false | ||
--name value | -n | Name of task | string | automatically generated |
--comment value | Comment of task | string | empty | |
--overwrite value | Overwrite all identical files already stored at destination | true - false | false | |
--priority value | Priority of the task, between 0 and 9 (0 is the highest priority) | 0 - 9 | 0 | |
--recursive | -R | Execute a recursive copy of the folder. If subfolders are present, the service will also copy the contents of each subfolder | false | |
--working-dir value | --wd | Defines the workpath to be kept at destination | . - .. - path | 0 |
--ignore-hidden value | Task will not handle hidden file(s) | true - false | false | |
--progress value | Display live progress when running the task | true - false | true | |
--processed-nodes value | Display the processed nodes when running a task when the flag--progress is set | none, error, all | error |
Advanced Parameters
Parameters are available for each data movement task.
Name | Shortcut | Description | Value | Default value |
---|---|---|---|---|
--context-uid value | --uid | Define the User ID which will handle the movement | integer | unset |
--context-gid value | --gid | Define the Group ID which will handle the movement | integer | unset |
--defer | when requesting the run of the task, will defer it for later with an unique ID | false | ||
--parallel value | Define the number of mover which will handle the movement. Maximum value is determined by the deployed implementation. | 1-20 | 1 | |
--callback type | Add callback. Format is type:./path/to/file | ./path/to/file | ||
--trigger-md key=value | --md key=value | Set metadata on the trigger. Format is key=value. Accepts multiple inputs | key=value | |
--task-md key=value | Set metadata on the task. Format is key=value. Accepts multiple inputs | key=value | ||
--files-md key=value | Set metadata on the files. Format is key=value. Accepts multiple inputs | key=value |
3. Configuration
nd uses a JSON formatted configuration file used for storing certain kinds of information, such as the authentication and authorization options. By default, this configuration file is unique by user. It is stored in its home directory.
For Linux and macOS, the default configuration file location is .config/.nd/config.json
which is store in the $HOME
. For Windows, the configuration file is stored in $AppData$
.
You can display the configuration file location in using the command nd --help
:
You can use the --config value
where value is the path to a JSON formatted configuration file that nd uses for storing data. The ND_CONFIG
environment variable can be used to set the value.
Store the configuration file in a 'central' directory to allow each user to get the same nd client configuration. For this, the --config-dir value
is available.
Command
Command | Description |
---|---|
| this option specifies the JSON filename where the configuration is stored |
| this option specifies the directory where the JSON configuration is stored |
SSL
nd client allows SSL configuration to communicate with the Data Mover service which listen in HTTPS. It is required to add the public certificate generated with the server.
The public certificate file has to be stored in this config-dir
folder: .config/.nd/certs/CAs/
.
The certificates on the server side have been generated following this command:
Where 1.1.1.1
is the ip of the nginx interface and nodeum.domain.local
is its hostname including domain name.
Authentication and Authorization
Description
Two authentifcation options are available:
Username / Password
IDP with OpenID
Command
Command | Description |
---|---|
| this command save the nd configuration for authentication |
| this command display the information related to the credentials |
| clear persisted session |
Username / Password configuration
The nd client provides a basic method of authentication in using Username / Password credentials.
Option | Description |
---|---|
| this refer to the node which hosts the following service |
| this is the username to grant authorization to the service |
| this is the password associated to the username that will grant the access to the service |
OpenID configuration
The nd client provides an OpenID authentication mechanism. In this case, nd Client has to be configured with the appropriated IDP to handle proper token management.
The basic configuration is the following one:
Option | Description |
---|---|
| this refer to the node which hosts the following service |
| this is the endpoint url to grant authorization to the service |
| this url is used to programmatically request tokens |
| this refer to the client identifier which is provided by the OpenID provider |
| persist Device Authorization session on disk for 1 hour (default: true) |
| if persist session is enabled, renew the token (default: false) |
The standard behavior is to request a token, which is automatic if there is no token available. The token will be stored in a cache during 15 minutes. The --persist-session-renew
option can be defined to true to force a request token process any time the user has to interface with the nd client.
The token renewal is automatic based on the renewal token
.
Alias & default flags
Description
Alias & default flags allow structuration of different group of settings. Different alias can be defined in the configuration file.
Definition of alias & default flags
Alias and flags are declared in the configuration file ~/.config/.nd/config.json"
. Default flags are defined for each available parameter command. Flags can be overwritted in the nd command.
Example in config file:
Alias usage
The nd command allows the usage of alias, example : nd --alias myorganisation copy
4. Data Mover Service Status
Command
Command | Description |
---|---|
| retrieve the status and the health of each services part of the cluster |
| retrieve all Logs and return their contents |
Data Management Monitoring Services
nd admin status
command requests the Data Management Monitoring service to retrieve the status and health of each services part of the cluster. This command returns list of services. The following information are displayed:
Service Status
Service version
Host where the service is deployed
Its uptime
Consumed memory
Output where all services are reachable
Output where some services are not available
Data Management Log Management Services
nd admin logs
command requests the Data Management Log Management Services to retrieve all Logs and return their contents.
This command allows different parameters:
Option | Description |
---|---|
since | to only show logs not older than a specified date |
until | to only show logs not newer than a specified date |
tag | to filter the logs per type of services. Example nodeum.monitoring |
level | to define the minimum level of logs, one of [trace - debug - info - warn - error - fatal] |
Export
The Logs can be exported in using the standard OS mechanism of exportation
Where nodeum_site-name_log.txt
is the file name and site represents the name of the site.
5. Data Mover Task Management
Follow these steps to create a task:
Use Mandatory Parameters
Define the data source
Define the destination
Apply others parameters if needed
Task Creation
The nd copy
command send a copy request to the data mover service from a storage A (nod://posix_storage/) to a storage B (nod-cloud://cloud_storage/).
Command with minimal parameters
nd copy \ --md project_name=<my project name> \ --md project_domain_name=<my projectdomain name> \ --md user_domain_name=<my user domain name> \ nod://posix_storage/path/subpath/ \ nod-cloud://cloud_storage/container
Detailed syntax
Example of creation task with additional parameters
nd copy \ --md project_name=<my project name> \ --md project_domain_name=<my project domain name> \ --md user_domain_name=<my user domain name> \ --working-dir nod://largedata2_pool/storagetestdata/ \ --recursive \ nod://posix_storage/path/subpath/ \ nod-cloud://cloud_storage/container
Detailed syntax
Available Parameters
Option | Description |
---|---|
| add callback. Format is type:./path/to/file (accepts multiple inputs) |
| when requesting the run of the task, will defer it for later with an unique ID (default: false) |
| just create the task, don't run it (default: false) |
| when running the task, display live progress (default: true) |
| copy directories recursively (default: false) |
| ignore hidden files and folders, starting with (default: false) |
| overwrite existing entries (default: false) |
| task priority [0..9] (default: 0) |
| set working directory |
Working Directory Explanation
The definition of a working directory allows to define where the files will be stored at the destination. Different options are available, they are described in the following definition.
With --wd=.
Source | Destination | Result |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
With --wd=..
Source | Destination | Result |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Examples of Tasks Creation
Execute a task copy from Posix to Swift
nd copy \ --md project_name=<my project name> \ --md project_domain_name=<my project domain name> \ --md user_domain_name=<my user domain name> \ --working-dir nod://posix_storage/path/ \ --recursive \ --ignore-hidden \ nod://posix_storage/path/subpath/ \ nod-cloud://cloud_storage/container
Detailed syntax
Execute a task copy from Swift to Posix
nd copy \ --md project_name=<my project name> \ --md project_domain_name=<my project domain name> \ --md user_domain_name=<my user domain name> \ --working-dir nod://posix_storage/path/ \ --recursive \ --ignore-hidden \ nod-cloud://cloud_storage/container/path/ \ nod://posix_storage/path/
Detailed syntax
Execute a task move from Posix to Swift
nd move \ --md project_name=<my project name> \ --md project_domain_name=<my project domain name> \ --md user_domain_name=<my user domain name> \ --working-dir nod://posix_storage/path/ \ --recursive \ --ignore-hidden \ nod://posix_storage/path/subpath/ \ nod-cloud://cloud_storage/container
Detailed syntax
Execute a task move from Swift to Posix
nd move \ --md project_name=<my project name> \ --md project_domain_name=<my project domain name> \ --md user_domain_name=<my user domain name> \ --working-dir nod-cloud://cloud_storage/container/ \ --recursive \ --ignore-hidden \ nod-cloud://cloud_storage/container/path/ \ nod://posix_storage/path/
Detailed syntax
Execute a defer task
The objective of defer task is to create the task and already initiate the authentication process but defers its execution. Unique IDs will be returned.
List created tasks
Command
nd task list
Description
This command list all tasks created by the user in the data mover service.
The columns describe:
Output | Description |
---|---|
TASK ID | ID of the task |
TASK NAME | Name of the task defined during the creation |
COMMENT | Associated comment |
CREATED BY | User who has created the task |
Output
Tasks status
Description
At the end of each task execution, the task result is displayed if the --progress
parameter is set at true.
Get the status of a task
Description
The nd task status
command allow to display the status any task. The default command execution display a summary of the task status including number of files copied, size copied, overall status, ....
Additional parameters are available to get more insights about the task.
Additional Parameters
Parameters | Description |
---|---|
| display live progress (default: false) |
| display the processed nodes. One of (none, error, all) (default: "error") |
Example of Command
# nd task status 633ecc74a91db0f38f7abc2e
where 633ecc74a91db0f38f7abc2e
is the id of the task
Output
List the status of all executed tasks
Command
nd task list-exec 6389c04605e7b8ff6df35cc4
Description
This command list all tasks executed by the user in the data mover service. The columns describe:
Output | Description |
---|---|
ID | ID of the executed task |
STARTED AT | Date when the task has been started |
FINISHED AT | Date when the task has been finished |
NODES | Number of files copied / Total number of files to be copied |
SIZE | Size of files copied / Total size of files to be copied |
STATUS | Status of the executed task |
Output
Last updated