Commit Graph

487 Commits

Author SHA1 Message Date
Jonas L e6d24333cb
fix(installer): clean legacy files before copying (#2002) 2022-07-27 09:51:34 +02:00
Jonas L c4bccf16f9
feat(installer): remove allow-restart flag (#1970)
Services management should be handled by the admin. You can use the following command `systemctl restart  libretime.target`
2022-07-17 23:58:51 +02:00
jo 1cb03c35d2 feat(api): listen on unix socket with gunicorn 2022-07-07 10:51:07 +02:00
jo ec45717ccf feat: replace apache2 with nginx + php-fpm
BREAKING CHANGE: The `apache2` webserver has been replaced with `nginx` and `php-fpm`, be sure to uninstall `apache2` and clean related configuration files from your system before upgrading.
2022-07-07 10:51:07 +02:00
jo 2f205544c2 feat: use dedicated 'libretime' user
BREAKING CHANGE: The default `www-data` user has been replaced by a dedicated  `libretime` user to run the services. Be sure to change the ownership of the libretime files.
2022-07-07 10:51:07 +02:00
jo 0bb792d047 feat(installer): load .env file to persistent install config 2022-07-07 10:51:07 +02:00
jo e8fc5cd1c5 feat(installer): rename shared files path to /usr/share/libretime
BREAKING CHANGE: The shared files path changed from `/usr/share/airtime` to `/usr/share/libretime`. The directory must be renamed **before the upgrade procedure**.
2022-06-08 23:23:08 +02:00
jo f7bb6e7592 feat: move storage path setting to configuration file
- change default storage path to /srv/libretime
- remove music dirs table
- use /tmp for testing storage
- storage dir should always have a trailing slash
2022-06-08 23:23:08 +02:00
jo 510e978952 feat: add systemd libretime.target
- add wanted by
- instantly start services in vagrant
2022-06-08 23:23:08 +02:00
jo a9c2271559 feat(installer): post install setup instructions 2022-06-08 23:23:08 +02:00
jo ee98387264 feat(installer): rewrite install script
- remove unused root packages.ini
- write config to yaml file
- allow to set public_url during install
- force icecast start right after package install
- move config file in place at the end of installation

BREAKING CHANGE: The bash installer has been rewritten, the flags and
options changed, please run `./install --help` to get more details.
2022-06-08 23:23:08 +02:00
jo aed6d2f294 feat: change config dir path to /etc/libretime
BREAKING: The configuration directory changed from `/etc/airtime` to
`/etc/libretime`. Please rename your configuration directory accordingly.
2022-06-08 23:23:08 +02:00
jo 8278366899 feat(worker): don't run with a dedicated user
BREAKING: The worker service no longer uses a dedicated `celery` user to run. The old `celery` user can be removed from the system.
2022-05-19 09:35:05 +02:00
jo 137e76ff00 fix: don't set log folder permissions recursivly 2022-05-05 09:42:34 +02:00
jo 21ab07eff8 feat(legacy): change logrotate config deploy path
BREAKING: the legacy logrotate config filepath was changed from `/etc/logrotate.d/airtime-php` to `/etc/logrotate.d/libretime-legacy`
2022-05-05 09:42:34 +02:00
Jonas L 41df76eed0
feat(api): replace uwsgi with gunicorn (#1785)
Related to #1719

BREAKING: The uwsgi packages and configuration files (`/etc/airtime/libretime-api.ini`) should be removed from the system.
2022-04-25 16:09:19 +02:00
Jonas L 95a7411c0c
feat: improve apache configuration (#1784)
- merge php config in apache config
- remove deprecated php config
- remove old apache config
- use dedicated log files for libretime vhost
- change template variables format

BREAKING: The apache configuration file has been updated and renamed. You must remove the old configuration files `/etc/apache2/sites-available/airtime*` file from the system.

BREAKING: The php configuration file has been merged in the apache configuration. You need to remove the `/etc/php/*/apache2/conf.d/airtime.ini` file from the system.
2022-04-25 12:46:30 +02:00
Jonas L dc92661c49
chore(api): move uswgi config in api/install (#1781) 2022-04-21 07:14:35 +02:00
Jonas L 5cb4b5e9e5
chore(legacy): move logrotate config in legacy/install (#1780) 2022-04-21 07:11:16 +02:00
jo c7ebeee114 fix(installer): always install fresh packages
reorder apt-get update commands to be sure we install fresh packages.
2022-04-11 11:52:55 +02:00
Kyle Robbertze f048d32ec2 fix(installer): install software-properties-common when required 2022-04-11 11:52:55 +02:00
Jonas L fef38fb131
chore: rename api_client to api-client (#1727) 2022-04-04 10:25:38 +02:00
Kyle Robbertze 38efa9cd31 fix(installer): remove /var/tmp/airtime reference 2022-03-28 21:06:43 +02:00
Kyle Robbertze 2ca883334a
fix(installer): remove rougue reference to /var/log/airtime (#1710) 2022-03-28 20:56:14 +02:00
Kyle Robbertze 9ba17fba4f fix(installer): test and create correct log path 2022-03-28 17:18:40 +02:00
Jonas L 926f18aec8
fix: upgrade python packages during install (#1707) 2022-03-28 15:19:38 +02:00
Kyle Robbertze e8fb17a653 fix: add PPA for newer liquidsoap version on Ubuntu
Fixes: #1689
2022-03-28 11:11:44 +02:00
jo 9af717ef7f feat(api): remove admin app and static files
- remove django admin app,
- disable static files for production deployment,
- keep the rest framework browsable api in dev mode.
2022-03-02 22:03:56 +02:00
Jonas L 2d451aa951
fix: change celery user in worker service file (#1638) 2022-02-25 15:53:32 +02:00
jo 9b6d657fd6 feat(worker): load config using shared helpers
BREAKING CHANGE: The worker `RMQ_CONFIG_FILE` environement variable has
been renamed to `LIBRETIME_CONFIG_FILEPATH`. In addition the systemd
working directory for the worker has changed from `/srv/airtime` to
`/var/lib/libretime/worker`.
2022-02-25 11:48:57 +02:00
Jonas L c3d2a4dfab
feat: remove unused ubuntu ppa (#1591)
Fixes #1573
2022-02-11 15:34:32 +02:00
Jonas L e106858fd8
feat: remove locale generation from installer (#1560)
Fixes #317
2022-02-04 09:16:00 +02:00
jo ceab19271d feat(analyzer): analyze replaygain using ffmpeg
- remove pycairo pip install
- fix py36 compatibility
- reraise when executable was not found

BREAKING CHANGE: The analyzer requires 'ffmpeg'. The 'rgain3' python package and it's system dependencies can be removed.
2022-01-24 12:54:31 +02:00
jo 12f96f5043 feat(playout): change playout working directory
- use working dir for storing files

BREAKING CHANGE:  the playout working directory changed from '/var/tmp/airtime/pypo/' to '/var/lib/libretime/playout' when running with systemd and the current directory by default.
2022-01-24 12:46:40 +02:00
Jonas L fe0b2c4a7a
feat(analyzer): enhance analyzer cli and logging (#1507)
Some initial work on modernizing the analyzer app. This replace any custom logger or `logging` based logger with the logging tools from `libretime_shared.logging` and `loguru`.

- rename cli to main
- use pathlib in setup.py
- add api-client and shared package as dev deps
- rework main entrypoint cli to use click and shared helpers
- remove unused imports
- replace logging with logger
- rework analyzer app using shared abstract app
- move analyzer log path to systemd service
- change analyzer working dir

BREAKING CHANGE: The analyzer cli has been reworked and uses new flags / environnement variables for configuration.
`--debug` flag becomes `--log-level <level>`
`--rmq-config-file` flag becomes `--config <filepath>`
`--http-retry-queue-file` flag becomes `--retry-queue-filepath`.
`retry-queue-filepath` default value changed from `/tmp/airtime_analyzer_http_retries` to `retry_queue` in the working dir.
`LIBRETIME_CONF_DIR` environnement variable replaced by `LIBRETIME_CONFIG_FILEPATH`.

BREAKING CHANGE: When running analyzer as a systemd service, the working directory is now /var/lib/libretime/analyzer.
2022-01-17 10:26:30 +02:00
Jonas L 5c72f714a8
feat(playout): enhance playout logging (#1495)
Some initial work on modernizing the playout app. This replace any custom logger or
logging based logger with the logging tools from libretime_shared.logging and loguru.

Removed all the thread/function assigned logger (self.logger = ...), as this makes it
part of the logic (passing logger though function args) as it should not.

Of a dedicated logger is required for a specific task, it should use
the create_task_logger function.

- refactor: remove dead code
- refactor: remove py2 specific fix
- feat: remove unused test command
- feat: setup shared cli and logging tools
- feat: replace logging with loguru
- feat: setup shared cli and logging tools for notify
- fix: warn method deos not exist
- feat: make cli setup the entrypoint
- fix: install shared modules globally in production
  use extra_requires to load local packages in dev environement
- feat: configure log path in systemd service
- feat: default behavior is to log to console only
- feat: create log dir during install
- chore: add comment
- fix: don't create useless dir in install
- fix: move notify logs to /var/log/libretime dir
- fix: update setup_logger attrs
- style: linting
- fix: replace verbosity flag with log-level flag
- feat: use shared logging tool in liquidsoap
- fix: pass logger down to api client
- feat: allow custom log_filepath in liquidsoap config
- chore: add pylintrc to playout
- refactor: fix pylint errors
- feat: set liquidsoap log filepath in systemd service
- fix: missing setup entrypoint update

BREAKING CHANGE: for playout and liquidsoap the default log file path changed to None
and will only log to the console when developing / testing. Unless you are running the
app as a systemd service (production) the default logs filepaths changed:
from "/var/log/airtime/pypo/pypo.log" to "/var/log/libretime/playout.log" and
from "/var/log/airtime/pypo-liquidsoap/ls_script.log" to "/var/log/libretime/liquidsoap.log"

BREAKING CHANGE: for playout-notify the default log file path changed
from "/var/log/airtime/pypo/notify.log" to "/var/log/libretime/playout-notify.log"
2022-01-13 17:11:37 +02:00
jo aa4be97312 chore: move liquidsoap logrotate in install dir 2022-01-04 09:18:58 +02:00
Kyle Robbertze 959e001edd fix: revert removal of eval for shell commands
Fixes: #1434
2021-11-09 14:47:56 +01:00
Jonas L 4057c88cf0
feat: debian 11 support (#1292)
* Debian 11 Support

Run api ci test on bullseye as well

* Silan does not work for mp3 on bullseye

* Liquisoap does not fail with wma files on bullseye
2021-11-09 11:21:40 +02:00
Kyle Robbertze 022b1a2881 chore: resolve shell warnings 2021-11-08 20:57:41 +01:00
Kyle Robbertze 7182390000
feat: add support for Ubuntu Focal 20.04 (#1168)
Co-authored-by: Valerio Bozzolan <gnu@linux.it>
2021-11-04 09:55:50 +02:00
jo 19c816f294 Update paths after playout move 2021-10-17 08:02:47 +00:00
jo 8fe0156d4f Update paths after api_client move 2021-10-17 08:02:47 +00:00
jo cf36eec5f8 Update paths after wroker move 2021-10-17 08:02:47 +00:00
jo 08f13d850c Update paths after analyzer move 2021-10-17 08:02:47 +00:00
Kyle Robbertze 2f3adac09d
Merge pull request #1373 from jooola/feat/rename_python_packages
Rename python packages/entrypoints
2021-10-14 14:06:50 +00:00
jo 25e947c8bf Rename airtime-liquidsoap to libretime-liquidsoap
BREAKING:
sudo rm -f \
  /etc/logrotate.d/airtime-liquidsoap
2021-10-14 15:31:59 +02:00
jo 67db856fd8 Pin setuptools to ^58.0 in installer 2021-10-14 15:23:58 +02:00
jo c4c89eae19 Fix paths after legacy rename 2021-10-11 13:43:39 +02:00
jo a55962a42c Remove unused /run/airtime directory 2021-10-06 18:10:22 +02:00