Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

In this example we’re configure an agent to run as a service on Windows, under the NT AUTHORITY\NETWORK SERVICE account. This agent will enable Azure DevOps YAML pipelines invoke the MettleCI command line on a dedicated Windows server. This is required because the DataStage compilation process still requires the Microsoft Windows-based components.

Note that these configuration options work for Azure DevOps running either in the cloud or on premises.

There are two steps to follow:

Create a PAT (Personal Access Token)

  1. From the User settings menu select Personal access tokens

  2. Select New Token and enter the name of your Windows machine, select your Azure organisation, specify your token’s expiry period, and select a scope of Full access.

  3. Copy the generated token and keep it somewhere secure. You’ll need it in subsequent steps.

Download and configure an Agent

  1. Under Project Settings create an Agent Pool for your agents. For example, here’s a list including a pool of agents across Data Migrators' AWS infrastructure:

  2. Select the Agents tab,

  3. Click New agent

  4. Download the appropriate agent (e.g. Windows x64 for traditional DataStage v11.7 instances) on to the server you intent to use for CI-related job compilation and follow the PowerShell instructions provided. Your PowerShell output should look a little like this:

    Windows PowerShell
    Copyright (C) 2016 Microsoft Corporation. All rights reserved.
    
    PS C:\Users\Administrator> cd c:\
    PS C:\> mkdir agent ; cd agent
    
    
        Directory: C:\
    
    
    Mode                LastWriteTime         Length Name
    ----                -------------         ------ ----
    d-----       12/08/2020   8:12 PM                agent
    
    
    PS C:\agent> Add-Type -AssemblyName System.IO.Compression.FileSystem ; [System.IO.Compression.ZipFile]::ExtractToDirecto
    ry("$HOME\Downloads\vsts-agent-win-x64-2.173.0.zip", "$PWD")
    PS C:\agent> .\config.cmd
    
      ___                      ______ _            _ _
     / _ \                     | ___ (_)          | (_)
    / /_\ \_____   _ _ __ ___  | |_/ /_ _ __   ___| |_ _ __   ___  ___
    |  _  |_  / | | | '__/ _ \ |  __/| | '_ \ / _ \ | | '_ \ / _ \/ __|
    | | | |/ /| |_| | | |  __/ | |   | | |_) |  __/ | | | | |  __/\__ \
    \_| |_/___|\__,_|_|  \___| \_|   |_| .__/ \___|_|_|_| |_|\___||___/
                                       | |
            agent v2.173.0             |_|          (commit ecd4119)
    
    
    >> Connect:
    
    Enter server URL > https://dev.azure.com/mettleci
    Enter authentication type (press enter for PAT) >
    Enter personal access token > ****************************************************
    Connecting to server ...
    
    >> Register Agent:
    
    Enter agent pool (press enter for default) > AWS DataStage Agents
    Enter agent name (press enter for DEMO4-CLNT) >
    Scanning for tool capabilities.
    Connecting to the server.
    Successfully added the agent
    Testing agent connection.
    Enter work folder (press enter for _work) >
    2020-08-12 10:24:26Z: Settings Saved.
    Enter run agent as service? (Y/N) (press enter for N) > Y
    Enter User account to use for the service (press enter for NT AUTHORITY\NETWORK SERVICE) >
    Granting file permissions to 'NT AUTHORITY\NETWORK SERVICE'.
    Service vstsagent.mettleci.AWS DataStage Agents.DEMO4-CLNT successfully installed
    Service vstsagent.mettleci.AWS DataStage Agents.DEMO4-CLNT successfully set recovery option
    Service vstsagent.mettleci.AWS DataStage Agents.DEMO4-CLNT successfully set to delayed auto start
    Service vstsagent.mettleci.AWS DataStage Agents.DEMO4-CLNT successfully configured
    Service vstsagent.mettleci.AWS DataStage Agents.DEMO4-CLNT started successfully
    PS C:\agent>

  5. Now you’re ready to use that agent in your pipeline YAML definitions!

  • No labels