Selective Deployment in Azure Data Factory (ADF)? - azure-data-factory

I am using npm package based CI-CD approach for ADF. I want to selectively deploy some pipelines and datasets on prod, instead of deploying everything in repository.
Is there any powershell script where I can send list of ADF objects which I want to deploy using my CI-CD pipeline?
Instead of powershell, if there is any other way, please let me know that as well.

As per official documentation, Data factory entities depend on each other.
For example, triggers depend on pipelines, and pipelines depend on datasets and other pipelines. Selective publishing of a subset of resources could lead to unexpected behaviors and errors.
On rare occasions when you need selective publishing, consider using a hotfix.
Steps to deploy a hotfix

Related

Should I have a distinct CI/CD for dev and prod or can I have one for all of my environments and applications in azure devops

I have a monorepo where a lot of applications and libs are build.
I tried to make the CI/CD process the more readable and performant as possible.
Problem is I'm not so familiar with all the possibilites azure pipeline give me.
Should I have a pipeline for each environement? for each app? or can I create only one and using tags or something like that?
thanks
For monorepo, you can create one pipeline for all applications, or create individual CI/CD for each one. It depends on how you define in the pipeline.
One pipeline for all: you can use different stages, file path filter, conditions...etc to isolate the builds&testing of application, add stage/job name to display which application it's building.
Individual pipeline: define more pipelines for each application, but could be more readable.
There is a monorepo pipeline sample which has one pipeline and seperate pipelines, you can choose the best way for your project.

Azure Data Factory ADF Unit Testing on feature branch without having to deploy changes to the data factory instance

Is there a way to unit test individual pipelines in Azure Data Factory on a particular branch without having to deploy my changes. Currently the only way I am able to run unit tests on ADF pipelines is by publishing my changes to the data factory instance and kick off a pipeline run. However this approach requires me to merge my changes to the collaboration branch before I am able to execute any pipeline test cases.
Ideally I'd like to be able to kick off a pipeline on particular feature branch without having to deploy to the default instance, so that I can validate my test case and make adjustments before merging it with the collaboration branch.
Any suggestions people can give or resources they can point to?
I think you can try going for Automated Unit Testing for ADF, this will enable you to write a code and the test runs before deployment.
You can check a sample for the same here
At the time of writing it is not possible to command the Azure Data Factory API to run pipes in debug mode. You can call the published pipes through the REST API. If you do not want to modify the published configuration of Azure Data Factory you would need to have multiple data factories.
We use 1 ADF per engineer, and 1 ADF per higher level environment.

How to deploy multiple ARM with Azure DevOps Pipeline

Ì would like to deploy Storage, SQL Logical Server and SQL database with ARM. Currently templates are all located under own folder in repo /Storage /SQLLogicalServer /SQLDB
I can deploy they one by one with dedicated pipeline currently.
What is best practice to deploy several Azure resources with single pipeline?
Is it good idea to use one master ARM template that call each resource ARM?
Any tutorial or article about this scenario?
What is best practice to deploy several Azure resources with single
pipeline? Is it good idea to use one master ARM template that call
each resource ARM? Any tutorial or article about this scenario?
You can follow Deploy nested Azure Resource Manager templates for testing environments to combine your three templates into one, then you would easily use one single pipeline to deploy them together. Here's a similar scenario like yours.
Note:
If you have separate pipelines for your three ARM templates, you can easily customize them. E.g: You can set the pipeline to be triggered only when the corresponding ARM template repo is changed. If the ARM templates are in one pipeline, they would be deployed even when only one of them is changed. (In that scenario, you can use this as workaround.)
Whether it's good idea totally depends on your needs/scenarios. Hope it helps :)

Is it possible to realease a full set of potentially dependant artifacts (microservices) at once?

Traditionally we have to deliver our applications on the test and pre-production platforms one by one (usually by hand using setups). Applications like the front end javascript SPA UI are linked to backend services and their delivery sometimes goes together.
Each service and each application has its own git repository. (we are using on premise TFS 2018 for now )
Then when it is necessary to go into production, we deliver all of the front end services and applications at once that have been validated at once.
We would like to automate our process but we don't know if Azure Devops is suitable.
From what I understand with Azure Devops, we can make an independent artifact for each microservice and each front end application. We can also deliver them independently.
It seems to me that Azure Devops by default allows you to manage the delivery cycle for a particular microservice but not for an assembly making up a complete system, right?
But is it possible to deliver a set of projects each with a particular version? For that, must all of our projects be in the same solution or the same git repository?
Yes, you can use multiple artifacts from different sources (build artifacts, repositories, package feeds, github, docker hub, Azure Container Registry, ++) within a single pipeline or release definition. That's true for both the classic release definitions and the modern multi-stage pipeline implementation.
For example you can define a pipeline or release definition that consumes a front-end web app from a build artifact sourced from RepoA, a back-end service artifact consumed from a container registry originally from RepoB, and say a script library in the form of a Git artifact from RepoC. From there you could deploy each of those artifacts together, or in parallel stages, in sequence, partially, with approvals, conditionally, etc, all from the same pipeline.
The full configuration as code YAML multi-stage pipelines are still in preview, so there are some workflow orchestrations that are a little tougher to implement. But there is enough feature parity with the classic release definitions that I would default to using multi-stage for any net new needs.

confusion on Azure DevOps pipelines

I've recently been working on switching from On premise TFS to Azure DevOps, and trying to learn more about the different pipelines and I think I may have had my Build pipeline do too much.
Currently I have my Build Pipeline do
Get Source code from Repo
Run database scripts/deploy dacpacs
Copy files over to virtual machines that have web application set up already
Run unit/integration tests
Publish the test results
I repeat these steps closely multiple times, one for develop branch, one for current and previous release branch.
But if I want to take advantage of the Releases and Deployments areas what would that really get me?
It looks like it would be easier to say yes this code did make it out to this dev/beta environment.
I'm working with ColdFusion code that includes some .NET webservices within the repo, would I have to make an artifact that zips up the repo and then deploys it, or is there a better way to take advantage of the release pipeline?
It's not necessary to make an artifact that zips up the repo and then deploys it. There are several types of tools you might use in your application lifecycle process to produce or store artifacts. For example, you might use version control systems such as Git or TFVC to store your artifacts. You can configure Azure Pipelines to deploy artifacts from multiple sources. Check the following link for more details:
https://learn.microsoft.com/en-us/azure/devops/pipelines/release/artifacts?view=azure-devops#sources