Thoughts on Integrating Systems & IoT

Azure Logic Apps CI/CD – Part 1 – Introduction

In a series of posts I will demonstrate how to setup a continuous integration and continuous deployment (CI/CD) pipeline for Azure Logic Apps.  I also intend to touch on general Logic Apps development topics along the way and the broader subject of DevOps practices.

This first blog post introduces the scenario and the Logic App that will eventually be a well oiled component of slick automated delivery pipeline using Visual Studio Team Services (VSTS).

Introduction to the Scenario – Low or High Priority Purchase Order Processing

In order to demonstrate CI/CD with Logic Apps we will use the following simple Logic App:

1_Logic_App_Screenshot

b2b.processpurchaseorder.servicebus Logic App

The Logic App does the following:

  1. Receives a batch of Purchase Orders (PO) via an HTTP request.
  2. The variable “CBRFilter” is initialized that will be assigned the calculated priority of the PO.
    1. This variable will be initialized further on, for the purposes of Content Based Routing (CBR) on Azure Service Bus.
  3. The Condition action will evaluate the total PO amount and assign low or high priority accordingly.
    1. If the PO amount is < $200K, then the CBR filter variable will be assigned the value “PriorityLow”.
    2. If the the PO amount is >= $200K, then the CBR filter variable will be assigned the value “PriorityHigh”.
  4. Finally, we publish the PO to a Service Bus topic with the low/high priority filter assigned such that the message will appear on the low/high priority topic subscription.

Testing the Logic App

Ok, let’s take the Logic App for a spin and try it out.

Using Postman, I call the Logic App endpoint, passing in a PO batch as follows:

1_1_Postman_Screenshot

Calling Logic App via Postman

Logging in to the Azure Portal, I can check that the Logic App has worked as expected and has assigned a “high priority” CBR filter, since the total PO batch amount is indeed > $200K:

1_2_Logic_App_Run

Logic App Run with High Priority Assigned

And using Service Bus Explorer, I can see that the PO has been picked up by the high priority topic subscription:

1_3_SB_Explorer

Service Bus Explorer

Conclusion

So this concludes Part 1 of this series where I will demonstrate setting up a CI/CD pipeline for the Logic App that has been introduced in this post.

In the next post I will take you through downloading and parameterising an ARM template using Visual Studio that will be used for deploying the Logic App to the various Azure Resource Groups.

Stay tuned!

 

Advertisements

4 responses

  1. Pingback: Microsoft Integration Weekly Update: August 06, 2018 | Hooking Stuffs Together

  2. steveculshaw

    Excellent post … looking forward to the rest of the series

    Any chance you can post the “source code”, as I’d like to follow along and try it out

    August 6, 2018 at 9:52 pm

    • Thank you. Yes I will post the project on GitHub, stay tuned for that.

      August 7, 2018 at 5:11 pm

  3. Yuko Mattingley

    It’s clear, concise and great post. I’m looking forward to the next one.

    August 7, 2018 at 6:09 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s