This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Configuration

Configuring ew-manip and the Repackager

Configuring ew-manip

The ew-manip global service parameters can be specified in the following ways:

  1. On the command line
  2. As environment variables
  3. Default values This also shows the order of precedence, where values on the command line, will override all other values.

The repackager is normally running as an HTTP server on port 80. The ew-manip service would typically run on the same host with the default port 8094. The port can be changed in the service file at: /usr/lib/systemd/system/ew-manip.service key: ExecStart

If the repackager is not running on port 80, or on a different host from ew-manip, then this should be specified on the same line in the service file by adding: -u <repackager-hostname:port>

In the resulting combined manifest, the pre-roll content URL will point to another asset, and its URL needs to be an absolute URL. This does not have to be configured since the full absolute URL must be sent in the query string.

Repackager configuration (nginx routing)

The nginx routing must be manually configured in the repackager. To do that, add the following include entry to the nginx config file at: /etc/ew-repackager/ew-repackager-custom.conf

include /etc/edgeware/ew-manip/ew-manip-nginx.conf;

This will make requests with URLs ending with .m3u8 or .mpd containing the string ewm= at the start of the query string to be forwarded to the ew-manip server at http://localhost:8094.

1 - Licensing

Licensing credentials for ew-manip

ew-manip requires a valid license to operate. Some endpoints are accessible without a valid license, but endpoints retrieving a manipulated playlist/manifest are protected.

Requirements

  • An internet connection on the machine running ew-manip
  • A valid license reference provided by Agile Content

Using the license reference

The license reference along with the product name must be stored in: /etc/edgeware/ew-manip/license.json. For example:

{
    "license_ref": "this_is_an_example_license_ref",
    "product_name": "ew-manip"
}

License validation

There will be an initial and then a periodic license check every 24 hours towards a license server once the service has started. The service will initiate a grace period if, and only if, the license server cannot be reached or the license server reports an internal error. The grace period will last for 2 hours if this is the license validation made during startup, and 7 days if this was a license validation that was made after a successful validation during startup (for internal license server errors, the grace period will always be 2 hours).

If an unsuccessful validation occurs, ew-manip will do the verification more often. This starts with one minute after the first fail, two minutes after the second, doubling every time it fails. It will do so until it reaches 1024 minutes (~17 hours), and then do the verification every 1024 minutes. If the license reference is successfully verified again, it will return to verifying the reference every 24 hours.

In case license.json is changed, the ew-manip service must be restarted in order to update server data.

License information

There are mainly two ways of finding information regarding the license status in the ew-manip service, the logging, and an HTTP endpoint.

Logging

All license related logging has the topic logging. Filtered logs with regard to topic is described in Monitoring & Logging.

HTTP

The /licensing endpoint of the ew-manip service provides some information regarding the licensing status. Currently, the information provided includes:

  • A timestamp for when the last license validity verification occurred
  • Timestamp for when the next license validity verification will occur
  • Whether the current license reference is considered valid or not. If this is false, and there is no active grace period, requests to the protected endpoints will fail
  • If the license is valid, this endpoint will also show the expiry date of the license
  • If currently in a grace period, or the grace period has ended, a timestamp of when the grace period end is provided