Deploying Azure Data Factory With CI/CD Using Azure Pipeline

Поделиться
HTML-код
  • Опубликовано: 21 июл 2024
  • This video will focus on how to use Azure Data Factory CI/CD Pipelines and promote ETL Pipelines from Dev environment to UAT then production. How to create an Azure DevOps pipeline to deploy Azure Data Factory pipelines, link services, triggers, datasets, etc to several Azure Data Factories.
    Learn a complete tutorial for creating Azure Data Factory CI/CD pipelines with Git enabled that use different branches for developing new features for ETL pipelines and other Azure Data Factory components.
    This will cover, creating three Azure Data Factories, two Azure Storage accounts, Azure Release pipeline with Azure Artifacts based on Git repo and deploying Azure Data Factory ARM templates files to another environment.
    It will show how to develop all the Azure Data Factory components in the feature branch. Then how to raise a pull request to merge those changes with the master branch. After that publish Azure Data Factory development which will create adf_publish branch which will include the ARM template that describes the current Azure Data Factory Environment. And by using this ARM template, we can deploy it to UAT and Production environments.
    Commands:
    Stop trigger
    ---------------
    -armTemplate "$(System.DefaultWorkingDirectory)/[artifact source alias]/[SC folder]/ARMTemplateForFactory.json" -ResourceGroupName "[RG name]" -DataFactoryName "[Target ADF Env]" -predeployment $true -deleteDeployment $false
    Start trigger
    -------------
    -armTemplate "$(System.DefaultWorkingDirectory)/[artifact source alias]/[SC folder]/ARMTemplateForFactory.json" -ResourceGroupName "[RG name]" -DataFactoryName "[Target ADF Env]" -predeployment $true -deleteDeployment $true
    Stop trigger
    ---------------
    -armTemplate "$(System.DefaultWorkingDirectory)/_adf_publish_source/ADF-Radwan-Dev/ARMTemplateForFactory.json" -ResourceGroupName "adf-rg" -DataFactoryName "ADF-Radwan-UAT" -predeployment $true -deleteDeployment $false
    Start trigger
    -------------
    -armTemplate "$(System.DefaultWorkingDirectory)/_adf_publish_source/ADF-Radwan-Dev/ARMTemplateForFactory.json" -ResourceGroupName "adf-rg" -DataFactoryName "ADF-Radwan-UAT" -predeployment $true -deleteDeployment $true
    -factoryName "[target ADF name]" -AzureBlobStorage1_connectionString "" -AzureBlobStorage2_connectionString ""
    -factoryName [target ADF name] -AzureBlobStorage1_connectionString "" -AzureBlobStorage2_connectionString ""
    -factoryName "ADF-Radwan-UAT" -AzureBlobStorage1_connectionString "DefaultEndpointsProtocol=https;AccountName=storageaccradwan1;AccountKey=xx;EndpointSuffix=core.windows.net" -AzureBlobStorage2_connectionString "DefaultEndpointsProtocol=https;AccountName=storageaccradwan2;AccountKey=xxx;EndpointSuffix=core.windows.net"
    -armTemplate "$(System.DefaultWorkingDirectory)/_adf_publish_source/ADF-Radwan-Dev/ARMTemplateForFactory.json" -ResourceGroupName "adf-rg" -DataFactoryName "ADF-Radwan-UAT" -predeployment $true -deleteDeployment $false
    About the Author
    -----------------------------
    Video:
    • Mohamed Radwan is a Pr...
    Blog:
    mohamedradwan.com
    Linked-in
    / mohamedahmedradwan
    GitHub
    github.com/MohamedRadwan-DevOps
    Twitter:
    / mradwan06
    DevOps #Azure #Azure_Data_Factory_tutorial #Azure_training #Azure_DevOps
  • НаукаНаука

