I'm currently trying to understand how I can deploy a Logic App from Azure DevOps. I'm trying to give my team the ability to back out changes. Is this possible without using a series of scripts?
I'd like to create a release that does the following
Deploy Logic App ARM template
Upload code to Logic App from VSTS/DevOps
There is a good article on how to prepare the logic apps for CI/CD into multiple environments using ARM template.
You just need to download the ARM template for the Logic app and make changes in the template file, declaring parameters. You will also need to create parameter files for each environment. You can then create a Azure Pipelines and upload the files to the build and release definition.
https://platform.deloitte.com.au/articles/preparing-azure-logic-apps-for-cicd
You should extract the ARM template for your logic app and upload it to DevOps, then make a build and release definition
there are several helpful links available, here is one:
https://platform.deloitte.com.au/articles/preparing-azure-logic-apps-for-cicd
Edit: Link to Logic App Extractor:
If you just want to know how to deploy Logic App with VSTS, maybe this doc could help you.
Related
I'm trying to deploy the logic app application through CI CD for each env, say DEV/TEST/ACC/PRD.
Azure storage table used in logic apps should be dynamic based on the env.
Could you please help me with a solution to achieve this?
Look at the automated deployment documentation here it shows how to setup the arm templates for deploying logic apps
https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-azure-resource-manager-templates-overview#workflow-definition-and-parameters
In terms of the different variables for various environments you need to define them as parameters in the template
https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-azure-resource-manager-templates-overview#workflow-definition-and-parameters
If you have sensitive information like passwords, connection strings etc you can store them in Azure Devops Library variables (or as secrets if you are in Github), guidance for that below
https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-azure-resource-manager-templates-overview#workflow-definition-and-parameters
I've got a bicep file that has made the following resources: Function app, storage account, app insights, key vault and app service plan, via a build pipeline in Azure Dev Ops Pipelines. I need to populate these resources with artifacts built from source code e.g. adding functions to the function app. I'm not sure how to do this though. Does anyone have any advice or links to tutorials? I'm new to Azure and would appreciate any help. Thanks.
Basically, Azure pipelines working with tasks to deploy artifacts to the resources. These resources can be AKS, IIS or Azure functions as you mentioned. If you particularly looking for Azure function deployment task you can use the AzureFunction#1 task for that.
Here is some additional useful links;
https://www.azuredevopslabs.com/labs/vstsextend/azurefunctions/#:~:text=Azure%20Functions%20is%20an%20event,well%20as%20on%2Dpremises%20systems.
https://learn.microsoft.com/en-us/azure/azure-functions/functions-how-to-azure-devops?tabs=dotnet-core%2Cyaml%2Ccsharp
I have an existing app service running on Azure that I previously published directly from Visual Studio. I am trying to get to grips with using DevOps and was wondering if it is possible to add a CI/CD pipeline to an existing app service.
I have seen a lot of tutorials on the web about how to create a pipeline for a new app service (many, of course, are out of date and do not actually relate to what one sees in the Azure portal!) So far, though, I have not come across anything about adding this to an existing app service.
Any advice or links to handy tutorials would be greatly appreciated!
I am hoping that the answer is not delete the existing service and start again from scratch!
If you are a beginner on Azure Devops, I will recommend to use the Azure Devops Starter project to create a pipeline, you can pick AppService as the deployment.
Once the pipelines are created on the Azure Devops , just open the pipeline and select the existing AppService where you want to deploy and also the source from where you want to pull the code. This makes easier rather than creating the stuffs from the scratch.
I want to deploy a Function App including code using an ARM template that is going to be published in the Azure Marketplace as a Managed App.
I've seen in the docs that you can add a sourcecontrols element in the ARM template that you can use to point to e.g. a GitHub repository. However, I don't want to use a repository, I want to code to be uploaded to the Function App.
I also know you can upload the code using the Azure CLI or powershell, however this will not be possible when publishing the app in the marketplace.
Is there a way to have a package that contains everything including the code and have that uploaded to the Function App all using an ARM template in the Azure Marketplace?
You should take a look at Run-From-Zip. Basically, you host the zip package somewhere (typically storage blob), and in ARM template you just set a WEBSITE_RUN_FROM_ZIP App Setting pointing to it.
As an alternative, you could use the ARM msdeploy extension, and point it to the zip package (e.g. something like this).
I working on Azure ARM templates, I developed few ARM templates for production environment it includes vnet, subnet, web app, API app, storage and database etc...
I had the source code contains the MVC application and Azure API Application and check in the code into VSTS team repository.
Source code managed in VS2017:
Currently I created Build and Release for source code along with ARM templates in single build and release by following this link.
I have few questions in my mind after implemented above process in my current environment:
What are best industry practices to manage the source code and ARM templates in VS2017?
How to know which version of ARM template deployed in specified resource group?
For suppose if someone changes the application code only, then also ARM template deployed along with modified source code into azure. is it recommended approach?
Is it recommended approach for deploying the source code along with ARM templates at time by creating single build and release definition In VSTS?
Is it recommended way to give application settings and connection strings in web app and API app arm templates?
What is the enterprise implementations to deploy the ARM templates and source code into azure environment using VSTS?
You can deploy ARM and web application in the same build/release, simple workflow:
Check the template file has been updated or not through VSTS REST API (e.g. Get a single commit with changed items)
Check the related resource is existing in Azure through Azure PowerShell task (e.g. Find-AzureRmResource, Get-AzureRmResource)
Add a new variable per to the results of step1 and step3 through Logging Command (e.g. isUpdated: Write-Host "##vso[task.setvariable variable= isUpdated;]true")
Add Azure Resource Group Deployment task and choose custom conditions in Run this taks box (Custom condition: eq(variables[isUpdated '], 'true')
Add corresponding tasks to deploy your web app.