Showing posts with label AzureTutorial. Show all posts
Showing posts with label AzureTutorial. Show all posts

Monday, 19 August 2019

Using Azure Devops Deploy Webapi in Azure App Service

Here, in this article, we will see how to deploy Azure WebApi using Azure DevOps Pipeline, refer earlier articles for creating an Azure App Service for WebApi Application.

Lets create a new azure pipeline with classic editor and then choose the repository of the WebApi solution and then continue to select Azure WebApp for Asp.Net template as shown below, this would automatically add relevant tasks that are required for building the application.

As we don't have any test project,we have removed the unnecessary task, refer below build pipeline configuration.

Refer below screen shot for CD Pipeline configuration, easiest way to create release pipeline using the Azure Web App Deployment template.

Here, we have the authenticate to Azure Portal using the appropriate subscription and then configure the relevant resource that has to be deployed using the task.
Let's trigger the build and release pipeline for the AzureWebApi, deployment was successful and the application was deployed to the Azure App Service.


Wednesday, 2 January 2019

Liquid Transformation As a Azure Function using DotLiquid

In this article, I would brief about achieving Liquid Template Transformation using DotLiquid in a Azure Function.

Using Azure SDK, I have create a simple HTTP Trigger function. This has two projects, LiquidTransformationApp(LiquidTransformation) and AzureFunctions.Helper.

In LiquidTransformation, we extract the request body, map name and map type from the query string and invoke utility helper for the transformation, as shown

Here is utility helper class with does the Parse and Render of the Liquid Template. I have embedded the liquid templates as as resource files and based on the MapName and MapType, we would dynamically execute the transformation and render the transformed result as HTTP Response to client. 

Here, we receive JSON request and JSON request would contain nested JObject/Array, thus to parse the JSON request as Dictionary Object, we use ParseJSONHelper and GenericInterface<T> and Generic<T> are used in Parse and Render stages of Liquid Templates to achieve support for dynamic objects.

Here are the Json To Json and Json To XML Transformation liquid templates.
Lets run and verify the Liquid Template Transformation

Tuesday, 3 April 2018

Connecting On-Premise Service Using On-Premise Data Gateway


In this article, I would brief on connecting on-premise service(API/WCF service) using On-Premise Data Gateway.

Lets install and configure on-premise data gateway.
Configure the data gateway with your account id (must be domain user)
As shown below, configure the the gateway in appropriate location and provide the recovery key.
Post configuring the gateway in the on-premise system, lets connect to the Azure Portal and map the on-premise gateway with the Azure Gateway, as shown below. Make sure to choose the same region/location of on-premise gateway.
Now lets, create custom logic app connector.
Lets edit the custom connector and configure the on-premise service(for our eg we choose WebAPI) using swagger for API or WSDL for SOAP services.
Here we would connect to on-premise API, lets fill in the general information and enable the connectivity using on-premise data gateway as shown below
On the security tab, lets choose No Authentication to keep it simple and on the definition tab, configure each operations available on the API, which are available as part of Actions [Action Methods], finally update the connector. Now using this connector, we would be able to connect to on-premise services.
Lets create and connect to on-premise service using custom connector. Here, we will develop simple request response logic which would pull all the products information thru the on-premise API Service.

Lets add an action and choose custom connector and select relevant operation as shown below
Now, lets add a response and configure the response with the output body of custom connector.
Test and verify the logic app.

Sunday, 18 February 2018

Logic Apps | Azure Integration | Server-less Compute


In this article, I would explain how to develop a simple Logic App.In Azure, Click on New-->Enterprise Integration-->Logic App, as shown below
Provide the Logic App Name and choose the subscription and resource group.

Once its created;we can develop the flow either from a blank template or using common template. Here, we would would develop a simple app that poll twitter for a specific keyword and process the tweet to an Azure SQL Server DB.

Lets sign-in and configure/authorise logic app to use that twitter account to use for polling; now configure the polling details and text keyword to poll for.
Let now add a new step to process the tweet to SQL DB, bring in a SQL Server -Insert row and provide the Azure SQL Server connection details as shown. Here we capture the user name and tweet in the Azure SQL DB table.
Lets run and verify the behaviour, for every 3 mins logic app polls and if any tweets are available those are processed to Azure SQL DB.

Thursday, 12 October 2017

BizTalk Server 2016 | Application Insight Logging | Azure-BizTalk


In this article, I will explain the steps involved in sending BizTalk tracking data/trace details to Azure Application Insights.

Lets create an instance of Application Insights in Azure portal as shown below, 
  • Log on to Azure portal and add a new application insights instance and Provide an appropriate name. 
  • Choose application type as General. 


Make sure you Download the BizTalk Server 2016 Feature Pack 1; this update enables BizTalk to integrate with Azure Application Insight. Once the feature pack is installed, we can see a section called “Analytics” in BizTalk Group hub settings page.
Once the analytics is configured at the group level, now we can enabling tracking at individual artifacts level, as shown below.
I have enabled the Analytics for send port, receive and orchestration. This ensures that all the data will be pushed to Application insights. From Application Insight azure portal; You can explore these metrics and create graphs for data visualization; once the data is pumped to Application Insights.


Below are few pointers on AppInsight logging mechanism for BizTalk. 
  • Captures analytics on BizTalk Message Box only.
  • Context Properties available on messages are captured in App Insight.
  • For Physical Ports 2 entries are made (Receive and Send | Publish Subscriber)
  • For each logical Port, an entry is made (Orchestration)
  • There should be a dedicated Send Port for routing exception message to capture exceptiondetails in App Insight.
  • Analytics can be captured at Ports and Orchestrations. It’s not mandate to enable tracking at ports and orchestrations; enabling analytics is sufficient.
  • Orchestration entries are captured with respect to logical ports. If call or start orchestration doesn’t have any logical ports; analytics entries for these orchestration aren’t captured.
Here is my simple helper class using this we could capture the trace details from orchestration.
This is my simple orchestration, which would send the trace logs to application insight using the helper class.
As you can see the logs are available under traces.