Metadata Supplier | Version 4

Sophora Metadata Supplier for ARD-Mediathek Administration

This article describes how to set up the Sophora Metadata Supplier for ARD-Mediathek.

System Requirements

The Sophora Metadata Supplier for ARD-Mediathek requires Java 11.

Configuration

The Sophora Metadata Supplier for ARD-Mediathek uses the following configuration files:

  • application.yml: This is the main configuration file.
  • metadata-supplier-application-executable.conf (optional): Used to set the JVM properties (JAVA_OPTS) such as heap size.
  • loader.properties (optional): Used for changing the folder of the mapping plugins.
  • logback-spring.xml: Logging configuration.

The Sophora Metadata Supplier for ARD-Mediathek needs to be restarted for changes in any of these configuration files to take effect.

The main configuration of the Sophora Metadata Supplier is done in the file application.yml. Here you can see the default application.yml you may copy and adapt. See also section "Running with(out) Sophora" and "Triggering the Sophora Metadata Supplier" for examples.

# Default configuration to use the Metadata Supplier with Sophora as source system
---
# Application settings
spring:
  application:
    name: 'Sophora Metadata Supplier for ARD-Mediathek'
    # Specifies the package of the spring-boot-sophora-commons for component scan.
    # Default is 'com.subshell.sophora.springbootsophoracommons'.
    # Set to empty if Sophora should not be used.
    spring-boot-sophora-commons-package: 'com.subshell.sophora.springbootsophoracommons'
    # Specifies additional base packages for component scan. Default is empty.
    spring-additional-base-packages: ''

# Sophora feature settings
# Note: Property 'spring.application.spring-boot-sophora-commons-package' must be set
# if any of these properties is set to true.
metadata-supplier-sophora:
  listen-to-document-changes: true
  enable-sticky-note-feedback: true
  sync-at-startup: true

# Sophora connection settings
sophora:
  client:
    server-connection:
      urls:
        - 'http://localhost:1196'
      username: 'admin'
      password: 'admin'
      retries: 60
      retryInterval: 20
    cache:
      publishedDocumentCacheElementsInMemory: 2000
      documentCacheElementsInMemory: 2000
    misc:
      dataDir: data
      jmxName: 'Sophora Metadata Supplier for ARD-Mediathek'
    toolInfo:
      enabled: true
      name: 'Sophora Metadata Supplier for ARD-Mediathek'

# ARD-Mediathek connection settings
ardmedialibrary:
  credentials:
    username: 'username'
    password: 'password'
    proxyUrl: ''
    proxyPort: 0
  imageService:
    url: 'https://deliver-test.ard.de/image-service'
  assetApi:
    url: 'https://deliver-test.ard.de/asset-api'
  playerApi:
    url: 'https://deliver-test.ard.de/player-api'

Installation

The Sophora Metadata Supplier for ARD-Mediathek is a Spring Boot application. It expects to find the configuration files next to the JAR file. So we recommend to put the executable application JAR and the configuration files into the same directory.

Recommended directory structure:

/cms
    /sophora-metadata-supplier
        /logs
        /plugins
        application.yml
        loader.properties
        logback-spring.xml
        metadata-supplier-application-executable.conf
        metadata-supplier-application-executable.jar

Starting and Stopping

The executable Metadata Supplier Application JAR file is a Spring Boot executable JAR. On Linux and MacOS, the Metadata Supplier can be started by running the executable JAR as follows:

./metadata-supplier-application-executable.jar

For running the Metadata Supplier as a background daemon, we suggest to create a systemd service as /etc/systemd/system/metadata-supplier-application.service. You may need to adapt the user (line 6) and path to the installation (line 7-8) according to your setup.

[Unit]
Description=Sophora Metadata Supplier for ARD-Mediathek
After=syslog.target

[Service]
User=sophora
WorkingDirectory=/cms/sophora-metadata-supplier
ExecStart=/cms/sophora-metadata-supplier/metadata-supplier-application-executable.jar
SuccessExitStatus=143

[Install]
WantedBy=multi-user.target

More options are documented in the Spring Boot documentation.

JAVA_OPTS

Options for the Java VM, such as heap size, can be set using the environment variable JAVA_OPTS or using an entry in the metadata-supplier-application-executable.conf file. For example:

JAVA_OPTS="-Xmx1G"

Running with(out) Sophora

By default, the Metadata Supplier wants to connect to a Sophora Server as source system. You have to specify the connection data like the Sophora Server URL, user name and password as well as the connection data to the ARD-Mediathek in your application.yml:

---
# Sophora connection settings
sophora:
  client:
    server-connection:
      urls: 'https://my-sophora-server:1195'
      username: '<sophora-username>'
      password: '<sophora-password>'

# ARD-Mediathek connection settings
ardmedialibrary:
  credentials:
    username: '<ARD-Mediathek username>'
    password: '<ARD-Mediathek password>'
    proxyUrl: ''
    proxyPort: 0
  imageService:
    url: 'https://server.ard.de/image-service'
  assetApi:
    url: 'https://server.ard.de/asset-api'
  playerApi:
    url: 'https://server.ard.de/player-api'

If you do not use Sophora as source system, you have to disable loading Sophora components at startup. Just activate the no-sophora profile in your application.yml and provide the ARD-Mediathek connection data:

---
# Application settings
spring:
  profiles:
    active: 'no-sophora'

# ARD-Mediathek connection settings
ardmedialibrary:
  credentials:
    username: '<ARD-Mediathek username>'
    password: '<ARD-Mediathek password>'
    proxyUrl: ''
    proxyPort: 0
  imageService:
    url: 'https://server.ard.de/image-service'
  assetApi:
    url: 'https://server.ard.de/asset-api'
  playerApi:
    url: 'https://server.ard.de/player-api'

See the Operation Guide for further informations how to setup the workflow with Sophora.

Last modified on 11/11/21

The content of this page is licensed under the CC BY 4.0 License. Code samples are licensed under the MIT License.

Icon