Commit Graph

361 Commits

Author SHA1 Message Date
David 7ad096bd5b add xenial minimal flags 2018-09-16 22:19:10 +10:00
David 6222e56ee4 add defaults for no-postgres and no-rabbitmq options 2018-09-16 22:13:30 +10:00
David 9f15b2d3df begin docker xenial support 2018-09-16 21:55:55 +10:00
Robb 914e2a2384
Merge pull request #475 from WiccyShackleton/master
Fix to the installer to enable successful install on Raspbian 9 (stretch)
2018-05-24 14:36:04 -04:00
WiccyShackleton 46a820b817 Marked where the raspbian stretch fix is located 2018-04-04 02:07:39 +00:00
WiccyShackleton 81e0832a2f Modified install to recognise Raspbian Stretch 9 as Debian Stretch - installer now works on Raspberry Pi 2 and above 2018-04-04 01:55:10 +00:00
Lucas Bickel b718a1b53b Remove obsolete settings from master config template 2018-03-02 13:12:19 +01:00
Lucas Bickel 538bfb8426 Fix install --version 2018-02-05 18:46:08 +01:00
Kyle Robertze c16d7c2a1d remove media-monitor
airtime-media-monitor conflicts with airtime-analyzer, which is what
is now used to monitor the LibreTime application

https://github.com/LibreTime/libretime-debian-packaging/issues/2#issuecomment-359987457
2018-01-24 09:20:51 +02:00
Xabi Spacebiker 167f7d1c98 Update install 2017-10-05 01:04:02 +02:00
Xabi Spacebiker 09dbe3ea06 Update install
Adding support for Debian 9 Stretch
2017-10-05 00:17:46 +02:00
Lucas Bickel 2b64fe0d96 Disable media-monitor on update
The installer originally contained code to stop media-monitor on
updates. This code was removed together with media-monitor. In
the update case we want to make sure that media-monitor is never
running after updating to LibreTime.

The stop command will fail with a warning on systems that never
had media-monitor installed. This warning can be ignored and the
other services stopped with the same command still get stopped
as intended.

Fix #230
2017-08-06 22:34:22 +02:00
Lucas Bickel fa2018a2c5 Simplify configuration file structure
This removes most of the legacy upstream config madness by not using
weird config files spread all over the place.

This isn't the solution to other config reading fragility issues, but
it does move the whole config back to the central airtime.conf file.
2017-07-21 13:15:28 +02:00
Lucas Bickel 9c5b769cf0 Fix update warning
I fixed the manual installer to ensure that the VERSION file ends up
in the right directory on install.

I also took care of the pre-release parts of the naggingness. It shows
no updates as long there is no stable release for the current version.
As soon as one is available it uses the orange update icon to alert the
user that an update would be in order since a stable version has been
released.
2017-07-17 21:15:51 +02:00
Lucas Bickel 5013a76060 Don't start services on install
We need to wait until the setup routine is finished or else the
install will fail when starting celery.
2017-06-27 22:44:13 +02:00
Lucas Bickel 43eb777177 Clean up file creation and remove std_err_override
* Re-order folder creation to make a bit more sense (the log file creation step was unreachable because python scripts always created the checked dir early)
* create dirs from pypo data_files in installer so pypo can run out of the box on a new install
* Fix path to logrotate script (logrotation needs testing though)
* Remove std_err_override module from install. Code-wise only airtime-media-monitor is still based on it and that is slated for removal together with std_err_override.
2017-05-01 19:04:40 +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 28fb7fca72 Changed on Xenial Upstart to Systemd 2017-04-19 20:35:47 +02:00
Lapotor c8a474e1fe Delete debug things, changed if for initctl 2017-04-11 14:36:34 +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 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
Lucas Bickel 9a6d5b0175 Restore SELinux tags after install 2017-03-13 14:10:29 +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
Robb Ebright 8fb41cabc0 adding --upgrade to pip install for pyopenssl 2017-03-11 19:15:33 +00:00
Robb Ebright 880496c20f Merge branch 'install-fix-python-ssl-workaround' of https://github.com/Robbt/libretime into Robbt-install-fix-python-ssl-workaround 2017-03-11 09:56:46 -05:00
Robb Ebright 2ae2377ee2 Modified install script to install PyOpenSSL for Ubuntu 14.04 for airtime-celery SSL fix 2017-03-10 17:13:24 -05:00
Lucas Bickel f80afc83c1 Fix default port 80 Listen case 2017-03-10 12:17:16 +01:00
Lucas Bickel 2350650e26 Enable icecast autoinstall
And fix docs :)
2017-03-07 15:36:18 +01:00
Lucas Bickel bd2f96acf2 Switch LibreTime port to 9080 in vagrant
Also expose icecast and make the airtime port generally configurable from the installer.

