From fa5db502ed6c0a8d019305337a9b0aecb4f8340a Mon Sep 17 00:00:00 2001 From: Kyle Robbertze Date: Fri, 18 Jun 2021 22:37:43 +0200 Subject: [PATCH 1/4] Drop Ubuntu Xenial support Fixes: #1226 --- .github/workflows/test.yml | 28 ------- Vagrantfile | 4 - docs/_docs/vagrant.md | 23 +++--- install | 13 +-- installer/lib/requirements-ubuntu-xenial.apt | 80 ------------------- ...uirements-ubuntu-xenial_docker_minimal.apt | 69 ---------------- 6 files changed, 13 insertions(+), 204 deletions(-) delete mode 100644 installer/lib/requirements-ubuntu-xenial.apt delete mode 100644 installer/lib/requirements-ubuntu-xenial_docker_minimal.apt diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6843c327f..654138670 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,31 +58,3 @@ jobs: composer install --no-progress --dev cd airtime_mvc/tests php ../../vendor/bin/phpunit - test-xenial-php: - runs-on: ubuntu-16.04 - env: - ENVIRONMENT: testing - LIBRETIME_LOG_DIR: /tmp/log/libretime - steps: - - uses: actions/checkout@v2 - - name: Setup PostgreSQL - run: | - sudo systemctl start postgresql.service - pg_isready - sudo -u postgres psql -c 'CREATE DATABASE libretime;' - sudo -u postgres psql -c "CREATE USER libretime WITH PASSWORD 'libretime';" - sudo -u postgres psql -c 'GRANT CONNECT ON DATABASE libretime TO libretime;' - sudo -u postgres psql -c 'ALTER USER libretime CREATEDB;' - - name: Setup PHP with specific version - uses: shivammathur/setup-php@v2 - with: - php-version: "7.0" - - name: Install prerequisites - run: sudo -E ./.github/scripts/install-xenial.sh - - name: Run PHP tests - run: | - echo "::group::Install PHP dependencies" - composer install --no-progress --dev - echo "::endgroup::" - cd airtime_mvc/tests - php ../../vendor/bin/phpunit diff --git a/Vagrantfile b/Vagrantfile index c099fdafe..7356a97bf 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -48,10 +48,6 @@ Vagrant.configure("2") do |config| os.vm.box = "bento/ubuntu-18.04" provision_libretime(os, "debian.sh", installer_args) end - config.vm.define "ubuntu-xenial" do |os| - os.vm.box = "bento/ubuntu-16.04" - provision_libretime(os, "debian.sh", installer_args) - end config.vm.define "debian-buster" do |os| os.vm.box = "bento/debian-10" provision_libretime(os, "debian.sh", installer_args) diff --git a/docs/_docs/vagrant.md b/docs/_docs/vagrant.md index 410f3af0e..72c46bcb4 100644 --- a/docs/_docs/vagrant.md +++ b/docs/_docs/vagrant.md @@ -34,8 +34,8 @@ This is fixed by stopping virtualbox and re-creating the vagrant box: ``` sudo systemctl stop virtualbox -vagrant destroy ubuntu-xenial -vagrant up ubuntu-xenial --provider=libvirt +vagrant destroy ubuntu-bionic +vagrant up ubuntu-bionic --provider=libvirt ``` ### Debian and Ubuntu @@ -46,9 +46,9 @@ sudo usermod -aG libvirt $USER # Reboot -vagrant box add bento/ubuntu-16.04 --provider=virtualbox -vagrant mutate bento/ubuntu-16.04 libvirt -vagrant up ubuntu-xenial --provider=libvirt +vagrant box add bento/ubuntu-18.04 --provider=virtualbox +vagrant mutate bento/ubuntu-18.04 libvirt +vagrant up ubuntu-bionic --provider=libvirt ``` ### Other Distributions @@ -62,9 +62,9 @@ sudo usermod -a -G libvirt $USER # Reboot vagrant plugin install vagrant-mutate -vagrant box fetch bento/ubuntu-16.04 -vagrant mutate bento/ubuntu-16.04 libvirt -vagrant up ubuntu-xenial --provider=libvirt +vagrant box fetch bento/ubuntu-18.04 +vagrant mutate bento/ubuntu-18.04 libvirt +vagrant up ubuntu-bionic --provider=libvirt ``` ## Starting LibreTime Vagrant @@ -76,26 +76,25 @@ change the default provider if you have multiple installed. This can be done by ```bash git clone https://github.com/libretime/libretime.git cd libretime -vagrant up ubuntu-xenial +vagrant up ubuntu-bionic ``` If everything works out, you will find LibreTime on [port 8080](http://localhost:8080) and Icecast on [port 8000](http://localhost:8000). Once you reach the web setup GUI you can click through it using the default values. To -connect to the vagrant machine you can run `vagrant ssh ubuntu-xenial` in the libretime +connect to the vagrant machine you can run `vagrant ssh ubuntu-bionic` in the libretime directory. ## Alternative OS installations -With the above instructions LibreTime is installed on Ubuntu Xenial Xerus. The Vagrant setup +With the above instructions LibreTime is installed on Ubuntu Bionic. The Vagrant setup offers the option to choose a different operation system according to you needs. | OS | Command | Comment | | ------------ | -------------------------- | ----------------------------------------------------------- | | Debian 10 | `vagrant up debian-buster` | Install on Debian Buster. | | Ubuntu 18.04 | `vagrant up ubuntu-bionic` | Install on Ubuntu Bionic Beaver. | -| Ubuntu 16.04 | `vagrant up ubuntu-xenial` | Install on Ubuntu Xenial Xerus. | | CentOS | `vagrant up centos` | CentOS 8 with native systemd support and activated SELinux. | ## Troubleshooting diff --git a/install b/install index a0e5553b4..c0ecc21de 100755 --- a/install +++ b/install @@ -625,7 +625,6 @@ is_debian_dist=false is_debian_buster=false is_ubuntu_dist=false is_ubuntu_bionic=false -is_ubuntu_xenial=false is_centos_dist=false is_centos_7=false is_centos_8=false @@ -641,13 +640,8 @@ case "${dist}-${code}" in is_ubuntu_bionic=true ;; ubuntu-16.04|ubuntu-xenial|ubuntu-xenial_docker_minimal) - code="xenial" - is_ubuntu_dist=true - is_ubuntu_xenial=true - ;; - ubuntu-14.04|ubuntu-trusty) - echo -e "ERROR: Ubuntu Trusty is archived and does not receive any security or other updates since 2019-04-17." >&2 - echo -e "The LibreTime installer dropped support for installing LibreTime on Trusty in 3.0.0-alpha.8." >&2 + echo -e "ERROR: Ubuntu Xenial is archived and does not receive any security or other updates since 2021-04-01." >&2 + echo -e "The LibreTime installer dropped support for installing LibreTime on Xenial in 3.0.0-alpha.10." >&2 exit 1 ;; debian-9|debian-stretch) @@ -1076,8 +1070,6 @@ if $is_debian_buster; then loudCmd "a2enmod rewrite php7.3 proxy proxy_http" elif $is_ubuntu_bionic; then loudCmd "a2enmod rewrite php7.2 proxy proxy_http" -elif $is_ubuntu_xenial; then - loudCmd "a2enmod rewrite php7.0 proxy proxy_http" elif $is_centos_dist; then verbose "TODO: enable Apache modules mod_rewrite, mod_php, mod_proxy and mod_proxy_http manually" else @@ -1227,7 +1219,6 @@ if $is_centos_dist; then else # not on centos ip_device="eth0" - $is_ubuntu_xenial && ip_device="enp0s8" IP=$(ifconfig ${ip_device} 2>/dev/null |awk -F'[ :]+' '/inet addr:/ {print $4}') fi verbose "...Done" diff --git a/installer/lib/requirements-ubuntu-xenial.apt b/installer/lib/requirements-ubuntu-xenial.apt deleted file mode 100644 index 840db9306..000000000 --- a/installer/lib/requirements-ubuntu-xenial.apt +++ /dev/null @@ -1,80 +0,0 @@ -apache2 -build-essential -coreutils -curl -ecasound -flac -gcc -gir1.2-gtk-3.0 -gstreamer1.0-plugins-bad -gstreamer1.0-plugins-good -gstreamer1.0-plugins-ugly -icecast2 -lame -libao-ocaml -libapache2-mod-php7.0 -libcamomile-ocaml-data -libcairo2-dev -libfaad2 -libffi-dev -libglib2.0-dev -libgirepository1.0-dev -libmad-ocaml -libopus0 -libportaudio2 -libpulse0 -libpq-dev -libsamplerate0 -libsoundtouch-ocaml -libssl-dev -libtaglib-ocaml -liquidsoap -liquidsoap-plugin-alsa -liquidsoap-plugin-ao -liquidsoap-plugin-faad -liquidsoap-plugin-flac -liquidsoap-plugin-icecast -liquidsoap-plugin-lame -liquidsoap-plugin-mad -liquidsoap-plugin-ogg -liquidsoap-plugin-portaudio -liquidsoap-plugin-pulseaudio -liquidsoap-plugin-taglib -liquidsoap-plugin-voaacenc -liquidsoap-plugin-vorbis -lsb-release -lsof -mpg123 -patch -php7.0 -php7.0-curl -php7.0-gd -php7.0-pgsql -php-apcu -php-bcmath -php-mbstring -php-pear -pkg-config -postgresql -postgresql-client -pwgen -python3 -python3-dev -python3-gi -python3-gi-cairo -python3-gst-1.0 -python3-pika -python3-pip -python3-virtualenv -python3-cairo -rabbitmq-server -silan -sysvinit-utils -unzip -uwsgi -uwsgi-plugin-python3 -vorbisgain -vorbis-tools -vorbis-tools -xmlstarlet -zip diff --git a/installer/lib/requirements-ubuntu-xenial_docker_minimal.apt b/installer/lib/requirements-ubuntu-xenial_docker_minimal.apt deleted file mode 100644 index 3452d8a2d..000000000 --- a/installer/lib/requirements-ubuntu-xenial_docker_minimal.apt +++ /dev/null @@ -1,69 +0,0 @@ -apache2 -build-essential -coreutils -curl -ecasound -flac -gstreamer1.0-plugins-bad -gstreamer1.0-plugins-good -gstreamer1.0-plugins-ugly -lame -libao-ocaml -libapache2-mod-php7.0 -libcamomile-ocaml-data -libfaad2 -libffi-dev -libmad-ocaml -libopus0 -libportaudio2 -libpulse0 -libpq-dev -libsamplerate0 -libsoundtouch-ocaml -libssl-dev -libtaglib-ocaml -liquidsoap -liquidsoap-plugin-alsa -liquidsoap-plugin-ao -liquidsoap-plugin-faad -liquidsoap-plugin-flac -liquidsoap-plugin-icecast -liquidsoap-plugin-lame -liquidsoap-plugin-mad -liquidsoap-plugin-ogg -liquidsoap-plugin-portaudio -liquidsoap-plugin-pulseaudio -liquidsoap-plugin-taglib -liquidsoap-plugin-voaacenc -liquidsoap-plugin-vorbis -lsb-release -lsof -mpg123 -patch -php7.0 -php7.0-curl -php7.0-gd -php7.0-pgsql -php-apcu -php-bcmath -php-mbstring -php-pear -postgresql-client -pwgen -python3 -python3-dev -python3-gst-1.0 -python3-pika -python3-pip -python3-virtualenv -python3-cairo -silan -sysvinit-utils -unzip -vorbisgain -vorbis-tools -vorbis-tools -xmlstarlet -uwsgi -uwsgi-plugin-python3 -zip From 39a8b66b49f77d6e3609af5390ef1f641938c7ea Mon Sep 17 00:00:00 2001 From: Kyle Robbertze Date: Fri, 2 Jul 2021 12:32:12 +0200 Subject: [PATCH 2/4] Update upgrade documentation Fixes: #71 #623 --- docs/_docs/upgrading.md | 61 +++++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 18 deletions(-) diff --git a/docs/_docs/upgrading.md b/docs/_docs/upgrading.md index d5dd8304d..d730b7df5 100644 --- a/docs/_docs/upgrading.md +++ b/docs/_docs/upgrading.md @@ -6,18 +6,17 @@ category: admin ## LibreTime versioning -LibreTime 3.x versions support upgrading from Airtime 2.5.x versions. LibreTime follows the [Semantic Versioning (semver)](http://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. -Any pre-release versions of LibreTime are denoted by appending a hyphen and a series -of dot separated identifiers immediately following the patch version. This pre-release indicates -that the version is unstable in a sense that it might contain incomplete features or not satisfy the -intended compatibility requirements as per semver. +Any pre-release versions of LibreTime are denoted by appending a hyphen and a +series of dot separated identifiers immediately following the patch version. +This pre-release indicates that the version is unstable in a sense that it might +contain incomplete features or not satisfy the intended compatibility +requirements as per semver. ## Upgrading @@ -27,20 +26,46 @@ intended compatibility requirements as per semver. > downtime, so you should always have a fallback system available during the > upgrade to ensure broadcast continuity. -Before upgrading a production LibreTime server, you should back up both the PostgreSQL -database and the storage server used by LibreTime. This is especially important if you have not already -set up a regular back up routine. This extra back up is a safety measure in case of accidental data loss -during the upgrade, for example due to the wrong command being entered when moving files. See -[Backing up the server](/docs/backing-up-the-server) in this manual for details of how to perform these back ups. +Before upgrading a production LibreTime server, you should back up both the +PostgreSQL database and the storage server used by LibreTime. This is especially +important if you have not already set up a regular back up routine. This extra +back up is a safety measure in case of accidental data loss during the upgrade, +for example due to the wrong command being entered when moving files. See +[Backing up the server](/docs/backing-up-the-server) in this manual for details +of how to perform these back ups. -The LibreTime [installation script](/install) will detect an existing LibreTime or Airtime deployment and back up any configuration files that it finds. We recommend taking your own manual backups of the configuration yourself nevertheless. The install script also tries to restart the needed services during an upgrade. In any case you should monitor if this happened and also take a quick look at the logs files to be sure everything is still fine. Now might be the time to reboot the system or virtual machine LibreTime is running on since regular reboots are part of a healthy system anyway. +The LibreTime [installation script](/install) will detect an existing LibreTime +deployment and back up any configuration files that it finds. We recommend +taking your own manual backups of the configuration yourself nevertheless. The +install script also tries to restart the needed services during an upgrade. In +any case you should monitor if this happened and also take a quick look at the +logs files to be sure everything is still fine. Now might be the time to reboot +the system or virtual machine LibreTime is running on since regular reboots are +part of a healthy system anyway. -After the upgrade has completed, you may need to clear your web browser's cache before logging into the new version of the LibreTime administration interface. If the playout engine starts up and detects that a show should be playing at the current time, it will skip to the correct point in the current item and start playing. +After the upgrade has completed, you may need to clear your web browser's cache +before logging into the new version of the LibreTime administration interface. +If the playout engine starts up and detects that a show should be playing at the +current time, it will skip to the correct point in the current item and start +playing. -There will be tested ways to switch from a LibreTime pre-release to a packaged version of LibreTime. +> **Note:** Airtime's _linked files_ and _watched folders_ features currently do +> not work in Libretime. -Airtime 2.5.x versions support upgrading from version 2.3.0 and above. If you are -running a production server with a version of Airtime prior to 2.3.0, you should -upgrade it to version 2.3.0 before continuing. +### Migrating from Airtime -> **Note:** Airtime's _linked files_ and _watched folders_ features currently do not work in Libretime. +LibreTime has dropped support for Ubuntu 16.04, which is the last supported +version of Ubuntu that Airtime supports. The following instructions describe how +to migrate from Airtime to LibreTime. If there are issues encountered while +upgrading, please [file a bug](https://github.com/libretime/libretime/issues/new?labels=bug&template=bug_report.md) + +1. Take a [backup of the server](/docs/backing-up-the-server) +2. Create a new system for LibreTime and run the install script, as described in + [install](/install). +3. Before running the web-configuration, restore the Airtime database to the new + PostgreSQL server, media database and configuration file +4. Edit the configuration file to update any changed values +5. Edit the Icecast password in `/etc/icecast2/icecast.xml` to reflect the + password used in Airtime +6. Restart the LibreTime services +7. Navigate to the LibreTime web-page From f94e90a7f68c74669c88dd1072c5f0041d24ad71 Mon Sep 17 00:00:00 2001 From: Kyle Robbertze Date: Sat, 3 Jul 2021 18:39:47 +0200 Subject: [PATCH 3/4] update documentation to remove bionic --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- docs/_docs/install.md | 4 +-- docs/_docs/upgrading.md | 41 +++++++++++++--------------- install | 8 +----- 4 files changed, 23 insertions(+), 32 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 4fd6996b7..8342d1bdd 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -26,7 +26,7 @@ Version from the upgrade popup if you can reach it. **Installation method:** - OS: [e.g. Ubuntu] -- OS Version [e.g. 16.04.5 LTS (Xenial Xerus)] +- OS Version [e.g. 18.04.5 LTS (Bionic Beaver)] - Method: [e.g. `./install` script or packages] - Details: [how did you call the install script, where did you get packages from] diff --git a/docs/_docs/install.md b/docs/_docs/install.md index cd3a38cf7..535520d38 100644 --- a/docs/_docs/install.md +++ b/docs/_docs/install.md @@ -10,9 +10,9 @@ permalink: /install ## Minimum System Requirements - One of the following Linux distributions - - Ubuntu 16.04 LTS, 18.04 LTS + - Ubuntu 18.04 LTS - Debian 10 - - Raspberry Pi OS 9, 10 (formerly Raspbian) + - Raspberry Pi OS 10 (formerly Raspbian) - 1 Ghz Processor - 2 GB RAM recommended (1 GB required) - Wired internet connection and static IP address for on-prem install diff --git a/docs/_docs/upgrading.md b/docs/_docs/upgrading.md index d730b7df5..2b372f224 100644 --- a/docs/_docs/upgrading.md +++ b/docs/_docs/upgrading.md @@ -26,28 +26,25 @@ requirements as per semver. > downtime, so you should always have a fallback system available during the > upgrade to ensure broadcast continuity. -Before upgrading a production LibreTime server, you should back up both the -PostgreSQL database and the storage server used by LibreTime. This is especially -important if you have not already set up a regular back up routine. This extra -back up is a safety measure in case of accidental data loss during the upgrade, -for example due to the wrong command being entered when moving files. See -[Backing up the server](/docs/backing-up-the-server) in this manual for details -of how to perform these back ups. - -The LibreTime [installation script](/install) will detect an existing LibreTime -deployment and back up any configuration files that it finds. We recommend -taking your own manual backups of the configuration yourself nevertheless. The -install script also tries to restart the needed services during an upgrade. In -any case you should monitor if this happened and also take a quick look at the -logs files to be sure everything is still fine. Now might be the time to reboot -the system or virtual machine LibreTime is running on since regular reboots are -part of a healthy system anyway. - -After the upgrade has completed, you may need to clear your web browser's cache -before logging into the new version of the LibreTime administration interface. -If the playout engine starts up and detects that a show should be playing at the -current time, it will skip to the correct point in the current item and start -playing. +1. Take a [backup of the server](/docs/backing-up-the-server). This is + especially important if you have not already set up a regular back up routine. + This extra back up is a safety measure in case of accidental data loss during + the upgrade, for example due to the wrong command being entered when moving + files. It is also recommended to backup all the configuration files under + `/etc/airtime/`. +2. Run `./install -fiap` as described in the [install documentation](/install). + This will detect an existing LibreTime deployment and backup any + configuration files that if finds. The install script also tries to restart + the needed services during an upgrade. In any case you should monitor if this + happened and also take a quick look at the logs files to be sure everything + is still fine. Now might be the time to reboot the system or virtual machine + LibreTime is running on since regular reboots are part of a healthy system + anyway. +3. Log into the new version of the LibreTime administration interface. If the + playout engine starts up and detects that a show should be playing at the + current time, it will skip to the correct point in the current time and start + playing. If you encounter issues trying to connect to the new administration + interface, you may need to clear your web browser's cache. > **Note:** Airtime's _linked files_ and _watched folders_ features currently do > not work in Libretime. diff --git a/install b/install index c0ecc21de..1b232fbf6 100755 --- a/install +++ b/install @@ -146,8 +146,7 @@ function systemInitDetect() { verbose "\nDetecting init system type ..." # Get the path of the command where pid=1 following any symlinks pid_1_path=$(readlink --canonicalize -n /proc/1/exe) - # returns '/sbin/init' (Debian Wheezy & Ubuntu Trusty) - # returns '(/usr)?/lib/systemd/systemd' (Debian Stretch, Debian Jessie, Debian Buster, Ubuntu Xenial, CentOS 7) + # returns '(/usr)?/lib/systemd/systemd' (Debian Buster, CentOS 7) verbose "Detected path to PID=1 process: $pid_1_path" # Get package of PID=1 path as it identifies the init system. # Allow this to fail, at least then the init system can be guessed from the @@ -724,11 +723,6 @@ if [ "$ignore_dependencies" = "f" ]; then # Get apt-get version by returning the 2nd parameter from the 1st line of output apt_version=$(apt-get --version |awk 'NR == 1 { print $2 }') # returns 1.8.0~alpha3 (Debian Buster) - # returns: 1.4.7 (Debian Stretch) - # returns: 0.9.7.9 (Debian Wheezy) - # returns: 1.0.1ubuntu2 (Ubuntu Trusty) - # returns: 1.0.9.8.4 (Debian Jessie) - # returns: 1.2.9 (Ubuntu Xenial) verbose "Detected apt-get version as: $apt_version" apt_version_formatted=$(awk 'BEGIN {FS = "."} {printf "%03d.%03d\n", $1,$2}' <<< $apt_version) [[ "$apt_version_formatted" < "001.001" ]] && apt_force_options="--force-yes" From 9494a17ad04d3e543044de7aeeb87e046f58d2dd Mon Sep 17 00:00:00 2001 From: Kyle Robbertze Date: Mon, 12 Jul 2021 10:15:31 +0200 Subject: [PATCH 4/4] move Airtime migration note to the correct place --- docs/_docs/upgrading.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_docs/upgrading.md b/docs/_docs/upgrading.md index 2b372f224..b1290f24e 100644 --- a/docs/_docs/upgrading.md +++ b/docs/_docs/upgrading.md @@ -46,11 +46,11 @@ requirements as per semver. playing. If you encounter issues trying to connect to the new administration interface, you may need to clear your web browser's cache. +### Migrating from Airtime + > **Note:** Airtime's _linked files_ and _watched folders_ features currently do > not work in Libretime. -### Migrating from Airtime - LibreTime has dropped support for Ubuntu 16.04, which is the last supported version of Ubuntu that Airtime supports. The following instructions describe how to migrate from Airtime to LibreTime. If there are issues encountered while