Enterprise Integration with Azure Logic Apps

By Matthew Bennett
    What do you get with a Packt Subscription?

  • Instant access to this title and 7,500+ eBooks & Videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. Free Chapter
    Chapter 1: Getting Started with Azure Logic Apps
About this book

Logic Apps are a visual flowchart-like representation of common programming actions, and are a flexible way to create logic without writing a single line of code. Enterprise Integration with Azure Logic Apps is a comprehensive introduction for anyone new to Logic Apps which will boost your learning skills and allow you to create rich, complex, structured, and reusable logic with instant results.

You'll begin by discovering how to navigate the Azure portal and understand how your objects can be zoned to a specific environment by using resource groups. Complete with hands-on tutorials, projects, and self-assessment questions, this easy-to-follow guide will teach you the benefits and foundations of Logic App logic design. As you advance, you'll find out how to manage your Azure environment in relation to Logic Apps and how to create elegant and reliable Logic Apps. With useful and practical explanations of how to get the most out of Logic App actions and triggers, you'll be able to ensure that your Logic Apps work efficiently and provide seamless integration for real-world scenarios without having to write code.

By the end of this Logic Apps book, you'll be able to create complex and powerful Logic Apps within minutes, integrating large amounts of data on demand, enhancing your systems, and linking applications to improve user experience.

Publication date:
December 2021
Publisher
Packt
Pages
294
ISBN
9781801074728

 

Chapter 1: Getting Started with Azure Logic Apps

This chapter introduces us to a new way of working – the no-code revolution. Microsoft Azure makes this possible by taking the concept of a flowchart and applying it to the access, formatting, calculating, and use of data within systems. As a result, for the end user, Flow, now called Power Automate, was born, allowing interaction, alerting, and collaboration. For developers, logic apps was created, allowing large amounts of records in bulk form to be updated immediately upon a change, or saved in the frontend system. Immediate alterations and process logic are now possible without the need to write custom apps. These may be complex to write but can address problems within a matter of minutes, not days.

In this chapter, we're going to cover the following main topics:

  • Introducing the new world
  • We know the why, now for the how
  • At your service
  • It all leads to logic
  • Introducing Azure
  • Getting started with Azure Logic Apps
  • Obtaining an MSDN account
  • The Azure portal
 

Introducing the new world

IT is changing. IT is forever evolving, and in line with that, the business market adapts, evolves in turn, and enhances itself. IT used to be complex, time-consuming, and expensive. Programming had a reputation for seeming alien and techy, distancing regular people from the task – making the task ever harder to accomplish. Welcome to your first step into a new world.

As a former Microsoft Trainer, I have been watching the evolution not only of Microsoft's software as it adapts to needs but also how businesses adapt to the changing landscape. In 2016, Microsoft published its new strategy: Digital transformation: Seven steps to success. This highlights several changes afoot in the current climate, or as their strapline puts it, How businesses can stay relevant and competitive in today's new digital era. More information can be found here: https://aka.my/3AE.

The document explains how technology has become pervasive in modern society. How it has gone beyond the computer lab, the office, and the factory floor and into homes, fridges, and wearable devices. The Internet of Things (IoT) requires an ever-growing amount of data that is ever more complex. Moreover, we are not only interested in managing this data but are also seeking to make sense of it. Through advanced analytics, artificial intelligence, and machine learning, we can track patterns, make predictions, and determine how we can make the best decisions, or even let these technologies make them for us.