To aid in debugging and support the -v (verbose) argument was added to the call.
2017-03-07 13:26:52 +01:00
Lucas Bickel 8ed1dce4b1 Install airtime in vagrant env
Uses the old installer to get LibreTime installed quick and dirty on vagrant.

It uses the `install -fIap` command that does a local install and points the apache config
directly to the local working copy mounted in /vagrant.

While we don't have fancy autoloading for libretime like the docs do, this way
it's already easy to work against a local branch.

I'm not sure if the `-I` arg to the installer also covers the python parts of libretime.
2017-03-06 12:05:22 +01:00
Robb Ebright 86b1fcbf7c Added sample cloud_storage.conf to build dir and install script, changed production dir to symlink, added libretime ASCII art logo 2017-03-04 19:44:01 -05:00
Robb 9bac8354b6 Merge pull request #21 from radiorabe/feature/analyzer-on-travis
mostly run analyzer tests on travis
2017-03-04 19:17:23 -05:00
Robb Ebright a1c4b888c3 Added production directory during setup and used --upgrade parameter for pip install setuptools 2017-03-04 15:22:53 -05:00
Lucas Bickel 9b3d0c90da mostly run analyzer tests on travis
* [x] regonfigured the build matrix with more php jobs and a separate python job (we can add more python jobs later)
* [x] run tests on travis' trusty beta container (it's closer to what we need anyway)
* [x] install packages needed for analyzer tests in build env
* [x] added docs on how to run nosetests locally
* [x] don't run initctl in analyzer setup so setup can also be used on travis (and add it to the install script directly)
* [x] ignore replaygain checks on travis (it has proven quite impossible to get the needed python-gi module to work in the provided virtualenv)

I tried a lot of solutions to get the replaygain checks to run. I needed to decide that this has gone far enough, maybe someone who is more of a pythonista than me can take a crack at it and get it solved. Even without running those tests on CI/CD there are still plenty others.

This PR only has parts of what are needed for getting python tests running on travis as per #15. I only took a quick shot at anything not analyzer and figured I would not be able to "fix" them without digging a bit deeper (ie. also getting rid of std_err_override).
2017-03-03 20:38:27 +01:00
Lucas Bickel b79ab33de2 Install to /usr/share/airtime/php per default
The added php subdir lets us keep the vendor and airtime_mvc in the same relative position to each other while keeping everything in /usr/share/$name.

This does not yet take care of cleaning any files left at the old locations, taking care of those would make this installer even more bloated and should be the responsability of apt packages.
2017-03-02 13:13:34 +01:00
Albert Santoni f21fcb3dcc SAAS-1011 - Fixed one mimetype problem and fixed installer 2015-08-24 16:25:09 -04:00
Duncan Sommerville dff54ac880 Add composer install to installer 2015-07-01 00:24:11 -04:00
Duncan Sommerville b4599317e9 Run build from installer; add upstart files and templating back in 2015-06-30 12:16:31 -04:00
Duncan Sommerville 4c797cf100 Update installer to work with saas branch 2015-06-23 19:02:55 -04:00
Duncan Sommerville 92ad5bde6d Add fields to airtime.example.conf for compatibility, remove /etc/init scripts to prevent duplicate processes on startup 2015-06-17 14:49:12 -04:00
Duncan Sommerville ece81c3419 Fix bug where /airtime* named vhosts could break installation 2015-06-17 13:12:47 -04:00
Duncan Sommerville 2f20729e05 Small update to wording in install help 2015-05-05 12:41:02 -04:00
Albert Santoni e618861737 Start the daemons at bootup on Debian 2015-04-07 18:36:14 -04:00
Duncan Sommerville 47f7ad2e98 Fix to upgrade path 2015-03-25 12:03:01 -04:00
Duncan Sommerville 0a3d8ea515 Merge branch '2.5.x-installer' of https://github.com/sourcefabric/Airtime into 2.5.x-installer 2015-03-18 10:12:58 -04:00
Duncan Sommerville a91656a063 Fixed string comparison issue for installer on debian 2015-03-18 10:00:07 -04:00
Albert Santoni 0eebd182dd Installer support for Ubuntu 15.04 2015-03-16 12:22:17 -04:00