How we save time when moving Azure Data Factory Integration Runtimes

Eugene Niemand
Eugene Niemand’s Blog
3 min readFeb 7, 2020

If you are using Azure Data Factory (ADF) and need to access data outside of Azure you need to install an Integration Runtime (IR) on a Virtual Machine (VM) that does have access to the data. At ASOS we have some sources that are still on premises or within VNETs in which case you need an IR. We are always evolving our implementations and recently had to split one of our solutions into two, which meant we had to reconfigure the IRs in multiple environments to connect to different ADFs in other Azure subscriptions.

The current recommendation of re-configuring an instance is that you cannot enter another key and you will need to reinstall it. However, there is a much easier way to do this using a single line of PowerShell.

Azure Data Factory

In your ADF go to the Connections section then select the Integration Runtimes (IR) tab. Here you can add and edit IRs as well as get more info about them. Click the edit button (Fig 1) for your chosen IR.

Figure 1 — Integration Runtimes overview

You will be presented with the following screen (Fig 2). Copy Key 1 or Key 2 to your clipboard or somewhere else as we will use it soon.

Figure 2 — Integration Runtime Settings

If you select the Nodes tab (Fig 3) you will notice that there aren’t any running nodes for the selected IR

Figure 3— Nodes Overview

On the VM hosting your IR

Remote Desktop into the VM hosting your IR and open PowerShell. Execute the below command. Remember to add the key you copied earlier to the gatewayKey parameter.

& “C:\Program Files\Microsoft Integration Runtime\3.0\PowerShellScript\RegisterIntegrationRuntime.ps1” -gatewayKey <YourKeyCopiedInPrevStep>

It will take about a minute to execute and it may look like its hanging as there is no feedback or progress updates until its completed. After successful execution you should see a message like the one below (Fig 4)

Figure 4 — PowerShell Output

You can also open the Microsoft Integration Runtime (Fig 5) from the Start Menu and confirm that the Data Factory displayed is indeed the one that you want to connect to.

Figure 5— Microsoft Integration Runtime

Back in Azure Data Factory

When you look at Nodes now you should see (Fig 6) the new node added and in a running status. You may need to refresh the page to see this.

Figure 6— Nodes Overview

About the author

Eugene is a Senior Data Engineer at ASOS with a passion for Test Driven Development, Agile Methodologies, Continuous Integration and Delivery using Microsoft Azure. In my spare time I tinker with Home Automation.

--

--

Eugene Niemand
Eugene Niemand’s Blog

Lead Data QA Engineer at ASOS.com - I have a passion for Test Driven Development, Agile Methodologies, Continuous Integration and Delivery using Microsoft Azure