Deployment Guide
This guide provides comprehensive installation instructions for Axinom DRM License Service in an on-board environment.
Before you beginβ
Make sure you have read the overview and worked through contractual, hardware and software prerequisites. In particular you should now have:
- A Linux host with Docker installed
- Access to Linux terminal
- Axinom DRM Tenant and its configuration (available from Axinom Portal)
- Credentials for Axinom Docker Registry (received from Axinom)
- On-board Configuration Package
- Decision which of the DRM technologies you would like to deploy (Widevine, FairPlay, PlayReady).
Conventionsβ
This document has the following conventions:
-
Commands and their output are represented like
echo "Text"
-
Commands are modeled for the Linux terminal. However, they have been chosen in a way that all of them work in Windows PowerShell.
-
All
docker
commands require administrative privileges. Therefore, make sure to applysudo
on Linux and launch PowerShell console on Windows with elevated privileges. -
Identifiers and paths are represented like
this
, and placeholders like{this}
. -
Placeholders are explained the first time they are encountered with no further explanations in the rest of the document.
Pull Docker Imageβ
All Docker images are published to Axinomβs private Docker registry https://registry.axinom.com.
To log in to the registry (use the credentials you received from Axinom):
docker login registry.axinom.com -u {username} -p {password}
...
Login Succeeded
Select the correct image depending on DRM technology and CPU architecture:
Axinom DRM License Service Docker Images
DRM Technology | x64 | ARM 64-bit |
---|---|---|
Widevine | widevine-api/app | widevine-api-arm64/app |
FairPlay | fairplay-api/app | fairplay-api-arm64/app |
PlayReady | playready-api/app | - |
You are only given access to the images based on the service agreement. Therefore, you wonβt be able to pull any other Docker images that you donβt have access to.
To pull the Docker image (use the name of the selected image):
sudo docker pull registry.axinom.com/{drm_technology}-api/app
...
Status: Downloaded newer image for registry.axinom.com/{drm_technology}-api/app:latest
Create Folders for Configs and Logsβ
Axinom DRM License Service expects two folders: one where it finds the config-files, and one to which it will write logs. The folders donβt have to be next to each other, the exact mapping will be made when starting the container.
-
Create the folders:
mkdir ~/{drm_technology}
mkdir ~/{drm_technology}/config
mkdir ~/{drm_technology}/logs
mkdir ~/{drm_technology}/logs/nginx -
Extract and copy the contents of the Configuration Package into the Config folder.
- To verify the contents of the folder run
ls ~/{drm_technology}/config
- To verify the contents of the folder run
-
For PlayReady follow the section below to copy PlayReady SDK files.
-
If you wish to review/adjust configuration, you can do it now, following Configuration Options and Configuration Package.
(PlayReady) Copy PlayReady SDK Filesβ
The following PlayReady SDK files must be present in the Config folder:
- Microsoft.Media.Drm.RMCore.NETCore.dll
- Microsoft.Media.Drm.RMCore.NetCore.Http.dll
- Microsoft.Media.Drm.RMUtil.so
You also need a PlayReady Server Certificate:
- ServerCertificate.xml
<?xml version="1.0" encoding="utf-8"?>
<ServerCertificateData>
<Certificate>Qblablabla[...]blablablaQpP6xas=</Certificate>
<ECCKeyValue>
<PrivateKey>7LX1IrfLsjE6V8CXNGviGSP5U9M3OYKD0PyKqm+igUQ=</PrivateKey>
<PublicKey>2cxfn1WIGXwpL1kCa5t48D64GueK0cf2c+yQQbNqafc=</PublicKey>
<Curve>1</Curve>
</ECCKeyValue>
</ServerCertificateData>
These files must be obtained from Microsoft IPLA licensing portal. Once you have concluded the necessary agreements, Microsoft allows you to download the PlayReady SDK packages.
To get the files:
- Download and extract the SDK package named
PlayReady_Srv_<version>.zip
from the portal given by Microsoft. E.g: "PlayReady_Srv_4.6.7607_qfe1.zip". - Navigate to
RMSDK.Core
folder. - Extract the following NuGet packages. These NuGet packages are ZIP archives which can be extracted.
- Microsoft.Media.Drm.RMCore.NETCore.4.6.7607.nupkg
- Microsoft.Media.Drm.RMCore.NetCore.Http.4.6.7607.nupkg
- Microsoft.Media.Drm.RMUtil.4.6.7607.nupkg
- The above-mentioned DLL files will be under "lib" directory. The
Microsoft.Media.Drm.RMUtil.so
will be under theruntimes\linux-x64\native
directory.
Run the Containerβ
-
Decide which HTTP and HTTPS ports shall be exposed on the host (further refered to as
{host_http_port}
and{host_https_port}
). The Docker image exposes the following ports: 80 (HTTP), 443 (HTTPS), 8080 (alternative HTTP port). -
Run the docker container:
sudo docker run -d --restart always -p {host_http_port}:80 -p {host_https_port}:443 -v ~/
{drm_technology}/config:/Config -v ~/{drm_technology}/logs:/Logs registry.axinom.com/
{drm_technology}-api/app
3bc85e55c4e18bd5fbb2ea5d43c046d15e63b47bff1ca5fbb564d57f4f0ba9db -
Verify that the License Service started up successfully:
sudo docker logs {container_id}
{container_id}
- full or partial identifier of the previously started License Service container.Example:
docker logs 3bc85e55c
Overriding the app's configuration... Done.
Overriding the app's logging configuration... Done.
Overriding the hosts configuration... Done.
Overriding the Nginx configuration... Done.
The setup has been successfully completed.
2019-05-21 10:48:12,702 CRIT Supervisor running as root (no user in config file)
2019-05-21 10:48:12,703 INFO Supervisor started with pid 12
2019-05-21 10:48:13,705 INFO spawned: 'nginx' with pid 15
2019-05-21 10:48:13,706 INFO spawned: 'app' with pid 16
[2019-05-21T10:48:14.3959460+00:00] Listening on: http://127.0.0.1:8089
Press Ctrl+C to quit.
2019-05-21 10:48:15,398 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-05-21 10:48:15,398 INFO success: app entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Verify that the License Service Responds via HTTPβ
In a web-browser on the client, navigate to the address where the License Service is hosted. For
example, if the host name is widevine-api.example.com
, navigate to
"http://widevine-api.example.com/AcquireLicense" (license acquisition URL).
If the container runs properly, the page should display (for Widevine and FairPlay):
Use POST to get a license.
In case of PlayReady, the response is slighly different:
LicensingService
...
Instructions in this section apply for a playback machine only. They will most likely not work on the host machine running a License Service Docker image.
Set up HTTPSβ
To make HTTPS work you need to:
- Decide on the DNS name to call the License Service (e.g. widevine-api.example.com)
- Make sure the License Service is accessible in your environment using this name (e.g. via local DNS)
- Issue a TLS certificate for this name
- Configure the TLS certificate on the server (you will need the certificate file and its private key in PEM format)
- Make a test call using HTTPS from the client machine: https://widevine-api.example.com:443/AcquireLicense (expected response is the same as above)
For evaluation purpose the Configuration Package you get already contains a TLS certificate and its private key
issued to axdrm-{drm_technology}-evaluation.axprod.net
and signed by AxRoot certificate authority.
Certificate of the AxRoot CA is also included (AxRootCA.crt
). Nginx configuration already contains the mentioned TLS certificate:
...
ssl_certificate /Config/axdrm-widevine-evaluation.axprod.net.cert.pem;
ssl_certificate_key /Config/axdrm-widevine-evaluation.axprod.net.key.pem;
To use this certificate, on the client machine:
- Add an entry to the
hosts
file foraxdrm-{drm_technology}-evaluation.axprod.net
- Import the
AxRootCA.crt
file into the root certificate store - Make a test call using HTTPS from the client machine: https://{drm_technology}-evaluation.axprod.net:443/AcquireLicense
For production purpose you have to use your own TLS certificate. Replace Axinom certificate above with your own.