Skip to main content

1E 8.1 (on-premises)

Example Location Discovery script

Sample script to enable and disable the location discovery feature, along with the option to run it and load site, subnet and information in Content Distribution. This information can then be retrieved by Nomad at a later stage when implementing the Single Site Download (SSD) or Single Site PBA features.You can view Nomad Sites in theNomad Sites page.

The Nomad Sites page is primarily designed to show how the network is being used for content distribution in different locations. It focuses on the volume of content downloaded from peers vs over the WAN, rather than the status of specific Content Titles in a given site. You can see what content is available in a given site by looking at the Content tab for that site.

Note

A Nomad Site corresponds to Nomad Single Site Download (SSD) site. Customers that have implemented SSD and upgrade ActiveEfficiency to the Nomad app and Content Distribution will see their defined SSD locations displayed as Nomad Sites in the app.

Any subnets that are not included in a Nomad SSD Site definition will be represented in a site named Unknown. If no SSD sites have been defined, all subnets will be included in the 'Unknown' site.

Prerequisites

The LocationDiscovery.ps1 script is available from the Scripts folder in the NomadBranch download zip. You can download this zip from the 1E Support Portal https://support.1e.com/.

The 1E Nomad product pack is included in the Tachyon Platform zip. The TachyonPlatform zip file can be downloaded from 1E Support Portal https://support.1e.com/. Additional Product Packs are available from Tachyon Exchange Tachyon Exchange.

The sample script requires:

  • ContentDistribution version 8.0 or above is installed.

  • Tachyon platform with the Nomad consumer provisioned.

  • The1E-Nomad-LocationDiscoveryinstruction is uploaded and permissioned appropriately. The typical configuration is:

    • The 1E Nomad product pack is uploaded into an Instruction set called 1E Nomad.

    • The Nomad Administrator role is configured with Actioner permissions on the 1E Nomad instruction set, and the All Devices management group.

  • The account used to run the script must be a Tachyon user with the Nomad Administrator role assigned.

  • CSV file – described below.

CSV file

The LocationDiscovery.ps1 script uses a CSV file as input, and accepts several parameters.

The input file should be made up of four columns, without column headers:

  1. Site name

  2. CIDR notation subnet associated with that site

  3. Latitude of the site

  4. Longitude of the site

An example of the file contents for a site named LAB with four subnets would be:

LAB,10.1.1.0/24,-89.2345,120.5674

LAB,192.168.1.0/24,-81.2345,180.5674

LAB,192.168.2.0/24,20.2345,-160.5674

LAB,192.168.2.0/24,59.2345,20.5674

Example Excel CSV file
Using the example Location Discovery script
Parameters

The LocationDiscovery.ps1 has the following configurable parameters:

Parameter

Description

TLS12

TLS12 is an optional switch type parameter. Include this switch if TLS 1.2 is required to connect to the CD server.

GetSettings

GetSettings is used to fetch the existing configured settings of the location discovery feature.

Enable

Enable is a switch to turn-on the location discovery feature. If this feature is enabled, a user needs to use the "execute" switch to download the automatic grouping of sites and subnets.

Disable

Disable is a switch to turn off the location discovery feature. If this feature is disabled, grouping of locations and subnets has to be provisioned by scripting in the ContentDistribution LocationsV2 table.

Execute

Execute is a switch to trigger automatic location discovery instruction and automates download of the Excel file containing sites and subnet grouping. This step takes at least 45 minutes, and depends on your devices and network topology.

OutPath

OutPath is a mandatory parameter in case of Execute switch is present. It indicates where the result file should be downloaded. The path should already exist.

InterSiteDistance

InterSiteDistance is a mandatory parameter to be configured if the location discovery feature is enabled. By default, its value is 500 meters.

Upload

Upload is a parameter used for uploading the Excel file containing site, subnet, latitude, longitude fields in the ContentDistribution LocationsV2 table. This step will take a backup of the existing LocationsV2 table, truncates it and loads new data from an input Excel file. If Excel is not loaded successfully, then the previous LocationsV2 table entries will be loaded again.

CDServer

CDServer is a mandatory parameter. You must provide the name of the ContentDistribution web server using this parameter.

Protocol

Protocol is a mandatory parameter. You must indicate if the ContentDistribution web server is configured for HTTP or HTTPS connections.

Example PowerShell command lines

The example LocationDiscovery .ps1 script can be run on a PowerShell command line as shown in the following examples, where 1Etrnap.1etrn.local is the ContentDistribution server in our sample environment:

Get location discovery feature settings:

.\LocationDiscovery.ps1 -Disable -CDServer 1Etrnap.1etrn.local -Protocol http

Configure inter-site distance for location discovery feature:

.\LocationDiscovery.ps1 -InterSiteDistance 50 -CDServer 1Etrnap.1etrn.local -Protocol http

Execute location discovery feature:

.\LocationDiscovery.ps1 -Execute -CDServer 1Etrnap.1etrn.local -Protocol http -OutPath C:\Temp\

Import Site and Subnet information from C:\Temp\network.csv using HTTP after clearing the Locations table:

.\LocationDiscovery.ps1 -Upload C:\Temp\network.csv -CDServer 1Etrnap.1etrn.local -Protocol http