Get all the related datasets, LS, pipelines, and resources related to a pipeline in Azure Data Factory - azure-data-factory

I am trying to migrate a pipeline from a data factory with pipelines/ds/ls related to other pipelines. To do this, I want to find all the related ds/ls/resources to the pipeline that I want to migrate to a different data factory(differnet env). What would be the way to do so? Secondly, how would you do it using ARM Template in release pipelines?

You can simply accomplish this task by importing/exporting ARM templates. This will export your datasets, Linked Services and pipelines settings. But if you are changing your data source and destination, you need to change them separately.
To export the pipeline configuration as a template just go to that pipeline and click on three dots on right side and click on Export template option.

Related

Selective Deployment in Azure Data Factory (ADF)?

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

Move Build and Release Pipeline from one organization to another

We have been working in one organization and now we are migrating all from one organization to another.
Can anyone suggest me How Can I Migrate my Build and Release Pipelines from one organization to another?
You can Export and Import the Pipelines as a template / JSON.
Move Build and Release Pipeline from one organization to another.
We can easily move the classic Build/Release pipelines into new Org with the Export and Import pipeline options, as Abhujit answered above.
However, we still need to modify/fix many configurations to make the newly imported pipelines work. We can't access the Private Agent Pool, Source within old Organization, so we have to do more jobs to fix them.
So if someone only needs to reuse the tasks/steps, it's easier to replicate steps to create new Build and Release pipelines instead of importing the pipelines from another org.
PS: Also, using Yaml pipelines+templates in both orgs is also a good choice for reusing tasks.
As a work-around I found this.
You can't directly import exported configuration file, You need to change lot configurations as you have change organization, which takes time. It is easier to replicate steps to create Build and Release pipelines in New Organization.

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 :)

Cloning an Azure Devops yaml Pipeline

Azure Devops pipelines provide a clone functionality. This is super useful functionality for scaffolding pipelines. My yaml pipelines have a lot of variables, and it's difficult and error prone to reassign all of these variables from scratch.
The Azure Devops UI updated in the last week or so, and there doesn't seem to be an option to clone yaml pipelines anymore. Classic pipelines still have the clone option.
Can anyone figure out how to clone a yaml pipeline with the new UI?
Hmm I haven't used the clone feature, but have you investigated using variable groups or variable templates to make your life easier? You can link a variable group to Azure Key Vault to facilitate secrets.
I've never used a cloning option in YAML. But I wouldn't use so many Azure DevOps variables which were created in the UI. You have multiple options here:
Store the variables in your YAML file (not for secrets)
Store the variables in a YAML template (not for secrets)
Store the variables in a variable group (use Azure Key Vault or the Secure flag for secrets)
The variable group can be linked to multiple pipelines. But there is currently no scope available. So, if you have multiple environments, you have to name it like "myvariablegroup-dev", "myvariablegroup-prod". Hopefully, this feature to attach a variable group to an environment is coming in the near feature.
1,You can disable the multi-stage pipelines feature in preview features
On the top right corner of the page click the user profile and choose Preview features
Then disable the Multi-stage pipelines. Then you will see the clone option appear again.
2,The other workaround is to create a new pipeline and choose to use the Existing Azure PipelineS Yaml file while following the wizard. (which has the same effect with cloning yaml, they use the same azure-pipelines.yml file)
Then choose the same yaml file with the original pipeline.

What is the schema used to define an Azure Devops (VSTS) Build Definition

I am trying to located the Schema used to define a build or builds in Azure Devops. I have exported a build and would like to use VS Json Outline to view it -- perhaps build out a parser.
I noticed in VS there are references to http://json.schemastore.org/...lots of schemas..., but the site does is not brow-sable.
I dont think it makes sense to go that route, Azure Devops has got the ability to define builds in yaml, schema is described here. you can use those yaml builds to manage builds at scale and reuse definitions or parts of those (depending on how you structure your stuff)
Json stuff is the old way of exporting\importing builds, its not really meant for managing builds at scale