The tms_ctl utility
tms_ctl is a single command line utility for installing, upgrading and maintaining the TVIP TMS platform. It is part of the tvip-tms-standalone package and is installed in /usr/bin/tms_ctl.
All commands must be run with root (sudo) privileges. A lock file /var/run/tms_ctl.lock is created while the command is running - running two commands in parallel will cause an error.
Show the installed version:
tms_ctl --version
Command help can be displayed with either tms_ctl --help or tms_ctl help.
List of commands
Command |
Description |
|---|---|
|
Complete platform installation. Read more: installation. |
|
Updating installed services. Read more: update. |
|
Install the optional service (see below). |
|
Start/stop all installed TMS services. |
|
Enable/disable autorun of TMS services. |
|
Creating a backup. Read more: backup. |
|
Restore from backup. Read more: restore. |
|
Search setup (Elasticsearch). Read more: search. |
|
Enable/disable debug logging for a service (see below). |
|
Enable/disable VOD functionality (see below). |
Service management
After installation, all platform services start automatically and are added to autostart. The commands below are required for typical maintenance operations - for example, when the server is stopped for routine maintenance.
Starts all installed TMS services:
sudo tms_ctl start-all-services
Stop all installed TMS services:
sudo tms_ctl stop-all-services
Note
The commands find services automatically - all installed manager-tvip-* and gateway-tvip-* packages are detected, as well as tms-web-player if present. The services are started in the order specified in the configuration and stopped in reverse order.
Enable autostart for all TMS services:
sudo tms_ctl enable-services-autostart
Disable autostart for all TMS services:
sudo tms_ctl disable-services-autostart
Installation of additional services
The platform includes services that are put on-demand:
Service |
Description |
|---|---|
|
Web player for watching TV and VOD from your browser. |
Install a service by name:
sudo tms_ctl add-service <service-name>
Without an argument, the command displays an interactive menu with the services available for installation:
sudo tms_ctl add-service
Search setup
The setup-search command sets up the search service: it installs Elasticsearch on the current server or connects TMS to an existing Elasticsearch on another server:
sudo tms_ctl setup-search
The command works interactively: it asks for the Elasticsearch user password, the memory limit (2 GB by default) and the maximum number of shards (5000 by default), then configures Elasticsearch, writes the connection parameters to the search manager configuration and restarts the manager-tvip-tms-search service.
To prepare a separate server for Elasticsearch, use the --prepare-db flag:
sudo tms_ctl setup-search --prepare-db
Diagnostics of the current search configuration and connectivity to Elasticsearch (makes no changes):
sudo tms_ctl setup-search doctor
Read more: search.
Debug logging
The enable-logging and disable-logging commands enable and disable debug logging for the specified TMS service:
sudo tms_ctl enable-logging <service-name>
sudo tms_ctl disable-logging <service-name>
The service name can be abbreviated - a unique part is enough (for example, vod instead of manager-tvip-tms-vod). The change is applied to the service configuration and takes effect after its restart, which the command performs automatically after confirmation.
VOD management
The enable-vod and disable-vod commands enable and disable the VOD functionality in the gateway-tvip-tms-tvip-api gateway:
sudo tms_ctl enable-vod
sudo tms_ctl disable-vod
The change takes effect after the gateway restarts, which the command performs automatically after confirmation.