feat(playout): allow harbor ssl configuration

This commit is contained in:
jo 2023-03-30 20:39:02 +02:00 committed by Kyle Robbertze
parent 8764feded9
commit b2fc3a5ecf
17 changed files with 248 additions and 13 deletions

View file

@ -8,8 +8,10 @@
# Inputs
input_main_mount = "main"
input_main_port = 8001
input_main_secure = false
input_show_mount = "show"
input_show_port = 8002
input_show_secure = false
# Settings
set("log.file.path", "/var/log/radio.log")
@ -43,8 +45,50 @@
# Inputs
input_main_mount = "main"
input_main_port = 8001
input_main_secure = false
input_show_mount = "show"
input_show_port = 8002
input_show_secure = false
# Settings
set("log.file.path", "/var/log/radio.log")
set("server.telnet", true)
set("server.telnet.bind_addr", "127.0.0.1")
set("server.telnet.port", 1234)
set("harbor.bind_addrs", ["0.0.0.0"])
set("harbor.ssl.certificate", "/fake/ssl.cert")
set("harbor.ssl.private_key", "/fake/ssl.key")
station_name = interactive.string("station_name", "LibreTime")
message_offline = interactive.string("message_offline", "LibreTime - offline")
message_format = interactive.string("message_format", "0")
input_fade_transition = interactive.float("input_fade_transition", 0.0)
%include "/fake/1.4/ls_script.liq"
gateway("started")
'''
# ---
# name: test_generate_entrypoint[stream_config2-1.4]
'''
# THIS FILE IS AUTO GENERATED. PLEASE DO NOT EDIT!
###########################################################
# The ignore() lines are to squash unused variable warnings
# Inputs
input_main_mount = "main"
input_main_port = 8001
input_main_secure = false
input_show_mount = "show"
input_show_port = 8002
input_show_secure = false
# Settings
set("log.file.path", "/var/log/radio.log")
@ -94,7 +138,7 @@
'''
# ---
# name: test_generate_entrypoint[stream_config2-1.4]
# name: test_generate_entrypoint[stream_config3-1.4]
'''
# THIS FILE IS AUTO GENERATED. PLEASE DO NOT EDIT!
###########################################################
@ -103,8 +147,10 @@
# Inputs
input_main_mount = "main"
input_main_port = 8001
input_main_secure = false
input_show_mount = "show"
input_show_port = 8002
input_show_secure = false
# Settings
set("log.file.path", "/var/log/radio.log")
@ -150,7 +196,7 @@
'''
# ---
# name: test_generate_entrypoint[stream_config3-1.4]
# name: test_generate_entrypoint[stream_config4-1.4]
'''
# THIS FILE IS AUTO GENERATED. PLEASE DO NOT EDIT!
###########################################################
@ -159,8 +205,10 @@
# Inputs
input_main_mount = "main"
input_main_port = 8001
input_main_secure = false
input_show_mount = "show"
input_show_port = 8002
input_show_secure = false
# Settings
set("log.file.path", "/var/log/radio.log")
@ -231,7 +279,7 @@
'''
# ---
# name: test_generate_entrypoint[stream_config4-1.4]
# name: test_generate_entrypoint[stream_config5-1.4]
'''
# THIS FILE IS AUTO GENERATED. PLEASE DO NOT EDIT!
###########################################################
@ -240,8 +288,10 @@
# Inputs
input_main_mount = "main"
input_main_port = 8001
input_main_secure = false
input_show_mount = "show"
input_show_port = 8002
input_show_secure = false
# Settings
set("log.file.path", "/var/log/radio.log")
@ -274,7 +324,7 @@
'''
# ---
# name: test_generate_entrypoint[stream_config5-1.4]
# name: test_generate_entrypoint[stream_config6-1.4]
'''
# THIS FILE IS AUTO GENERATED. PLEASE DO NOT EDIT!
###########################################################
@ -283,8 +333,10 @@
# Inputs
input_main_mount = "main"
input_main_port = 8001
input_main_secure = false
input_show_mount = "show"
input_show_port = 8002
input_show_secure = false
# Settings
set("log.file.path", "/var/log/radio.log")

View file

@ -3,20 +3,33 @@ from typing import List
from libretime_playout.config import Config
def make_config_with_stream(**kwargs) -> Config:
def make_config(**kwargs) -> Config:
return Config(
**{
"general": {
"public_url": "http://localhost:8080",
"api_key": "some_api_key",
},
"stream": kwargs,
**kwargs,
}
)
def make_config_with_stream(**kwargs) -> Config:
return make_config(stream=kwargs)
TEST_STREAM_CONFIGS: List[Config] = [
make_config_with_stream(),
make_config(),
make_config(
liquidsoap={
"harbor_ssl_certificate": "/fake/ssl.cert",
"harbor_ssl_private_key": "/fake/ssl.key",
},
stream={
"system": [{"enabled": True, "kind": "pulseaudio"}],
},
),
make_config_with_stream(
outputs={
"icecast": [