Skip to main content

1E 8.1 (on-premises)

Example Single Site script

Sample script that provides two functions to update sites and subnets in the Content Distribution locations table: DeleteAllLocations and AddLocation(). This information can then be retrieved by Nomad at a later stage when implementing theSingle Site DownloadandSingle Site PBAfeatures.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 ExampleSitesAndSubnets.ps1 script is available from the Scripts folder in the NomadBranch download zip. You can download this zip by clicking on the Nomad Tools link in the 1E Support Portal at 1eportal.force.com/s/article/Nomad81.

  • Content Distribution 8.0 or above

  • PowerShell version 5.0 or above.

Using the example Single Site script

The sample script includes an example of how the script can be used:

  1. Clears all current sites and subnet information stored in the ContentDistribution database.

  2. Adds the following 3 sites and subnets in the ContentDistribution database.

    "HOMER.SIMPSON.Springfield" "192.148.226.0/24"

    "HOMER.SIMPSON.Springfield" "192.148.228.0/24"

    "MARGE.SIMPSON.Springfield" "192.168.227.0/24"

Before using it in your environment, you must edit the script to replace the example "HOMER" site and subnets with your own list. Over time, you will manually modify the script to reflect your environment.

Note

The example script does not support supernets.

Note

If you prefer to automatically add Sites and subnets by querying AD, then you should consider using Example Active Directory Single Site script instead.

Parameters

The script uses the following parameters:

  • PlatformUrl as a mandatory parameter - you must provide the Tachyon Platform base URL

  • Tls12 as an optional switch parameter - include this switch if TLS 1.2 is required to connect to the Tachyon Platform server.

For example, to run the script on a PowerShell command-line:

.\ExampleSitesandSubnets.ps1 -PlatformUrl https://tachyon.acme.local:443 -Tls12
How it works

The sample script provides the following two functions:

Script functions

function DeleteAllLocations()
Description: Deletes all rows from the ContentDistribution locations table
Params: none
Return: $result(empty)

function AddLocation()
Description: Adds a new entry into the ContentDistribution locations table
Params: site  - [string] containing the site name
             subnet - [string] containing the ipv4subnet in CIDR notation
Return: $result - newly created location object of the form #     {"Id":"efa19226-266f-4bd0-8a9d-94fa5ac1b773","Site":"HOMER.SIMPSON.Springfield","Subnet":"192.148.226.0/24"}

You must edit this section with your own list of sites and subnets:

# optional will delete all existing entries 
DeleteAllLocations

# sample adding 3 locations using the AddLocation function
# duplicate entires will report an error: (409) conflict
AddLocation "HOMER.SIMPSON.Springfield" "192.148.226.0/24"
AddLocation "HOMER.SIMPSON.Springfield" "192.148.228.0/24"
AddLocation "MARGE.SIMPSON.Springfield" "192.168.227.0/24"