Комментарии • 114

  • @castrojona82
    @castrojona82 9 дней назад

    Muchas gracias. Años y años con este dispositivo guardado, me salvaste de una compra mas.

  • @jasonbougas2999
    @jasonbougas2999 3 года назад +1

    Thanks for this detailed walk through. I got up and running with my Dev to UAT deployment really fast following your demo. Really helpful!

  • @bonnevilleedits2303
    @bonnevilleedits2303 11 месяцев назад +3

    There's a slight mistake in the values for Start and Stop Trigger. In the Video Mohamed sets the delete deployment flag to true for clean Resources and Start Trigger. But you also need to set the predeployment flag to false for it to start the triggers again as this is the flag to distinguish between pre and post deployment.

  • @msvasankv
    @msvasankv 3 года назад +3

    It's a great presentation and a nice walkthrough on creating all the stages. Thanks, Mohammed!

    • @MRadwanMSF
      @MRadwanMSF  3 года назад

      Glad it helped! and thanks for your comment!

  • @empowerpeoplebytech2347
    @empowerpeoplebytech2347 3 года назад +3

    Fantastic! Thank you very much for this detailed video on ADF CICD. I was stuck at an initial point where my account and project were not visible in ADF, it helped. Also, now have a clear understanding how the flow from various branches takes place. This is a very big thing which every ADF developer must know. Thank you very much. Wish you lots of success!

  • @riojedac
    @riojedac 3 года назад +1

    Good to find you here Mo! This is a great and didactic video, thanks!

  • @lukeroberts70
    @lukeroberts70 6 месяцев назад

    Fantastic walkthrough, helped a lot, thank you so much!! One thing I did need to do for the ci-cd.ps1 to run was under Use Latest PowerShell Version, was to choose Use PowerShell Core under the advanced option below. Otherwise it didn't like the format of the script.

  • @alphacharith
    @alphacharith 3 года назад +1

    Thank You
    Mohamed Radwan. Excellent Video

  • @HemantKrSahu
    @HemantKrSahu 2 года назад

    Bravo Man !!! Thanks for making this helpful video.

  • @irammapatil9957
    @irammapatil9957 Год назад

    This is really helping for me...i got so many things which i was looking for..Thanks

  • @saikarthik4a9
    @saikarthik4a9 3 года назад +1

    Thanks Radwan, It's a clear explanation. Looking forward from you to get more videos

  • @lifechamp007
    @lifechamp007 2 года назад

    Super helpful - Thank you so much Radwan !! #StayBlessednHappy

  • @NSys-ru3ix
    @NSys-ru3ix 11 месяцев назад

    Excellent tutorial, thank you.

  • @bharathsairam443
    @bharathsairam443 3 года назад +1

    Fantastic...Very good explanation...Thank you Mohamed..

    • @MRadwanMSF
      @MRadwanMSF  3 года назад

      Glad you liked it Thanks for your comment!

  • @minineng21494
    @minineng21494 2 года назад

    Thanks so much for the video, really helpful!!

  • @sanjithkumar7600
    @sanjithkumar7600 Год назад

    thanks for the end to end demo :)

  • @MarimuthuSA
    @MarimuthuSA 3 года назад +1

    Great Video; Detailed explanation. It helped a lot.

    • @MRadwanMSF
      @MRadwanMSF  3 года назад +1

      Thanks Mari, I am happy you like it!

  • @syedfarhaan-e9k
    @syedfarhaan-e9k 24 дня назад

    thank you so much bro. bless you bro for this! this is really helpful.

  • @sriramudhyab
    @sriramudhyab 3 года назад +1

    Excellen video and very thorough explanation..Thank you

    • @MRadwanMSF
      @MRadwanMSF  3 года назад

      Glad it was helpful! Thanks for your comment!

  • @terryliu3635
    @terryliu3635 3 года назад +1

    Thanks! This is what I’m looking for.

  • @UmerPKgrw
    @UmerPKgrw 2 года назад

    Very Well Explained

  • @Mramaamo
    @Mramaamo 3 года назад +1

    Thanks Mohammed, its a very good one

    • @MRadwanMSF
      @MRadwanMSF  3 года назад

      Glad you liked it! Thanks!

  • @CoopmanGreg
    @CoopmanGreg 3 года назад +1

    Excellent Video! Thanks!

  • @AndersKnudsen93
    @AndersKnudsen93 3 года назад +2

    Thanks for the great video, Mohamed!
    I was wondering how this would work if the ADF kept on growing and more and more pipelines along with more linked services would be added. Would that require to keep adding connection strings and alike to the "override template parameters" section of the release pipeline?

  • @gustavoortega4361
    @gustavoortega4361 2 года назад +1

    Thanks for the video :)

  • @user-jf1mz2ds6b
    @user-jf1mz2ds6b 2 месяца назад

    This information is very informative and has been incredibly helpful, especially due to its hands-on nature. Instead of creating a single resource group for all three environments (dev, UAT, and prod), I believe it is more practical to create separate resource groups for each environment. This approach better separates the environments. What do you think?

  • @harishchalla268
    @harishchalla268 2 года назад

    Thanks for the great video, Mohamed Radwan.
    The pipelines which you are pushing to the destination(UAT), it reaches to UAT live mode.
    Is it possible to move pipelines from DEV to UAT git repo mode instead of livemode ? (in which both DEV and UAT are connected to git.)

  • @gobindamohan
    @gobindamohan 3 года назад +1

    This is really awesome

  • @Andyfshito
    @Andyfshito 3 года назад

    Hi! I would like to know if there's a way to avoid clicking on Publish every time you perform a pull request to the master branch. Is that possible? Thank you!

  • @hamzamanouzi4937
    @hamzamanouzi4937 2 года назад

    Hi, Radwan. Thank you very much for this! It saved me a lot of time. I have one little question: what if the data factorys are in two different resource groups? Thank you very much again.

  • @swapnilwagh7515
    @swapnilwagh7515 3 года назад +1

    Nice one!

  • @chennareddy2770
    @chennareddy2770 2 года назад

    Thanks Mohamed, this is really great.
    I have a question on stop and start trigger , if i dont include the script which you have added before and after the ARM template deployment, will it just copy the datasets and pipelines but will not trigger the pipeline to copy the blob content to source to destination correct? I have multiple Data Factories in my resource group and is it safe to use the stop and start trigger script, hope that it will not disturb the other Data Factories

  • @colinrippey1723
    @colinrippey1723 3 года назад

    Great presentation. In a scenario where you have say two developers and each developer works on their own dev branch, would you have two ADF-DEV instances or would the two developers share the single ADF-DEV instance and work on their individual branches via the git integration? I am trying to get my head around what happens in Data Factory as you switch git branches, does all the associated artefacts “swap themselves out”? Does the Data Factory git integration really imply you just have one ADF-DEV and one git branch being developed at a time? Any thoughts you have on this would be most appreciated, thank you again for taking the time to put together such a useful video.

  • @bharanidharanm2653
    @bharanidharanm2653 3 года назад

    Hi Mohammed, Thanks for the video. I am using managed identities to blob storage and database. How can i form the variables for "override template parameters"
    could you pls help clarifying. thanks.

  • @sjitghosh
    @sjitghosh 3 года назад +1

    Excellent

  • @bitips
    @bitips Год назад

    Thanks for that, But in different environments we have different DBs (connection strings), so how can we manage this dynamically?

  • @abreezy1st
    @abreezy1st 3 года назад

    what do we do if we have copy pipelines in dev and uat but we dont want them in prod? is there a way to specify which environments to pass copy pipelines into?

  • @rodrigueschetan
    @rodrigueschetan Год назад

    Hi Radwan ,
    Can we parameterize self hosted run time in Azure data factory while doing azure devops ?

  • @abidnadia6382
    @abidnadia6382 Год назад

    Thank you for sharing this relavent information however I would like to ask about data flow and where to make the data transformations ? Thank you in advance :)

  • @amitsinhaism
    @amitsinhaism 4 месяца назад

    but how we would change the storage accounts for UAT and prod as they would be different for UAT and prod ?

  • @LandscapeInMotion
    @LandscapeInMotion 2 года назад

    Thanks for not speeding through this demo!

  • @sabirpatel3555
    @sabirpatel3555 2 года назад

    Thanks for the video, Mohamad Radwan , Can you please create a video or guide us how to create a CI-CD pipeline using Azure SQL table. how should we proceed for that.

  • @antongolubev3511
    @antongolubev3511 2 года назад

    Can I use multiple ADF for developing one pipeline in one repository?

  • @gameimdum7396
    @gameimdum7396 3 года назад +1

    Thanks mate

  • @kannan114
    @kannan114 2 года назад

    What's the difference between adf and master branch? Is master a staging and adf actual master in each environment?

  • @minufrancis222
    @minufrancis222 2 года назад

    I see a task - publish data factory - is this the new form of deployment or not? It has checkboxes which says 'StartStopTriggers' as well

  • @prabhurathinam
    @prabhurathinam Год назад

    Hi Mohamed, Thanks for a great video. Appriciate it. One of my linked service is conencted to Dataverse. In the template parameter i'm unbale to pass Service uri for the uppper environements. i can only able to pass Service connection and its secrect. is there a way to pass the Service URI as well in the parameters? Please advice.
    Thank you

  • @rameshbaddam5465
    @rameshbaddam5465 2 года назад

    I just have a question . Where is the build pipeline ?. Don’t we have build pipeline like other services for adf?

  • @galilioXX
    @galilioXX 2 года назад +1

    Thanks a lot Mohamed for the great presentation, very informative and straight to the point!
    I configured the CICD pipelines for my organization to auto-deploy ADF changes, however I ran into an issue in which the deployment messed up my scheduled triggers start times as it used the start times from the source code which is an old value.
    I was wondering if there is a way to deploy all the changes without changing the triggers start times? if no, how we can keep the trigger's start time value from being overwritten?

    • @arupnaskar3818
      @arupnaskar3818 Год назад

      Hi Nemairi,
      Do u know is there any way to release pipeline with disabling adf triggers.. ??
      Please, I am stuck 😔

  • @kamblekiran786
    @kamblekiran786 2 года назад

    Very nice video @mohamed, Can you please elborate more on powersell script we are using it. For what purpose it is used?

  • @amitghotikar
    @amitghotikar 3 года назад

    Predeployment should be set to false for starting triggers , isnt it?

  • @DINESHKUMAR-cu2db
    @DINESHKUMAR-cu2db 2 года назад

    Unable to connect the AAD in Azure devops. Error is the current organization policy does not allow guest users to access the organization . Change the policy setting to external guest access

  • @HanumanSagar
    @HanumanSagar Год назад

    Hi can you help me in stop trigger task while selecting Azure subscription I'm not able to see the subscription list..what should I do if want to see list of subscriptions?

  • @ravindranathmetla8180
    @ravindranathmetla8180 2 года назад

    Mohammed, having issues to deploy data factory with global parameters.. can you send any link or info regarding this..

  • @bhavyavful
    @bhavyavful 3 года назад

    Hi Mohamed. This video was great. I have a question for you regarding ADF. I am facing a problem in creating a single pipeline. Pls reply if you are interested to sort out my problem.

  • @debbieedwards7267
    @debbieedwards7267 3 года назад +1

    So helpful. Thank you. My only problem is that my dev and prod are in different subscriptions and resource groups so I don't quite know how to tie this into your where your dev and prod are in the same subscription. for example. At 40.51 when setting up the ARM template. Should the resource group be your dev or Prod one if they are different?

    • @MRadwanMSF
      @MRadwanMSF  3 года назад

      Glad it was helpful!
      This is just a small example but in reality you should parameterize everything and most probably we will use variable group
      docs.microsoft.com/en-us/azure/devops/pipelines/library/variable-groups?view=azure-devops&tabs=yaml

  • @AxL28AxL
    @AxL28AxL 3 года назад +1

    For the Data Factory Scheduled Trigger, in my Dev the Trigger status is Stop and I would like to ask if I deploy it to Test or Prod would the "Stop Trigger" and "Clean Resource Resource and Start " task would start the status of the Data Factory Scheduled Triggers?

    • @MRadwanMSF
      @MRadwanMSF  3 года назад

      The script should start all triggers

  • @SynonAnon-vi1ql
    @SynonAnon-vi1ql 29 дней назад

    31:29 You see everything is great in this video but I am not understanding one thing. I would really appreciate if you could please explain.
    My question is why did you merge the code from feature branch to master without first testing it in the UAT environment. This is opposite for me. I was thinking you will show the automated mechanism to first merge the dev code to "UAT" branch, then deploy it in UAT env for testing purposes. Once the testing is successful, the code from UAT branch will be merged into Master branch and from there it will be deployed into production. But you first merged the Dev code into master without verification (UAT). Now if the UAT fails your master is no more good and is not representative of the prod.
    Can you please explain why my thought process is wrong? Thank you!

  • @andychiarwantopranata6579
    @andychiarwantopranata6579 3 года назад +1

    Hi, Radwan. Thanks for the detailed explanation!
    I wonder if we can change the dataset source programmatically in release pipeline?
    For example: in ADF-Dev I use Azure SQL Database as dataset source, but when publishing to ADF-UAT it automatically changed to SQL Server On-Premise Database (assuming both of data source has the same table structure).

    • @MRadwanMSF
      @MRadwanMSF  3 года назад

      Yes you can do that, you can use YAML and replace function. See the following.
      devblogs.microsoft.com/scripting/use-powershell-to-replace-text-in-strings

    • @andychiarwantopranata6579
      @andychiarwantopranata6579 3 года назад

      @@MRadwanMSF Thanks!

  • @camassasantiago933
    @camassasantiago933 3 года назад +1

    great video, I wonder can we just get changed files in repository and only deploy these changed files without all files. I stuck in how to do that

    • @MRadwanMSF
      @MRadwanMSF  3 года назад

      You can use another way that only deploy the ADF pipelines that you want, see this link:
      marketplace.visualstudio.com/items?itemName=liprec.vsts-publish-adf

  • @tipums123
    @tipums123 3 года назад +1

    Thanks Mohamed, it was a great presentation.
    One question - Instead of Master can we add Powershell script files to adf_publish branch? Is there any pros or cons adding them in adf_publish?

  • @BharathKumar-zq6lm
    @BharathKumar-zq6lm 2 года назад

    Great presentation Sir
    I have one question - we have 3 different self hosted integration runtime with different names for each environment dev, uat and prod respectively.
    how to parameterize it while deploying to uat and prod env?

    • @rodrigueschetan
      @rodrigueschetan Год назад

      Hi Bharath, did you parameterize self hosted IR now ?

  • @jubatistim
    @jubatistim 3 года назад +1

    Great presentation man, thank you! Where I can get the ci-cd.ps1 file content?

    • @MRadwanMSF
      @MRadwanMSF  3 года назад +1

      I am happy it helped. Here is the link where you can find the file
      docs.microsoft.com/en-us/azure/data-factory/continuous-integration-deployment

  • @adamkhouiy2719
    @adamkhouiy2719 3 года назад +1

    Excellent video Mohamed. Thank you!!. I have just some questions about deployment in different resource group (Dev, Uat, prod) and each time with different resources names. For example using dev-storeaccount in Dev resource group and uat-storeaccount in Uat resource group and so on ... My first question is : do we use the target resource groupe name in start/stop trigger script ? . Second question how we can handle the parametrization of resource name from an environement to an other ?

    • @MRadwanMSF
      @MRadwanMSF  3 года назад +1

      Thanks!
      You should parameterize everything and most probably we will use variable group
      docs.microsoft.com/en-us/azure/devops/pipelines/library/variable-groups?view=azure-devops&tabs=yaml

    • @adamkhouiy2719
      @adamkhouiy2719 3 года назад +1

      @@MRadwanMSF Thanks !

  • @AxL28AxL
    @AxL28AxL 3 года назад

    So the UAT and Prod don't need to be associated with Azure DevOps Git?

    • @MRadwanMSF
      @MRadwanMSF  3 года назад

      Yes, only Dev assoicated with Git and the rest of envs are not

  • @ketanshah9082
    @ketanshah9082 3 года назад +1

    Awesome work Mohamed, you explained it so well in your video. thank you so much. Mohammed is there anyway you can give access to this presentation(ppt) you prepared for this demo?

    • @MRadwanMSF
      @MRadwanMSF  3 года назад

      Thanks, I am happy it was helpful.
      Sorry, I can't find the ppt.

    • @ketanshah9082
      @ketanshah9082 3 года назад

      @@MRadwanMSF no worries Mohammed. Please keep up this great work you do in teaching some of us so easily and with step by step guidance. I am looking forward for Azure DevOps with Databricks, Synpase, HDInsights would be great to learn.

  • @shwetasaronja2110
    @shwetasaronja2110 2 года назад

    We need the powershell script that you copied from microsoft website at the time of creating a file.On microsoft website it is not available. Please watch video at 34.26 time and guide me

  • @irammapatil9957
    @irammapatil9957 Год назад

    Hi, can you send powershell script link which you have copied from microsoft website

  • @hemanthkh
    @hemanthkh Год назад

    Please share the yaml pipeline

  • @user-um1bd3zz9f
    @user-um1bd3zz9f 4 месяца назад

    هل ممكن حضرتك تعملنا فيديو بالعربي شرح ل azure data factory

  • @MrDwikipedia
    @MrDwikipedia 3 года назад +1

    Thanks for this it's been very helpful! I got it working after a lot of trial and error.
    One question and maybe I'm misunderstanding, but shouldn't the start trigger be -predeployment $false ?

    • @MRadwanMSF
      @MRadwanMSF  3 года назад +1

      Glad it helped!
      Yes, for the start trigger and if I didn't do that, it's my mistake :-)

  • @RajeevKumar-zf8ox
    @RajeevKumar-zf8ox 3 года назад

    Hi Radwan, I have one Databricks. How to deploy it using CI/CD

    • @MRadwanMSF
      @MRadwanMSF  3 года назад

      You need to use this tasks
      marketplace.visualstudio.com/items?itemName=riserrad.azdo-databricks

  • @snad256
    @snad256 2 года назад

    Hi
    I'm unable to add custom parameters for Snowflake.
    Could you please get back to me?!
    Great video man! Thanks

  • @abhijnanbp1397
    @abhijnanbp1397 2 года назад +1

    Hi Radwan,
    This is a great video!
    I have a question - in this video, you have demonstrated that all those changes made in Dev will be deployed on UAT and Production in the same CD pipeline. However, in the real time scenario, if I make 10 changes in Dev, all those 10 changes should be deployed on UAT. Imagine, out of those 10, we got an approval to deploy only 4 changes onto Production, and the rest of the 6 should still be in UAT for extended testing. I am curious to understand how can we deploy only those 4 changes onto production. I look forward to having answer, and that will be of great help.
    Thanks in advance!

    • @TheMadhan1988
      @TheMadhan1988 2 года назад

      Did you get a solution for this?

  • @NitinMathewGeorge
    @NitinMathewGeorge Год назад

    But now the arm approach is having limitations with parameter limit of 256. Secondly the concept of branches in this approach isn't ideal and acceptable from MS.

  • @zabeehullah3673
    @zabeehullah3673 4 года назад

    ​Hi,
    I have a scenario and need community advise to manage it in best possible way.
    Due to compliance issues, I am not allowed to save our source code in any Geo location supported by Azure Devops Services. so under repo when we create a repo, by default its created somewhere in Geo location, ideally where azure devops service is hosted.But this approach is NOT-OK for us.
    And I want to use our own server "hosted in MS-azure" as repo server.so whenever, we create a repo using create repo under the project repositories this should be stored in that particular server.. please advise how can i achieve this?
    our own server is having Visual studio 2019 and connected to azure devops also.

    • @shakechen7944
      @shakechen7944 4 года назад

      you can use tfs server deploy local.

  • @mohammedalbosifi3975
    @mohammedalbosifi3975 3 года назад

    بدنا دورات بالعربي

    • @MRadwanMSF
      @MRadwanMSF  3 года назад +1

      احضر المحاضرة الجاية
      ruclips.net/video/dDZw1K7ow68/видео.html

  • @saisylaka955
    @saisylaka955 8 месяцев назад

    Hi Mohamed,
    I have follwed the same setps which you explied in the video. I'm getting below error while running the pipeline. Please help me out in this.
    Error:
    2023-11-03T06:31:42.8563878Z ##[error]Could not find the modules: 'Az.Accounts' with Version: ''. If the module was recently installed, retry after restarting the Azure Pipelines task agent.
    2023-11-03T06:31:42.9672510Z ##[error]PowerShell exited with code '1'.
    2023-11-03T06:31:45.6177222Z ##[command]Disconnect-AzureRmAccount -Scope Process -ErrorAction Stop
    2023-11-03T06:31:45.7413326Z ##[warning]Run Connect-AzureRmAccount to login.