You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/synapse-analytics/cicd/continuous-integration-delivery.md
+31-33Lines changed: 31 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,29 +4,27 @@ description: Learn how to use continuous integration and continuous delivery (CI
4
4
author: liudan66
5
5
ms.service: azure-synapse-analytics
6
6
ms.subservice: ci-cd
7
-
ms.topic: conceptual
7
+
ms.topic: concept-article
8
8
ms.date: 01/25/2024
9
9
ms.author: liud
10
10
ms.reviewer: pimorano
11
-
12
11
---
13
12
14
13
# Continuous integration and delivery for an Azure Synapse Analytics workspace
15
14
16
15
Continuous integration (CI) is the process of automating the build and testing of code every time a team member commits a change to version control. Continuous delivery (CD) is the process of building, testing, configuring, and deploying from multiple testing or staging environments to a production environment.
17
16
18
-
In an Azure Synapse Analytics workspace, CI/CD moves all entities from one environment (development, test, production) to another environment. Promoting your workspace to another workspace is a two-part process. First, use an [Azure Resource Manager template (ARM template)](../../azure-resource-manager/templates/overview.md) to create or update workspace resources (pools and workspace). Then, migrate artifacts like SQL scripts and notebooks, Spark job definitions, pipelines, datasets, and other artifacts by using **Synapse Workspace Deployment** tools in Azure DevOps or on GitHub.
17
+
In an Azure Synapse Analytics workspace, CI/CD moves all entities from one environment (development, test, production) to another environment. Promoting your workspace to another workspace is a two-part process. First, use an [Azure Resource Manager template (ARM template)](../../azure-resource-manager/templates/overview.md) to create or update workspace resources (pools and workspace). Then, migrate artifacts like SQL scripts and notebooks, Spark job definitions, pipelines, datasets, and other artifacts by using **Synapse Workspace Deployment** tools in Azure DevOps or on GitHub.
19
18
20
19
This article outlines how to use an Azure DevOps release pipeline and GitHub Actions to automate the deployment of an Azure Synapse workspace to multiple environments.
21
20
22
21
## Prerequisites
23
22
24
-
To automate the deployment of an Azure Synapse workspace to multiple environments, the following prerequisites and configurations must be in place. Note that you may choose to use **either** Azure DevOps **or** GitHub, according to your preference or existing setup.
25
-
23
+
To automate the deployment of an Azure Synapse workspace to multiple environments, the following prerequisites and configurations must be in place. You can choose to use **either** Azure DevOps **or** GitHub, according to your preference or existing setup.
26
24
27
25
### Azure DevOps
28
26
29
-
If you are using Azure DevOps:
27
+
If you're using Azure DevOps:
30
28
31
29
- Prepare an Azure DevOps project for running the release pipeline.
32
30
-[Grant any users who will check in code Basic access at the organization level](/azure/devops/organizations/accounts/add-organization-users?view=azure-devops&tabs=preview-page&preserve-view=true), so they can see the repository.
@@ -38,7 +36,7 @@ If you are using Azure DevOps:
38
36
39
37
### GitHub
40
38
41
-
If you are using GitHub:
39
+
If you're using GitHub:
42
40
43
41
- Create a GitHub repository that contains the Azure Synapse workspace artifacts and the workspace template.
44
42
- Make sure that you've created a self-hosted runner or use a GitHub-hosted runner.
@@ -67,7 +65,7 @@ If you are using GitHub:
67
65
- Microsoft.Synapse/workspaces/read
68
66
3. In the workspace, don't configure the Git repository connection.
69
67
4. In the Azure Synapse workspace, go to **Studio** > **Manage** > **Access Control**. 4. In the Azure Synapse workspace, go to Studio > Manage > Access Control. Assign the “Synapse Artifact Publisher” to the service principal. If the deployment pipeline will need to deploy managed private endpoints, then assign the “Synapse Administrator” instead.
70
-
5. When you use linked services whose connection information is stored in Azure Key Vault, it is recommended to keep separate key vaults for different environments. You can also configure separate permission levels for each key vault. For example, you might not want your team members to have permissions to production secrets. If you follow this approach, we recommend that you to keep the same secret names across all stages. If you keep the same secret names, you don't need to parameterize each connection string across CI/CD environments because the only thing that changes is the key vault name, which is a separate parameter.
68
+
5. When you use linked services whose connection information is stored in Azure Key Vault, it's recommended to keep separate key vaults for different environments. You can also configure separate permission levels for each key vault. For example, you might not want your team members to have permissions to production secrets. If you follow this approach, we recommend that you to keep the same secret names across all stages. If you keep the same secret names, you don't need to parameterize each connection string across CI/CD environments because the only thing that changes is the key vault name, which is a separate parameter.
71
69
72
70
### Other prerequisites
73
71
@@ -104,7 +102,7 @@ In this section, you'll learn how to deploy an Azure Synapse workspace in Azure
104
102
105
103
:::image type="content" source="media/release-creation-arm-template-branch.png" lightbox="media/release-creation-arm-template-branch.png" alt-text="Screenshot that shows setting the resource ARM template branch.":::
106
104
107
-
1. For the artifacts **Default branch**, select the repository [publish branch](source-control.md#configure-publishing-settings) or other non-publish branches which include Synapse artifacts. By default, the publish branch is `workspace_publish`. For the **Default version**, select **Latest from default branch**.
105
+
1. For the artifacts **Default branch**, select the repository [publish branch](source-control.md#configure-publishing-settings) or other nonpublish branches which include Synapse artifacts. By default, the publish branch is `workspace_publish`. For the **Default version**, select **Latest from default branch**.
108
106
109
107
:::image type="content" source="media/release-creation-publish-branch.png" alt-text="Screenshot that shows setting the artifacts branch.":::
110
108
@@ -161,12 +159,12 @@ Use the [Synapse workspace deployment](https://marketplace.visualstudio.com/item
161
159
162
160
#### Configure the deployment task
163
161
164
-
The deployment task supports 3 types of operations, validate only, deploy and validate and deploy.
162
+
The deployment task supports three types of operations, validate only, deploy and validate and deploy.
165
163
166
164
> [!NOTE]
167
-
> This workspace deployment extension in is not backward compatible. Please make sure that the latest version is installed and used. You can read the release note in [overview](https://marketplace.visualstudio.com/items?itemName=AzureSynapseWorkspace.synapsecicd-deploy&ssr=false#overview)in Azure DevOps and the [latest version](https://github.com/marketplace/actions/synapse-workspace-deployment) in GitHub action.
165
+
> This workspace deployment extension in is not backward compatible. Please make sure that the latest version is installed and used. You can read the release note in [overview](https://marketplace.visualstudio.com/items?itemName=AzureSynapseWorkspace.synapsecicd-deploy&ssr=false#overview)in Azure DevOps and the [latest version](https://github.com/marketplace/actions/synapse-workspace-deployment) in GitHub action.
168
166
169
-
**Validate** is to validate the Synapse artifacts in non-publish branch with the task and generate the workspace template and parameter template file. The validation operation only works in the YAML pipeline. The sample YAML file is as below:
167
+
**Validate** is to validate the Synapse artifacts in nonpublish branch with the task and generate the workspace template and parameter template file. The validation operation only works in the YAML pipeline. Here's the sample YAML file:
170
168
171
169
```yaml
172
170
pool:
@@ -187,14 +185,14 @@ The deployment task supports 3 types of operations, validate only, deploy and v
**Validate and deploy** can be used to directly deploy the workspace from non-publish branch with the artifact root folder.
190
+
**Validate and deploy** can be used to directly deploy the workspace from nonpublish branch with the artifact root folder.
193
191
194
192
> [!NOTE]
195
193
> The deployment task needs to download dependency JS files from this endpoint **web.azuresynapse.net** when the operation type is selected as **Validate** or **Validate and deploy**. Please ensure the endpoint **web.azuresynapse.net** is allowed if network policies are enabled on the VM.
196
194
197
-
The validate and deploy operation works in both classic and YAML pipeline. The sample YAML file is as below:
195
+
The validate and deploy operation works in both classic and YAML pipeline. Here's the sample YAML file:
198
196
199
197
```yaml
200
198
pool:
@@ -223,7 +221,7 @@ The validate and deploy operation works in both classic and YAML pipeline. The s
223
221
-key2 value2
224
222
```
225
223
226
-
**Deploy** The inputs of the operation deploy include Synapse workspace template and parameter template, which can be created after publishing in the workspace publish branch or after the validation. It is same as the version 1.x.
224
+
**Deploy** The inputs of the operation deploy include Synapse workspace template and parameter template, which can be created after publishing in the workspace publish branch or after the validation. It's same as the version 1.x.
227
225
228
226
You can choose the operation types based on the use case. Following part is an example of the deploy.
229
227
@@ -241,7 +239,7 @@ You can choose the operation types based on the use case. Following part is an e
241
239
242
240
:::image type="content" source="media/create-release-artifacts-deployment.png" lightbox="media/create-release-artifacts-deployment.png" alt-text="Screenshot that shows setting up the Synapse deployment task for the workspace.":::
243
241
244
-
1. The deployment of managed private endpoint is only supported in version 2.x. please make sure you select the right version and check the **Deploy managed private endpoints in template**.
242
+
1. The deployment of managed private endpoint is only supported in version 2.x. make sure you select the right version and check the **Deploy managed private endpoints in template**.
245
243
246
244
:::image type="content" source="media/deploy-private-endpoints.png" alt-text="Screenshot that shows selecting version 2.x to deploy private endpoints with synapse deployment task.":::
247
245
@@ -351,7 +349,7 @@ In your GitHub repository, go to **Actions**.
351
349
1. In your GitHub repository, go to **Actions**.
352
350
1. To see detailed logs of your workflow's run, open the first result:
353
351
354
-
:::image type="content" source="media/review-deploy-status.png" lightbox="media/review-deploy-status.png" alt-text="Screenshot that shows selecting the workspace deployment log in the repository Actions in GitHub.":::
352
+
:::image type="content" source="media/review-deploy-status.png" lightbox="media/review-deploy-status.png" alt-text="Screenshot that shows selecting the workspace deployment sign in the repository Actions in GitHub.":::
355
353
356
354
## Create custom parameters in the workspace template
357
355
@@ -516,7 +514,7 @@ Here's an explanation of how the preceding template is constructed, by resource
516
514
517
515
**`linkedServices`**
518
516
519
-
- Linked services are unique. Because linked services and datasets have a wide range of types, you can provide type-specific customization. In the preceding example, for all linked services of the `AzureDataLakeStore` type, a specific template is applied. For all others (identified through the use of the `*` character), a different template is applied.
517
+
- Linked services are unique. Because linked services and datasets have a wide range of types, you can provide type-specific customization. In the preceding example, for all linked services of the `AzureDataLakeStore` type, a specific template is applied. For all others (identified by using the `*` character), a different template is applied.
520
518
- The `connectionString` property is parameterized as a `securestring` value. It doesn't have a default value. The parameter name is shortened and suffixed with `connectionString`.
521
519
- The `secretAccessKey` property is parameterized as an `AzureKeyVaultSecret` value (for example, in an Amazon S3 linked service). The property is automatically parameterized as an Azure Key Vault secret and fetched from the configured key vault. You also can parameterize the key vault itself.
522
520
@@ -533,44 +531,44 @@ If you're using Git integration with your Azure Synapse workspace and you have a
533
531
- **Sync versioning in infrastructure as code scenarios**. To manage infrastructure (networks, virtual machines, load balancers, and connection topology) in a descriptive model, use the same versioning that the DevOps team uses for source code.
534
532
- **Review Azure Data Factory best practices**. If you use Data Factory, see the [best practices for Data Factory artifacts](../../data-factory/continuous-integration-deployment.md#best-practices-for-cicd).
535
533
536
-
## Troubleshoot artifacts deployment
534
+
## Troubleshoot artifacts deployment
537
535
538
536
### Use the Synapse workspace deployment task to deploy Synapse artifacts
539
537
540
-
In Azure Synapse, unlike in Data Factory, artifacts aren't Resource Manager resources. You can't use the ARM template deployment task to deploy Azure Synapse artifacts. Instead, use the Synapse workspace deployment task to deploy the artifacts, and use ARM deployment task for ARM resources (pools and workspace) deployment. Meanwhile this task only supports Synapse templates where resources have type Microsoft.Synapse. And with this task, users can deploy changes from any branches automatically without manual clicking the publish in Synapse studio. The following are some frequently raised issues.
538
+
In Azure Synapse, unlike in Data Factory, artifacts aren't Resource Manager resources. You can't use the ARM template deployment task to deploy Azure Synapse artifacts. Instead, use the Synapse workspace deployment task to deploy the artifacts, and use ARM deployment task for ARM resources (pools and workspace) deployment. Meanwhile this task only supports Synapse templates where resources have type Microsoft.Synapse. And with this task, users can deploy changes from any branches automatically without manual clicking the publish in Synapse studio. The following are some frequently raised issues.
541
539
542
-
#### 1. Publish failed: workspace arm file is more than 20MB
540
+
#### 1. Publish failed: workspace arm file is more than 20 MB
543
541
544
-
There is a file size limitation in git provider, for example, in Azure DevOps the maximum file size is 20Mb. Once the workspace template file size exceeds 20Mb, this error happens when you publish changes in Synapse studio, in which the workspace template file is generated and synced to git. To solve the issue, you can use the Synapse deployment task with **validate** or **validate and deploy** operation to save the workspace template file directly into the pipeline agent and without manual publish in synapse studio.
542
+
There's a file size limitation in git provider, for example, in Azure DevOps the maximum file size is 20 Mb. Once the workspace template file size exceeds 20 Mb, this error happens when you publish changes in Synapse studio, in which the workspace template file is generated and synced to git. To solve the issue, you can use the Synapse deployment task with **validate** or **validate and deploy** operation to save the workspace template file directly into the pipeline agent and without manual publish in synapse studio.
545
543
546
-
#### 2. Unexpected token error in release
544
+
#### 2. Unexpected token error in release
547
545
548
546
If your parameter file has parameter values that aren't escaped, the release pipeline fails to parse the file and generates an `unexpected token` error. We suggest that you override parameters or use Key Vault to retrieve parameter values. You also can use double escape characters to resolve the issue.
549
547
550
-
#### 3. Integration runtime deployment failed
548
+
#### 3. Integration runtime deployment failed
551
549
552
-
If you have the workspace template generated from a managed Vnet enabled workspace and try to deploy to a regular workspace or vice versa, this error happens.
550
+
If you have the workspace template generated from a managed virtual network enabled workspace and try to deploy to a regular workspace or vice versa, this error happens.
553
551
554
-
#### 4. Unexpected character encountered while parsing value
552
+
#### 4. Unexpected character encountered while parsing value
555
553
556
-
The template can not be parsed the template file. Try by escaping the back slashes, eg. \\\\Test01\\Test
554
+
The template can't be parsed the template file. Try by escaping the back slashes, for example, \\\\Test01\\Test
557
555
558
556
#### 5. Failed to fetch workspace info, Not found
559
557
560
-
The target workspace info is not correctly configured. Please make sure the service connection which you have created, is scoped to the resource group which has the workspace.
558
+
The target workspace info isn't correctly configured. Make sure the service connection which you have created, is scoped to the resource group which has the workspace.
561
559
562
560
#### 6. Artifact deletion failed
563
561
564
-
The extension will compare the artifacts present in the publish branch with the template and based on the difference it will delete them. Please make sure you are not trying to delete any artifact which is present in publish branch and some other artifact has a reference or dependency on it.
562
+
The extension will compare the artifacts present in the publish branch with the template and based on the difference it will delete them. Make sure you aren't trying to delete any artifact which is present in publish branch and some other artifact has a reference or dependency on it.
565
563
566
564
#### 8. Deployment failed with error: json position 0
567
565
568
-
If you were trying to manually update the template, this error would happen. Please make sure that you have not manually edited the template.
566
+
If you were trying to manually update the template, this error would happen. Make sure that you haven't manually edited the template.
569
567
570
568
#### 9. The document creation or update failed because of invalid reference
571
569
572
-
The artifact in synapse can be referenced by another one. If you have parameterized an attribute which is a referenced in an artifact, please make sure to provide correct and non null value to it
570
+
The artifact in synapse can be referenced by another one. If you have parameterized an attribute which is a referenced in an artifact, make sure to provide correct and non null value to it
573
571
574
572
#### 10. Failed to fetch the deployment status in notebook deployment
575
573
576
-
The notebook you are trying to deploy is attached to a spark pool in the workspace template file, while in the deployment the pool does not exist in the target workspace. If you don't parameterize the pool name, please make sure that having the same name for the pools between environments.
574
+
The notebook you're trying to deploy is attached to a spark pool in the workspace template file, while in the deployment the pool doesn't exist in the target workspace. If you don't parameterize the pool name, make sure that having the same name for the pools between environments.
0 commit comments