DataWorks allows you to add multiple objects, such as nodes, functions, resources, and components, to a deployment package at a time for unified deployment. This topic describes how to create a deployment package to deploy objects in the package across workspaces.
Scenarios
Cross-workspace deployment is mainly used to publish objects such as nodes, functions, resources, and components from one basic-mode workspace to another within the same Alibaba Cloud account and region. This feature also allows you to implement development and production environment isolation for basic-mode workspaces. For more information, see Appendix: How to isolate data between development and production environments for a workspace in basic mode.
To ensure that tasks run properly and as expected after being published to the destination workspace, carefully read Deployment logic and understand the mapping relationships between the source and destination workspaces before proceeding.
Limits
Permissions
Create a deployment environment: Only members with the Workspace Administrator role are allowed to create and configure a deployment environment.
Deploy tasks to the production environment of the source workspace: Members with the O&M, Deploy, or Workspace Administrator roles can deploy tasks to the production environment of the source workspace in DataStudio.
Create a deployment package: Only members with the Development role can create a deployment package in Deploy Center.
Deploy the package: Members with the O&M, Deploy, or Workspace Administrator roles in both the source and destination workspaces can deploy packages.
For information about how to add members to a workspace and grant permissions to the members, see Manage permissions on workspace-level services.
Environments
The following environment limits apply when you perform cross-workspace deployment from the source workspace to the destination workspace.
Source workspace | Destination workspace | ||||
Workspace mode | DataStudio version | Basic mode DataStudio (new version) | Basic mode DataStudio (old version) | Standard mode DataStudio (new version) | Standard mode DataStudio (old version) |
Basic mode |
| Unsupported |
| Unsupported | |
Unsupported |
| Unsupported |
| ||
Standard mode | - | Unsupported | Unsupported | Unsupported | Unsupported |
Others
Cross-workspace deployment is used to deploy objects across workspaces within the same Alibaba Cloud account and in the same region. Cross-region deployment is not supported. If you need to deploy objects across regions, use Deploy Center.
Deployment process
The following figure shows the cross-workspace deployment process.
Procedures
All cross-workspace deployment operations are performed in the source workspace.
1. Create a deployment environment
When you deploy nodes from the source workspace to the destination workspace, the destination offers a completely new deployment environment. Therefore, you must map the source's engine instance, resource group, and dependencies to the destination environment. After the mapping is complete, you can deploy packages without additional configuration in the destination workspace. The system will automatically replace the environment configurations used for deploying nodes with the mapped environment information/configurations?.
Only members with the Workspace Administrator role are allowed to create and configure deployment environments.
Step 1: Go to the Deploy Center
Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose . On the page that appears, select the desired workspace from the drop-down list and click Go to Management Center.
In the upper-left corner of the page that appears, click the
icon and choose .
Step 2: Configure a deployment environment
On the Deployment Center page, click Deployment Environment Management in the left-side navigation pane.
Click Create Deployment Environment and configure the environment information as needed.
Click Create.
2. Deploy the task to the production environment of the source workspace
Using a basic-mode workspace in DataStudio (new version) as an example, this step involves deploying tasks to the production environment of the current (source) workspace. After the deployment is complete, the system pushes the built deployment package to the Nodes to Deploy list in the Deploy Center, which will be used for subsequent cross-workspace deployment.
Only members with the O&M, Deploy, or Workspace Administrator roles are allowed to perform deployment operations.
If you are using a basic-mode workspace in DataStudio (old version), locate the nodes, functions, or other items to be deployed in the DataStudio module, and click the Submit button (
) in the top toolbar.
In DataStudio (new version), locate the nodes, functions, or other items to be deployed, and click the Deploy button in the top toolbar to enter the deployment process.
In the deployment process, click Start Deployment to Production Environment to deploy the selected objects to the production environment of the source workspace.

3. Create a deployment package
Members with the Develop role can create deployment packages in the Deploy Center. If you are assigned the Workspace Administrator role, you do not need to manually create a package. After you select the objects to be deployed, the system automatically generates a package.
Log on to the Deploy Center of the source workspace as a member with the Development role.
To enter the Deploy Center, click the
icon in the upper-left corner, then choose . In the left-side navigation pane, click Nodes to Deploy to view the packages to be deployed. You can click Add to Deployment Package in the Actions column. After the packages are added, the number of packages to be deployed is displayed in the View Package to Deploy section.
NoteYou can also select multiple objects and click Batch Add to Deployment Package in the lower part of the page.
If you use DataStudio (new version) and click Terminate Deployment in the deployment process, the corresponding package to be deployed will no longer be displayed here.

After the objects are added to the deployment package, click View Packages to verify the objects to be deployed in the package. You can click Remove to remove the unnecessary package.
NoteCurrently, you can only view objects in DataStudio (old version).
On the Deployment Package page, click Create Deployment Package and follow the instructions to complete the creation.
NoteIf you are assigned the Workspace Administrator role, click Deploy All to directly deploy the objects.
4. Deploy the deployment package
The member performing this operation must have the O&M, Deploy, or Workspace Administrator role in both the source and destination workspaces.
Log on to the Deploy Center of the source workspace as a member with one of the required roles.
To enter Deploy Center, click the
icon in the upper-left corner, then choose . In the left-side navigation pane, click Deployment Packages to view the generated package.
Click Deploy in the Actions column of the package and follow the on-screen instructions to deploy it.
NoteDuring cross-workspace deployment, members with the O&M, Deploy, or Workspace Administrator roles can edit and modify the resource group to be used when the deployed task runs in the destination workspace.
For a node whose instance generation mode is
Next Day, the deployment takes effect based on the following rules:If you deploy the node before 23:30 on the current day, the deployment takes effect on an instance that is generated for the node on the next day.
If you deploy the node after 23:30 on the current day, the deployment takes effect on an instance that is generated for the node on the third day.
For a node whose instance generation mode is Immediately After Deployment, the deployment takes effect based on the following rules:
If the scheduling time of the node is at least 10 minutes after the node is deployed, the updated instance is generated as scheduled.
If the scheduling time of the node is within 10 minutes after the node is deployed, or you deploy the node after 23:30 on the current day, the updated instance is generated on the third day.
Step 5: View the deployment result
After a deployment package is created and deployed, you can go to the Deployment Packages page of the current workspace to view deployment packages.

If the deployment is successful, you can go to the Operation Center of the destination workspace to view the deployed tasks.