DataWorks allows you to add multiple objects, such as nodes, functions, resources, and components, to a deployment package and deploy them in a single batch. This topic describes how to create and deploy a deployment package for cross-workspace deployment.
Use case
Cross-workspace deployment is primarily used to deploy objects such as nodes, functions, resources, and components from a workspace in basic mode to another workspace within the same region and under the same Alibaba Cloud account. You can also use this feature to isolate the development and production environments for workspaces in basic mode. For more information, see Appendix: How to isolate development from production in basic mode.
To ensure that tasks run correctly in the destination workspace after deployment, read Publishing change logic carefully before you proceed. Make sure that you fully understand the mapping logic between the source and destination workspaces.
Limitations
Permissions
-
Create a deployment environment: Only members with the Workspace Administrator role can create and configure a deployment environment.
-
Deploy tasks to the production environment of the source workspace: Members with the Operator, Deployer, or Workspace Administrator role can deploy tasks to the source workspace's production environment in Data Studio.
-
Create a deployment package: Members with the Development role can create a deployment package in Deployment Center.
-
Deploy a deployment package: Members with the Operator, Deployer, or Workspace Administrator role in both the source and destination workspaces can deploy a deployment package.
For more information about adding members to a workspace and granting permissions, see Manage permissions on workspace-level services.
Environment limitations
The following table describes the environment requirements for deploying objects from a source workspace to a destination workspace.
|
Source workspace |
Destination workspace |
||||
|
Workspace mode |
Data Studio version |
Basic mode New Data Studio |
Basic mode Legacy Data Studio |
Standard mode New Data Studio |
Standard mode Legacy Data Studio |
|
Basic mode |
|
|
|
|
|
|
|
|
|
|
||
|
Standard mode |
- |
|
|
|
|
Other limitations
Cross-workspace Deployment is used to deploy objects across different workspaces within the same Alibaba Cloud account and the same region. Cross-region deployment is not supported. If you need to deploy objects across regions, use Deploy Center.
Deployment process
Procedure
All operations for cross-workspace deployment are performed in the source workspace.
Step 1: Create a deployment environment
When you deploy nodes from the source workspace to the destination workspace, the destination is a completely new deployment environment. Therefore, you must map information such as engine instances, resource groups, and dependencies from the source to the destination. After the mapping is configured, the system automatically replaces the environment used by the deployed nodes with the mapped environment information when you deploy a deployment package, without requiring additional configuration in the destination workspace.
Only members with the Workspace Administrator role can create and configure a deployment environment.
1. Go to Deployment Center
-
Log on to the DataWorks console. In the target region, click in the left-side navigation pane. Select a workspace from the drop-down list and click Go to Management Center.
-
In the upper-left corner of the page, click the
icon and choose All Products > More > Deployment Center to go to Deployment Center.
2. Configure the 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.
-
-
-
-
-
-
-
Click Create to create the deployment environment.
-
Step 2: Deploy tasks to the production environment of the source workspace
Taking a workspace in basic mode that uses Data Studio (new version) as an example, this step requires you to deploy tasks to the production environment of the current workspace (source workspace). After deployment, the system pushes the built deployment package to Nodes to Deploy in Deployment Center for subsequent cross-workspace deployment.
-
Only members with the Operator, Deployer, or Workspace Administrator role can perform deployment operations.
-
When using a workspace in basic mode with DataStudio (legacy), find the nodes, functions, and other objects to deploy in Data Studio, and click Commit (
) on the top toolbar.
-
In Data Studio, find the nodes, functions, and other objects to deploy, and click Deploy on the top toolbar to start the deployment process.
-
In the deployment process, click Start Production Deployment to deploy the objects to the production environment of the source workspace.
The deployment process consists of three stages: Package Build, Production Checker, and Deploy to Production. After each stage is completed, the status is displayed as Completed. You can click View Details to view the execution information.
Step 3: Create a deployment package
Members with the Development role can create a deployment package in Deployment Center. If you have the Workspace Administrator role, you do not need to manually create a deployment package. After you select the objects to deploy, you can directly deploy them in a batch, and the system automatically generates a deployment package.
-
Use a member with the Development role to go to Deployment Center of the source workspace.
You can go to any DataWorks module, click the
icon in the upper-left corner of the page, and then choose All Products > More > Deployment Center to go to Deployment Center. -
In the left-side navigation pane, click Nodes to Deploy to view the generated objects to deploy. In the Actions column, click Add to Deployment Package for the desired objects. After you add objects, the number of objects to deploy is displayed on the View Deployment Package button.
Note-
You can also select multiple objects to deploy and click Batch Add to Deployment Package at the bottom of the page.
-
When using new Data Studio, if you clicked Terminate Deployment in the deployment process in Data Studio, the corresponding objects to deploy are no longer displayed here.
-
-
After adding objects to the deployment package, click View Deployment Package to verify whether the objects in the deployment package meet your expectations. You can click Remove to remove unwanted objects from the deployment package.
NoteCurrently, only objects from legacy Data Studio can be viewed. Objects from new Data Studio cannot be viewed yet.
-
On the Pending Deployment page, click Deployment Package Creation and follow the on-screen instructions to create the deployment package.
NoteIf you have the Workspace Administrator role, the Deployment Package Creation button is not displayed. Instead, the Deploy All button is displayed, allowing you to directly deploy the objects.
Step 4: Deploy the deployment package
The operator in this step must have the Operator, Deployer, or Workspace Administrator role in both the source and destination workspaces.
-
Use a member with the Operator, Deployer, or Workspace Administrator role to go to Deployment Center of the source workspace.
You can go to any DataWorks module, click the
icon in the upper-left corner of the page, and then choose All Products > More > Deployment Center to go to Deployment Center. -
In the left-side navigation pane, click Deployment Packages to view the generated deployment packages.
-
In the Actions column, click Deploy for the target deployment package and follow the on-screen instructions to complete the deployment.
Note-
During cross-workspace deployment, members with the Operator, Deployer, or Workspace Administrator role can edit the resource group used by the deployed tasks in the destination workspace.
-
For nodes that generate instances on the next day (
T+1), the deployment takes effect as follows:-
If the deployment is performed before 22:00, the deployment takes effect the next day.
-
If the deployment is performed after 22:00, the deployment takes effect on the third day.
-
-
For nodes that generate instances immediately, the deployment takes effect as follows:
-
Instances whose scheduled time is more than 10 minutes after the deployment time are normally generated or updated.
-
Instances whose scheduled time is within 10 minutes of the deployment time, or instances deployed after 22:00, take effect on the third day.
-
-
Step 5: View the deployment result
-
After the deployment package is created and deployed, you can view the deployment result on the Deployment Packages page of the current workspace.
On the Deployment Packages page, verify that the Deployment Status column displays Deployed, which indicates that the cross-workspace deployment is complete.
-
After the deployment succeeds, you can go to Operation Center of the destination workspace to view the deployed tasks.