I want to deploy a logic app standard tier with workflow using arm template in ci/cd - azure-logic-apps

I have a logic app deployed in consumption plan using terraform.
Now I want to deploy a logic app standard tier with the workflow using arm template and create a ci/cd pipeline for it.

Here are steps to be followed in order to create a logic app workflow using arm template & release pipeline.
Upload your ARM template file to your repro or git hub & copy the link.
Create a release pipeline, with an empty job & add a task ARM template deployment as shown below
Select the deployment scope as resource group, in the Azure Resource manager Connection click on authorize to configure an Azure service connection. A new Azure service principal will be created and added to the Contributor role, having access to all resources in the selected subscription.
In the template location, select the option URL of the file & pass the URL of the ARM template
Pass the required fields based on your requirement, click on Save & click on Create Release (this will deploy the arm template resources in the select subscription).

Related

Anyone able to use Abp.io background tasks with azure webjobs

I'm looking to use abp.io and azure webjobs or functions to create a job scheduler for many jobs. Each job would be in a module and have its own settings for how often to run the background task. Wondering if anyone has successfully done this already?
Yes, I have done that. We have an .Net core console application created with an ABP template that does all the long-running background jobs. I struggled with it for a while but got it working. The trick was to publish the project directly into a path that the app service uses to find runnable web jobs. We are using azure DevOps where the publish configuration looks like this: --configuration $(BuildConfiguration) --self-contained -r win10-x64 --output $(Build.BinariesDirectory)/publish_output/App_Data/jobs/continuous/background-process-manager.
It is also now possible to use the ABP framework with Azure functions. This can be achieved using the isolated mode: https://learn.microsoft.com/en-us/azure/azure-functions/dotnet-isolated-process-guide. This works if you don't want to use the ABP background jobs triggered from another application. In our case, we wanted to run long-running background jobs triggered either on schedule or by our web application. Using the ABP background job structure required us to run the background process manager as a continuous web job.

I cannot find app service name of my current subscription

I already create app service from my Azure Subscription but I can't find it when I tried to create new release pipeline. Cannot find app service from current Subscription
As i tried to create a release pipeline for my app service and i can able to see my application from App service drop down box.
Please make sure that the created app services present in same subscription which you select .
or, Try to refresh the App service name drop down as shown in below
For more information please refer this Build your app with Azure Pipelines| MS DOC & App service name not visible on configuring release definition page.

How to build and release a react application in a web api application with Azure DevOps?

