Commit Graph

15413 Commits

Author SHA1 Message Date
Robb 2b30a14744 Merge pull request #168 from radiorabe/feature/use-global-angular-install-and-not-cdn
Use the minimized angular from public dir instead of cdn
2017-04-28 19:58:20 -04:00
Robb 3b2a9451eb Merge pull request #169 from radiorabe/feature/use-official-magic
Use file-magic instead of python-magic
2017-04-28 19:56:38 -04:00
Robb 481b8b2ebc Merge pull request #188 from radiorabe/feature/update-docs
Refactor upgrading docs
2017-04-28 15:44:26 -04:00
Bill Burton 320856516f Merge remote-tracking branch 'upstream/master' into install-auto-detect-distro-init 2017-04-28 11:38:12 -04: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
Lucas Bickel a48bdb8461 Add info on system restart/reboot 2017-04-25 20:32:38 +02:00
Lucas Bickel 0f831c6e0b Update faq entry 2017-04-25 20:14:03 +02:00
Lucas Bickel b2f8a57332 Refactor upgrade docs
* [x] explain semver since this upgrade cases are when this applies
* [x] links to different parts of manual
* [x] move backup section to the top
* [x] add "real" git pull example
* [x] rename install script to plain ./install
* [x] remove very old monit upgrade help
2017-04-25 20:09:14 +02:00
Lucas Bickel 65a4961aac Merge pull request #187 from Kirill-Kad/patch-1
Correction lines 399 and 400.  ls_script.liq
2017-04-25 13:09:58 +02:00
Lucas Bickel 711238af18 Merge pull request #171 from bburton/vagrant-debian-bento-box
Switch Vagrantfile to use bento boxes for Debian #170
2017-04-20 15:22:26 +02:00
Lucas Bickel 122166216a Merge pull request #157 from Lapotor/Ubuntu-16.04-Update
Ubuntu 16.04 installer update
2017-04-20 15:21:56 +02:00
Lapotor 74d58b7555 Removed upstart-sysv comment 2017-04-19 20:45:17 +02:00
Bill Burton 450a92384f Switch Vagrantfile to use bento boxes for Debian #170 2017-04-19 14:42:12 -04:00
Lapotor 0766b91cde Added remind to reload systemctl for Xenail 2017-04-19 20:36:48 +02:00
Lapotor 28fb7fca72 Changed on Xenial Upstart to Systemd 2017-04-19 20:35:47 +02:00
Lucas Bickel 9ce611130c Use file-magic instead of python-magic
This gets the mime type using file-magic in a most minimal way. Since the python bindings have been available as a distro package for quite a while it is written in a way so it should also run on pre pypi installs of file-magic. This means not being able to use nice things like magic.detect_from_filename due to the fact that they where added rather recently (with recently being 2 years ago).

As the mime type is only used to check for wav files that mutagen can't handle it only reads the mime type and ignores the charset and other attributes that magic can find.

Due to the fact that file-magic is not properly unicode safe I'm checking the file based on it's first 2048 bytes as per <http://stackoverflow.com/questions/34836792/python-magic-cant-identify-unicode-filename#comment57418632_34838355>. This is not an issue since wav files need to start with a wav header by definition anyway.

