Launcher Application Overview

The Launcher Application is a powerful tool designed for service launch and orchestration. It offers a seamless way to manage services based on platform and channel parameter descriptions provided in a YAML configuration file. The Launcher Application ensures the availability of services by automatically restarting them in case of unexpected termination. Additionally, it provides a REST interface for remote control, allowing users to interact with the Launcher Application from anywhere. This tool is particularly useful if, for some reason (for example, on Windows), you prefer not to use Docker Compose or similar orchestration tools.

Key Features

  1. Service Launch and Orchestration: The Launcher reads a YAML configuration file containing platform and channel descriptions. It spawns the corresponding services (as child processes), enabling the launch and management of multiple services simultaneously.

  2. Automatic Service Restart on confuguration change: The launcher automatically restarts the services when the configuration file is changed.

  3. Automatic Service Restart on exceptions: In the event of unexpected termination, the Launcher Application detects the failure and automatically restarts the affected service. This ensures continuous service availability without manual intervention.

  4. YAML Configuration: The Launcher Application utilizes a YAML configuration file to define platforms and channels. Users can easily modify the configuration to add, remove, or update services as required.

  5. Remote Control via REST Interface: The Launcher Application offers a REST interface that allows users to remotely control and monitor the Launcher. By sending HTTP requests to the appropriate endpoints, users can retrieve the Launcher's current configuration, restart services, or stop them entirely.

  6. Built-in http server: The Launcher Application provides a built-in HTTP server for hosting web applications.

  7. Hidden processes: The Launcher Application spawns services in hidden terminal windows to keep the user interface clean. Although these services are not visible to the user, they can still be observed in the task manager.

Getting Started

To begin using the Launcher Application effectively, follow these steps:

  1. Installation: Download the latest version of the Stanag2WebRtc. The launcher executable (s2wlauncher.exe for Windows / s2wlauncher.run for Linux) will be in the root folder. Ensure any necessary dependencies are installed, for example in case of external recorder.

  2. Configuration: Configure the Launcher Application by providing a YAML configuration file - /data/platforms.yml. This file should contain platform and channel descriptions according to your service requirements.
    More on platform configuration

  3. Launching Services: Launch services by running the Launcher Application and providing the path to the configuration file. The Launcher will read the file, spawn the necessary processes, and continuously monitor their status.

  4. Remote Control: Utilize the REST interface provided by the Launcher Application to remotely control and monitor the Launcher. Send HTTP requests to the appropriate endpoints to retrieve status information, restart services, or stop the Launcher entirely.

Using the launcher

s2wlauncher.exe -i ./data/platforms.yml -p 8048

In the above example we start the s2wlauncher application that reads the configuration file (./data/platforms.yml) and spawns the services. It can be accessed via REST interface on port 8048 and uses external recorder TsRecorder.exe

Command line arguments

Argument Description Default Value
-i, --platformConfig Platforms YAML configuration file path data/platforms.yml
-p, --port Port number for the server 8048
--bindIp Server bind IP
-r, --recorderProcPath Path to the recorder executable ./tsrecorder/TsRecorder.exe
--showChildProcessesOutput Show output of child processes false
--showShell Show shell for the child processes false
--printUsage Print argument descriptions false

Automatic restart

The launcher will automatically restart the processing in the following two cases:
1. When the spawned process unexpectedly exits with a non-zero error code.
2. When changes are made to the platform configuration file

REST interface

See REST interface documentation

HTTP server

The launcher will serve the frontend of web applications from the ./web subfolder. Therefore, if it is run from the default location (in the root of stanag2WebRtc), it will serve the frontend, enabling the incorporation of multiple stanag2WebRTC services (multiple channels) into a single web page.

TSRecorder License

To activate the license for a TsRecorder, it is necessary to follow a simple procedure by copying two essential files into the tsrecorder folder. The files that need to be copied are identified by their specific extensions: .lic and .Key.txt. These files contain information that enables the software to validate and authenticate the license. By placing these files within the tsrecorder folder, the software can access the necessary license details, allowing it to function properly and grant users the full benefits and features associated with the licensed version.

Note that this license is different from the STANAG2WebRTC license.

Log file

The launcher stores the log information in the ./log/s2wlauncher.log file

Troubleshooting and Support

If you encounter any issues while using the Launcher Application or have any questions, consider the following resources:

  • Review the Launcher Application documentation for detailed instructions and troubleshooting information.

  • Set --showChildProcessesOutput or --showShell option to true and inspect the debugging information in the consoles

  • Reach out to the support channels provided by the Launcher Application developer for assistance.

By leveraging the Launcher Application, you can easily manage and orchestrate services, ensuring their availability and stability. With its automatic restart capability and remote control functionality, the Launcher simplifies the process of managing services across multiple platforms and channels.