We now have two applications with two differents git respositories. The first one is in ReactJS for the front and the second one is in C# (Web Api 2) for the back. When we want to deploy on Azure, we build the front and we copy the output files to the c# project (web api project). We deploy the web api application from Visual Studio in Azure thanks to the deploy menu.
It's a little bit boring and sometimes we have errors when we change by hand the parameters relative to our differents environments.
We would like to automatize all these tasks with Azure Dev Ops. Have you ever done this kind of stuff ? And how ? Sorry, if this question seems stupid but i can't find a tutorial to build when the front and the back are not in the same git repo. Thanks in advance for your help.
You can follow below steps to build and deploy your application. I can only give a general idea and steps. The main idea is to get your front and backend source code together and build them in the same pipeline. The configurations and parameters for each tasks in the build pipeline need you to specify according to your project.
Below steps is shown in classic view pipeline. Check here for yaml view pipeline
1,Sign in to your Azure DevOps organization and navigate to your project.
2,Go to Pipelines, and then select New Pipeline, and select Use the classic editor to create a pipeline without YAML at the end of the page.
3,Walk through the steps of the wizard by first selecting as the location of your source code.
4, select a source to specify where your code is located. And continue to choose a template, here i choose ASP.NET Core(.NET Framework) template.
5, Add a powershell task to the top of your pipeline(the tasks can be drag and drop to reorder) to run the git commands to clone your front react.js code into same source folder of your backend c# code.
If your code is hosted in azure repo git. You can add below scripts in your powershell task. Make sure Allow scripts to access the OAuth token is checked
cd $(Build.SourcesDirectory)
git clone "https://$env:SYSTEM_ACCESSTOKEN#dev.azure.com/{yourAzureorganizationName}/{yourProjectname}/_git/testrepo"
6, add npm install task and npm custom task to build your react.js, You need to specify the path of Working folder that contains package.json to the folder where you cloned your reactjs code in the above powershell step. you can check steps here for reference.
7, Add a copy file task before task Visual Studio build to copy the output files from building react.js to the your c# project.
8, Configure the necessary path and parameters for Visual Studio build
task and Visual Studio test task to build and test your backend c# code.
9, Add an Azure App Service deploy task at the end to deploy to azure.
You might need to add other additional tasks to build your projects. You can also move your deployment task to release pipeline.check here for more information.
There are lots of examples and learning materials that you can find online about how to create build pipeline and how to deploy your application to azure. I suggest you can follow one example to create your build pipeline for c# project and try to edit your existing pipeline to integrate your react.js project.
Here is microsoft official documents for you to check it out. Hope you find above helpful.
Here, you can find the steps to build and release two web apps (hosting web api) and the relative front developed in ReactJS. Here's our goal :
In Azure devops, we've created a pipeline using the classic editor :
We selected our git repository and this template :
After a step of creating tasks, we obtain :
We'll describe some of these tasks. For example :
/p:SkipInvalidConfigurations=true /p:DeployOnBuild=true /p:WebPublishMethod=FileSystem /p:publishUrl="$(build.artifactstagingdirectory)\appRetailLab" /p:DeployDefaultTarget=WebPublish
Once you've build the two web applications, you've to copy the front files in web applications. There're two tasks for that :
At last, you publish your artefacts in the drop directory within the build.artifactstagingdirectory :
The release :
Our release is not too difficult :
We use 4 tasks :
Replace Token is a very usefull plugin. You can replace a token (defined by a template) by a value defined in the release. We use this plugin to replace our token in the front part of our applications (js files).
To add token in our reactjs application, we use dotenv npm package.
For the web.config parameters don't forget to check XML Variable substitution in your deploy task.
That's it.

Create multiple databases dynamically in Microsoft Azure

I am a newbie in Microsoft Azure platform. I want to create multiple databases dynamically (We are developing multi-tenant model. So, Each organization should have their own database. Whenever an organization is registered with our system, we need to create a new database dynamically). Please provide some insights on this.
By using Azure Resource Manager Templates you can reliably deploy the whole infrastructure required by each organisation. So if they need a webserver, database and middleware servers, you can define the whole thing in a template and reliably deploy that for every client.
(from the above link)
You can deploy, manage, and monitor all of the resources for your solution as a group, rather than handling these resources individually.
You can repeatedly deploy your solution throughout the development lifecycle and have confidence your resources are deployed in a consistent state.
You can use declarative templates to define your deployment.
You can define the dependencies between resources so they are deployed in the correct order.
You can apply access control to all services in your resource group because Role-Based Access Control (RBAC) is natively integrated into the management platform.
You can apply tags to resources to logically organize all of the resources in your subscription.
You can clarify billing for your organization by viewing the rolled-up costs for the entire group or for a group of resources sharing the same tag.
The link above has a lot of resources for learning how to use templates as well as the syntax and usage.
There are a large number of templates at the Azure ARM Template Github page and even some pre-existing templates to get you started deploying SQL Server to Azure (there's also mysql and postgress if you prefer)
Plus many others that you can work through to get accustomed to how they work.
you can use the AZURE SQL Database REST API to do so, its as simple as sending a PUT Request to a URL https://management.azure.com/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/microsoft.sql/servers/{server-name}/databases/{database-name}?api-version={api-version}
Check out these links for more details
https://msdn.microsoft.com/en-us/library/azure/mt163571.aspx
https://msdn.microsoft.com/en-us/library/azure/mt163685.aspx

Wonderware archestra distributed application

I'm using System Platform and deploying InTouch application.And I try to make distributed application. There is a server with InTouch Apps and a computer work station, that has to display InTouch Apps. How could I configure distributed application in System Platform?
Assuming existing installation
Create Instance of WinPlatform (Usually under /System in template Toolbox). Assign IP
Create Instance of ViewEngine (again in template Toolbox) Assign to newly created WinPlatfrom)
Create Instance of existing Intouch Application or create new instance of $InTouchViewApp.
Deploy WinPlatform, ViewEngine and Intouch Application.
Test Deployed application on target Platform.
Cheers!

Resources