Using Azure Pipelines for Azure SQL Deployments | Data Exposed

Поделиться
HTML-код
  • Опубликовано: 8 июн 2024
  • Many organizations have complex security and deployment requirements. In the second of this two-part series with Arvind Shyamsundar, we show you how to leverage Azure Pipelines features like multi-stage pipelines and AZ CLI support, to securely deploy an Azure SQL Server and Database into a private VNET in Azure.
    To learn how to get started with DevOps for Azure SQL, watch part one: • Getting Started with D...
    0:00 Introduction
    1:00 Changed-based approach
    1:35 State-based approach
    3:30 Demo
    8:23 Demo Background
    12:07 Back to Demo
    19:11 Demo: pipeline execution
    22:45 Key takeaways
    24:50 Getting started
    ✔️ Resources:
    Download and install sqlpackage: docs.microsoft.com/en-us/sql/...
    Azure PowerShell task: docs.microsoft.com/en-us/azur...
    Github- SqlAzureDacpacDeploymentV1: github.com/Microsoft/azure-pi...
    Azure SQL Database Deployment task: docs.microsoft.com/en-us/azur...
    Github - Virtual Environments: github.com/actions/virtual-en...
    Add & use variable groups: docs.microsoft.com/en-us/azur...
    Multi-stage pipelines user experience: docs.microsoft.com/en-us/azur...
    Github - SqlDacpacDeploymentOnMachineGroupV0: github.com/microsoft/azure-pi...
    📌 Let's connect:
    Twitter: Arvind Shyamsundar, / arvisam
    Twitter: Anna Hoffman, / analyticanna
    Twitter: AzureSQL, aka.ms/azuresqltw
    🔴 To check out even more Data Exposed episodes, see our playlist: aka.ms/dataexposedyt
    🔔 Subscribe to our channels for even more SQL tips:
    Microsoft Azure SQL: aka.ms/msazuresqlyt
    Microsoft SQL Server: aka.ms/mssqlserveryt
    Microsoft Developer: aka.ms/microsoftdeveloperyt
    #AzurePipelines #AzureSQLDeployments #AzureSQL
  • НаукаНаука

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

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

    informative content. thanxs for putting together the go-through..

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

    Very informative. Thank you

  • @seanrhone5306
    @seanrhone5306 Месяц назад

    What if you have 100 databases you want to deploy to? How can you dynamicly supply the database list and how does the deployment work?

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

    I have a query as the document states that VSBuild@1 task can be executed only in Windows VM. So is there any way we can do all these steps in a linux VM?

  • @MunindherReddy
    @MunindherReddy 11 месяцев назад

    Do we have steps to create SQL deployment scripts and incremental sql deployment scripts? like Differential scripts?

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

    Great knowledge sharing. I have a query if you could answer. Why you are creating a separate pipeline for SQL deployment. Can not we have tools to deploy the SQL artifacts with code? I have a big project which has three components to deploy together. Angular for UI, .Net core for API and SQL tables and procedure. when a developer completes the development of a new functionality then he commits Angular code, API code and SQL tables and stored procedures. Now the challenge is to deploy all these three parts together ( in sequence of course ) through Ci/CD. I do not see any way to do this. I have googled it but did not find the solution. For code , CI/CD pipelines is there but it is not in sync with the SQL objects. Do we have any way to do this?

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

      Sure - you can take the example from this repo wherein a single pipeline is used to orchestrate a SQL + web app deployment.

  • @sandeep-bp2tu
    @sandeep-bp2tu Год назад +1

    pls send the link to the yaml pipeline

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

    Is there a way to do this without hand-editing YAML?

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

      You can use the Azure Pipelines YAML editor (docs.microsoft.com/en-us/azure/devops/pipelines/get-started/yaml-pipeline-editor?view=azure-devops), which offers some "IntelliSense", as a starting point.

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

    some one can say to me where is the previous video?

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

      In the description they provide a link to a playlist, where you can check all the episodes: aka.ms/dataexposedyt
      I think this is the particular episode they're referring to: ruclips.net/video/j7OnxOz7YDY/видео.html

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

    I have a self-hosted agent, with the sqlpackage capability enabled and my pipeline fails on the SQL Azure DacPacDeployment task with the following error:
    The current operating system is not capable of running this task. That typically means the task was written for Windows only. For example, written for Windows Desktop PowerShell.
    I am not quiet sure where does the task pickup the non windows OS.

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

      Thank you for the interest in this episode, and also the question. At this moment I cannot adequately diagnose what might be causing this error, as it will be very specific to the environment. To rule out known issues, I would suggest following the below check list:
      - Ensure that the Visual Studio 2019 build tools are installed on the self-hosted agent. Build tools can be downloaded by searching in the page visualstudio.microsoft.com/downloads/ - scroll down and you'll find sections for Visual Studio 2019 Tools - expand that and then locate the build tools download.
      - Register self-hosted Agent from ADO following the instructions here: docs.microsoft.com/en-us/azure/devops/pipelines/agents/agents
      - Ensure that a current version of DacFx is installed. You can get this from docs.microsoft.com/en-us/sql/tools/sqlpackage/sqlpackage-download - the latest at this point in time is 15.0.5164.1
      -Ensure that the self-hosted pool is correctly referenced in your pipeline job as shown in the example: github.com/arvindshmicrosoft/azure-sql-devops/blob/9a7f249e23540374d8eb3755294d1c459ca27b22/azure-pipelines/deploy-sqlproj.yml#L57-L58
      If the error still persists, consider opening an issue on github.com/microsoft/azure-pipelines-tasks/issues and cross-reference the issue here so that one of us can take a deeper look. In the GitHub issue, please provide as many details as possible (without revealing any sensitive / private information, of course). For example, the pipeline definition YAML would help. In addition, the details about the self-hosted runner / agent etc. would be required.

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

      @@MicrosoftDeveloper I had two stages, one for building the project the other one for deploying the dacpac. In each stage there was a pool specificed and removing the ubuntu-latest fixed the problem. I am able to deploy the dacpac successfuly.... Many Thanks for your response....

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

    .dacpacs rocks!!!!