Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Robust Cloud Integration with Azure

You're reading from  Robust Cloud Integration with Azure

Product type Book
Published in Mar 2017
Publisher Packt
ISBN-13 9781786465573
Pages 696 pages
Edition 1st Edition
Languages
Authors (6):
Gyanendra Kumar Gautam Gyanendra Kumar Gautam
Ashish Bhambhani Ashish Bhambhani
Profile icon Ashish Bhambhani
Abhishek Kumar Abhishek Kumar
Profile icon Abhishek Kumar
James Corbould James Corbould
Profile icon James Corbould
Mahindra Morar Mahindra Morar
Profile icon Mahindra Morar
Martin Abbott Martin Abbott
Profile icon Martin Abbott
View More author details

Table of Contents (23) Chapters

Robust Cloud Integration with Azure
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
1. An Introduction to Systems Integration in the Cloud 2. What Is an Azure App Service? 3. Getting Started with API Apps 4. What is Azure API Management? 5. Trigger Your First Logic App in Azure 6. Working with Connectors in Logic Apps 7. Azure Functions in Logic Apps 8. A Deep Dive into Logic Apps 9. Powerful Integration with SaaS Using Logic Apps 10. Advanced Integration with Powerful, Scalable Service Bus in the Cloud 11. Connecting to Event Hubs and an Introduction to IoT Hubs 12. EAI/B2B Integration Using Logic Apps 13. Hybrid Integration Using BizTalk Server 2016 and Logic Apps 14. Tooling and Monitoring for Logic Apps 15. Whats Next for Azure Integration?

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 2017 Publisher: Packt ISBN-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.
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 ₹800/month. Cancel anytime}