Disclaimer
Your use of this download is governed by Stonebranch’s Terms of Use, which are available at Stonebranch Integration Hub - Terms of Use.
Version Information
Template Name | Extension Name | Version | Status |
---|---|---|---|
Cloud Data Transfer | ue-cloud-dt | 4 (Current 4.0.2) | Fixes and new features are introduced. |
Cloud Data Transfer | ue-cloud-dt | 3 | Hot Fixes Only (Until UAC 7.3 is End of Support) |
Cloud Data Transfer | ue-cloud-dt | 1 & 2 | End of Support |
Refer to Changelog for version history information.
Version 4.0.0 is a major release and introduces breaking changes that might affect some users depending on their setup. Administrators are strongly advised to refer to Changelog for more information on the changes introduced in this release. Refer also to Migration Guide to apply changes in existing task definitions.
Overview
This integration provides the capability to perform data transfers between cloud-based storage services and local or distributed file systems. It also provides data storage management capabilities like listing, creating, or deleting data storage objects.
Key Features
This integration is equipped with the following key features.
Feature | Description |
---|---|
Data management and synchronization |
|
Efficient and secure data transfers |
|
Complementary capabilities |
|
Observability |
|
Requirements
This integration requires a Universal Agent, a Python runtime to execute the Universal Task.
Area | Details |
---|---|
Python Version | Requires Python 3.7 or 3.11. Tested with Python 3.7.6 and Python 3.11.6. |
Universal Agent Compatibility |
|
Universal Controller Compatibility | Universal Controller Version >= 7.4.0.0. |
Network and Connectivity | Universal Agent should be able to establish a connection with:
|
Supported Actions
This integration supports multiple actions which can be grouped into the following categories:
Category | Actions | Required Input Fields |
---|---|---|
Single storage actions |
|
|
Two storage actions |
|
|
Action Type: Single Storage Action
Single storage actions involve listing and managing existing data objects in a local or remote storage.
Configuration Examples
User Scenario: List Directories action, using a filter and with output log in Text format. | User Scenario: Create Object action and with output as JSON format. |
Action Output
Output Type | Description | Examples |
---|---|---|
EXTENSION | The extension output provides the following information:
| |
STDOUT | The executed command's output. |
Action Type: Two Storage Action
Two storage actions involve data transfers between local or cloud storages.
Configuration Examples
User Scenario: Copy files matching filenames with pattern “2024_March*.csv”, from local storage of Universal Agent to AWS S3. Exclude files matching “2024_March*.txt”. | User Scenario: Synchronization of source and target cloud storages as a dry run execution. In the scenario that no files are to be synced the task instance status is marked as “Failed". |
Action Output
Output Type | Description | Examples |
---|---|---|
EXTENSION | The extension output provides the following information:
| |
STDOUT | The executed command's output. |
Input Fields
Name | Type | Description | Version Information |
---|---|---|---|
Action | Choice | Action to be performed. Available actions:
| Introduced in 1.0.0 |
Configuration File | Script | This integration depends on Rclone. This field models the Rclone Configuration file, which contains all required parameters to connect to the Storage System, Source Storage and Target Storage. The filename should have the ".conf" suffix. Example: rclone.conf | Introduced in 1.0.0 |
Storage System | Dynamic Choice Field | Remote or Local storage to execute the selected Action. Execute the Dynamic Choice Field and retrieve all the available Storages from Configuration File. Required when one of the Single storage actions is selected. | Introduced in 1.0.0 |
Source Storage | Dynamic Choice Field | Remote or Local source storage, where transfer Action is initiated. Execute the Dynamic Choice Field and retrieve automatically all the available Storages from Configuration File. Required when one of the Two storage actions is selected. | Introduced in 1.0.0 |
Target Storage | Dynamic Choice Field | Remote or Local target storage, where transferred data is stored. Execute the Dynamic Choice Field and retrieve automatically all the available Storages from Configuration File. Required when one of the Two storage actions is selected. | Introduced in 1.0.0 |
Storage Credentials | Credential | Credentials needed to connect to the selected Storage System. From Universal Controller 7.6 onwards a variable that holds the Credential Name can be used when related checkbox is selected. In this case the content of this field should be Required when one of the Single storage actions is selected. | Introduced in 1.0.0 |
Source Credentials | Credential | Credentials needed to connect to the selected Source Storage. From Universal Controller 7.6 onwards a variable that holds the Credential Name can be used when related checkbox is selected. In this case the content of this field should be | Introduced in 1.0.0 |
Target Credentials | Credential | Credentials needed to connect to the selected Target Storage.
| Introduced in 1.0.0 |
Filepath | Text | File or directory path from where to retrieve data for the selected Action. Required when one of the Single storage actions is selected. | Introduced in 1.0.0 |
Source Filepath | Text | File or directory path from where to retrieve data for the selected Action. Required when one of the 150079703 is selected. | Introduced in 1.0.0 |
Target Filepath | Text | File or directory path where transferred data will be stored for the selected Action. Required when one of the Two storage actions is selected. | Introduced in 1.0.0 |
Update Credentials | Checkbox | If the remote storage uses OAuth for its authorization, Rclone can be adjusted to refresh the respective token in its Configuration File during execution time. Enabling this field, will ensure that the runtime-updated token from Rclone, will get provisioned to the respective Credential Field on the Universal Controller. The default setting is unchecked. | Introduced in 1.0.0 |
Controller URL | Text | Controller URL where Storage Credentials, Source Credentials, Target Credentials are stored. Required when Update Credentials is checked. | Introduced in 1.0.0 |
Controller Credentials | Credentials | Controller user's credentials, used for logging and updating Storage Credentials, Source Credentials, Target Credentials. The Credentials definition should be as follows:
Required when Update Credentials is checked. | Introduced in 1.0.0 |
Refresh Storage Credentials
| Array | Note: This Array is not required to be configured in case the Storage type is "One Drive". This Array field is available when Update Credentials is checked. Is used as a mapping table between the Configuration File locator that has been updated by Rclone during execution, and its corresponding Universal Controller Credential field.
The result of this action is that the Configuration File's locator value, is copied to the provided Storage Credential's field. Each line of this Array is evaluated, and related mapping is performed. See the Refresh authorization fields for other remotes. Note: Refresh of Storage/Source/Target Credentials is performed via Controller's REST API. See Network Requirements . | Introduced in 1.0.0 |
Use Filter | Choice | The filter type that is applied on the Action. Available options:
Optional for all, but Create Object Action. | Introduced in 1.0.0 |
Filter | Text | Filter as regular expression that is applied on the Action. Required when Use Filter is checked. | Introduced in 1.0.0 |
Overwrite Options | Choice | Options for overwriting files in the Target Storage. Available options:
Optional when one of the Two storage actions is selected. | Introduced in 1.0.0 |
Recursion Depth | Integer | Recursion depth that is applied. Default value 1 means that no recursion will be applied. Note: Use this option with caution when one of the following Actions are selected, as this might result in doing actions on unnecessary files/cloud objects. For more information on Recursion Depth, you can refer to the official Rclone documentation:
The default value is 1. | Introduced in 1.0.0 |
Error On No File Transfer | Checkbox | When enabled and when no files are transferred a failure exit code with value equal to 21 is raised. The default setting is unchecked. | Introduced in 1.0.0 |
Dry-Run | Checkbox | When enabled, performs a trial run with no permanent changes of the selected Action. Note: It is recommended to execute a Dry-Run as a test prior to the final task configuration when the following Actions are used:
The default value is unchecked. | Introduced in 1.0.0 |
Additional Options | Text | Space-separated Rclone options applied to the selected Action. | Introduced in 1.0.0 |
Log Format | Choice | Option for STDERR logging format. Available options:
| Introduced in 1.0.0 |
Output Fields
Name | Type | Description | Version Information |
---|---|---|---|
Progress | Large Text | Live progress information of the transferred files. | Introduced in 1.0.0 |
Exit Codes
The exit codes for this Universal Extension are described below.
Exit Code | Status | Status Description | |
---|---|---|---|
0 | Success | Task executed successfully. | |
1 | Failed | Execution Failed: "<Error Description>" | |
20 | Failed | Data Validation Error: "<Error Description>" | |
21 | Failed | Execution Failed: No Files were transferred. | |
22 | Failed | Execution Failed: Task executed successfully, but updating Credentials failed. |
STDOUT and STDERR
STDOUT and STDERR provide additional information to the User. The populated content can be changed in future versions of this extension without notice. Backward compatibility is not guaranteed.
Observability
Metrics are generated and exported by this integration, contributing to the UAC data observability, delivered since Universal Automation Center 7.5.0.0.
Metric: ue.cdt.rclone.speed
Name | Instrument Type | Unit (UCUM) | Attributes | Instrumented By | Description |
---|---|---|---|---|---|
| Histogram | By/s | As defined on Metric Attributes. | Universal Controller (Through Universal Event Templates) | The average speed at which rclone transfers files. |
When the transfer time is too small, the speed becomes too big (Bytes/Sec) and is displayed as 0 by RClone. In such cases, the transfer speed statistic is ignored and no relevant metric is sent.
Metric: ue.cdt.rclone.duration
Name | Instrument Type | Unit (UCUM) | Attributes | Instrumented By | Description |
---|---|---|---|---|---|
| Histogram | s | As defined on Metric Attributes. | Universal Controller (Through Universal Event Templates) | The time took to complete the entire file transfer process, from initiation to completion. |
Metric: ue.cdt.rclone.transfers
Name | Instrument Type | Unit (UCUM) | Attributes | Instrumented By | Description |
---|---|---|---|---|---|
| Histogram | {transfers} | As defined on Metric Attributes. | Universal Controller (Through Universal Event Templates) | The total number of file transfers. |
Metric Attributes
The following attributes are applicable for ue.cdt.rclone.speed
, ue.cdt.rclone.duration
and ue.cdt.rclone.transfers
.
Attribute Name | Enabled | Description |
---|---|---|
action | By Default | The selected action of the Universal Task. |
source | By Default | The source storage of the files. |
target | By Default | The source file path. |
Other Observability Configuration Options
Administrators can update the Universal Event Template to control additional attributes that can be sent out for Universal Event-based Metrics. However, this configuration should be approached with caution. When the possible distinct values of those attributes are high, that might lead to high cardinality issues.
Administrators can activate them with caution as follows:
Go to Administration → Universal Templates
Select the Universal Template
Click “Event Templates” Tab
Select the Name of the Event Template you want to update, which represents the metric you are interested in.
Update the “Optional Metric Labels” List the required Metric Labels.
How To
Import Universal Template
To use the Universal Template, you first should perform the following steps.
This Universal Task requires the Resolvable Credentials feature. Check that the Resolvable Credentials Permitted system property has been set to true.
To import the Universal Template into your Controller, follow the instructions from the official documentation: Import An Integration.
When the files have been imported successfully, refresh the Universal Templates list; the Universal Template will appear on the list.
Modifications of this integration, applied by users or customers, before or after import, might affect the supportability of this integration. For more information refer to Integration Modifications.
Configure Universal Task
To configure a new Universal Task, there are three steps required:
- Create required Resolvable Credentials. Required as Input Fields on the Universal Task Configuration.
- Create a new Script of type Data, for the Configuration File and populate it according to the following section of Setup Rclone Configuration File as UAC Script.
- Create a new task, and enter the task-specific details that were created in the Universal Template.
Setup Rclone Configuration File as UAC Script
This integration depends on Rclone binary which needs a configuration file to locate the required information for the involved storage system(s). This file is passed from the Universal Controller to the Universal Agent as UAC Script through the Configuration File Input Field. The Universal Controller Script should be of type Data, and option Resolve UAC Variables should be enabled.
Integrated Storage Systems & Sample Configurations
Rclone is integrated with multiple storage systems. This integration has been tested against the following Storage Systems:
- Amazon S3
- Google Cloud Storage
- Microsoft OneDrive Business
- Local file system (Linux, Windows)
- HTTP(S) URL
This integration should work properly against other Storage Systems as well, as long as the integration interface (see chapter Configure Universal Task) and functionalities listed in this document fulfill the needs of the Storage System.
For functionalities required for specific Storage Systems, users and customers are encouraged to open a Feature Request in our Customer Support Portal.
The indicative Rclone configuration examples below contain the basic connection parameters.
System | Rclone Configuration Documentation Link | Example |
---|---|---|
AWS S3 | AWS S3 Rclone Configuration Guide | |
Google Cloud Storage (Google Drive) | Google Drive Rclone Configuration Guide | |
Microsoft OneDrive/Sharepoint | Microsoft OneDrive/Sharepoint Configuration Guide For One Drive / Sharepoint data transfers, refer also to Refresh Storage Credentials section. | |
Local Filesystem |
Using Credentials
Storage system configuration embodies the related credentials for authentication and authorization. It is advised that account credentials, tokens, or any other essential information inside Rclone Configuration File to be passed as Universal Controller Credentials, through Credential functions to be kept safe.
Task authors should be aware of Credential Attributes length limitations. For example, the 'Runtime Password' attribute of a Universal Controller Credential, supports strings with up to 512 characters, so it should not be used to store information larger than this value.
There are several ways that Credential Functions can be used. To make the Configuration File immune to changes of credential names used in the task definition it is recommended to follow the Configuration through Credential Field Variables approach. Another benefit of this approach is that it is compatible with all the Universal Controller versions supported by this integration. However, alternative approaches are Configuration through Credential Name and Configuration through Credential as Variable, which rely on changes performed on the Configuration File itself, rather on the task definition. The next chapters provide more information on them.
For local filesystem storage, no credentials are required in the Configuration File. In this case, the credentials that are provided in the Agent Details of the Universal Task are used. If not, the selected action is executed with the permissions of the user that runs the ubroker daemon.
Configuration through Credential Field Variables
The below table lists the variable that can be used for the respective input Credential Field and an example of a function that can be used in the Configuration File definition.
Field Name | Field Variable | Credential Function Example |
---|---|---|
Storage Credentials | ops_ue_cloud_storage_credentials | ${_credentialUser('${ops_ue_cloud_storage_credentials}')} |
Source Credentials | ops_ue_cloud_source_credentials | ${_credentialUser('${ops_ue_cloud_source_credentials}')} |
Target Credentials | ops_ue_cloud_target_credentials | ${_credentialUser('${ops_ue_cloud_target_credentials}')} |
Example of a Configuration File for AWS S3 Storage
[aws_s3] type = s3 provider = AWS access_key_id = ${_credentialUser('${ops_ue_cloud_storage_credentials}')} secret_access_key = ${_credentialPwd('${ops_ue_cloud_storage_credentials}')} region = us-east-2 [aws_s3_source] type = s3 provider = AWS access_key_id = ${_credentialUser('${ops_ue_cloud_source_credentials}')} secret_access_key = ${_credentialPwd('${ops_ue_cloud_source_credentials}')} region = us-east-2 acl = bucket-owner-full-control role_arn = arn:aws:iam::<account_id>:role/<role policy> [aws_s3_target] type = s3 provider = AWS env_auth = false access_key_id = ${_credentialUser('${ops_ue_cloud_target_credentials}')} secret_access_key = ${_credentialPwd('${ops_ue_cloud_target_credentials}')} region = us-east-2
Configuration through Credential Name
In this case, the Credential Name is used directly inside the Configuration File
Example of a Configuration File for AWS S3 Storage, using a Credential Function with the Credential Name
[aws_s3] type = s3 provider = AWS access_key_id = ${_credentialUser('ue-aws-s3')} secret_access_key = ${_credentialPwd('ue-aws-s3')} region = us-east-2
When using this approach always have in mind that:
- Any update on the Storage/Source/Target Credential attributes will have no affect on the Configuration File. However if different Credential Names are used on the Task definition, then the configuration file needs to be updated as well to refer to the new Credential names.
- A single change on the Configuration File will affect all the Cloud Data Transfer Tasks, which are utilizing this Script.
Configuration through Credential as Variable
Starting from Universal Controller 7.6 and Cloud Data Transfer 4.0.0, Credentials can be provided as UAC Variables:
The above approach requires no custom changes in the Configuration File contents.
[aws_s3] type = s3 provider = AWS access_key_id = ${_credentialUser('${ops_ue_cloud_storage_credentials}')} secret_access_key = ${_credentialPwd('${ops_ue_cloud_storage_credentials}')} region = us-east-2
Refresh Storage Credentials
Refresh token for Microsoft One Drive
Remote storages of type Microsoft One Drive & Sharepoint use OAuth2 token ({"access_token": ..., "token_type": ... , "refresh_token": ... , "expiry": .... }
) to authorize users or applications. In this case and only when the access token has expired, Rclone exchanges the existing refresh token
for a new access token
and then establishes a connection with the remote storage. This integration provides the capability to save the new value of the token on the selected Universal Controller Credential, so it can be used and configured as a Credential Function.
To enable this functionality, the task input fields related to this configuration are Update Credentials, Controller URL, Controller Credentials. The integration will perform no Update Credentials actions if the identifies Storage/Source/Target System is not of type "onedrive".
An example of such a configuration can be found below:
Please read the Rclone limitations on OneDrive token refresh.
Refresh authorization fields for other remotes
Some remote storages might have a functionality of refreshing an authorization field. This integration provides the capability to save the new value of the authorization field on a selected Universal Controller Credential, so it can be used and configured as a Credential Function.
The task input fields related to this configuration are Update Credentials, Controller URL, Controller Credentials, and Refresh Storage Credentials.
An example of such a configuration can be found below:
Import Grafana Dashboard
Users can benefit from a ready-to-use sample dashboard that this downloadable integration offers when observability features are used. It is located under the /observability/grafana/
directory inside the downloadable zip file from Stonebranch Integration Hub. Administrators should refer to the official Grafana User Guide on how to import a Grafana Dashboard.
Dashboard’s Prometheus data source is configured as a variable and thus needs to be mapped to an existing Data Source configured on the target Grafana instance.
Integration Modifications
Modifications applied by users or customers, before or after import, might affect the supportability of this integration. The following modifications are discouraged to retain the support level as applied for this integration.
Python code modifications should not be done.
Template Modifications
General Section
"Name", "Extension", "Variable Prefix", and "Icon" should not be changed.
Universal Template Details Section
"Template Type", "Agent Type", "Send Extension Variables", and "Always Cancel on Force Finish" should not be changed.
Result Processing Defaults Section
Success and Failure Exit codes should not be changed.
Success and Failure Output processing should not be changed.
Fields Restriction Section
The setup of the template does not impose any restrictions, However with respect to the "Exit Code Processing Fields" section.Success/Failure exit codes need to be respected.
In principle, as STDERR and STDOUT outputs can change in follow-up releases of this integration, they should not be considered as a reliable source for determining the success or failure of a task.
Event Template configuration related to “Metric Label Attributes” & “Optional Metric Labels” is allowed. However, administrators should be cautious of high cardinality scenarios that might occur
Users and customers are encouraged to report defects, or feature requests at Stonebranch Support Desk.
Migration Guide
Upgrading from version 3.0 to 4.0
When upgrading major versions, the following actions should be performed to migrate properly task definitions due to the breaking changes:
- Tasks which reference Cloud Data Transfer task instance variables (for example sibling tasks within a Workflow), should be updated to reference the Cloud Data Transfer variables as
${ops_ue_cloud_<field_name>}.
- Configuration File should be updated when credential fields are referenced:
Cloud Data Transfer 3.0.0 (and earlier) | Cloud Data Transfer 4.0.0 (and later) |
---|---|
Document References
This document references the following documents.
Document Link | Description |
---|---|
Universal Templates | User documentation for creating Universal Templates in the Universal Controller user interface. |
Universal Tasks | User documentation for creating Universal Tasks in the Universal Controller user interface. |
Rclone | Rclone official documentation. |
Rclone Install | Installation instructions. |
Rclone Downloads | Download links for Linux, Windows, and MacOS. |
Rclone Storage Systems configuration | Configuration file details. |
Rclone Exit Codes | Rclone exit codes list. |
Known Issues
On version 4.0.1 only the agent user (the user running the Universal Agent) could run this integration on Linus OS.
On version 4.0.2 this limitation can be removed manually. To allow users other than the agent user to run a Cloud Data Transfer Task, follow these steps:
Identify the Linux Agents on which the Cloud Data Transfer Task needs to run.
- Import the new version of ue-cloud-dt (4.0.2) on the desired Universal Controller.
Initiate a Test Cloud Data Transfer Task (such as listing files on a local system) on the agents identified in step (1), using the agent user (thus leaving the Agent Details → Credentials field empty). This test ensures that the integration installs correctly on each agent, enabling future tasks to run smoothly under various user accounts.
Changelog
ue-cloud-dt-4.0.2 (2024-10-31)
Fixes
- Fix permission issue on Linux OS when task is executed with a user different than the agent user (#42860)
ue-cloud-dt-4.0.1 (2024-08-08)
Fixes
- Avoid setting executable flag for
rclone
binary on Windows (#41574)
ue-cloud-dt-4.0.0 (2024-06-21)
Enhancements
- Added: New input fields Storage Credentials Variable, Source Credentials Variable, Target Credentials Variable, are supported starting from Universal Controller 7.6.0.0 (#41027).
- Added: Support for automatic refresh of Token Credential field on Universal Controller, for Storage Systems of type One Drive (#40913).
Fixes
- Fixed: Metrics not produced when Task's Log Level is INFO (#36684).
- Fixed: Traceback was visible in STDERR for handled exceptions (#35731).
- Fixed: Set exit code 22 when error is occurs during Update Credentials actions (#30107).
Deprecations and Breaking Changes
Breaking Change: Bundle third party dependencies within the integration package. This change forces the minimum supported Universal Controller and Universal Agent versions to be 7.4.0.0 (#36182).
- Breaking Change: Variable prefix of the Universal Template is changed from ue_cloud_dt to ue_cloud. This change affects the Configuration File contents and referencing task instance variables from other tasks. (#36365).
ue-cloud-dt-3.0.0 (2023-10-07)
Enhancements
Changed: The progress bar, available on Universal Controllers of version 7.3 and above, now syncs with RClone's transfer completion (#34332).
- Changed: Improved clarity of RClone's log messages with respect to log level (#34332).
Added: Introduced Observability metrics enabling enhanced visibility and understanding of behavior for Task Instances. This feature is enabled on Universal Controllers of version 7.5 and above (#34330).
- Added: Filter options are available for all list actions (#34455).
Deprecations and Breaking Changes
Breaking Change: Updated the status descriptions to be more informative (#34335).
Tasks or workflows evaluating the "Status Description" of the task Instance, either programmatically or within UAC, might be affected by it. In that case, they need to conform to the new "Status Description" Text
Breaking Change: Extension Invocation Fields > Some fields are renamed for better readability (#34335).
Breaking Change: Extension Invocation Fields > Credential fields are displayed as an object for better readability (#34335).
Fixes
- Fixed: RClone's command will no longer include duplicate flags (#34265).
Other
- Extra: The extension is supplemented with a Grafana dashboard that, by utilizing the produced observability metrics, calculates and displays statistical data (#34338).
ue-cloud-dt-2.0.1 (2023-07-28)
Fixes
- Fixed: Retrieving STDOUT/STDERR might block a Task Instance in Running status (#33732).
ue-cloud-dt-2.0.0 (2022-10-26)
Deprecations and Breaking Changes
- Breaking Change: Universal Template Name rename.
This version of Universal Extension will have no effect on existing tasks created with Universal Template Cloud Data Transfer and extension archive ue-cloud-ft-1.0.0. Future updates on this integration will take place on top of ue-cloud-dt-2.0.0.
ue-cloud-ft-1.0.0 (2022-09-02)
Enhancements
- Added: Initial version (#28787)