Reader small image

You're reading from  Robust Cloud Integration with Azure

Product typeBook
Published inMar 2017
Reading LevelIntermediate
PublisherPackt
ISBN-139781786465573
Edition1st Edition
Languages
Tools
Right arrow
Authors (6):
Ashish Bhambhani
Ashish Bhambhani
author image
Ashish Bhambhani

Ashish Bhambhani is an Integration Sr. Premier Field Engineer working for Microsoft. He lives in the Seattle region. He has been working in the integration space for more than a decade. In his current role he helps Microsofts enterprise customers by architecting, designing, building, and maintaining their integration solutions. Recently, he has been able to roll out Azure technologies enterprise-wide for his clients and replace their legacy solutions. He is a content creator and master trainer for some of a Microsofts training that is delivered to clients worldwide. Additionally, he was part of the team that wrote the BizTalk performance whitepaper for msdn.com
Read more about Ashish Bhambhani

Abhishek Kumar
Abhishek Kumar
author image
Abhishek Kumar

Abhishek Kumar works with New Zealand Trade and Enterprise as an integration and data specialist. He is a Microsoft Azure MVP with deep expertise in software development and design. He is a co-author of Robust Cloud Integration and a seasoned contributor to Microsoft blogs, forums, and events. As a technological evangelist, he is specialized in cloud-based technologies such as Azure Functions, Microsoft Graph, Logic Apps, Web API, and Cosmos DB, along with various Software-as-a-Service (SaaS) such as Salesforce, Office 365, and ServiceNow. As a technology advocate, he promotes loosely coupled solution design along with event-based programming.
Read more about Abhishek Kumar

James Corbould
James Corbould
author image
James Corbould

James Corbould has been working in the IT sector since 2003, developing and supporting applications in New Zealand and the United Kingdom. Since 2010, James has been working in the software integration field, designing and building integration solutions using Microsoft technologies such as BizTalk, SQL Server, WCF, .NET, and now Azure, for a wide range of different customers. Recently, he has been working in the health insurance sector and in the building supplies sector.James currently works for Datacom Systems as a consultant and team lead.
Read more about James Corbould

Mahindra Morar
Mahindra Morar
author image
Mahindra Morar

Mahindra Morar has been working in the IT sector from 1997, developing Windows and website enterprise applications. In 2009, he has been focusing primarily on integrating systems as a principle integration consultant. Having come from an electronics engineering background, he is able to use this knowledge to design solutions that integrate between wetware, software and hardware.
Read more about Mahindra Morar

Martin Abbott
Martin Abbott
author image
Martin Abbott

Martin Abbott is a Microsoft Azure MVP living in Perth, Western Australia. He started his career developing subroutines for commercial computational fluid dynamics software, eventually moving on to more mainstream development and systems integration. He has been working with BizTalk Server since the early days of the product, has spent a lot of time with WCF, but more recently has moved in to providing his customers with integration solutions spanning both on-premises and cloud workloads.
Read more about Martin Abbott

View More author details
Right arrow

Chapter 14. Tooling and Monitoring for Logic Apps

Being able to deploy a solution that consists of several resources and for different environments (Dev, UAT, QA, and Prod) in a repetitive and structured manner can be challenging without proper tooling in place.

In general, when a solution has been deployed to a cloud environment, you lose the capability to actively monitor, troubleshoot, and optimize your applications without the proper monitoring in place. Also, being able to view the current workload or being alerted of unpredicted loads can be another issue.

Another challenge is how do we actively monitor the consumption of resources and be alerted if we exceed the existing hosting plan.

In this chapter, you will learn the following:

  • How to use the Azure Resource Manager templates to create resources and best practices

  • Deploying Logic Apps either manually or using continuous deployments and using PowerShell scripts

  • How to set up monitoring and alerting for Logic Apps

Tools to monitor Azure resources


