how to copy and deploy multiple logic apps to different RG - deployment

I am having multiple logic apps in resorce group.How can i copy all and deploye to different RG.
what is best way to do so?
I am not prefering Moving resorces.

As an example, you can download all of the logic apps to visual studio, from there create parameter files and build Azure DevOps build/release pipelines to different resource groups. Such as dev, test, uat & prod resource groups. I am using this strategy to build and govern over 300 logic apps for one of my customers. Now I started from Visual studio but you could easily download your current logic apps using the cloud explorer in visual studio or directly from the Azure portal.
One of the things you will have to look out for is the API-connections, they tend to create new ones even when not asked for.

Related

Test server for release pipeline in Azure DevOps

Forgive me for asking a stupid question. I am from IT Infrastructure background & have been asked to create CI/CD pipelines based on my recent learnings on DevOps.
We have couple of applications whose source code is currently in TFS 2013 & those apps are written in ASP.NET C# language. Now, requirement is to migrate the source code from TFS to Azure Repos (Azure DevOps services) & further create a CI/CD pipeline.
Now for demo purposes, customer is asking us to do the deployment (i.e. Release pipeline) on a test server which is a plain windows 2012 OS without any SQL & IIS for both of these applications. Is that possible & how could we achieve the results to confirm release pipeline is funcioning properly?
In my opinion, it wont work as there is no application infra/configuration done for those applications on that plain test server. I guess we actually need a ready dev/stage environment which is replica of production to do the testing of release pipeline for those applications. Am I correct?
Just need expert advise for confirmation so I communicate the same to customer.
Azure DevOps Pipelines use an agent to perform the deployments. You can run the agent entirely in the cloud when deploying to Azure resources. You can also install an agent locally. Follow this link and scroll down to read about self-hosted agents. This is how you can deploy to your test instance from the pipeline.
Now, what you deploy there may require additional software be installed. You say it's an application in C#. Cool. Now, what's it do? Is it a windows program? Then just having the server there, with an agent installed, is all you need. Is it a web program? Then, yeah, it's going to need an IIS (or whatever) instance available somewhere to deploy to. Is it a database program? Then, yeah, it's going to need a database instance to deploy to. There's nothing magical about having a VM or a machine somewhere. All the same rules have to apply. There has to be an OS, drives, memory, and yes, supporting services depending on the needs of the application.
However, using a local machine instead of a hosted one, that works fine. Just follow the instructions in the link above.

Azure DevOps: Merging two projects together

A few years ago, our team made the full transition to Azure DevOps. Before that, we had a mixture of on-prem TFS and Subversion but went to the Azure DevOps as it was easier to maintain project status between our developer and BA teams. At that time, for each project the team was working on, we just created a new "project" in Azure DevOps, but over the course of the past few years, we have found that using that method doesn't lend itself to helping us track metrics across all of those projects. We also see that maintaining multiple, separate backlogs is not ideal as we have developers spread across multiple sprints at the same time in different projects without a single place for the team leads or scrum master to fully know what their team members are working on in a single day.
Now, we've made use of queries, but those only go so far, so we've made the decision to merge our projects into a single "project". My scrum master and I have been looking at Naked Agility's merge tool, as outlined in this link: https://blog.devopsabcs.com/index.php/2019/06/12/one-project-to-rule-them-all/.
Has anyone used this tool and how well did it work for you? Also, are there any other options for merging projects together as this tool seems really complex (which the developer states is the case).
Azure DevOps: Merging two projects together
Sorry for any inconvenience.
I am afraid merging projects into a project is currently not supported in azure devops.
There is a Under Review user voice about make it possible to move a Team Project between Team Project Collections.
Merging two projects is not a simple task, it contains not only source code, build/release history, workitems and other watch outs were mainly around access and security:
External API integrations such as Web Apps, Function Apps, JIRA, Service Now
External inbound app authorisations
External outbound app authorisations such as Azure Service Principals
Variable Group authorisations to YAML Build Pipelines
Library reference updates including KeyVault
etc
This refactoring ended up being much more work than the code merge itself.
Besides, there is a Azure devops extension Migration Tools for Azure DevOps, which allow you to migrate Teams, Work Items, and Plans & Suits from one Project to another in Azure DevOps/TFS both within the same Organisation, and between Organisations. Watch the Video Overview to get you started in 30 minutes. This tool is complicated and its not always easy to discover what you need to do.
Hope this helps.

CI / CD pipeline Template for logic app and azure function

I have a logic app that connects to an sftp server (virtual machine that I created on azure) and does actions when a file is added to that sftp:
When a file is added I create a new blob on the blob storage.
Delete the file from the SFTP server
I have also created a blob trigger-based azure function that, every time a blob is created, processes some actions (like blob content decryption and parsing).
Next steps will be chaining some other azure functions executions in my logic app (like sending e-mail after executing and azure function etc... )…
Now, I have two main questions:
In order to have the best CI/CD pipeline suited for this workflow, do I create the logic app from the portal or from visual studio and why please?
Do I put azure function and logic app in the same solution/Repo? Same project?
Then, how can I create the CI/CD pipeline (type template and steps please)?
Ps: I want to add unit tests to test if my logic app and azure function are working correctly so I want to integrate test step in my build definition.
For more details about the logic app please see this Stack overflow question in which i detailed the process
and here is the logic app
Please find the below points:
I would recommend using Visual Studio. The main advantage is it gives you the same
designer experience, and you can make use of ARM Template and parameters to
deploy your logic app robustly to multiple environments to dev, Staging , proc etc.,
making a robust CI/CD pipeline. It also gives you an advantage of using Azure key vaults using ARM template and the parameter syntax to store any sensitive data.
Also Visual studio provides you to connect to the cloud using cloud
explorer where you can mimic resubmit , run history etc..
If you are using Azure function only for one process then you can
put it under the same solutions, but keeping Azure functions as a
separate Repo gives you more flexibility of re-usability, so that
other applications can also make use of it.
You can utilise Speck flow for automate logic app testing Automated tesing logic app with speckflow this link explained it in detail.