Microsoft focused on seven key areas of change:

  • Leadership matters: Technology, and the ability to be clever enough to perform a task, does not make you a leader. By removing the technical barrier, leadership remains solely focused on vision and strategy.
  • Cultural change is driven by effective change management: Becoming a digital enterprise will change how the organization makes decisions.
  • Connect your customers, products, assets, and people: Through this connection, customers will be aware of what is being planned and can shape strategy through dialog and demand. People will be able to interact with your system seamlessly. Here, "people" refers to company staff and stakeholders, whereas customers are buyers who are not interested in the mechanics of the system you have built to sell to them.
  • Adopt a data culture: As the amount of information required grows, the Microsoft cloud platform offers a hardware-invisible, pay-as-you-go solution to your data needs at all levels. The focus is less on how much upfront cost you will need to get started, or what you need to build your IT hardware infrastructure, and instead on a turnkey model that is provided for the business. Everything you need to get started is at your fingertips from day 1.
  • Experiment and fail fast: By adopting short planning and implementation cycles – or even better, an Agile approach – your team can develop, test, go back a step, try again, and refine until they reach a much faster and less expensive solution. The concept of the fail fast and learn fast era means that accelerated development produces accelerated learning and maturity of the product in a much, much smaller timescale.

    Note:

    On the topic of point 5, I have experienced first-hand how, when embraced correctly, the Experiment and fail fast methodology can be a force for significant change within the company in many ways. I work for a large organization in the UK with a small development team that traditionally worked on highly technical programming projects. They were seen by the wider business as experts, and sometimes only communicated when there was an absolute need for their input. Most of the business was operational in nature, so the office was awash with administrative staff, managers, and analysts. Project work was an essential part of the change, but that change had to be embraced by the wider business. To assist with this, and as a conduit, business analysts and change officers would inspect developments and then sell these to the wider business for adoption. Project rollout was phased, per department, and over time.

    While all of this was happening, the developers were adopting an Agile approach. They quickly learned how to use Azure as the new key area for IT project development and would experiment with the use of logic apps and Power Automate (Flow) to create logic tasks, integrating systems and building the requirements that would then be tested and demonstrated by the business change team. The need to engage developers and change agents, plus the need to think about the solution in a more technical way, was a culture shift for the business as it planned to incorporate Agile working alongside PRINCE2 or Six-Sigma project management.

  • Think ecosystem and become an enterprise software company: The structure of the company will need to alter to embrace the changes demanded of it by wider engagements with its supply chain, providers, partners, IT systems, creditors, communication channels, and so on. Change is needed as the company goes from thinking about making a product or offering a service for one specific partner, business, or group of people, to instead adopting a holistic approach. The business is now encouraged to think end to end in relation to its supply chain, manufacturing, and distribution.
  • Who is my Uber?: Through 2015-2019, I followed the legal battles between London taxi companies and their unions and Uber, the emerging company whose strategy undercut the incumbent and dominant provider. I found this to be an interesting test case – Uber had no fleet of its own, no assets, no big offices. Everything was virtualized and socially focused, and, as such, cost margins were lower and the customer, in turn, benefitted from this.
  • Following on from the example of a virtual world, companies such as Amazon, eBay, Netflix, and Uber share one thing in common: they don't manufacture a product but instead offer a marketplace. If I wanted to sell an item a few decades ago, I might have held a stall at a flea market or traded it in at a pawn shop. Now, services are offered for consumers to consume without the need for handling goods, negotiation, waiting for production, and so on. This was extremely apparent last year when the UK entered the COVID-19 lockdown; everyone bought takeaways, shopped for groceries, and bought items online, and got them delivered the next day. We went from an owning society to a renting, disposable society, and this social and cultural shift is very important if you are a person who can operate holistically and offer an end-to-end service.

Hopefully, the paragraphs so far will have provided interesting content for you, but you are reading this book to understand not why we are where we are today, but how you can benefit from the situation, and how you can use modern change development tools and build solutions quickly and efficiently.

Forgive me, dear reader, but I don't know your skill set, your career path, or whether you have also thought about some of these seismic changes to our industry. The change is potentially so great that the expression The King is dead, long live the King! is rather apt. We have no choice but to change because change is inevitable.

 

We know the why, now for the how

Microsoft Azure was launched several years ago. As a trainer, I saw a shift in focus from infrastructure training (for example, Microsoft Certified Systems Administrator (MCSA) 2003 Server) to Microsoft Certified Solutions Associate. The system became increasingly irrelevant. Concepts such as DNS, DHCP, and subnetting/supernetting, which were highly technical, became less important. They were still in use but became merely second-nature configuration settings. For the IT development community, the focus shifted to creating no-code application solutions, of which system hardware and infrastructure were key parts.

