chore: release 3.0.0-beta.0

This commit is contained in:
jo 2022-09-13 21:10:43 +02:00 committed by Jonas L
parent a79980e65f
commit bdc2e92454
129 changed files with 1286 additions and 538 deletions

View File

@ -25,7 +25,7 @@ jobs:
- name: Create Release - name: Create Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
with: with:
body_path: docs/releases/3.0.0-alpha.13.md body_path: docs/releases/3.0.0-beta.0.md
draft: true draft: true
prerelease: true prerelease: true
files: libretime-*.tar.gz files: libretime-*.tar.gz

View File

@ -2,7 +2,7 @@ from setuptools import find_packages, setup
setup( setup(
name="libretime-analyzer", name="libretime-analyzer",
version="3.0.0-alpha.13", version="3.0.0-beta.0",
description="Libretime Analyzer", description="Libretime Analyzer",
author="LibreTime Contributors", author="LibreTime Contributors",
url="https://github.com/libretime/libretime", url="https://github.com/libretime/libretime",

View File

@ -2,7 +2,7 @@ from setuptools import find_packages, setup
setup( setup(
name="libretime-api-client", name="libretime-api-client",
version="3.0.0-alpha.13", version="3.0.0-beta.0",
description="LibreTime API Client", description="LibreTime API Client",
author="LibreTime Contributors", author="LibreTime Contributors",
url="https://github.com/libretime/libretime", url="https://github.com/libretime/libretime",

View File

@ -2,7 +2,7 @@ from setuptools import find_packages, setup
setup( setup(
name="libretime-api", name="libretime-api",
version="3.0.0-alpha.13", version="3.0.0-beta.0",
description="LibreTime API", description="LibreTime API",
author="LibreTime Contributors", author="LibreTime Contributors",
url="https://github.com/libretime/libretime", url="https://github.com/libretime/libretime",

View File

@ -0,0 +1,188 @@
---
title: LibreTime 3.0.0 beta 0
---
import ReleaseHead from './\_release-head.md';
<ReleaseHead date='2022-09-16' version='3.0.0-beta.0'/>
## :sparkling_heart: Contributors
The LibreTime project wants to thank the following contributors for authoring PRs to this release:
- @jooola
- @paddatrapper
- Milo Ivir
## :rocket: Features
- **playout:** use liquidsoap version functions
- **playout:** replace pytz with zoneinfo ([#1969](https://github.com/libretime/libretime/issues/1969))
- **installer:** remove allow-restart flag ([#1970](https://github.com/libretime/libretime/issues/1970))
- rename AirtimeApiClient to ApiClient
- **playout:** use single clients instance ([#1980](https://github.com/libretime/libretime/issues/1980))
- **api:** don't use trailing slashes ([#1982](https://github.com/libretime/libretime/issues/1982))
- **api:** cast StreamSetting raw_value to value ([#1991](https://github.com/libretime/libretime/issues/1991))
- **worker:** load callback details from config ([#1994](https://github.com/libretime/libretime/issues/1994))
- **analyzer:** load callback details from config and file_id ([#1993](https://github.com/libretime/libretime/issues/1993))
- **api-client:** rewrite api-client v2
- **playout:** integrate api-client v2 calls
- **api:** don't use hyperlinked serializers ([#1984](https://github.com/libretime/libretime/issues/1984))
- **shared:** load env config using jsonschema
- **installer:** use ed for config update ([#2013](https://github.com/libretime/libretime/issues/2013))
- move off_air_meta stream setting to pref table ([#2023](https://github.com/libretime/libretime/issues/2023))
- move stream liquisoap status to pref table
- move stream stats status to pref table
- **analyzer:** override paths using env variables
- **playout:** rewrite stats collector ([#2028](https://github.com/libretime/libretime/issues/2028))
- **legacy:** setup config schema validation
- **legacy:** add config dot notation access
- **shared:** pass config data via init ([#2042](https://github.com/libretime/libretime/issues/2042))
- **playout:** create liquidsoap client
- **playout:** integrate new liquisoap client
- **worker:** rename service and package to libretime-worker ([#2065](https://github.com/libretime/libretime/issues/2065))
- **playout:** improve generate\_\*\_events ([#2088](https://github.com/libretime/libretime/issues/2088))
- **api:** remove set passwords command
- remove cc_stream_setting models
- **installer:** deploy stream config
- **legacy:** read stream config from file
- **api:** add /info and /stream/\* endpoints
- **shared:** create stream config models
- **playout:** build liquidsoap entrypoint with stream config
- **playout:** stats collector using stream config
- **playout:** allow updating message_offline value
- **playout:** remove stream_setting update handler
- **playout:** liquidsoap bootstrap using new api endpoints
- **playout:** allow liquidsoap listen address configuration
- **api:** move /api-auth to /api/browser ([#2094](https://github.com/libretime/libretime/issues/2094))
- add container setup
- move timezone preference to config file ([#2096](https://github.com/libretime/libretime/issues/2096))
- **playout:** move message handling to main thread
## :bug: Bug fixes
- **api-client:** get status_code from response
- **analyzer:** remove outdated urllib3 workaround
- **api-client:** fix base_url joining for client v2 ([#1998](https://github.com/libretime/libretime/issues/1998))
- **api:** update set_icecast_passwords StreamSetting fields ([#2001](https://github.com/libretime/libretime/issues/2001))
- **legacy:** get local logo file ([#1999](https://github.com/libretime/libretime/issues/1999))
- **installer:** clean legacy files before copying ([#2002](https://github.com/libretime/libretime/issues/2002))
- **legacy:** sanitize track_type_id when updating file ([#2003](https://github.com/libretime/libretime/issues/2003))
- **shared:** validator value type can be wrong
- **shared:** remove unused field from rabbitmq config ([#2012](https://github.com/libretime/libretime/issues/2012))
- **playout:** replace deprecated harbor.bind_addr ([#2025](https://github.com/libretime/libretime/issues/2025))
- **legacy:** do not rely on undefined SERVER_NAME ([#2031](https://github.com/libretime/libretime/issues/2031))
- **api-client:** remove unused v1 methods
- **playout:** use stream download when fetching files ([#2048](https://github.com/libretime/libretime/issues/2048))
- **playout:** add thread names ([#2056](https://github.com/libretime/libretime/issues/2056))
- **legacy:** args comma syntax error
- **legacy:** 404 on listeners stats
- **deps:** update dependency mdx-mermaid to v1.3.0 [security]
- **playout:** py36 compatibility broken typings
- **playout:** py39 compatibility zoneinfo import
- **api:** install gunicorn from pip for bionic
- **installer:** only upgrade pip packages if needed
- **installer:** fix compatibility with bionic
- **legacy:** look in /legacy for a VERSION file
- **playout:** missing live show events ([#2087](https://github.com/libretime/libretime/issues/2087))
- **legacy:** config default values are not sanitized
- **installer:** add liquidsoap config section
- **installer:** move non reusable fields from default output
- **legacy:** consistent with docs in outputs public_url generation
- **playout:** also shutdown on SIGTERM ([#2104](https://github.com/libretime/libretime/issues/2104))
- **installer:** simplify distro support notice ([#2106](https://github.com/libretime/libretime/issues/2106))
- **shared:** install tzdata distributions package ([#2105](https://github.com/libretime/libretime/issues/2105))
- **installer:** config dir should be read only
- **installer:** config should not be world readable
- **legacy:** track_type_id should cast to int not text ([#2112](https://github.com/libretime/libretime/issues/2112))
- **worker:** rewrite podcast download task
- **shared:** load env from oneOf union schema
- **deps:** update dependency friendsofphp/php-cs-fixer to <3.11.1
- nginx depends on legacy in docker-compose ([#2147](https://github.com/libretime/libretime/issues/2147))
- **playout:** remove shutdown_handler
## :fire: Deprecation and removal
### Ubuntu Bionic support deprecation
Support for Ubuntu Bionic is being deprecated, and will be removed in LibreTime v3.1.0. Maintenance only versions (3.0.x) for Ubuntu Bionic will be provided until the distribution release reaches its end of life. Please see the [supported distributions release policy](../developer-manual/development/releases.md#distributions-releases-support) for details.
Along with the Ubuntu Bionic deprecation, the following dependencies versions are also being deprecated:
- [liquidsoap 1.1.1](https://packages.ubuntu.com/bionic/liquidsoap)
- [php7.2](https://packages.ubuntu.com/bionic/php7.2)
- [python3.6](https://packages.ubuntu.com/bionic/python3)
### Debian Buster support deprecation
Support for Debian Buster is being deprecated, and will be removed in LibreTime v3.1.0. Maintenance only versions (3.0.x) for Debian Buster will be provided until the distribution release reaches its end of life. Please see the [supported distributions release policy](../developer-manual/development/releases.md#distributions-releases-support) for details.
Along with the Debian Buster deprecation, the following dependencies versions are also being deprecated:
- [liquidsoap 1.3.3](https://packages.debian.org/buster/liquidsoap)
- [php7.3](https://packages.debian.org/buster/php7.3)
- [python3.7](https://packages.debian.org/buster/python3)
## :arrow_up: Before upgrading
:::caution
Please follow this **before the upgrade procedure**!
:::
### File based stream configuration
The stream configuration moved from the database to the [configuration](../admin-manual/setup/configuration.md#stream) file. A configuration sample can be found in the project folder under `installer/config.yml`. Make sure to save your existing stream config to the configuration file.
:::info
To prevent accidental data loss during upgrade, the stream configuration data will only be removed from the database in future releases. You can view the data using the following commands:
```bash
sudo -u libretime libretime-api dbshell --command="
SELECT *
FROM cc_stream_setting
ORDER BY keyname;"
sudo -u libretime libretime-api dbshell --command="
SELECT *
FROM cc_pref
WHERE keystr IN (
'default_icecast_password',
'default_stream_mount_point',
'live_dj_connection_url_override',
'live_dj_source_connection_url',
'master_dj_connection_url_override',
'master_dj_source_connection_url'
)
ORDER BY keystr;"
```
:::
### Timezone configuration
The timezone preference moved from the database to the [configuration](../admin-manual/setup/configuration.md#general) file. Make sure to save your existing timezone preference to the configuration file.
:::info
To prevent accidental data loss during upgrade, the timezone preference will only be removed from the database in future releases. You can view the data using the following commands:
```bash
sudo -u libretime libretime-api dbshell --command="SELECT * FROM cc_pref WHERE keystr = 'timezone'";
```
:::
### Worker python package and service
The `libretime-celery` python package and service was renamed to `libretime-worker`. Make sure to remove the old python package and service using the following command:
```bash
sudo pip3 uninstall libretime-celery
sudo rm -f \
/etc/systemd/system/libretime-celery.service \
/usr/lib/systemd/system/libretime-celery.service
```

View File

@ -16,26 +16,6 @@ The LibreTime project wants to thank the following contributors for authoring PR
## :fire: Deprecation and removal ## :fire: Deprecation and removal
### Ubuntu Bionic support deprecation
Support for Ubuntu Bionic is being deprecated, and will be removed in LibreTime v3.1.0. Maintenance only versions (3.0.x) for Ubuntu Bionic will be provided until the distribution release reaches its end of life. Please see the [supported distributions release policy](../developer-manual/development/releases.md#distributions-releases-support) for details.
Along with the Ubuntu Bionic deprecation, the following dependencies versions are also being deprecated:
- [liquidsoap 1.1.1](https://packages.ubuntu.com/bionic/liquidsoap)
- [php7.2](https://packages.ubuntu.com/bionic/php7.2)
- [python3.6](https://packages.ubuntu.com/bionic/python3)
### Debian Buster support deprecation
Support for Debian Buster is being deprecated, and will be removed in LibreTime v3.1.0. Maintenance only versions (3.0.x) for Debian Buster will be provided until the distribution release reaches its end of life. Please see the [supported distributions release policy](../developer-manual/development/releases.md#distributions-releases-support) for details.
Along with the Debian Buster deprecation, the following dependencies versions are also being deprecated:
- [liquidsoap 1.3.3](https://packages.debian.org/buster/liquidsoap)
- [php7.3](https://packages.debian.org/buster/php7.3)
- [python3.7](https://packages.debian.org/buster/python3)
## :arrow_up: Before upgrading ## :arrow_up: Before upgrading
:::caution :::caution
@ -44,64 +24,8 @@ Please follow this **before the upgrade procedure**!
::: :::
### File based stream configuration
The stream configuration moved from the database to the [configuration](../admin-manual/setup/configuration.md#stream) file. A configuration sample can be found in the project folder under `installer/config.yml`. Make sure to save your existing stream config to the configuration file.
:::info
To prevent accidental data loss during upgrade, the stream configuration data will only be removed from the database in future releases. You can view the data using the following commands:
```bash
sudo -u libretime libretime-api dbshell --command="
SELECT *
FROM cc_stream_setting
ORDER BY keyname;"
sudo -u libretime libretime-api dbshell --command="
SELECT *
FROM cc_pref
WHERE keystr IN (
'default_icecast_password',
'default_stream_mount_point',
'live_dj_connection_url_override',
'live_dj_source_connection_url',
'master_dj_connection_url_override',
'master_dj_source_connection_url'
)
ORDER BY keystr;"
```
:::
### Timezone configuration
The timezone preference moved from the database to the [configuration](../admin-manual/setup/configuration.md#general) file. Make sure to save your existing timezone preference to the configuration file.
:::info
To prevent accidental data loss during upgrade, the timezone preference will only be removed from the database in future releases. You can view the data using the following commands:
```bash
sudo -u libretime libretime-api dbshell --command="SELECT * FROM cc_pref WHERE keystr = 'timezone'";
```
:::
## :arrow_up: Upgrading ## :arrow_up: Upgrading
### Worker python package and service
The `libretime-celery` python package and service was renamed to `libretime-worker`. Make sure to remove the old python package and service using the following command:
```bash
sudo pip3 uninstall libretime-celery
sudo rm -f \
/etc/systemd/system/libretime-celery.service \
/usr/lib/systemd/system/libretime-celery.service
```
## :warning: Known issues ## :warning: Known issues
The following issues may need a workaround for the time being. Please search the [issues](https://github.com/libretime/libretime/issues) before reporting problems not listed below. The following issues may need a workaround for the time being. Please search the [issues](https://github.com/libretime/libretime/issues) before reporting problems not listed below.

View File

@ -2,7 +2,7 @@ from setuptools import find_packages, setup
setup( setup(
name="libretime-playout", name="libretime-playout",
version="3.0.0-alpha.13", version="3.0.0-beta.0",
description="LibreTime Playout", description="LibreTime Playout",
author="LibreTime Contributors", author="LibreTime Contributors",
url="https://github.com/libretime/libretime", url="https://github.com/libretime/libretime",

View File

@ -2,7 +2,7 @@ from setuptools import find_packages, setup
setup( setup(
name="libretime-shared", name="libretime-shared",
version="3.0.0-alpha.13", version="3.0.0-beta.0",
description="LibreTime Shared", description="LibreTime Shared",
url="https://github.com/libretime/libretime", url="https://github.com/libretime/libretime",
author="LibreTime Contributors", author="LibreTime Contributors",

View File

@ -1,7 +1,7 @@
module.exports = { module.exports = {
title: "LibreTime", title: "LibreTime",
description: "Radio Broadcast & Automation Platform", description: "Radio Broadcast & Automation Platform",
version: "3.0.0-alpha.13", version: "3.0.0-beta.0",
website: "https://libretime.org", website: "https://libretime.org",
repository: { repository: {
@ -22,7 +22,7 @@ module.exports = {
home: { home: {
links: [ links: [
{ label: "Get started 🚀", to: "/docs/admin-manual" }, { label: "Get started 🚀", to: "/docs/admin-manual" },
{ label: "Release note", to: "/docs/releases/3.0.0-alpha.13" }, { label: "Release note", to: "/docs/releases/3.0.0-beta.0" },
], ],
}, },

View File

@ -1,41 +0,0 @@
---
title: Modifying the LibreTime interface
---
The LibreTime administration interface, as a web application, is fully customizable using the same methods that you might use to modify a website. For instance, you may wish to increase certain font sizes or change the colours in the LibreTime interface to better suit staff users with impaired vision. To do so, open one of the CSS files in the `/public/css/` directory under the LibreTime _DocumentRoot_ directory in an editor such as `nano`:
```bash
sudo nano /usr/share/airtime/public/css/styles.css
```
To change the background colour of the administration interface from dark gray to white, the _background:_ property of the body tag could be changed to `#ffffff` as follows:
```css
body {
font-size: 62.5%;
font-family: Arial, Helvetica, sans-serif;
background: #ffffff;
margin: 0;
padding: 0;
}
```
Save the file with **Ctrl+S**, then refresh your browser to see the change to the interface background colour.
Any custom changes that you make to the administration interface should be backed up before upgrading LibreTime to a newer version, otherwise they could be overwritten. If you have made improvements that you think might be useful to other LibreTime users, please contact LibreTime and tell us about them.
# Modifying the Icecast interface
If you have installed Icecast, in the directory `/etc/icecast2/web/` you will find several XSLT and other files which are used to generate the Icecast web interface. If you are familiar with HTML you should be able to modify these pages, as they're well commented. You do have to be careful with syntax, because something as simple as a missing bracket can cause the Icecast web interface to break down.
For example, you could change the `status.xsl` page:
```bash
sudo nano /etc/icecast2/web/status.xsl
```
Modifying the `status.xsl` page is a good place to start, because this is the default page that site visitors see when they browse port 8000 on your Icecast server. The most obvious change to make in the XSLT pages is the content of the _&lt;title&gt;_ and _&lt;h2&gt;_ tags, to announce the name of your station. You can also modify the `style.css` file in this directory to change colour and layout options.
After saving the file with Ctrl+O, refresh your web browser, and the new look should now be visible.
![](/img/Screenshot177-Icecast_rocks.png)

View File

@ -1,59 +0,0 @@
---
title: Interface localization
---
The LibreTime administration interface can be localized using the standard GNU **gettext** method. Using GitHub for this task means you don't have to tackle the whole of a localization yourself; just as much as you can manage.
![](/img/Screenshot464-Korean_stream_setting.png)
First, you should check if a localization is already under way for your locale of choice. The best way to do this is to take a look at the 'main' branch in the GitHub repository for LibreTime at https://github.com/libretime/libretime. You can also ask in the LibreTime development forum at https://discourse.libretime.org/, where you might find community members who can help you with the translation.
GNU **gettext** means using a .po file for each language or dialect, a specially formatted plain text file with groups of three or more lines, like this example from LibreTime's Korean localization:
```
#: legacy/application/configs/navigation.php:57
msgid "Media Folders"
msgstr "미디어 폴더"
```
The first of these three lines starts with the hash symbol, and references where this string of text is found in the source code by its file name and line number. If this string is found more than once in the source code, you will see other reference lines here. The second line contains the **msgid**, which is the original version of the string. The third line contains the **msgstr**, which is the translation of that string for the localization that this particular .po file relates to.
If you use the cross-platform program **Poedit** (https://www.poedit.net/) to edit the .po file, this formatting of the text is hidden by an easy-to-use GUI. The _poedit_ package can be installed on most GNU/Linux distributions using the standard software installer. Versions of Poedit for Mac and Windows are available for free download from the project's homepage.
Before manually translating strings in Poedit from scratch, you should take a look at the online translation services available, such as Lingohub (https://lingohub.com), which both support gettext .po files. If using automatic translation, you can then use Poedit to fine-tune the localization and fix any formatting errors.
If you don't already have a GitHub account, you can sign up at https://github.com/signup/free. Once you have a GitHub account, you can fork a copy (https://help.github.com/articles/fork-a-repo) of the LibreTime project. Work for the next major version of the software is done in the **main** branch of each project, so that's the branch to **checkout** after you have made the initial **git clone**.
In the locale code _de_CH_, for example, _de_ represents the German language and the suffix _\_CH_ indicates the dialect spoken in Switzerland. Some languages have a wide variety of dialect localizations, which can be differentiated with a suffix in this way. You should update the header information in the .po file, which includes the language code and a country code, using one of the existing .po files as a guide.
After forking the LibreTime git repository, make sure you're in the **main** branch:
```bash
git branch
devel
* main
```
Create a new locale directory (e.g. `legacy/locale/de_CH/LC_MESSAGES/` for German as spoken in Switzerland):
```bash
mkdir -p legacy/locale/de_CH/LC_MESSAGES/
```
Copy the template `airtime.po` file into the directory you just created:
```bash
cp legacy_locale/template/airtime.po legacy/locale/de_CH/LC_MESSAGES
```
and update the header information in the new copy of the `airtime.po` file using the **nano** editor:
```bash
nano legacy/locale/de_CH/LC_MESSAGES/airtime.po
```
After using an online translation tool to begin a new localization, you can load the exported .po file into Poedit and complete your translation there. Enter the localization team's contact information and language into Poedit's **Edit -&gt; Preferences** and **Catalog -&gt; Settings** dialogs, which will be added to the .po file. When you save a .po file in Poedit, the corresponding binary .mo file will be compiled automatically.
Finally, **git add**, **git commit** and **git push** these new .mo and .po files to your GitHub fork of the project, and send a git pull request (https://help.github.com/articles/using-pull-requests) to the LibreTime developers. The localization can then be added to a forthcoming LibreTime release.
If you don't want to work with git, that's no problem - download a copy of the .po template file, edit the header, run it through an automatic translator and check it with Poedit. Then email your contribution to the LibreTime team as an attachment - it will be very welcome! However, learning to use git is a good idea, because it means you can work directly on the current source code, share the localization work with the LibreTime community, and avoid duplicated effort.

View File

@ -1,26 +0,0 @@
---
title: Built-in microsite
---
![](/img/radio-page.png)
LibreTime includes a microsite, which can be accessed at _serverIP_ or a domain you've set up for your server. The site includes your
logo and station description (set under Settings > General), the login button to the LibreTime interface, the schedule for the next seven days,
podcast tabs, and a live feed of your station with information on the currently playing artist and track.
## Modifying the LibreTime radio page
The background of the mini-site that appears when you visit the server's domain in your web browser can be changed by modifying the page's CSS file, located at `/usr/share/airtime/php/legacy/public/css/radio-page/radio-page.css`.
```css
html {
background: url("img/background-testing-3.jpg") no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
overflow-y: auto;
}
```
Place the new background image in the `/usr/share/airtime/php/legacy/public/css/radio-page/img/` folder and change the `background:` entry's URL to point to the new image. The new image should be at least 1280 x 720 in pixel size to avoid being blurry.

View File

@ -1,56 +0,0 @@
---
title: Backup
sidebar_position: 10
---
## Create a backup
This guide walk you though the steps required to create a full backup of your installation.
:::info
Remember to **automate** and **test** the backup process and to have it run regularly. Having an **automated** and **tested** restoring process is also recommended.
:::
:::caution
Feel free to pick the backup software of your choice, but know that rsync and similar tools are not backup tools. You could use [restic](https://restic.net/) or [borg](https://borgbackup.readthedocs.io/).
:::
### Backup the configuration
On common setups, you need to backup the entire `/etc/libretime` folder.
### Backup the database
You need to backup the PostgreSQL database, which holds the entire data of your installation.
Here is an example to dump your PostgreSQL database:
```bash
sudo -u postgres pg_dump --file=libretime.sql libretime
```
Please read the `pg_dump` usage for additional details.
### Backup the storage
You need to backup the entire file storage, which holds all the files of your installation.
The path to your storage was defined during the installation process.
## Restore a backup
### Restore the configuration
Copy the backed configuration files back to the configuration folder.
### Restore the database
:construction:
### Restore the storage
:construction:

View File

@ -1,72 +0,0 @@
---
title: Setting the server time
sidebar_position: 20
---
Accurate time keeping on your server is vital for LibreTime performance. You can confirm that the date and time of your server are set correctly with the `date` command.
The server should respond with the date, time, time zone and year in a format similar to the following example:
```
Tue Jul 2 15:08:57 BST 2013
```
If the time on your server is wrong, we strongly recommend that you take LibreTime off-air until the problem is fixed.
## Configuring NTP
Although it is possible to set the date and time of the server manually, this is not recommended because the server clock can drift over time, compromising the accuracy of your broadcast schedule. If your LibreTime server is permanently connected to the Internet, you can synchronize your server to a time server with the **ntp** program. If **ntp** is not on your server, you can install it with `sudo apt-get install ntp`.
Optionally, open the **ntp** configuration file in the **nano** editor to add further time server names:
```
sudo nano /etc/ntp.conf
```
On Ubuntu GNU/Linux, the default time server is `ntp.ubuntu.com`, but there are many other time servers available on the public Internet, including the group of servers listed at https://www.pool.ntp.org/ for each country. Using a variety of NTP servers located closely to your LibreTime server should produce the most accurate results. For example, for a server in the United Kingdom you could use the following list:
```title="/etc/ntp.conf"
# You do need to talk to an NTP server or two (or three).
server ntp.ubuntu.com
server 0.uk.pool.ntp.org
server 1.uk.pool.ntp.org
server 2.uk.pool.ntp.org
server 3.uk.pool.ntp.org
```
Enter the server names you require, press **Ctrl+O** to write out the `/etc/ntp.conf` file, then **Ctrl+X** to exit **nano**. Restart the **ntp** service with `sudo systemctl restart ntp`.
The server should respond:
```
* Stopping NTP server ntpd [ OK ]
* Starting NTP server ntpd [ OK ]
```
Then use the **ntpq -p** command to confirm that **ntp** is working. This command should produce output similar to the following:
```
ntpq -p
remote refid st t when poll reach delay offset jitter
==================================================================
europium. 193.79.237.14 2 u 28 64 3 39.571 12.600 3.590
norb.v4.c 46.227.200.72 3 u 28 64 3 47.856 -6.908 10.028
82.113.15 193.62.22.82 2 u 29 64 3 11.458 -0.513 2.629
ntppub.le 158.43.192.66 2 u 91 64 2 122.781 44.864 0.001
dns0.rmpl 195.66.241.3 2 u 27 64 3 22.171 1.464 4.242
```
## Adjusting the server time zone
The data centre which hosts your LibreTime server could be located anywhere in the world. Some servers are set to _Coordinated Universal Time_ or UTC (similar to _Greenwich Mean Time_ or GMT), regardless of their location. LibreTime uses UTC time in its database for scheduling purposes, independent of the server time zone.
Find your timezone's shortcode with `timedatectl list-timezones`, then enter
```bash
sudo timedatectl set-timezone your_time_zone
```
:::tip
You can check to see which time zone your server is set to by running `timedatectl` without any arguments.
:::

View File

@ -1,174 +0,0 @@
---
title: Configuration
sidebar_position: 20
---
To configure LibreTime, you need to edit the `/etc/libretime/config.yml` file. This page describe the available options to configure your installation.
## General
The `general` section configure anything related to the legacy and API services.
```yml
general:
# The public url, this field is REQUIRED
public_url: https://example.com
# The internal API authentication key, this field is REQUIRED
api_key: some_random_generated_secret!
# List of origins allowed to access resources on the server, default is []
# The public url origin is automatically included
allowed_cors_origins: []
# How many hours ahead Playout should cache scheduled media files, default is 1
cache_ahead_hours: 1
# Authentication adaptor to use for the legacy service, default is local
# Specify a class like LibreTime_Auth_Adaptor_FreeIpa to replace the built-in adaptor
auth: local
```
In order to apply the changes made in this section, please restart the following services:
```
libretime-api
libretime-analyzer
libretime-celery
libretime-playout
```
## Database
The `database` section configure the PostgreSQL connection.
:::caution
Before editing this section be sure to update the PostgreSQL server with the desired values.
#### Changing a PostgreSQL user password
You can change the `libretime` PostgreSQL user password using:
```bash
sudo -u postgres psql -c "ALTER USER libretime PASSWORD 'new-password';"
```
:::
```yml
database:
# The hostname of the PostgreSQL server, default is localhost
host: localhost
# The port of the PostgreSQL server, default is 5432
port: 5432
# The name of the PostgreSQL database, default is libretime
name: libretime
# The username of the PostgreSQL user, default is libretime
user: libretime
# The password of the PostgreSQL user, default is libretime
password: some_random_generated_secret!
```
In order to apply the changes made in this section, please restart the following services:
```
libretime-api
```
## RabbitMQ
The `rabbitmq` section configure the RabbitMQ connection.
:::caution
Before editing this section be sure to update the RabbitMQ server with the desired values.
#### Changing a RabbitMq user password
You can change the `libretime` RabbitMQ user password using:
```bash
sudo rabbitmqctl change_password "libretime" "new-password"
```
:::
```yml
rabbitmq:
# The hostname of the RabbitMQ server, default is localhost
host: localhost
# The port of the RabbitMQ server, default is 5672
port: 5672
# The virtual host of RabbitMQ server, default is /libretime
vhost: /libretime
# The username of the RabbitMQ user, default is libretime
user: libretime
# The password of the RabbitMQ user, default is libretime
password: some_random_generated_secret!
```
In order to apply the changes made in this section, please restart the following services:
```
libretime-api
libretime-analyzer
libretime-celery
libretime-playout
```
## Playout
The `playout` section configure anything related to the playout service.
```yml
playout:
# Liquidsoap connection host, default is localhost
liquidsoap_host: localhost
# Liquidsoap connection port, default is 1234
liquidsoap_port: 1234
# The format for recordings, allowed values are ogg,mp3, default is ogg
record_file_format: ogg
# The bitrate for recordings, default is 256
record_bitrate: 256
# The samplerate for recordings, default is 44100
record_samplerate: 44100
# The number of channels for recordings, default is 2
record_channels: 2
# The sample size for recordings, default is 16
record_sample_size: 16
```
In order to apply the changes made in this section, please restart the following services:
```
libretime-playout
```
## LDAP
The `ldap` section provide additional configuration for the authentication mechanism defined in `general.auth`, please see the [custom authentication documentation](../custom-authentication.md) for more details.
```yml
ldap:
# Hostname of LDAP server
hostname: ldap.example.org
# Complete DN of user used to bind to LDAP
binddn: "uid=libretime,cn=sysaccounts,cn=etc,dc=int,dc=example,dc=org"
# Password for binddn user
password: hackme
# Domain part of username
account_domain: INT.EXAMPLE.ORG
# Base search DN
basedn: "cn=users,cn=accounts,dc=int,dc=example,dc=org"
# Name of the uid field for searching. Usually uid, may be cn
filter_field: uid
# Map user types to LDAP groups. Assign user types based on the group of a given user
# Key format is groupmap_*
groupmap_superadmin: "cn=superadmin,cn=groups,cn=accounts,dc=int,dc=example,dc=org"
groupmap_admin: "cn=admin,cn=groups,cn=accounts,dc=int,dc=example,dc=org"
groupmap_program_manager: "cn=program_manager,cn=groups,cn=accounts,dc=int,dc=example,dc=org"
groupmap_host: "cn=host,cn=groups,cn=accounts,dc=int,dc=example,dc=org"
groupmap_guest: "cn=guest,cn=groups,cn=accounts,dc=int,dc=example,dc=org"
```

View File

@ -0,0 +1,88 @@
---
title: Backup
sidebar_position: 10
---
## Create a backup
This guide walk you though the steps required to create a full backup of your installation.
:::info
Remember to **automate** and **test** the backup process and to have it run regularly. Having an **automated** and **tested** restoring process is also recommended.
:::
:::caution
Feel free to pick the backup software of your choice, but know that rsync and similar tools are not backup tools. You could use [restic](https://restic.net/) or [borg](https://borgbackup.readthedocs.io/).
:::
### Backup the configuration
On common setups, you need to backup the entire `/etc/libretime` folder.
### Backup the database
You need to backup the PostgreSQL database, which holds the entire data of your installation.
Here is an example to dump your PostgreSQL database:
```bash
sudo -u postgres pg_dump --file=libretime.sql libretime
```
:::note
Consider using the `--no-owner` and `--no-privileges` flags to ignore roles
and permissions details about the database. This can be useful when restoring
to database or role that have different names.
:::
Please read the `pg_dump` usage for additional details.
### Backup the storage
You need to backup the entire file storage, which holds all the files of your installation.
The path to your storage is defined in the [configuration](./setup/configuration.md) file.
## Restore a backup
### Install or cleanup
If you are restoring a backup on a fresh system, we recommend that you first [install LibreTime](./setup/install.md), and **stop before the [setup tasks](./setup/install.md#setup)**.
If you are restoring a backup on an existing system, make sure to clean the old **database** and **files storage**.
### Restore the configuration
Copy the backed configuration files back to the [configuration](./setup/configuration.md) folder.
If you are upgrading LibreTime, edit the configuration file to match the new configuration schema and update any changed values. See the [configuration](./setup/configuration.md) documentation for more details.
### Restore the database
Restore the database by using the following command:
```bash
sudo -u postgres pg_restore --dbname=libretime libretime.sql
```
:::note
Consider using the `--no-owner` and `--no-privileges` flags to ignore roles
and permissions details about the database. This can be useful when restoring
to database or role that have different names.
:::
If you are upgrading LibreTime, make sure to apply the [database migration](./setup/upgrade.md#apply-migrations).
### Restore the storage
Copy the entire backed file storage back to the storage path.
The path to your storage is defined in the [configuration](./setup/configuration.md) file.

View File

@ -3,6 +3,12 @@ title: Custom authentication
sidebar_position: 40 sidebar_position: 40
--- ---
:::warning
Since LibreTime v3.0.0-alpha.13, this documentation is out of date, as it relies on the Apache2 web server and the default web server installed by LibreTime is now NGINX.
:::
## Setup FreeIPA authentication ## Setup FreeIPA authentication
You can configure LibreTime to delegate all authentication to a FreeIPA server. You can configure LibreTime to delegate all authentication to a FreeIPA server.

View File

@ -0,0 +1,479 @@
---
title: Configuration
sidebar_position: 20
---
To configure LibreTime, you need to edit the `/etc/libretime/config.yml` file. This page describe the available options to configure your installation.
Don't forget to restart the services after you made changes to the configuration file:
```
sudo systemctl restart libretime.target
```
:::tip
When upgrading, if [`yq`](https://mikefarah.gitbook.io/yq/) is installed on your system, you can easily keep your configuration file schema in sync, without losing your configuration values:
```bash
# Load your existing configuration values and merge them on top
# of the default configuration file
yq '. *= (load("/etc/libretime/config.yml") | ... comments="")' \
installer/config.yml > update-config.yml
# Check what has been updated
diff -y /etc/libretime/config.yml update-config.yml
# Move the updated configuration file in place
sudo cp update-config.yml /etc/libretime/config.yml
```
:::
## General
The `general` section configure anything related to the legacy and API services.
```yml
general:
# The public url.
# > this field is REQUIRED
public_url: "https://example.com"
# The internal API authentication key.
# > this field is REQUIRED
api_key: "some_random_generated_secret!"
# List of origins allowed to access resources on the server,
# the [general.public_url] origin is automatically included.
# > default is []
allowed_cors_origins: []
# The server timezone, should be a lookup key in the IANA time zone database,
# for example Europe/Berlin.
# > default is UTC
timezone: UTC
# How many hours ahead Playout should cache scheduled media files.
# > default is 1
cache_ahead_hours: 1
# Authentication adaptor to use for the legacy service, specify a class like
# LibreTime_Auth_Adaptor_FreeIpa to replace the built-in adaptor.
# > default is local
auth: "local"
```
## Storage
The `storage` section configure the project storage.
```yml
storage:
# Path of the storage directory.
# > default is /srv/libretime
path: "/srv/libretime"
```
## Database
The `database` section configure the PostgreSQL connection.
:::caution
Before editing this section be sure to update the PostgreSQL server with the desired values.
#### Changing a PostgreSQL user password
You can change the `libretime` PostgreSQL user password using:
```bash
sudo -u postgres psql -c "ALTER USER libretime PASSWORD 'new-password';"
```
:::
```yml
database:
# The hostname of the PostgreSQL server.
# > default is localhost
host: "localhost"
# The port of the PostgreSQL server.
# > default is 5432
port: 5432
# The name of the PostgreSQL database.
# > default is libretime
name: "libretime"
# The username of the PostgreSQL user.
# > default is libretime
user: "libretime"
# The password of the PostgreSQL user.
# > default is libretime
password: "some_random_generated_secret!"
```
## RabbitMQ
The `rabbitmq` section configure the RabbitMQ connection.
:::caution
Before editing this section be sure to update the RabbitMQ server with the desired values.
#### Changing a RabbitMq user password
You can change the `libretime` RabbitMQ user password using:
```bash
sudo rabbitmqctl change_password "libretime" "new-password"
```
:::
```yml
rabbitmq:
# The hostname of the RabbitMQ server.
# > default is localhost
host: "localhost"
# The port of the RabbitMQ server.
# > default is 5672
port: 5672
# The virtual host of RabbitMQ server.
# > default is /libretime
vhost: "/libretime"
# The username of the RabbitMQ user.
# > default is libretime
user: "libretime"
# The password of the RabbitMQ user.
# > default is libretime
password: "some_random_generated_secret!"
```
## Playout
The `playout` section configure anything related to the playout service.
:::caution
When changing the `playout.liquidsoap_*` entries, make sure to also configure the `liquidsoap.server_listen_*` entries accordingly.
:::
```yml
playout:
# Liquidsoap connection host.
# > default is localhost
liquidsoap_host: "localhost"
# Liquidsoap connection port.
# > default is 1234
liquidsoap_port: 1234
# The format for recordings.
# > must be one of (ogg, mp3)
# > default is ogg
record_file_format: ogg
# The bitrate for recordings.
# > default is 256
record_bitrate: 256
# The samplerate for recordings.
# > default is 44100
record_samplerate: 44100
# The number of channels for recordings.
# > default is 2
record_channels: 2
# The sample size for recordings.
# > default is 16
record_sample_size: 16
```
## Liquidsoap
The `liquidsoap` section configure anything related to the liquidsoap service.
:::caution
When changing the `liquidsoap.server_listen_*` entries, make sure to also configure the `playout.liquidsoap_*` entries accordingly.
:::
```yml
liquidsoap:
# Liquidsoap server listen address.
# > default is 127.0.0.1
server_listen_address: "127.0.0.1"
# Liquidsoap server listen port.
# > default is 1234
server_listen_port: 1234
# Input harbor listen address.
# > default is ["0.0.0.0"]
harbor_listen_address: ["0.0.0.0"]
```
## Stream
The `stream` section configures anything related to the input and output streams.
```yml
stream:
inputs: # See the [stream.inputs] section.
outputs: # See the [stream.outputs] section.
```
:::info
To help you simplify your stream configuration, you can use yaml anchors to define a common properties and reuse them in your output definitions:
```yml
stream:
outputs:
# This can be reused to define multiple outputs without duplicating data
.default_icecast_output: &default_icecast_output
source_password: "hackme"
admin_password: "hackme"
name: "LibreTime!"
description: "LibreTime Radio!"
website: "https://libretime.org"
genre: "various"
icecast:
- <<: *default_icecast_output
enabled: true
mount: "main.ogg"
audio:
format: "ogg"
bitrate: 256
- <<: *default_icecast_output
enabled: true
mount: "main.mp3"
audio:
format: "mp3"
bitrate: 256
```
:::
### Inputs
The `stream.inputs` section configures anything related to the input streams.
```yml
stream:
# Inputs sources.
inputs:
# Main harbor input.
main:
# Harbor input public url. If not defined, the value will be generated from
# the [general.public_url] hostname, the input port and mount.
public_url:
# Mount point for the main harbor input.
# > default is main
mount: "main"
# Listen port for the main harbor input.
# > default is 8001
port: 8001
# Show harbor input.
show:
# Harbor input public url. If not defined, the value will be generated from
# the [general.public_url] hostname, the input port and mount.
public_url:
# Mount point for the show harbor input.
# > default is show
mount: "show"
# Listen port for the show harbor input.
# > default is 8002
port: 8002
```
### Outputs
The `stream.outputs` section configures anything related to the output streams.
```yml
stream:
# Output streams.
outputs:
icecast: # See the [stream.outputs.icecast] section.
shoutcast: # See the [stream.outputs.shoutcast] section.
system: # See the [stream.outputs.system] section.
```
#### Icecast
The `stream.outputs.icecast` section configures the icecast output streams.
:::warning
If you configure more than 2 icecast stream on a **single icecast server**, make sure to raise the icecast sources limit:
```xml
<icecast>
<limits>
<sources>2</sources>
</limits>
</icecast>
```
:::
```yml
stream:
outputs:
# Icecast output streams.
# > max items is 3
icecast:
- # Whether the output is enabled.
# > default is false
enabled: false
# Output public url, If not defined, the value will be generated from
# the [general.public_url] hostname, the output port and mount.
public_url:
# Icecast server host.
# > default is localhost
host: "localhost"
# Icecast server port.
# > default is 8000
port: 8000
# Icecast server mount point.
# > this field is REQUIRED
mount: "main"
# Icecast source user.
# > default is source
source_user: "source"
# Icecast source password.
# > this field is REQUIRED
source_password: "hackme"
# Icecast admin user.
# > default is admin
admin_user: "admin"
# Icecast admin password. If not defined, statistics will not be collected.
admin_password: "hackme"
# Icecast output audio.
audio:
# Icecast output audio format.
# > must be one of (aac, mp3, ogg, opus)
# > this field is REQUIRED
format: "ogg"
# Icecast output audio bitrate.
# > must be one of (32, 48, 64, 96, 128, 160, 192, 224, 256, 320)
# > this field is REQUIRED
bitrate: 256
# format=ogg only field: Embed metadata (track title, artist, and show name)
# in the output stream. Some bugged players will disconnect from the stream
# after every songs when playing ogg streams that have metadata information
# enabled.
# > default is false
enable_metadata: false
# Icecast stream name.
name: "LibreTime!"
# Icecast stream description.
description: "LibreTime Radio!"
# Icecast stream website.
website: "https://libretime.org"
# Icecast stream genre.
genre: "various"
```
#### Shoutcast
The `stream.outputs.shoutcast` section configures the shoutcast output streams.
```yml
stream:
outputs:
# Shoutcast output streams.
# > max items is 1
shoutcast:
- # Whether the output is enabled.
# > default is false
enabled: false
# Output public url. If not defined, the value will be generated from
# the [general.public_url] hostname and the output port.
public_url:
# Shoutcast server host.
# > default is localhost
host: "localhost"
# Shoutcast server port.
# > default is 8000
port: 8000
# Shoutcast source user.
# > default is source
source_user: "source"
# Shoutcast source password.
# > this field is REQUIRED
source_password: "hackme"
# Shoutcast admin user.
# > default is admin
admin_user: "admin"
# Shoutcast admin password. If not defined, statistics will not be collected.
admin_password: "hackme"
# Shoutcast output audio.
audio:
# Shoutcast output audio format.
# > must be one of (aac, mp3)
# > this field is REQUIRED
format: "mp3"
# Shoutcast output audio bitrate.
# > must be one of (32, 48, 64, 96, 128, 160, 192, 224, 256, 320)
# > this field is REQUIRED
bitrate: 256
# Shoutcast stream name.
name: "LibreTime!"
# Shoutcast stream website.
website: "https://libretime.org"
# Shoutcast stream genre.
genre: "various"
```
#### System
The `stream.outputs.system` section configures the system outputs.
```yml
stream:
outputs:
# System outputs.
# > max items is 1
system:
- # Whether the output is enabled.
# > default is false
enabled: false
# System output kind.
# > must be one of (alsa, ao, oss, portaudio, pulseaudio)
# > default is alsa
kind: "alsa"
```
## LDAP
The `ldap` section provide additional configuration for the authentication mechanism defined in `general.auth`, please see the [custom authentication documentation](../custom-authentication.md) for more details.
```yml
ldap:
# Hostname of LDAP server.
hostname: "ldap.example.org"
# Complete DN of user used to bind to LDAP.
binddn: "uid=libretime,cn=sysaccounts,cn=etc,dc=int,dc=example,dc=org"
# Password for binddn user.
password: "hackme"
# Domain part of username.
account_domain: "INT.EXAMPLE.ORG"
# Base search DN.
basedn: "cn=users,cn=accounts,dc=int,dc=example,dc=org"
# Name of the uid field for searching. Usually uid, may be cn.
filter_field: "uid"
# Map user types to LDAP groups. Assign user types based on the group of a given user
# Key format is groupmap_*.
groupmap_superadmin: "cn=superadmin,cn=groups,cn=accounts,dc=int,dc=example,dc=org"
groupmap_admin: "cn=admin,cn=groups,cn=accounts,dc=int,dc=example,dc=org"
groupmap_program_manager: "cn=program_manager,cn=groups,cn=accounts,dc=int,dc=example,dc=org"
groupmap_host: "cn=host,cn=groups,cn=accounts,dc=int,dc=example,dc=org"
groupmap_guest: "cn=guest,cn=groups,cn=accounts,dc=int,dc=example,dc=org"
```

View File

@ -19,14 +19,11 @@ If you are coming from **Airtime**, please follow the [Airtime migration guide](
You can install LibreTime using the one of the following methods: You can install LibreTime using the one of the following methods:
- [:rocket: Using the installer](#using-the-installer) - [:rocket: Using the installer](#using-the-installer)
- :construction: Using Ansible - [:rocket: Using docker-compose](#using-docker-compose)
- :construction: Using ansible
#### Minimum system requirements ### Minimum system requirements
- One of the following Linux distributions
- Ubuntu [current LTS](https://wiki.ubuntu.com/Releases).
[Note Ubuntu 22.04 LTS is not yet supported](https://github.com/libretime/libretime/issues/1845)
- Debian [current stable](https://www.debian.org/releases/)
- 1 Ghz Processor - 1 Ghz Processor
- 2 GB RAM recommended (1 GB required) - 2 GB RAM recommended (1 GB required)
- A static external IP address ([How to setup a static ip using Netplan](../tutorials/setup-a-static-ip-using-netplan.md)) - A static external IP address ([How to setup a static ip using Netplan](../tutorials/setup-a-static-ip-using-netplan.md))
@ -49,6 +46,37 @@ LibreTime requires the following default ports to be open:
The installer is shipped in the released tarballs or directly in the project repository. The installer is shipped in the released tarballs or directly in the project repository.
We recommend installing on one of the following [distribution releases](../../developer-manual/development/releases.md#distributions-releases-support):
- [Debian 11](https://www.debian.org/releases/)
- [Ubuntu 20.04 LTS](https://wiki.ubuntu.com/Releases)
### Before installing
Before installing LibreTime, you need to make sure you operating system is properly configured.
#### Operating system time configuration
Check your operating system time configuration using the following command:
```bash
timedatectl
```
```
Local time: Fri 2022-08-05 12:43:39 CEST
Universal time: Fri 2022-08-05 10:43:39 UTC
RTC time: Fri 2022-08-05 10:43:40
Time zone: Europe/Berlin (CEST, +0200)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
```
Make sure that your time zone is properly configured, if not you can set it using the [`timedatectl set-timezone` command](https://www.freedesktop.org/software/systemd/man/timedatectl.html#set-timezone%20%5BTIMEZONE%5D).
If the NTP service is inactive, you should consider enabling it using the [`timedatectl set-ntp` command](https://www.freedesktop.org/software/systemd/man/timedatectl.html#set-ntp%20%5BBOOL%5D).
### Download ### Download
You can either download the latest released tarball or clone the repository. You can either download the latest released tarball or clone the repository.
@ -152,12 +180,6 @@ The install script will use randomly generated passwords to create the PostgreSQ
::: :::
:::info
By default, the install script will not restart any service for you, this is to prevent unwanted restarts on production environment. To let the install script restart the services, you need to pass the `--allow-restart` flag.
:::
Feel free to run `./install --help` to get more details. Feel free to run `./install --help` to get more details.
#### Using hardware audio output #### Using hardware audio output
@ -178,12 +200,6 @@ Next, run the following commands to setup the database:
sudo -u libretime libretime-api migrate sudo -u libretime libretime-api migrate
``` ```
Synchronize the new Icecast passwords into the database:
```bash
sudo libretime-api set_icecast_passwords --from-icecast-config
```
Finally, start the services, and check that they are running properly using the following commands: Finally, start the services, and check that they are running properly using the following commands:
```bash ```bash
@ -192,4 +208,84 @@ sudo systemctl start libretime.target
sudo systemctl --all --plain | grep libretime sudo systemctl --all --plain | grep libretime
``` ```
Next, continue by [configuring your installation](#configure).
## Using docker-compose
:::warning
The docker-compose install is still a work in progress and is **EXPERIMENTAL**, breaking changes may occur without notice.
:::
### Download
Pick the version you want to install:
<CodeBlock language="bash">
echo LIBRETIME_VERSION="{vars.version}" > .env
</CodeBlock>
Download the docker-compose files from the repository:
```bash
# Load LIBRETIME_VERSION variable
source .env
wget "https://raw.githubusercontent.com/libretime/libretime/$LIBRETIME_VERSION/docker-compose.yml"
wget "https://raw.githubusercontent.com/libretime/libretime/$LIBRETIME_VERSION/docker/nginx.conf"
wget "https://raw.githubusercontent.com/libretime/libretime/$LIBRETIME_VERSION/docker/config.yml"
```
### Setup
Once the files are downloaded, edit the [configuration file](./configuration.md) at `./config.yml` to fill required information and to match your needs.
:::info
The `docker/config.yml` configuration file you previously downloaded already contains specific values required by the container setup, you should not change them:
```yaml
database:
host: "postgres"
rabbitmq:
host: "rabbitmq"
playout:
liquidsoap_host: "liquidsoap"
liquidsoap:
server_listen_address: "0.0.0.0"
stream:
outputs:
.default_icecast_output:
host: "icecast"
```
:::
Next, run the following commands to setup the database:
```bash
docker-compose run --rm api libretime-api migrate
```
Finally, start the services, and check that they are running properly using the following commands:
```bash
docker-compose up -d
docker-compose ps
docker-compose logs -f
```
Next, continue by [configuring your installation](#configure).
## Configure
Once the setup is completed, log in the interface and make sure to edit the project settings (go to **Settings** > **General**) to match your needs. Important settings are:
- Timezone
- First day of the week
## Next
Once completed, it's recommended to [install a reverse proxy](./reverse-proxy.md) to setup SSL termination and secure your installation. Once completed, it's recommended to [install a reverse proxy](./reverse-proxy.md) to setup SSL termination and secure your installation.

View File

@ -15,9 +15,27 @@ LibreTime dropped support for Ubuntu 16.04, which is the last supported version
## Make a backup ## Make a backup
<!-- TODO: Airtime backup process might be different from the LibreTime one, we might need to write a dedicated backup guide here. --> ### Backup the configuration
Follow [the backup guide](../backup.md) to make a backup of your current Airtime installation. On common setups, you need to backup the entire `/etc/airtime` folder.
### Backup the database
You need to backup the PostgreSQL database, which holds the entire data of your installation.
Here is an example to dump your PostgreSQL database:
```bash
sudo -u postgres pg_dump --file=airtime.sql airtime
```
Please read the `pg_dump` usage for additional details.
### Backup the storage
You need to backup the entire file storage, which holds all the files of your installation.
The path to your storage was defined during the installation process, the default storage path is `/srv/airtime/stor`.
## Install ## Install

View File

@ -20,9 +20,9 @@ sudo systemctl stop libretime.target
# Or # Or
sudo systemctl stop libretime-analyzer.service sudo systemctl stop libretime-analyzer.service
sudo systemctl stop libretime-api.service sudo systemctl stop libretime-api.service
sudo systemctl stop libretime-celery.service
sudo systemctl stop libretime-liquidsoap.service sudo systemctl stop libretime-liquidsoap.service
sudo systemctl stop libretime-playout.service sudo systemctl stop libretime-playout.service
sudo systemctl stop libretime-worker.service
``` ```
## Make a backup ## Make a backup

View File

@ -23,7 +23,7 @@ If a service isn't running, you should search for details using the tool running
On a common setup, you should use the systemd service status: On a common setup, you should use the systemd service status:
```bash ```bash
sudo systemctl status libretime-celery sudo systemctl status libretime-worker
``` ```
:::note :::note
@ -51,6 +51,7 @@ On a common setup, to access LibreTime specific logs you should search for the f
- The `/var/log/libretime/legacy.log` file contains logs from the legacy app, - The `/var/log/libretime/legacy.log` file contains logs from the legacy app,
- The `/var/log/libretime/liquidsoap.log` file contains logs from liquidsoap, - The `/var/log/libretime/liquidsoap.log` file contains logs from liquidsoap,
- The `/var/log/libretime/playout.log` file contains logs from playout. - The `/var/log/libretime/playout.log` file contains logs from playout.
- The `/var/log/libretime/worker.log` file contains logs from the worker.
For some LibreTime services, you can set a higher log level using the `LIBRETIME_LOG_LEVEL` environment variable, or by running the service by hand and using a command line flag: For some LibreTime services, you can set a higher log level using the `LIBRETIME_LOG_LEVEL` environment variable, or by running the service by hand and using a command line flag:

View File

@ -78,9 +78,10 @@ sudo pip3 uninstall \
libretime-analyzer \ libretime-analyzer \
libretime-api \ libretime-api \
libretime-api-client \ libretime-api-client \
libretime-celery \
libretime-playout \ libretime-playout \
libretime-shared \ libretime-shared \
libretime-celery libretime-worker
# Check if we forgot old python packages. # Check if we forgot old python packages.
# Remove packages that show up with this commands. # Remove packages that show up with this commands.

View File

@ -0,0 +1 @@
label: Development

View File

@ -2,6 +2,25 @@
title: Development environment title: Development environment
--- ---
## Docker-compose
To setup a docker-compose development environment, run the following commands:
```bash
# Clean and build
make clean
cp .env.dev .env
docker-compose build
# Setup
docker-compose run --rm legacy make build
docker-compose run --rm api libretime-api migrate
# Run
docker-compose up -d
docker-compose logs -f
```
## Vagrant ## Vagrant
To use Vagrant, you need to install a virtualization engine: [VirtualBox](https://www.virtualbox.org) or Libvirt. The [vagrant-vbguest] package on Github can help maintain guest extensions on host systems using VirtualBox. To use Vagrant, you need to install a virtualization engine: [VirtualBox](https://www.virtualbox.org) or Libvirt. The [vagrant-vbguest] package on Github can help maintain guest extensions on host systems using VirtualBox.
@ -112,7 +131,7 @@ multipass shell ltTEST
``` ```
Multipass isn't currently able to do an automated install from the cloud-init script. Multipass isn't currently able to do an automated install from the cloud-init script.
After you enter the shell for the first time, you will still need to [run the LibreTime installer](../admin-manual/setup/install.md). After you enter the shell for the first time, you will still need to [run the LibreTime installer](../../admin-manual/setup/install.md).
The IP address of your new VM can be found by running `multipass list`. Copy and paste it into your web browser to access the LibreTime interface and complete the setup wizard. The IP address of your new VM can be found by running `multipass list`. Copy and paste it into your web browser to access the LibreTime interface and complete the setup wizard.

View File

@ -0,0 +1,159 @@
---
title: Releases
---
## Distributions releases support
New releases target the current stable distributions release, and development should prepare for future stable distributions releases.
- We recommend installing LibreTime on the current stable distributions.
- Maintenance only releases will provide bug and security fixes for stable and old stable distributions.
| | Ubuntu 18.04 | Debian 10 | Ubuntu 20.04 | Debian 11 |
| ------------ | :----------: | :---------: | :----------: | :---------: |
| Release date | 2018-04-26 | 2019-07-06 | 2020-04-23 | 2021-08-14 |
| End of life | 2023-04 | 2024-06 | 2025-04 | 2026-06 |
| Versions | | | | |
| 3.0.x | maintenance | maintenance | recommended | recommended |
## Versioning schema
We follow the [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standards.
In a nutshell, given a version number `MAJOR.MINOR.PATCH` we increment the:
1. `MAJOR` version when we make incompatible API changes,
2. `MINOR` version when we add functionality in a backwards-compatible manner, and
3. `PATCH` version when we make backwards-compatible bug fixes.
## Releasing a new version
This guide walks you through the steps required to release a new version of LibreTime.
:::caution
This guide is still a work in progress, and does not cover every use cases. Depending on
the version bump, some steps might be wrong. For example, in case of a patch release,
the documentation requires different changes.
:::
Before releasing a new version, make sure linter don't fail and tests are passing.
Start by cleaning the repository and make sure you don't have uncommitted changes:
```
git checkout main
make clean
git status
```
Choose the next version based the our [versioning schema](#versioning-schema):
```bash
export VERSION=3.0.0-beta.0
```
Create a new `release-$VERSION` branch and release commit to prepare a release pull request:
```bash
git checkout -b "release-$VERSION"
export COMMIT_MESSAGE="chore: release $VERSION"
git commit --allow-empty "$COMMIT_MESSAGE"
```
### 1. Version bump
Write the new `$VERSION` to the VERSION file, and bump the python packages version:
```bash
bash tools/bump-python-version.sh "$VERSION"
git add .
git commit --fixup ":/$COMMIT_MESSAGE"
```
### 2. Release note
Prepare a new release note based on the `docs/releases/unreleased.md` file. Be sure that
the filename match the releases notes naming conventions:
```bash
ls -l docs/releases/
cp docs/releases/unreleased.md docs/releases/$VERSION.md
```
The release note file must be updated with:
- the version and date of this release,
- an auto generated features and bug fixes changelog,
- instructions for upgrading,
- deprecation notices,
- remove empty sections.
Reset and clean the `docs/releases/unreleased.md` file for a future version.
Update the Github release creation job to use the new release note file in `.github/workflows/release.yml`.
Commit the release note changes:
```bash
git add .
git commit --fixup ":/$COMMIT_MESSAGE"
```
### 3. Website and docs
Update the version in the website files, the files that need changing are:
- `website/vars.js`
- `website/versions.json`
Replace the old versioned docs with the current docs:
```bash
mv website/versioned_sidebars/version-*-sidebars.json website/versioned_sidebars/version-$VERSION-sidebars.json
rm -R website/versioned_docs/version-*
cp -R docs website/versioned_docs/version-$VERSION
```
Commit the website and docs changes:
```bash
git add .
git commit --fixup ":/$COMMIT_MESSAGE"
```
### 4. Create a new pull request
Squash the changes and open a pull request for others to review:
```bash
git rebase --autosquash --interactive main
```
Merge the pull request when it is reviewed and ready.
### 5. Create and push a tag
Pull the merged release commit:
```bash
git checkout main
git pull upstream main
```
Make sure `HEAD` is the previously merged release commit and tag it with the new version:
```bash
git show --quiet
git tag -a -m "$VERSION" "$VERSION"
```
Push the tag upstream to finalize the release process:
```bash
git push upstream main --follow-tags
```

View File

@ -0,0 +1,188 @@
---
title: LibreTime 3.0.0 beta 0
---
import ReleaseHead from './\_release-head.md';
<ReleaseHead date='2022-09-16' version='3.0.0-beta.0'/>
## :sparkling_heart: Contributors
The LibreTime project wants to thank the following contributors for authoring PRs to this release:
- @jooola
- @paddatrapper
- Milo Ivir
## :rocket: Features
- **playout:** use liquidsoap version functions
- **playout:** replace pytz with zoneinfo ([#1969](https://github.com/libretime/libretime/issues/1969))
- **installer:** remove allow-restart flag ([#1970](https://github.com/libretime/libretime/issues/1970))
- rename AirtimeApiClient to ApiClient
- **playout:** use single clients instance ([#1980](https://github.com/libretime/libretime/issues/1980))
- **api:** don't use trailing slashes ([#1982](https://github.com/libretime/libretime/issues/1982))
- **api:** cast StreamSetting raw_value to value ([#1991](https://github.com/libretime/libretime/issues/1991))
- **worker:** load callback details from config ([#1994](https://github.com/libretime/libretime/issues/1994))
- **analyzer:** load callback details from config and file_id ([#1993](https://github.com/libretime/libretime/issues/1993))
- **api-client:** rewrite api-client v2
- **playout:** integrate api-client v2 calls
- **api:** don't use hyperlinked serializers ([#1984](https://github.com/libretime/libretime/issues/1984))
- **shared:** load env config using jsonschema
- **installer:** use ed for config update ([#2013](https://github.com/libretime/libretime/issues/2013))
- move off_air_meta stream setting to pref table ([#2023](https://github.com/libretime/libretime/issues/2023))
- move stream liquisoap status to pref table
- move stream stats status to pref table
- **analyzer:** override paths using env variables
- **playout:** rewrite stats collector ([#2028](https://github.com/libretime/libretime/issues/2028))
- **legacy:** setup config schema validation
- **legacy:** add config dot notation access
- **shared:** pass config data via init ([#2042](https://github.com/libretime/libretime/issues/2042))
- **playout:** create liquidsoap client
- **playout:** integrate new liquisoap client
- **worker:** rename service and package to libretime-worker ([#2065](https://github.com/libretime/libretime/issues/2065))
- **playout:** improve generate\_\*\_events ([#2088](https://github.com/libretime/libretime/issues/2088))
- **api:** remove set passwords command
- remove cc_stream_setting models
- **installer:** deploy stream config
- **legacy:** read stream config from file
- **api:** add /info and /stream/\* endpoints
- **shared:** create stream config models
- **playout:** build liquidsoap entrypoint with stream config
- **playout:** stats collector using stream config
- **playout:** allow updating message_offline value
- **playout:** remove stream_setting update handler
- **playout:** liquidsoap bootstrap using new api endpoints
- **playout:** allow liquidsoap listen address configuration
- **api:** move /api-auth to /api/browser ([#2094](https://github.com/libretime/libretime/issues/2094))
- add container setup
- move timezone preference to config file ([#2096](https://github.com/libretime/libretime/issues/2096))
- **playout:** move message handling to main thread
## :bug: Bug fixes
- **api-client:** get status_code from response
- **analyzer:** remove outdated urllib3 workaround
- **api-client:** fix base_url joining for client v2 ([#1998](https://github.com/libretime/libretime/issues/1998))
- **api:** update set_icecast_passwords StreamSetting fields ([#2001](https://github.com/libretime/libretime/issues/2001))
- **legacy:** get local logo file ([#1999](https://github.com/libretime/libretime/issues/1999))
- **installer:** clean legacy files before copying ([#2002](https://github.com/libretime/libretime/issues/2002))
- **legacy:** sanitize track_type_id when updating file ([#2003](https://github.com/libretime/libretime/issues/2003))
- **shared:** validator value type can be wrong
- **shared:** remove unused field from rabbitmq config ([#2012](https://github.com/libretime/libretime/issues/2012))
- **playout:** replace deprecated harbor.bind_addr ([#2025](https://github.com/libretime/libretime/issues/2025))
- **legacy:** do not rely on undefined SERVER_NAME ([#2031](https://github.com/libretime/libretime/issues/2031))
- **api-client:** remove unused v1 methods
- **playout:** use stream download when fetching files ([#2048](https://github.com/libretime/libretime/issues/2048))
- **playout:** add thread names ([#2056](https://github.com/libretime/libretime/issues/2056))
- **legacy:** args comma syntax error
- **legacy:** 404 on listeners stats
- **deps:** update dependency mdx-mermaid to v1.3.0 [security]
- **playout:** py36 compatibility broken typings
- **playout:** py39 compatibility zoneinfo import
- **api:** install gunicorn from pip for bionic
- **installer:** only upgrade pip packages if needed
- **installer:** fix compatibility with bionic
- **legacy:** look in /legacy for a VERSION file
- **playout:** missing live show events ([#2087](https://github.com/libretime/libretime/issues/2087))
- **legacy:** config default values are not sanitized
- **installer:** add liquidsoap config section
- **installer:** move non reusable fields from default output
- **legacy:** consistent with docs in outputs public_url generation
- **playout:** also shutdown on SIGTERM ([#2104](https://github.com/libretime/libretime/issues/2104))
- **installer:** simplify distro support notice ([#2106](https://github.com/libretime/libretime/issues/2106))
- **shared:** install tzdata distributions package ([#2105](https://github.com/libretime/libretime/issues/2105))
- **installer:** config dir should be read only
- **installer:** config should not be world readable
- **legacy:** track_type_id should cast to int not text ([#2112](https://github.com/libretime/libretime/issues/2112))
- **worker:** rewrite podcast download task
- **shared:** load env from oneOf union schema
- **deps:** update dependency friendsofphp/php-cs-fixer to <3.11.1
- nginx depends on legacy in docker-compose ([#2147](https://github.com/libretime/libretime/issues/2147))
- **playout:** remove shutdown_handler
## :fire: Deprecation and removal
### Ubuntu Bionic support deprecation
Support for Ubuntu Bionic is being deprecated, and will be removed in LibreTime v3.1.0. Maintenance only versions (3.0.x) for Ubuntu Bionic will be provided until the distribution release reaches its end of life. Please see the [supported distributions release policy](../developer-manual/development/releases.md#distributions-releases-support) for details.
Along with the Ubuntu Bionic deprecation, the following dependencies versions are also being deprecated:
- [liquidsoap 1.1.1](https://packages.ubuntu.com/bionic/liquidsoap)
- [php7.2](https://packages.ubuntu.com/bionic/php7.2)
- [python3.6](https://packages.ubuntu.com/bionic/python3)
### Debian Buster support deprecation
Support for Debian Buster is being deprecated, and will be removed in LibreTime v3.1.0. Maintenance only versions (3.0.x) for Debian Buster will be provided until the distribution release reaches its end of life. Please see the [supported distributions release policy](../developer-manual/development/releases.md#distributions-releases-support) for details.
Along with the Debian Buster deprecation, the following dependencies versions are also being deprecated:
- [liquidsoap 1.3.3](https://packages.debian.org/buster/liquidsoap)
- [php7.3](https://packages.debian.org/buster/php7.3)
- [python3.7](https://packages.debian.org/buster/python3)
## :arrow_up: Before upgrading
:::caution
Please follow this **before the upgrade procedure**!
:::
### File based stream configuration
The stream configuration moved from the database to the [configuration](../admin-manual/setup/configuration.md#stream) file. A configuration sample can be found in the project folder under `installer/config.yml`. Make sure to save your existing stream config to the configuration file.
:::info
To prevent accidental data loss during upgrade, the stream configuration data will only be removed from the database in future releases. You can view the data using the following commands:
```bash
sudo -u libretime libretime-api dbshell --command="
SELECT *
FROM cc_stream_setting
ORDER BY keyname;"
sudo -u libretime libretime-api dbshell --command="
SELECT *
FROM cc_pref
WHERE keystr IN (
'default_icecast_password',
'default_stream_mount_point',
'live_dj_connection_url_override',
'live_dj_source_connection_url',
'master_dj_connection_url_override',
'master_dj_source_connection_url'
)
ORDER BY keystr;"
```
:::
### Timezone configuration
The timezone preference moved from the database to the [configuration](../admin-manual/setup/configuration.md#general) file. Make sure to save your existing timezone preference to the configuration file.
:::info
To prevent accidental data loss during upgrade, the timezone preference will only be removed from the database in future releases. You can view the data using the following commands:
```bash
sudo -u libretime libretime-api dbshell --command="SELECT * FROM cc_pref WHERE keystr = 'timezone'";
```
:::
### Worker python package and service
The `libretime-celery` python package and service was renamed to `libretime-worker`. Make sure to remove the old python package and service using the following command:
```bash
sudo pip3 uninstall libretime-celery
sudo rm -f \
/etc/systemd/system/libretime-celery.service \
/usr/lib/systemd/system/libretime-celery.service
```

View File

@ -16,6 +16,14 @@ The LibreTime project wants to thank the following contributors for authoring PR
## :fire: Deprecation and removal ## :fire: Deprecation and removal
## :arrow_up: Before upgrading
:::caution
Please follow this **before the upgrade procedure**!
:::
## :arrow_up: Upgrading ## :arrow_up: Upgrading
## :warning: Known issues ## :warning: Known issues

Some files were not shown because too many files have changed in this diff Show More