I tested this sucessfully on both CentOS and Debian with files containing Unicode in their names.
2017-04-18 09:49:09 +02:00
Lucas Bickel f9a19d9e27 Uses the minimized angular from public dir instead of cdn
This uses the available minimized version of angular instead of using the non minimized version from the google cdn.
2017-04-18 08:43:44 +02:00
Robb ebd7c1d2a3 Merge pull request #163 from radiorabe/feature/python-debug-flag-for-140
Problem: airtime-liquidsoap --debug only works for liquidsoap
2017-04-17 16:36:07 -04:00
Robb b536769a5d Merge pull request #164 from radiorabe/feature/project-rename-in-defaultdata
Problem: legacy upstream name is still in defaultdata
2017-04-17 14:58:21 -04:00
Robb 0089aa203b Merge pull request #165 from radiorabe/feature/update-vagrant-docs
Update vagrant docs for new ubuntu boxes
2017-04-17 14:57:36 -04:00
Lucas Bickel e34d87a1da Update vagrant docs for new ubuntu boxes 2017-04-16 01:33:41 +02:00
Lucas Bickel 8253a070f4 Update name in ref_off_air_meta in Liquidsoap 2017-04-16 01:23:40 +02:00
Lucas Bickel 458d5254ac Remove legacy upstream name from defaultdata 2017-04-16 00:14:54 +02:00
Lucas Bickel 007ff5561c Pass debug flag to python logger as well 2017-04-15 23:27:04 +02:00
Robb 54ded86f6d Merge pull request #143 from radiorabe/fix/pervasives-in-test-script
Do not explicity load pervasives.liq
2017-04-14 17:15:51 -04:00
Lucas Bickel f1d6fdea39 Merge pull request #161 from Robbt/fix/celery-worker-crash
Fix/celery worker crash
2017-04-14 09:25:58 +02:00
Robb Ebright 2d7882872b use celery 3.0 and compatible kombo 2017-04-13 23:11:59 -04:00
Robb Ebright c7131e0936 set celery version 3 2017-04-13 21:58:49 -04:00
Robb cbdcba991b Merge pull request #149 from radiorabe/fix/js-return-on-i18n-resource
Use json_encode if we need to return js and not json
2017-04-13 20:30:49 -04:00
Lucas Bickel b33c154dd1 Merge pull request #159 from bburton/vagrant-ubuntu-bento-box
Switch Vagrantfile to use bento boxes for ubuntu #158
2017-04-12 22:10:33 +02:00
Bill Burton 5ef232a72c Switch Vagrantfile to use bento boxes for ubuntu #158 2017-04-12 12:51:36 -04:00
Lapotor c8a474e1fe Delete debug things, changed if for initctl 2017-04-11 14:36:34 +02:00
Lucas Bickel b9d95f72ae Merge pull request #151 from Lapotor/alsa-ubuntu
Alsa-ubuntu.deb Update
2017-04-11 11:08:30 +02: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
Lapotor a6d6b8a06c Deleted upstart from auto install 2017-04-11 06:04:29 +02:00
Lapotor 9c06be3b99 Deletet Auto install of Upstart 2017-04-11 06:03:45 +02:00
Lapotor 1132f79115 Delete develop things 2017-04-11 05:55:42 +02:00
Lapotor 6a088c5603 auto reboot added
after installing upstart it will automaticly restart
2017-04-11 05:47:43 +02:00
Lapotor 78e54eed0b added curl 2017-04-11 05:24:45 +02:00
Lapotor ad2435b2e6 Added php-bcmath and php-mbstring which are needed 2017-04-11 03:12:42 +02:00
Lapotor 585ea7f82e Update for install on Ubuntu 16.04
Changed will have additional changes is backwards comaptible only if code is xenial the changes will happen
2017-04-11 03:11:23 +02:00
Lapotor 230aea468e changed --force-yes to --allow if ubuntu xenial 2017-04-11 00:37:23 +02:00
Robb 05766d929f Merge pull request #150 from radiorabe/fix/always-install-curl
Install curl on all platforms
2017-04-10 14:05:11 -04:00
Lucas Bickel 0696b3c7bd Merge pull request #153 from bburton/patch-1
Create .gitattributes to ensure proper cloning with Windows Git
2017-04-10 00:13:20 +02:00
Lapotor fe92fd00cc Create requirements-ubuntu-xenial.apt 2017-04-09 21:51:17 +02:00
Lapotor 9160ffaf20 Delete requirements-ubuntu-xenial.apt 2017-04-09 21:43:02 +02:00
Lapotor 92eb3946ab Create requirements-ubuntu-xenial.apt
Made a list of pakages which arent't avaibled in Ubuntu 16.04
2017-04-09 20:48:36 +02:00
Bill Burton bd75773bfe Create .gitattributes to ensure proper cloning with Windows Git
Address issue #141 so Git cloning under Windows preserves line endings of relevant scripts and files regardless of a user's local Git configuration so it's possible to provision a VM with Vagrant, install and run LibreTime in place without issue.
2017-04-09 14:41:52 -04:00
Lucas Bickel 19320e623c Install curl on all platforms
As per the https://github.com/LibreTime/libretime/issues/145#issuecomment-292744215 it looks like we always need to install this.
2017-04-09 12:48:04 +02:00
Lucas Bickel 9807e78f72 Use json_encode if we need to return js and not json
Turns out the zf1 jsonHelper whas doing some weird stuff to the content-type header under the hood.
2017-04-09 12:40:35 +02:00