Multiple Logic Apps in same Azure Resource Group Project - azure

I have a requirement to create around 20 small logic apps. I want all of them to be part of single solution ideally single Azure Resource Group project.
Once it is created, I want to set up CI/CD on Azure Devops to deploy all these logic apps to multiple environments with different parameters in each environment.
Is it right to include all the logic apps in one single project? If so, what are the options to set up CI/CD pipeline?
Edit: Rather what is the best way to organise multiple logic apps?

To deploy your solution, you can use either a single template or a main template with many related templates. The related template can be either a separate file that is linked to from the main template, or a template that is nested within the main template.
For small to medium solutions, a single template is easier to understand and maintain. You can see all the resources and values in a single file. For advanced scenarios, linked templates enable you to break down the solution into targeted components, and reuse templates.
When using linked templates, you create a main template that receives the parameter values during deployment. The main template contains all the linked templates and passes values to those templates as needed.
see Tutorial: create linked Azure Resource Manager templates.
Note: For linked or nested templates, you can only use Incremental deployment mode.
You can find example templates here.

Related

Azure infra archive and restore

We have set up small dev platform on azure which includes servers(sql server, web server) and azure ML. These are protected by azure VPN gateway. Below are the list of azure components we created and configured . Currently we don't need the dev platform to be available but we will need it after 6 months . so is there any way we could take this complete setup as snap shot and store as image or images so that when we need we can just restore it with out doing much configuration
dev platform components to archive and restore
Virtual networks , sub nets, dns, firewalls
VPN gateway , configuration
VM with os and server setup
sql server with data
subscription with custom roles, assignments, cost alerts , dashboards etc
if this is not possible then what are the alternatives
regards,
Suman
Have a look at the different Infrastructure as Code options that are available. Easiest way to 'export' the current situation is to generate an ARM template of the needed resources by going to the resource group and clicking Export template under Automation.
To implement infrastructure as code for your Azure solutions, use Azure Resource Manager templates (ARM templates). The template is a JavaScript Object Notation (JSON) file that defines the infrastructure and configuration for your project. The template uses declarative syntax, which lets you state what you intend to deploy without having to write the sequence of programming commands to create it. In the template, you specify the resources to deploy and the properties for those resources.
To increase the functionality options you have, have a look at Azure Bicep.
We've introduced a new language named Bicep that's used to develop ARM template JSON. Bicep files and JSON templates offer the same capabilities. You can convert templates between the two languages. Bicep provides a syntax that's easier to use for creating templates.
and also
Bicep is a domain-specific language (DSL) that uses declarative syntax to deploy Azure resources. It provides concise syntax, reliable type safety, and support for code reuse. We believe Bicep offers the best authoring experience for your infrastructure-as-code solutions in Azure.
Be advised: this is meant for the resources and their configuration of your environment. For the data side of things, save and/or export the data somewhere you can restore it from easily like Azure Storage.

How to update and redeploy ARM template

I am new to Azure as well as Devops, ARM template etc..I have deployed an ARM template for key valut with a name "ABC" via DevOPs. Now I would like to change some parameters. I don't have access to do it via portal and I am forced to use only ARM template. How can this be achieved via devops? Should I delete that resource and start from the scratch or any SOP to update resource parameters via ARM templates. For example I want to enable "“enabledForDeployment” for already deployed kay-vault. Thanks.
generally speaking you just re-run the same template with the changes you've introduced to the template. there are many ways of deploying the template (az cli, powershell, built-in steps, various sdk's).
just keep in mind, some properties are settable only at creation time, so effectively read only, you wouldn't be able to update those after the resource is created, some resource providers do not play well with idempotent behavior and this will also lead to issues when you try to redeploy the same template, some providers offer dodgy behavior when you need to use a completely different api call to update something compared to creating it.
So there's no single answer, but for what you are doing, just updating the template and running it again should work just fine.
You can do it through PowerShell,
Update a resource in an Azure Resource Manager template

Setting application insights instrumentation key while deploying