The next change was the hybrid approach. This involved the coexistence of cloud (off-premises) and on-premises IT systems, with some tasks done online while others were performed with some cloud-based platforms while the internal on-premises domain remained protected. Here, the focus was on concepts such as the demilitarized zone, web servers, and honeypots/honeynets.

The next change was based on trust in the technology, and legal adoption, as trust was given to Microsoft Azure sites located in different countries across the globe. Concepts such as federation, Single Sign-On (SSO), and identity management became the focus as IT teams merged on-premises systems with the cloud. The cloud became a gated area where a company could own a tenant (a dedicated instance of Active Directory (AD)) that was secure.

In the period 2015-2019, two products from Microsoft were significantly changed and became cloud based. These were Microsoft's most important and highly used enterprise applications: Office and Dynamics. Office became Office 365, Dynamics became Dynamics 365, and both used the Office 365 tenant cloud, which co-exists as part of the Azure cloud.

 

At your service

From these key concepts, cloud as-a-service offerings were launched:

  • Software as a Service (SaaS): This is a way of delivering your custom application as a serviceable and consumable product through the internet. Gone are the days of buying a CD-ROM containing a program that then needed to be installed locally. You can now simply navigate to a website where the application is hosted to run it. Websites (commonly termed by Microsoft as web applications) are an example of this.

    To assist the developer further, Visual Studio, the main editor application suite available from Microsoft, was also made available as a cloud solution (now called Visual Studio Code).

  • Platform as a Service (PaaS): Some code and applications cannot run on a web server. They may still require a machine with a specific operating system to be able to function. For example, I use a variety of code packages from GitHub that are based on the Python programming language. This is a small but powerful language, but it is not web-based. Here, I would create a Virtual Machine (VM) and, on this, build my Python app. I can take a snapshot of the VM, clone, and then rebuild the container by, for example, using Docker. When the installation process is complex and multi-layered, using this simplifies the process. Docker is an excellent product that you will want to install on VMs. You will also want to use a layered software approach to share the same operating system but customize copies of the same build to be used in different ways (for example, two Linux builds with different middleware and different architecture on a virtual network).

    To get started with Docker and build your first pre-installed VM, visit the following link: https://www.docker.com/get-started.

  • Infrastructure as a Service (IaaS): Now, the entire IT hardware infrastructure can be created in the Azure cloud. Servers, firewalls, and data storage can all be spun up as required and on demand. You pay per use and by the amount of processing power or storage capacity you need. If managed correctly, costs can be considerably reduced as an initial outlay (the purchase of expensive hardware) is no longer required.
  • Anything as a Service (XaaS): As cloud offerings expand, they also incorporate interlinking and communication with various established third-party enterprise products. A mixture of services could be offered by a provider, and by doing so, allow the user the ability to create a complex solution, linking different parts of the business together, while in the process moving on-premises data and software to the cloud.

    Azure, Google Cloud Platform, and Amazon Web Services are some of the providers offering XaaS solutions.

 

It all leads to logic

"Logic, my dear Zoe, merely enables one to be wrong with authority."

-(Doctor Who, The Wheel in Space, 1968)

"Everything yields to logic. Our basic assumption."

-(Doctor Who, The Tomb of the Cybermen, 1967)

And so, we come to the most important tool to connect all these systems together –logic apps.

The Microsoft Azure Logic App is an example of no-code development. The idea is that a non-technical person who has not learned a programming language can still produce logic in much the same way that a business analyst may structure a sequence of events in a Visio flowchart.

Note

Sadly, I once lost a government teaching contract due to the change toward no-code development. I delivered a Visio training course and mentioned that the aim for Microsoft was to allow non-programmers to create program code. The initial idea was that a Visio diagram of an application would contain logic, and that could be turned into a skeleton of modules and functions within Visual Studio.

