Skip to main content

Updating Atria via AtriaNuget Local Packages

Overview

This article explains how to update Atria using AtriaNuget Local Packages. By downloading the latest packages to a Local NuGet Repository in advance, you can streamline the update process by skipping external downloads, saving time and reducing delays.

A Local NuGet Repository stores packages on a local network or machine, enabling faster installations and updates. This approach is ideal for secure environments or when managing custom packages internally.

info

This process requires IIS features to be configured on the server, so it is recommended to set it up on the Primary Provisioning Server.

Setup the Local Nuget Repository

  1. Download the following file: AtriaNuget.zip

  2. Extract the AtriaNuget folder and place in C:\inetpub\wwwroot:

    Extract the AtriaNuget Folder

  3. Open the Properties of the AtriaNuget folder, navigate to the Security tab, and click Edit. Click Add and type in Everyone then tick the Full control permissions box. This is to avoid any restrictions later when accessing the packages on this local repository.

    Security Permissions

  4. Open IIS, navigate to Sites, and click Add Website:

    IIS

  • Set the parameters as shown in the screenshot below and click Ok:

    Add the AtriaNuget Website

  1. Create a CNAME DNS record for AtriaNuget resolving to the server you are configuring AtriaNuget.

    Add DNS record

  2. Access the default website of the local NuGet website (http://atrianuget/default.aspx):

    Access the AtriaNuget Site

Download the Latest Available Atria Package to Local Nuget Repository

  1. In the AtriaNuget folder, there is a folder named Scripts:

    AtriaNuget Script Folder

    • Using an administrative PowerShell window, navigate to this folder.
  2. Setup the Temporary Download Path and Atria Package Path with the following commands:

    $tempDLPath = 'C:\inetpub\wwwroot\AtriaNuget\TempDLs\'
    $atriapkgPath = 'C:\inetpub\wwwroot\AtriaNuget\Packages\'
  3. Connect to the Atria Feed:

    Connect-AtriaFeed -UserName '<any username>' -PersonalAccessToken '<PersonalAccessToken given by Atria Support>' -FeedUrl 'https://pkgs.dev.azure.com/Automate101/A101/_packaging/Atria-Beta@PublicBeta/nuget/v2'
  4. Run the following command:

    .\DownloadLatestAtriaPkgs.ps1 -tempDLPath $tempDLPath -atriaPkgPath $atriapkgPath
    info

    This script executes Get-AtriaComponent -ListOutOfDate, and will download the latest available packages for each component that is out of date.

Example

Sample Run - PowerShell

Sample Run - Packages Result

Updating Atria Using the Local Nuget Repository

This step can only be completed if all the above steps were successful. We recommend creating snapshots/ backups prior to updating.

  1. Connect to the Local Nuget Repository:

    Connect-AtriaFeed -UserName 'Local' -PersonalAccessToken 'Local' -FeedUrl 'http://atrianuget/nuget'
  2. Verify that packages can be retrieved from the Local Nuget Repository:

    Get-AtriaPackage | Select Identity

    Get Atria Package - Local

  3. Update the Atria Modules. After updating the modules, close and re-open your administrative PowerShell session.

    Update-AtriaToolsModule

    Update Atria.Tools

  4. Update the Atria Components:

    • To include a backup of your database:
      Update-AtriaOutOfDateComponents
    • To skip the backup:
      Update-AtriaOutOfDateComponents -SkipDBBackup
  5. If prompted to run a given command on a specific server for the Web Components or Web Services, make sure to first run the following command to connect to the local Nuget repository on the target server:

    Connect-AtriaFeed -UserName 'Local' -PersonalAccessToken 'Local' -FeedUrl 'http://atrianuget/nuget'
  6. After that, run the given command in an administrative PowerShell session on the target server.

    Run command on target server

    Runtime command on target server

  7. Once all components on the Primary Environment are updated, you can list the components and check that they are on the latest version.

    Get-AtriaComponent | FT

    Get Atria Components

Remote Environments

  1. On the Remote Environment, setup a A Record DNS Entry for AtriaNuget pointing to the IP Address of the Primary Provisioning Server.

  2. On the Remote Provisioning Server, Connect to the Local Nuget Repository:

    Connect-AtriaFeed -UserName 'Local' -PersonalAccessToken 'Local' -FeedUrl 'http://atrianuget/nuget'
  3. Verify that packages can be retrieved from the Local Nuget Repository:

    Get-AtriaPackage | Select Identity

    Get Atria Package - Remote Env

  4. Update the Atria Tools Module, then close and re-open the administrative PowerShell session.

    Update-AtriaToolsModule
  5. Update the Atria Components on the Remote Environment.

    Update-AtriaOutOfDateComponents
  6. Once all components on the Remote Environment are updated, you can list the components and check that they are on the latest version:

    Get-AtriaComponent | FT

Cleanup the Local Nuget Repository Feed

This will clear the packages folder ready for the process to be completed again.

  1. In the AtriaNuget folder, there is a folder named Scripts:

    AtriaNuget Script Folder

    • Using an administrative PowerShell window, navigate to this folder.
  2. Setup the Temporary Download Path and Atria Package Path with the following commands:

    $tempDLPath = 'C:\inetpub\wwwroot\AtriaNuget\TempDLs\'
    $atriapkgPath = 'C:\inetpub\wwwroot\AtriaNuget\Packages\'
  3. Run the following command:

    .\RemoveDownloadedAtriaPkgs.ps1 -atriaPkgPath $atriapkgPath -tempDLPath $tempDLPath   

Notes

As we have connected to the Local Nuget Repository feed, in the future or for certain scenarios, we will need to connect back to the live Atria Repository feed, so make sure that the provided Personal Access Token as well as the Feed URL is kept.

For any questions or assistance, please contact us at support@getatria.com.