Our company is having multiple web services deployed each having three environments- Dev, Staging, and Production. Each environment has separate resource groups which contain application insights for the service. It's a tedious task to fetch the instrumentation key for each environment and set in the appsettings file. Instead, we want to automate this process in a way.
We are thinking in the direction- we will provide the application insight name as a placeholder which will get replaced to the actual instrumentation key at the deployment time after fetching it from the respective resource group.
I have gone through some articles but I'm unable to achieve same.
Please suggest me some approaches for the same.
TLDR:
Add an output to your ARM template
Pick that up in the release as an variable
Use it to change your configuration
Details:
When you are using an ARM template for deploying Application Insights, you can specify the template to return the key as an output variable (https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-manager-templates-outputs). The ARM template deployment task can pick these outputs up and make it available as a variable with an JSON object. A more easy approach is the ARM Outputs extension (https://marketplace.visualstudio.com/items?itemName=keesschollaart.arm-outputs) where you can directly make each individual output available as an variable.
After that, the 'Deploy Service Fabric Application' task allows you to override application parameters if names match (not very self-documenting) or you can use the tokenized approach you mentioned earlier. There are numerous extensions that can do that, including: https://marketplace.visualstudio.com/items?itemName=qetza.replacetokens (haven't tried it myself)

Copy Azure Resources to client azure account

We are working on following within Azure portal
Azure Functions
Data Factory
Logic Apps
Storage account (not files)
Now as we are done with development, we need to deploy these azure resources in client's UAT environment
I looked around (might be missing something) and found that deployment of Azure resources is not straightforward.
In Azure, it is like another subscription, correct?
So found this blog, which works with different PowerShell scripts to copies from one subscription to another
This is the right approach? & it cover everything required for resources to execute flawless (I still need to go thru scripts) for e.g. permissions, Data Factory datasets, etc?
Any other way to deploy (kind of export & import)?
Basically what you need is to create a reusable arm template, your question lacks some details yet ARM templates are the way of automated deployment in Azure, on a high-level
start by authoring your arm template to deploy the vanilla required resources look here
https://learn.microsoft.com/en-us/azure/templates/microsoft.web/sites/functions
https://learn.microsoft.com/en-us/azure/templates/microsoft.datafactory/factories
https://learn.microsoft.com/en-us/azure/templates/microsoft.logic/integrationaccounts
https://learn.microsoft.com/en-us/azure/templates/microsoft.datalakeanalytics/accounts/storageaccounts
you can combine all of them in one big template using ARM template dependency and other functions
look here
https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-group-template-functions
after you finish ARM templates can be used in many ways including PowerShell, direct API calls or even you can create a deployment in Azure and save it to be reused with a click
look here, also if there will be a high volume of users consider adding it to market place.
https://learn.microsoft.com/en-us/azure/azure-resource-manager/
after finishing your implementation of vanilla resources you can then move into adding any customization you might have.
this is the right and best way to do "afaik"
also look here to see all of your existing resources in an arm template view
https://resources.azure.com/
my understanding of Azure is that almost everything with some few exceptions has an ARM template representation
hope this would help.

How to rebuild a complex azure environment

I have a complex azure environment where there are so many components and dependencies.
Should I divide it to multiple deployments ? Even one resource has lots of dependencies.
Such as with the keys involving service fabric
According to your description, as 4c74356b41 says, I suggest you could use arm template to achieve your requirement.
Resource Manager template - A JavaScript Object Notation (JSON) file that defines one or more resources to deploy to a resource group. It also defines the dependencies between the deployed resources. The template can be used to deploy the resources consistently and repeatedly.
By using arm template. you could use linked templates to link different resources to achieve one resource has lots of dependencies.
More details about what is arm template and getting started, you could refer to this article.
Besides, there are also multiple arm template example, you could refer to this url to know how to create the template.
Besides, if you have created a resource group and it contains multiple resources, you could directly download its deploy template for next deployment by using automation script feature.
Notice: Not all the resource will be automatic included in the auto template.
More details, you could refer to this image:

Resources