Running SHIR in Window Container

Meyliana Wangsa 5 Reputation points
2023-04-05T01:53:27.18+00:00

Currently have an integrated runtime for Azure synapse workspace running on a Windows VM. It seems like a waste of resources and more expensive (paying for the windows license, managing the VM and so on) versus running the service in a container. Has anyone tried running the self-hosted integration runtime (SHIR) in a windows container? https://docs.microsoft.com/en-us/azure/data-factory/how-to-run-self-hosted-integration-runtime-in-windows-container

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
5,373 questions
{count} vote

1 answer

Sort by: Most helpful
  1. SAGAR SATAPATHY 150 Reputation points
    2023-05-05T08:44:10.39+00:00

    Hello Wangsa,
    Running the Self-Hosted Integration Runtime (SHIR) in a Windows container is possible, and it can be a more efficient approach compared to running it on a Windows VM. The process involves creating a Docker container that hosts the SHIR service. Here's a general outline of the steps you need to follow:

    1. Install Docker Desktop for Windows with Windows container support. If you're using a Windows Server, you can install the Docker Engine - Enterprise directly on the server.
    2. Create a new directory for your Docker project, and within that directory, create a new file named Dockerfile with the following content:
    
    # Use the Windows Server Core image as the base image
    
    FROM mcr.microsoft.com/windows/servercore:ltsc2019
    
    # Download and install the Self-Hosted Integration Runtime
    
    ADD https://go.microsoft.com/fwlink/?linkid=2178493 "C:\shir\IntegrationRuntime.msi"
    
    RUN msiexec /i "C:\shir\IntegrationRuntime.msi" /qn /norestart
    
    # Set the working directory
    
    WORKDIR C:/Program Files/Microsoft Integration Runtime/4.0/bin
    
    # Expose the required ports
    
    EXPOSE 8060 3389
    
    # Run the SHIR service
    
    CMD ["Microsoft.Cloud.DataMovement.DataTransferApp.exe"]
    
    
    1. Open a command prompt or PowerShell window, navigate to the directory containing the Dockerfile, and run the following command to build the Docker image:
    
    docker build -t shir:latest .
    
    
    1. After the image is built, run a new container with the following command, replacing <NodeName> and <AuthKey> with the appropriate values from your Azure Data Factory or Synapse workspace:
    
    docker run -d -p 8060:8060 -p 3389:3389 --name shir-container shir:latest -register -nodeName <NodeName> -authkey <AuthKey>
    
    
    1. The SHIR container should now be running, and it will register with your Azure Data Factory or Synapse workspace.

    Keep in mind that running SHIR in a Windows container is still subject to Windows licensing costs. If you want to reduce costs further, you can consider using the SHIR on a Linux container instead, following a similar approach.

    For a more detailed explanation and a step-by-step guide, refer to the official documentation: How to run the self-hosted integration runtime in a Windows container

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.