Not so far out. The eventual product was Logic Apps.

 

Introducing Azure

Azure is the brand name for Microsoft's cloud subscription offering. It covers every possible aspect of IT. With it, you can create your own virtual networks and databases, run CRM systems, and code without the need to install coding software on your PC. You can also run your own project management teams and their project boards and run Microsoft Office from anywhere.

The possibilities are virtually endless.

The following screenshot is a section from the welcome screen of Microsoft Azure, showing the various areas that make up your Azure environment:

Figure 1.1 – Azure home page header containing common areas

Figure 1.1 – Azure home page header containing common areas

Azure is the platform used to maintain your account and manage data and virtual objects (such as VMs), as well as logic currently housed within your account. You also have access to an editing tool that allows you to create logic to refine data, format data, and migrate or integrate data between systems. Azure operates under a subscription model, and you pay for what you use.

This logic editing tool is Logic Apps, a tool we will be focusing on in this book.

Key Azure terms

The following is a list of key Azure terms that you should know:

  • Tenant: This is a private cloud environment shared by users. This is typically linked to one or more domain names. When you set up your Microsoft (Office 365) subscription, you create a tenant.
  • Subscription: You can have one or several subscriptions linked to your Azure tenant, or one subscription can be used to pay for multiple tenants. The subscription is the financial mechanism (account) used to pay for the Azure resources consumed within the tenant. This may be on an enterprise model basis, costed plan, or pay-as-you-go model, depending on the extent you want to engage with Azure.
  • Resource group: A logical grouping of objects and resources (for example, by department or by environment). You can have copies of the same resource in several different resource groups.
  • Resource objects: These must be stored within a resource group and could be a variety of different items such as functions, logic apps, web apps, Virtual Machines, Binary Large Object (BLOB) storage, or a variety of other resources.
 

Getting started with Azure

As a first-time user, the following will be needed before you can get started:

  1. An email account (this does not have to be a Microsoft account). I will presume you have one already.
  2. A Microsoft 365 Business Basic account. This is what was originally referred to as an Office 365 account. It gives you access to the Microsoft Office suite, but also adds your user account into an authentication service called Azure AD, which is used to define what you can access and your level of access. Visual Studio Code, Dynamic 365, and DevOps also form part of the suite of applications available to you, as well as Visio and Project. We will look at how to set this up in the next section.
  3. An Azure subscription. We will also set this up in the next section.

Setting up a Microsoft 365 Business Basic account

In this section, you will learn how to set up a Microsoft 365 Business Basic account.

Please navigate to the following link to get the most up-to-date instructions, as the sign-up process is subject to regular changes:

https://docs.microsoft.com/en-us/microsoft-365/admin/setup/setup-business-basic?view=o365-worldwide

The sign-up instructions are listed underneath an explanatory video. Please use these to set up the account.

Figure 1.2 – A section of the welcome page of your Microsoft account

Figure 1.2 – A section of the welcome page of your Microsoft account

