Commit Graph

29 Commits

Author SHA1 Message Date
Jonas L e991870e2d
chore: clean unmaintained centos files (#2212)
Fix #1475
2022-10-08 08:07:53 +02:00
Jonas L f8de1ec865
chore: install python3-venv in vagrant for dev (#2057) 2022-08-14 19:56:00 +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 4004981429 chore: allow vagrant rabbitmq management access 2022-06-21 13:13:49 +02:00
jo 1a9fa6b559 chore: allow vagrant postgresql remote access 2022-06-21 13:13:49 +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
Jonas L 87ab49c8b9
chore: improve vagrant debian prepare script (#1850)
- add vim package
- split apt-cacher packages and utils
2022-05-09 12:55:15 +02:00
Jonas L 19faffea16
fix: make vagrant source.list update idempotent (#1520) 2022-01-17 09:33:09 +02:00
Jonas L 56a3875e2d
chore: add auto-apt-proxy to vagrant prepare (#1511)
* chore: add auto-apt-proxy to vagrant prepare

* bypass apt SRV redirections for deb.debian.org
2022-01-13 09:59:51 +02:00
Kyle Robbertze b193e0a28c add apt update to accept release suite change
Workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=929248
2021-08-18 17:56:45 +02:00
jo b5f302ac61 Enhance bash shebangs 2021-08-17 12:22:47 +02:00
jo 8b3e09d41c Format shell scripts
Fix flags order
2021-08-17 12:22:46 +02:00
jo 8ce437828e Remove install apt-get dangerous options
Apt should fail fast (and report) instead of
forcing a broken installation.

The version check is also not required anymore as
most distribution now provide an apt version > 1.1.
2021-08-17 00:07:39 +02:00
jo f2e840989a Fix executable bit 2021-06-04 17:06:05 +02:00
jo d8195f0fd8 Fix trailing whitespaces in files 2021-06-04 17:06:05 +02:00
jo 65f7b41487 Fix spelling 2021-06-04 17:04:53 +02:00
Lucas Bickel d67f321f74 fix(centos): update to python 3.8 and install psycopg 2021-01-04 11:50:06 +01:00
Lucas Bickel 194682d89c fix: update to CentOS 8 2020-12-26 12:59:54 +01:00
Robb Ebright 336e7d82b1 fixed installer to not change pass during upgrade and add centos support 2020-01-07 10:40:30 -05:00
Robb Ebright f42f331c29 added xmlstarlet to centos based vagrant install 2020-01-07 08:50:32 -05:00
Lucas Bickel 0ca6671355 (installer) remove puias dependency (now covered by epel, nux) 2019-08-18 18:05:16 +02:00
Kyle Robbertze 4556318967 merge ubuntu and debian provision scripts 2019-01-18 11:43:18 +02:00
Lucas Bickel 81f6845fc5 Add python-pika to install script
Currently pip is pulling a new pre-release version of pika. This
version does not seem to be backwards compatible and is the reason
why uploads fail on new installs.

Since there are packages available for pika on all major distros
we can get away with just installing those as pip will not try to
replace/upgrade them the way it is currently configured.
2017-08-05 13:26:37 +02:00
Bill Burton 3179651dec Installer auto-detects distro, portable system init
The theme of this commit is to make the install process more
resiliant to differences in distros by testing for specific
features or versions of executables rather than making as many
assumptions just on the distro and release.

* Distro and Release detection (install, Vagrantfile)
  - Added detection logic for distro and release based on
    /etc/os-release which is available on all potential supported
    distros. The --distribution and --release options can be used
    to override detection.
  - Added distro and release checks to ensure values specified are
    for a supported release.
  - Changed some distro checks to use booleans, e.g.
    if $is_centos_7; then ...
  - Added a simple check so if --distribution is specified, it will
    ensure it's at least sane, e.g. centos on debian or debian on
    centos will be caught.
  - In Vagrantfile, removed --distribution and --release options for
    all distro and release combinations.

* Portable Init System Detection and Management (install, centos.sh)
  - Added detection logic for init system type - systemd, Upstart or
    System V in the function systemInitDetect().
  - Added portable init system install in the function
    systemInitInstall() which depends on systemInitDetect(). After
    installing files, enables and starts service.
  - Added portable init system commands in the function
    systemInitCommand() for start, stop, reload, restart and status.
  - Python services don't support systemd but unconditionally install
    scripts for both Upstart and System V. Disabled by passing
    --no-init-script to setup.py for each service.
  - When upgrading, remove all old system init files in /etc/init,
    /etc/init.d, /etc/default and /etc/systemd/system.
  - In centos.sh, removed install of airtime systemd service files
    as it's now handled by install.
  - Created an Upstart .conf for airtime-celery
  - In systemd file for airtime-celery, changed absolute path to
    /usr/local/bin/celery and for centos, the install symlinks
    celery to /usr/local/bin.

* External Dependencies Install (install)
  - For external dependencies, only attempt to install for Debian-
    based distros with apt-get. For centos, a warning is displayed.
  - For systems with apt-get, detect version and if 1.1 or greater,
    use new force options, otherwise use --force-yes option.

* Configuring Apache (install)
  - For Apache, check for centos and use httpd for binary and
    service, otherwise use apache2ctl and apache2.
  - Detect Apache version 2 or better in a more reliable manner.
  - Detect Apache root folder and conf file name by running
    apache2ctl -V or httpd -V as appropriate.
  - Various checks for centos as it doesn't support the Debian
    Apache utilities a2ensite/a2dissite, a2enmod/a2dismod, etc.

* Installing Airtime Services (install)
  - Detect Python version. If less than 2.7.9, install OpenSSL
    support.
  - Prevent installing init files by passing --no-init-script to
    setup.py for each service.
  - Use systemInitInstall to install, enable and start each service
    after setup.py has run.
  - Removed filtering for WEB_USER for files in
    /etc/init/airtime*.template as that is handled in the
    systemInitInstall() function.

* Configuring PHP in Apache (install)
  - Detect PHP conf folder by checking a list of locations rather
    than making assumptions based on the distro and release.

* Configuring PostgreSQL (install)
  - Detects if the airtime user has already been created. If not,
    then creates the user.

* Installing Locales (install)
  - Minor changes to check for centos and prevent from running.
2017-04-28 11:00:50 -04:00
Lapotor 2b56932f18 Updated alsa_deb file
I looked up that the Alsa file name notlonger exist so i Updated it
2017-04-11 11:05:41 +02:00
Lucas Bickel b267036483 Fix recording through ecasound
This is part 2 of fixing ecasound recordings from line-in. Part 1 restored the User-Interface, part 2 takes care of getting to the point where ecasound gets started, records something and uploads it through rest when done. Part 3 will take care of making sure that the recorded file is mapped to the show and not just stored as a new track.

I refactored api_clients to not use urllib2 for posting multipart data since I was loosing my sanity over it and requests seems to have a modern approach to doing this compared to what api_clients was previously doing.
2017-03-24 15:15:37 +01:00
Lucas Bickel 7f8b73d9ae Add missing playout dependency 2017-03-13 20:56:59 +01:00
Lucas Bickel d2ffb6d91d Add missing packages 2017-03-13 14:10:03 +01:00
Lucas Bickel c29285ae48 Vagrant Debian support (and experimental CentOS)
This changes the Vagrant setup to support multiple installations as multiple
boxes. In addition to Ubuntu Vagrant can now be used to install on Debian
as well as on CentOS.

I took the chance to clean up the .deb install a bit and backported analyzer
and celery to SysV proper so it runs there. Some of the distro specfics were
moved to the install script from the python setup scripts to acheive this.

For the CentOS support I added a rather involved OS prepare script. In the
long term this will be added to the preparing-the-server docs we already have.

I had to switch the default port to http-alt (8080). On CentOS 9080 is registered
for ocsp and getting it to work for apache without hacking SELinux is hard. I
think 8080 is the RFC way to go anyhow. If anyone want to override this it
should be rather easy using the --web-port arg and by hacking Vagrantfile.

The PyOpenSSL code has been refactored for all the distros that the Vagrantfile
now supports.

As far as my checks go, I tried this code with all the distros, uploaded a track
and downloaded a unicode and a ssl podcast and was able to listen to them
in each case.

In the experimental CentOS case, the UI is not up to spec since services
need to get scheduled through systemctl and the status overview (ie. on the /?config page)
do not work properly. They need to be as follows:

```
sudo systemctl start airtime-playout
sudo systemctl start airtime-liquidsoap
sudo systemctl start airtime_analyzer.service
sudo systemctl start airtime-celery.service
```
2017-03-12 13:42:22 +01:00