Skip to content

Commit 614aa6e

Browse files
authored
Merge pull request #112133 from Samantha-Yu/adfupdate0421
New article creation for automating SHIR installation
2 parents bc0efad + 0c21737 commit 614aa6e

File tree

5 files changed

+82
-4
lines changed

5 files changed

+82
-4
lines changed

articles/data-factory/TOC.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,8 @@
577577
href: create-azure-ssis-integration-runtime.md
578578
- name: Shared self-hosted integration runtime
579579
href: create-shared-self-hosted-integration-runtime-powershell.md
580+
- name: Automation scripts of self-hosted integration runtime
581+
href: self-hosted-integration-runtime-automation-scripts.md
580582
- name: Run SSIS packages in Azure
581583
items:
582584
- name: Run SSIS packages in Azure from SSDT
@@ -597,10 +599,6 @@
597599
href: self-hosted-integration-runtime-proxy-ssis.md
598600
- name: Enable Azure AD authentication for Azure-SSIS IR
599601
href: enable-aad-authentication-azure-ssis-ir.md
600-
- name: Connect to data with Windows Authentication
601-
href: ssis-azure-connect-with-windows-auth.md
602-
- name: Save files and connect to file shares
603-
href: ssis-azure-files-file-shares.md
604602
- name: Provision Enterprise Edition for Azure-SSIS IR
605603
href: how-to-configure-azure-ssis-ir-enterprise-edition.md
606604
- name: Customize setup for Azure-SSIS IR
20.8 KB
Loading
52.9 KB
Loading
21.3 KB
Loading
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: Automating self-hosted integration runtime installation using local PowerShell scripts
3+
description: To automate installation of Self-hosted Integration Runtime on local machines.
4+
services: data-factory
5+
documentationcenter: ''
6+
ms.service: data-factory
7+
ms.workload: data-services
8+
ms.topic: conceptual
9+
author: nabhishek
10+
ms.author: abnarain
11+
manager: anandsub
12+
ms.custom: seo-lt-2019
13+
ms.date: 05/09/2020
14+
---
15+
16+
# Automating self-hosted integration runtime installation using local PowerShell scripts
17+
To automate installation of Self-hosted Integration Runtime on local machines (other than Azure VMs where we can leverage the Resource Manager template instead), you can use local PowerShell scripts. This article introduces two scripts you can use.
18+
19+
## Prerequisites
20+
21+
* Launch PowerShell on your local machine. To run the scripts, you need to choose **Run as Administrator**.
22+
* [Download](https://www.microsoft.com/download/details.aspx?id=39717) the self-hosted integration runtime software. Copy the path where the downloaded file is.
23+
* You also need an **authentication key** to register the self-hosted integration runtime.
24+
* For automating manual updates, you need to have a pre-configured self-hosted integration runtime.
25+
26+
## Scripts introduction
27+
28+
> [!NOTE]
29+
> These scripts are created using the [documented command line utility](https://docs.microsoft.com/azure/data-factory/create-self-hosted-integration-runtime#set-up-an-existing-self-hosted-ir-via-local-powershell) in the self-hosted integration runtime. If needed one can customize these scripts accordingly to cater to their automation needs.
30+
> The scripts need to be applied per node, so make sure to run it across all nodes in case of high availability setup (2 or more nodes).
31+
32+
* For automating setup:
33+
Install and register a new self-hosted integration runtime node using **[InstallGatewayOnLocalMachine.ps1](https://github.com/nabhishek/SelfHosted-IntegrationRuntime_AutomationScripts/blob/master/InstallGatewayOnLocalMachine.ps1)** - The script can be used to install self-hosted integration runtime node and register it with an authentication key. The script accepts two arguments, **first** specifying the location of the [self-hosted integration runtime](https://www.microsoft.com/download/details.aspx?id=39717) on a local disk, **second** specifying the **authentication key** (for registering self-hosted IR node).
34+
35+
* For automating manual updates:
36+
Update the self-hosted IR node with a specific version or to the latest version **[script-update-gateway.ps1](https://github.com/nabhishek/SelfHosted-IntegrationRuntime_AutomationScripts/blob/master/script-update-gateway.ps1)** - This is also supported in case you have turned off the auto-update, or want to have more control over updates. The script can be used to update the self-hosted integration runtime node to the latest version or to a specified higher version (downgrade doesn’t work). It accepts an argument for specifying version number (example: -version 3.13.6942.1). When no version is specified, it always updates the self-hosted IR to the latest version found in the [downloads](https://www.microsoft.com/download/details.aspx?id=39717).
37+
> [!NOTE]
38+
> Only last 3 versions can be specified. Ideally this is used to update an existing node to the latest version. **IT ASSUMES THAT YOU HAVE A REGISTERED SELF HOSTED IR**.
39+
40+
## Usage examples
41+
42+
### For automating setup
43+
1. Download the self-hosted IR from [here](https://www.microsoft.com/download/details.aspx?id=39717).
44+
1. Specify the path where the above downloaded SHIR MSI (installation file) is. For example, if the path is *C:\Users\username\Downloads\IntegrationRuntime_4.7.7368.1.msi*, then you can use below PowerShell command-line example for this task:
45+
46+
```powershell
47+
PS C:\windows\system32> C:\Users\username\Desktop\InstallGatewayOnLocalMachine.ps1 -path "C:\Users\username\Downloads\IntegrationRuntime_4.7.7368.1.msi" -authKey "[key]"
48+
```
49+
50+
> [!NOTE]
51+
> Replace [key] with the authentication key to register your IR.
52+
> Replace "username" with your user name.
53+
> Specify the location of the "InstallGatewayOnLocalMachine.ps1" file when running the script. In this example we stored it on Desktop.
54+
55+
1. If there is one pre-installed self-hosted IR on your machine, the script automatically uninstalls it and then configures a new one. You'll see following window popped out:
56+
![configure integration runtime](media/self-hosted-integration-runtime-automation-scripts/integration-runtime-configure.png)
57+
58+
1. When the installation and key registration completes, you'll see *Succeed to install gateway* and *Succeed to register gateway* results in your local PowerShell.
59+
[![script 1 run result](media/self-hosted-integration-runtime-automation-scripts/script-1-run-result.png)](media/self-hosted-integration-runtime-automation-scripts/script-1-run-result.png#lightbox)
60+
61+
### For automating manual updates
62+
This script is used to update/install + register latest self-hosted integration runtime. The script run performs the following steps:
63+
1. Check current self-hosted IR version
64+
2. Get latest version or specified version from argument
65+
3. If there is newer version than current version:
66+
* download self-hosted IR msi
67+
* upgrade it
68+
69+
You can follow below command-line example to use this script:
70+
* Download and install latest gateway:
71+
72+
```powershell
73+
PS C:\windows\system32> C:\Users\username\Desktop\script-update-gateway.ps1
74+
```
75+
* Download and install gateway of specified version:
76+
```powershell
77+
PS C:\windows\system32> C:\Users\username\Desktop\script-update-gateway.ps1 -version 3.13.6942.1
78+
```
79+
If your current version is already the latest one, you'll see following result, suggesting no update is required.
80+
[![script 2 run result](media/self-hosted-integration-runtime-automation-scripts/script-2-run-result.png)](media/self-hosted-integration-runtime-automation-scripts/script-2-run-result.png#lightbox)

0 commit comments

Comments
 (0)