Skip to content

Commit

Permalink
feat: prepare for libretime v4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jooola committed Dec 29, 2023
1 parent 44f9073 commit 838071c
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 5 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ See the `defaults/main.yml` file for details.

- `libretime_public_url` defines the public url used to access Libretime. This variable **MUST** be updated.
- `libretime_api_key` define the api key. This variable **MUST** be updated.
- `libretime_secret_key` define the secret key. This variable **MUST** be updated.

- `libretime_config_template` defines the path to your configuration template file. This variable **SHOULD** be updated. This is used to let you deploy your own configuration file, you can find an example in `templates/libretime/config.yml.j2`.

Expand Down Expand Up @@ -51,7 +52,8 @@ See the `requirements.yml` file for details.
- role: libretime
libretime_public_url: https://station.radio.org
libretime_listen_port: 8080
libretime_api_key: a182_your_secret_key_c87f
libretime_api_key: LutEXJfHC1iOdXbVd4LjA3jX0ZVvwBGJCYF6AUVh
libretime_secret_key: h4H2uMLGZoksbzcQECs2nhBwDW16vnWEfPEVao8q
libretime_icecast_admin_password: 0fd9ba81394a91cd178514e3c6788052
libretime_icecast_source_password: ee41c264d954b92fce44521e02663d89
libretime_icecast_relay_password: 9702d35f24d77ce8cb2da75ab2298654
Expand Down
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ libretime_public_url: "http://localhost:{{ libretime_listen_port }}/"
libretime_api_key: "{{ libretime_legacy_api_key | default('hackme') }}"

libretime_user: libretime
libretime_listen_port: 80
libretime_listen_port: 8080
libretime_max_upload_size: 512M

libretime_checkout_url: https://github.com/libretime/libretime
Expand Down
4 changes: 4 additions & 0 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ provisioner:
instance1:
libretime_public_url: http://localhost:{{ libretime_listen_port }}/
libretime_listen_port: 9001
libretime_api_key: hackme
libretime_secret_key: hackme
libretime_playout_pip_extras: [sentry]
libretime_playout_systemd_override: |
[Service]
Environment=LIBRETIME_LOG_LEVEL=debug
instance2:
libretime_public_url: http://localhost:{{ libretime_listen_port }}/
libretime_listen_port: 9002
libretime_api_key: hackme
libretime_secret_key: hackme

verifier:
name: testinfra
32 changes: 30 additions & 2 deletions templates/libretime/config.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ general:
# The internal API authentication key.
# > this field is REQUIRED
api_key: {{ libretime_api_key }}
# The Django API secret key.
# > this field is REQUIRED
secret_key: {{ libretime_secret_key }}

# List of origins allowed to access resources on the server, the public url
# origin is automatically included.
Expand Down Expand Up @@ -103,6 +106,13 @@ liquidsoap:
# > default is ["0.0.0.0"]
harbor_listen_address: ["0.0.0.0"]

# Input harbor tls certificate path.
harbor_ssl_certificate:
# Input harbor tls certificate private key path.
harbor_ssl_private_key:
# Input harbor tls certificate password.
harbor_ssl_password:

stream:
# Inputs sources.
inputs:
Expand All @@ -117,6 +127,9 @@ stream:
# Listen port for the main harbor input.
# > default is 8001
port: 8001
# Whether the input harbor is secured with the tls certificate.
# > default is false
secure: false

# Show harbor input.
show:
Expand All @@ -129,6 +142,9 @@ stream:
# Listen port for the show harbor input.
# > default is 8002
port: 8002
# Whether the input harbor is secured with the tls certificate.
# > default is false
secure: false

# Output streams.
outputs:
Expand Down Expand Up @@ -216,6 +232,10 @@ stream:
# Icecast stream genre.
genre: various

# Whether the stream should be used for mobile devices.
# > default is false
mobile: false

# Shoutcast output streams.
# > max items is 1
shoutcast:
Expand Down Expand Up @@ -261,6 +281,10 @@ stream:
# Shoutcast stream genre.
genre: various

# Whether the stream should be used for mobile devices.
# > default is false
mobile: false

# System outputs.
# > max items is 1
system:
Expand All @@ -269,5 +293,9 @@ stream:
enabled: false
# System output kind.
# > must be one of (alsa, ao, oss, portaudio, pulseaudio)
# > default is alsa
kind: alsa
# > default is pulseaudio
kind: pulseaudio

# System output device.
# > only available for kind=(alsa, pulseaudio)
device:
2 changes: 1 addition & 1 deletion templates/systemd/libretime-api.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Type=notify
KillMode=mixed
ExecStart={{ libretime_venv_dir }}/bin/gunicorn \
--workers 4 \
--worker-class uvicorn.workers.UvicornWorker \
--worker-class libretime_api.gunicorn.Worker \
--log-file - \
--bind unix:/run/libretime-api.sock \
libretime_api.asgi
Expand Down

0 comments on commit 838071c

Please sign in to comment.