Cross-workspace deployment
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 cases
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: Isolate the development and production environments in basic mode.
To ensure that tasks run correctly in the destination workspace after deployment, read Deployment change logic carefully before you proceed. Ensure you 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
The Cross-workspace Deployment feature supports deploying objects across different workspaces within the same region and under the same Alibaba Cloud account. Cross-region deployment is not supported. If you need to deploy objects across regions, use Deployment Center.
Deployment process
Procedure
All operations for a cross-workspace deployment are performed in the source workspace.
Step 1: Create a deployment environment
To deploy nodes from a source workspace, you must first define the destination workspace as a deployment environment. This involves mapping compute resources, resource groups, and dependencies from the source to the destination. When you deploy the package, the system uses these mappings to automatically reconfigure the nodes for the destination environment.
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, click the
icon and choose All Products > More > 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 parameters.
Click Create to create the deployment environment.
Step 2: Deploy to source production
This example uses a workspace in basic mode that is running New Data Studio. In this step, you deploy tasks to the production environment of the current (source) workspace. After deployment, the system adds the deployed objects to the Nodes to Deploy list in Deployment Center, ready for cross-workspace deployment.
Only members with the Operator, Deployer, or Workspace Administrator role can perform deployments.
For a workspace in basic mode that uses legacy Data Studio, find the node, function, or other object you want to deploy in Data Studio and click the Commit (
) icon in the top toolbar.
In Data Studio, find the object to deploy and click Deploy in the top toolbar.
In the deployment dialog box, click Start Deploying to Production.
The deployment process consists of three stages: Deployment package build, Production checker, and Deploy to production environment. When a stage is complete, its status changes to Completed. You can click View Details to see 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 deploy them in a batch, and the system automatically generates a deployment package.
Log on as a user with the Development role and go to the Deployment Center of the source workspace.
From any DataWorks module, click the
icon in the upper-left corner and choose All Products > More > Deployment Center.In the left-side navigation pane, click Nodes to Deploy to view the objects that are ready for deployment. In the Actions column of an object, click Add to Deployment Package. After you add an object, the number of objects to deploy is shown on the View Deployment Package button.
NoteYou can also select multiple objects and click Batch Add to Deployment Package at the bottom of the page.
If you use New Data Studio and click Terminate Deployment during the deployment process, the corresponding objects are removed from this list.
After adding objects to the package, click View Deployment Package to verify the package contents. You can click Remove to exclude unwanted objects from the package.
NoteCurrently, you can view only objects from legacy Data Studio, not from New Data Studio.
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 appears, allowing you to deploy the objects directly.
Step 4: Deploy the deployment package
You must have the Operator, Deployer, or Workspace Administrator role in both the source and destination workspaces.
Log on as a user with the Operator, Deployer, or Workspace Administrator role and go to the Deployment Center of the source workspace.
From any DataWorks module, click the
icon in the upper-left corner and choose All Products > More > Deployment Center.In the left-side navigation pane, click Deployment Packages to view the generated packages.
In the Actions column of the target package, click Deploy and follow the on-screen instructions.
NoteDuring a cross-workspace deployment, users with the Operator, Deployer, or Workspace Administrator role can edit the resource group that deployed tasks will use in the destination workspace.
For nodes that generate instances on the following day (
T+1), the deployment takes effect based on the following schedule:If you deploy before 23:30, the changes take effect the next day.
If you perform the deployment after 23:30, the changes take effect two days later.
For nodes that generate instances immediately, the deployment takes effect based on the following schedule:
Instances scheduled to run more than 10 minutes after the deployment time will be generated or updated normally.
For instances scheduled to run within 10 minutes of the deployment time, or for any deployment after 23:30, the changes take effect two days later.
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, confirm that the Deployment Status column shows Deployment Successful. This indicates that the cross-workspace deployment is complete.
After the deployment succeeds, go to the Operation Center of the destination workspace to view the deployed tasks.