Your Microsoft Azure account is a collection of all the cloud objects you will create. Some of these will be used by your account for Power Automate (https://flow.microsoft.com/). The following website will also be used by power users, and users wishing to get started straight away, to create apps and objects that support users with your cloud infrastructure: https://make.powerapps.com/. The actual objects, however, are stored in the Azure account.

Getting started with Azure

Now that you have a Microsoft account and access to end user resources, we need to create a cloud environment to create your projects and logic. For this, navigate to https://portal.azure.com/ and click the Start for free button to begin the enrollment process.

Figure 1.3 – The Azure sign-up portal

Figure 1.3 – The Azure sign-up portal

From the Azure welcome page, please take a moment to look at what is possible with the variety of Azure demo videos available here: https://azure.microsoft.com/en-gb/get-started/video/.

Setting up Azure

You will first be required to sign in, using the Microsoft account you created in the previous section. If you have a third-party email account linked to a GitHub account, you could use that, so long as it is not already tied to a Microsoft account.

Figure 1.4 – Microsoft sign-in screen (email address removed)

Figure 1.4 – Microsoft sign-in screen (email address removed)

Next, you will be asked to create your free Azure account. You will notice that credit is applied for your first 30 days.

Important note

If the services you create do not incur any charges, the account will be deleted after 6 months of inactivity.

The next step will require you to verify your identity using your phone.

This is then followed by financial authorization. Your card details are checked; however, you will not be charged unless you upgrade to a paid account.

Finally, read all the terms and conditions, and if you are happy, click on Agree.

The account will be generated, and you will then be presented with a home screen.

Before we can get started, you will need to attach a subscription to the account. Initially, you might wish to start with a pay-as-you-go subscription, although the credit provided on sign-up will also apply first. For myself, I already have a Microsoft MSDN Developer account, so have attached this as my Azure subscription, as shown in the following figure:

Figure 1.5 – The Subscriptions page showing my MSDN account

Figure 1.5 – The Subscriptions page showing my MSDN account

The Subscriptions page explains spending as it relates to the Azure subscription, which focuses on background objects and tasks. Any Flows or Power Automate apps (logic apps for frontend IT users) may not feature in this calculation.

 

Obtaining an MSDN account

This process is regularly changed by Microsoft, so a URL has not been provided. The standard MSDN URL now redirects to Microsoft Learn.

Please note that the following pricing* is indicative and subject to change:

  • A Visual Studio Community subscription is free for non-enterprise users and for non-commercial projects. This is for people entering the industry, or students starting out in application development.
  • The MSDN Visual Studio Professional subscription is $539/year for a cloud subscription or $1,199 for the first year of a perpetual license, with renewals at $799 per year. However, with this, you get licenses for Windows and Windows Server to be used for testing, alongside $50/month of Azure credit.
  • An MSDN Visual Studio Enterprise subscription costs $5,999 for the first year and $2,569 for annual renewals. Volume Licensing customers get a discount at $2,999/year. For this, you get $150/month in Azure credits, a Microsoft Office Professional Plus license with full usage rights, an Office 365 Developer license, as well as Exchange, SharePoint, and Power BI Pro licenses.
  • The MSDN Visual Studio Test Professional subscription is not intended for developers, instead, it is marketed to testers. This is only available as a perpetual license product at $2,169 for the first year, then $899 for subsequent years. This account features $50 of Azure credit each month.
  • Finally, the MSDN Platforms subscription is available for Volume Licensing customers only. This is for IT operational staff and Java developers who will not require access to the full Visual Studio product. The subscription is $2,000 but may vary based on the reseller. It does, however, include $100 of Azure credits to spend each month.

*Sourced from TechRepublic.com, available at https://www.techrepublic.com/article/a-quick-guide-to-choosing-the-right-msdn-subscription/.

 

The Azure portal

The most obvious place to start would be the All resources page. This shows all hidden and visible resources on the account.

The Azure portal is your one-stop shop for everything to do with your cloud subscription. Here, you can do the following:

  • Create new resources (there are several hundred different kinds available in the Microsoft catalog at present).
  • Create resource groups for grouping objects.
  • Manage your virtual infrastructure.
  • Monitor the health of your resources.
  • Check pricing levels.
  • Update object performance by scaling up. This means that your resource will perform quicker, but for an increased cost, as more resources are provided for it to use.
  • Add object reliability and high availability by scaling out. This means that your resource is always available.

Refer to the following figure:

Figure 1.6 – All resources showing connections and other visible resources

Figure 1.6 – All resources showing connections and other visible resources

You will find yourself becoming a regular user of the Azure portal if you intend to build logic apps!

Resource groups

A resource group is a collection of objects. It typically contains objects used by just one department, one location, or a stage of development.

Typical resource group names could therefore be the following:

  • Geographical: Such as North, South, East
  • Departmental: Such as Research, Production, Marketing
  • Development Stages: Such as Sandbox, Development, Testing, Production

This book is going to focus on the staged model – a model that is commonly used by development teams. It also aligns with the Agile model.

Here, we can see a list of resource groups I have created. Some are specific to a project, and others relate to an environment stage for an enterprise-level project:

Figure 1.7 – Resource groups in my subscription

Figure 1.7 – Resource groups in my subscription

Looking at one of these groups, we can see an object (in this case, a storage account) that is housed within this resource group:

Figure 1.8 – My storage object is my first resource in the resource group

Figure 1.8 – My storage object is my first resource in the resource group

Tip

Resource groups are a logical means to separate objects based on their stage, their purpose, or any other grouping. However, it is common to create a General or Core resource group where common objects can be reused across other resource groups. For example, an Azure function could be reused by development, testing, and production resource groups.

The object home page

Each object has an overview page that illustrates the status of the object. From here, you can determine whether it is running, can start/stop the object, and can scale it up (add more processing power/storage) or scale it out (copy it to other servers to provide fault tolerance and reliability). The following figure depicts my storage overview page:

Figure 1.9 – My storage overview page

Figure 1.9 – My storage overview page

You will notice that each Azure page is highly visual and richly detailed, containing tiles for further information. Information is categorized in sections and the object is highly configurable.

Blades and slices

You will notice that each Azure page starts on the left with a panel allowing you to select the section you are interested in. This is referred to as the blade.

Figure 1.10 – sqltestmjb showing blades, slices, and tiles

Figure 1.10 – sqltestmjb showing blades, slices, and tiles

In the preceding screenshot, you can see the storage blade showing a series of slices and tiles relating to access control for this storage object.

A blade is a starting point to determine how to customize an object.

Figure 1.11 – Blade

Figure 1.11 – Blade

A slice is a section detailing the options you have to customize your blade action.

Figure 1.12 – Slice

Figure 1.12 – Slice

A tile is a specific element you wish to customize.

Figure 1.13 – Tiles

Figure 1.13 – Tiles

Each object follows this principle, and, as we turn our focus on later chapters to logic apps, you will also learn about the configurable sections of objects.

 

Summary

In this chapter, I shared with you some of my experiences working within IT and in noticing the fundamental shift from traditional infrastructure, on-premises programming done by experts, to a service model more widely accessible across a cloud network. The focus is less on making exclusive code and more on offering holistic end-to-end services. The marketplace is less about the individual, the supply chain, or specific customers, and is now open to anyone and everyone, at a global level.

We then looked at how to get started by creating a Microsoft 365 account, an MSDN subscription (where this is needed), and an Azure subscription. We looked at the current costs, advantages, and disadvantages, at the time of writing this book. We then took a deep dive into the Azure user interface to understand resources, resource groups, subscriptions, and the notion of a tenant.

Finally, I showed one object (deliberately not a logic app, as these will be covered in later chapters in some detail) and encouraged you to understand the common structure of the Azure resource object panes. I mentioned that an object is split into separate pages and that these pages are accessible via the leftmost blade. Each blade expands from left to right, and each section contains the stages to develop and customize the object further.

Now that you have an Azure account and are familiarizing yourself with the environment, in the next chapter, we will be looking at the resource group in further detail and considering how you can plan an enterprise environment within your tenant.

About the Author
  • Matthew Bennett

    Matthew Bennett is an experienced IT author, Microsoft Corporate Trainer, and former IT teacher, having been involved in the IT sector for 22 years. He currently works at Platform Housing Group, a national housing association,and creates cloud applications for a living. He has worked on integration between legacy systems and CRM products for the past 2 years but has specialized in Dynamics since 2008. Matthew studied for postgraduate diplomas in management studies and sound design, originally planning to work in film, but fell into a successful career in IT and has not looked back since. “Every day is a learning day” is his motto, and when he joined Pearson, who share the same motto, he was convinced that he was in the right profession.

    Browse publications by this author
Enterprise Integration with Azure Logic Apps
Unlock this book and the full library FREE for 7 days
Start now