How to integrate powerapps with azure devops

I am doing some research for Powerapps integration with Azure DevOps.
However there is limitated information for it.
It is possible to integrate powerapps inside a Task for AzureDevops?
Based on, that we have a .zip file with the Powerapp, and we want to create a Build and Release/Deploy for several environments.
Thank You.
It is possible to integrate powerapps inside a Task for AzureDevops?
Yes it is.
You can leverage the Solution concept of the Microsoft Power Platform and the Power Apps BuildTools (preview) extension for Azure DevOps.
Update 11/2020: This is now GA and called Power Platform Build Tools
I've written a complete step-by-step guide on this topic:
A Continuous Delivery Approach for No-Code Solutions in Microsoft’s Power Platform
Bottom line:
With this build tool, you can automatically check-in a Solution into source control and deploy it using a continuous delivery approach with the help of Azure DevOps. See the screenshot for a sample configuration of the Export and Import Solution Task.
It works for everything you can organize inside a Solution, e.g.:
Power Apps
Power Automate Flows
AI Builder Models
Common Data Service Entities
It is possible to integrate powerapps inside a Task for AzureDevops?
I am afraid there is no such Task integrate powerapps for AzureDevops at this moment.
If you want to integrate powerapps with azure devops, you can follow the guide step by step:
Microsoft Teams – Integration with Visual Studio Team Services using PowerApps.
Besides, AFAIK, PowerApps should not be "Build/Deployed" through Azure Devops.
When you are developing with PowerApps, there is no way to do Source
Control. There are no source files. The only artifact you can version
control is the .zip file that you can export.
And
In PowerApps, you don’t have to build your code. Any change you make
to the application is live for you to test it. In that way it is very
productive. To publish the application you just click on the publish
button and it is live.
Check this great blog: PowerApps From A DevOps Perspective for some more details.
Hope this helps.
Solutions are a way to package your components in a single zip file and use Powerapps build tools to import your solution on to a different environment or tenant.
It is still a an improvement from manually importing each app or environment variable and then import it on to target system, but it lacks what we call as automation of deployment.
To provide an eg, I will explain what I have done, and what still constitutes of a manual task:
I created an enterprise level app using powerapp canvas model. My app consumes data from around 20 APIs. These API calls are implemented in power automate.
We have 4 environments, dev, sit, uat and prod. Now I cant keep on importing flows in each environment and change their api URLs to point to the deployed environment. So I used environment variables for each environment which stores api URLs for each environment. This can be done under solution.
Under the same solution, I added my app. So now my solution has 2 things, my app and the environment variable which consists of api URLs.
I then use powerapps build tools to move this solution from dev to sit.
Steps: use build tools tasks to perform the following
Export solution
Unpack it in git
Pack it
Import the solution.
This successfully moves my solution to sit.
But the solution environment variable still points to the dev url.
So I have to override environment variables to store sit URLs.
This manual intervention to edit environment variable is as good as doing all the tasks manually.
This was the case when PowerApps was first announced; however, this is no longer the case.
While it is technically true that there is no actual code that would be managed and deployed with a PowerApp or Flow but that doesn't mean that you can not use the power of Azure DevOps. Additionally, when creating a PowerApp / flow you would also be creating entities and even Model Driven apps - and these uses solutions - which naturally work well to deplooy within Azure DevOps.
Microsoft is building out this whole construct to enable all these to deploy...
While the whole incorporation of PowerApps and flows into Solutions is not fully baked yet - they are targeting to have this ready around the October time frame this year.
We have been talking to Microsoft about also enabling PowerApps and flows to follow the same expansion that solutions do so that they can take advantage of the full branching strategy.
So even though you would be simply exporting out zip files into your repo - you can still take advantage of the full devops pipeline which is highly recommended.
Use this component, it still on preview mode but is working fine on my side
https://marketplace.visualstudio.com/items?itemName=microsoft-IsvExpTools.PowerApps-BuildTools

Using VSTS Release Management, how can I modify the configuration of an Azure Web App for each environment?

I'm using Visual Studio Team Services and I'm trying to set up Release Management to allow automated deployments for our Azure Web App to multiple environments. I would like the same source to be deployed to each environment, but with modified configuration settings.
I was hoping that I could create a single Build for my application, and then modify the configuration at deployment time for each environment. I'm aware that this can be done for appSettings and connectionStrings (either through Tokenization, or even managing those settings via the Azure portal), but I'd like to be able to make more general changes to the web.config file. For example, I want to be able to:
Update 'simple' settings such as appSettings/connectionStrings
Update multiple attributes on elements (like httpErrors)
Insert or rewrite sections of the config file itself (for example to add IIS rewrite rules, or to remove unwanted HTTP handlers for production)
Currently we achieve this by using config file transformations and separate publish profiles for each environment (manual deployment). I can't see a way to re-use this if I want a single release pipeline.
I'm hoping someone can help point me in the right direction. I'm also happy to accept alternative solutions - ultimately I just want to be able to deploy the same source (e.g. from the same commit in source control) to multiple environments, with different configuration, while keeping some kind of flow from dev, to test, to eventually production.
You can use Tokenization Task to update the files base on the environment variables.
More similar extensions: Replace Tokens and Colin's ALM Corner Build & Release Tools.