With Azure, there are a set of APIs available to manage the provisioning of resources programmatically. There are two versions available; first, Azure Service Management (ASM) (For more information refer to: https://azure.microsoft.com/en-in/blog/introducing-the-windows-azure-service-management-api/), which was developed for the Classic portal and is used primarily for Azure v1 resource types. The second version is Azure Resource Manager (ARM), which is used to manage both v1 and the current version v2 of Azure resources.

Note, however, that some of the resources provisioned using ARM cannot be viewable from the Classic portal.

Deployment options

There are several options available when deploying and provisioning Azure resources, and they are listed here:

  • Azure portal-based deployment: Use the Classic or the new Azure portal to provision and manage resources individually and not as a group. You will need to manually set the order of provisioning and deletion...

Azure Resource Management templates


A typical Azure solution normally consists of many components (SQL Server, Active Directory, App Svc and so on) and involves provisioning these resources independently using Azure Service Management APIs or PowerShell scripts. By using ARM (Azure Resource Manager) templates you now have the ability to group all these resources together and use a declarative style template written in JSON to manage the deployment of your cloud services and any dependencies. Using the same template, provides the capability to deploy repeatedly into different environments throughout the application lifecycle with the same consistent results.

The benefits of using ARM templates are as follows:

  • Set up resource locks, this provides the option to prevent the deletion or modification of resources by other users

  • View the rolled-up costs of the entire resources for a resource group as they can now be grouped together

  • Use declarative templates that can be managed under a source control...

Creating ARM Template using Visual Studio


Using Visual Studio 2015 or greater, it provides syntax and dependency checking as you type and allows you to use track changes using a source control repository. One of the most helpful features of using VS is the intellisense available when constructing a template. For this walk through, we will create a template to provision a Service Bus topic and a subscription.

Start Visual Studio and open a new Azure Resource Group project then give it a name. After adding the project name, you will be presented with a list of templates. Choose the option for a Blank Template; we will go through the steps of creating our own.

This will create a skeleton template project with two folders—a Scripts folder to hold PowerShell scripts for deployment, which contains a default deployment script, and Templates folder to hold your templates, which contains the resource template and a parameters file.

Go to the Templates folder, right-click and add a new item. Select...

Manual deployments of App Services


Azure provides several options to deploy an Azure App Service, and each process has their own pros and cons. Note that these deployment options do not provision any required Azure resources, it is only for the application code.

FTP

Using FTP is simply a file transfer of the complied code and offers no versioning or file structure management.

MS Visual Studio

On the other hand, Visual Studio offers web deploy, which is an extensible client server tool for synchronizing content. It provides the capability to set security descriptors on the destination files and folders and has out-of-the-box support in order to publish databases including MySQL and Sqlite. The option to deploy only code differences between the source and target files. This will speed up the deployment time if there are a large number of files to transfer. Also, apply transforms on connection strings.

Synch

Another alternative of deploying an App Service manually is synchronizing with a cloud folder...

Continuous deployment


If your application has a frequent release cycles, then continuous deployment should be considered.

The advantage of using a continuous deployment strategy provides version control to roll back to a previous release and the ability to deploy from different branches to different deployment slots in Azure.

Continuous deployments for Azure App Services are available for cloud-based source code management repositories, such as Visual Studio Team Services and GitHub. Once you have set up the desired cloud-based repository, you simply publish your changes to imitate the build and deployment plus any load tests to be carried out.

At time of writing this chapter, the only build application types were only for ASP.Net and ASP.Net Core.

Setting up continuous deployments for these types of applications are made through the Azure portal under your App Service blade as follows:

Clicking the Configure button starts a four-step wizard, the first step allows you to select either Visual...

Monitoring


Logic Apps connect to various Application and Systems, which is distributed over cloud On-premise Applications. Monitoring deployed Logic Apps gives the enterprise view of integration point and health check of associated Applications. Within Azure, there are various ways to monitor developed Logic Apps. We will discuss them in the coming sections.

Metrics

The metrics section shows the chat view of all various actions, which is performed within the Logic App. There are the multitude of metrics that can be monitored using Azure metrics, such as ACTION LATENCY, ACTION SUCCESS LATENCY, RUN LATENCY, RUN SUCCESS LATENCY, TRIGGER FIRE LATENCY directly from the Azure portal.

To configure, click on the Metric within the Monitoring section of the Logic App blade and select on the required metrics, which you require to monitor within the specified interval.

Add metric alert

The metric alert configuration is used as a notification service to send the health information of the Logic Apps. You...

Logic App monitoring


Run history

Logic Apps has inbuilt capability to get the run history of a specified workflow. You can get the run status of a workflow by clicking on the Overview section of the specified logic App.

The Summary section lists the run status of a specified Logic App workflow. To get the details of the workflow action, you can click on the respective action, and it will show the list of actions and triggers which have run during the workflow execution.

Run details specifies the status of each action and trigger within the Logic Apps. It also gives information about the actual time taken by each associated action.

Run details are important to troubleshoot any workflow or performance issues.

Trigger history

Trigger history specifies how many times logic apps is invoked or triggered. Trigger activity will have three values—Succeeded, Failed, and Skipped.

  • Succeeded: The Logic App trigger is succeeded when the trigger has got the required data to run the logic App workflow.

  • Failed...

Logic App message logging with Azure Functions Application Insights


Application Insights is used to monitor application performance, logging, and detecting and diagnosing exception messages. In this section, we will discuss how we can write messages and logs within Application Insights using Azure Functions and Logic Apps.

We will follow the step-by-step process of creating necessary artifacts for the solution.

Create the Instance of Application Insights in Azure:

  • To add a new instance of Application Insights Log into Azure portal with the proper Azure subscription. Click on More and add Application Insights

  • Populate the Application Insights with proper Name, Resource Group, Application Type

  • Click on the newly created Application Insights and navigate to the Properties section to copy the Instrumentation Key

Add Application Insights to Azure Functions:

  • Create New function GetmessageLoggingFunApp within Sunny Electricals Azure Function App

  • Within the Function App, click on Function App Settings...

Summary


In this chapter, we explored some of the deployment options for Logic Apps and related components. We described Azure Resource Management templates, Deploying templates, and best practices. In this chapter, we also explored the Monitoring options available with the Logic Apps for real-time monitoring and auditing.

In the next chapter, we will look into What Next within the integration scope.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Robust Cloud Integration with Azure
Published in: Mar 2017Publisher: PacktISBN-13: 9781786465573
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (6)

author image
Ashish Bhambhani

Ashish Bhambhani is an Integration Sr. Premier Field Engineer working for Microsoft. He lives in the Seattle region. He has been working in the integration space for more than a decade. In his current role he helps Microsofts enterprise customers by architecting, designing, building, and maintaining their integration solutions. Recently, he has been able to roll out Azure technologies enterprise-wide for his clients and replace their legacy solutions. He is a content creator and master trainer for some of a Microsofts training that is delivered to clients worldwide. Additionally, he was part of the team that wrote the BizTalk performance whitepaper for msdn.com
Read more about Ashish Bhambhani

author image
Abhishek Kumar

Abhishek Kumar works with New Zealand Trade and Enterprise as an integration and data specialist. He is a Microsoft Azure MVP with deep expertise in software development and design. He is a co-author of Robust Cloud Integration and a seasoned contributor to Microsoft blogs, forums, and events. As a technological evangelist, he is specialized in cloud-based technologies such as Azure Functions, Microsoft Graph, Logic Apps, Web API, and Cosmos DB, along with various Software-as-a-Service (SaaS) such as Salesforce, Office 365, and ServiceNow. As a technology advocate, he promotes loosely coupled solution design along with event-based programming.
Read more about Abhishek Kumar

author image
James Corbould

James Corbould has been working in the IT sector since 2003, developing and supporting applications in New Zealand and the United Kingdom. Since 2010, James has been working in the software integration field, designing and building integration solutions using Microsoft technologies such as BizTalk, SQL Server, WCF, .NET, and now Azure, for a wide range of different customers. Recently, he has been working in the health insurance sector and in the building supplies sector.James currently works for Datacom Systems as a consultant and team lead.
Read more about James Corbould

author image
Mahindra Morar

Mahindra Morar has been working in the IT sector from 1997, developing Windows and website enterprise applications. In 2009, he has been focusing primarily on integrating systems as a principle integration consultant. Having come from an electronics engineering background, he is able to use this knowledge to design solutions that integrate between wetware, software and hardware.
Read more about Mahindra Morar

author image
Martin Abbott

Martin Abbott is a Microsoft Azure MVP living in Perth, Western Australia. He started his career developing subroutines for commercial computational fluid dynamics software, eventually moving on to more mainstream development and systems integration. He has been working with BizTalk Server since the early days of the product, has spent a lot of time with WCF, but more recently has moved in to providing his customers with integration solutions spanning both on-premises and cloud workloads.
Read more about Martin Abbott