Commit Graph

79 Commits

Author SHA1 Message Date
Lucas Bickel e28ad471f9 Rewrite config from /etc/airtime-saas to plain /etc/airtime
This is the results of sed -i -e 's|/etc/airtime-saas/|/etc/airtime/|' `grep -irl 'airtime-saas' airtime_mvc/ python_apps/` :P

It might need more testing, the airtime-saas part never really made sense, zf1 has environments for that, ie you would create a saas env based on production for instance.

I beleive legacy upstream was using this to share configuration between customers (ie. analyser runs only once and writes to a shared S3 bucket). I assume they mount the airtime-saas folder onto individual customers instances with a global config. Like I said, I don't feel that this makes sense since all it does is make hacking at the configs in airtime-saas a bit easier. A serious SaaS operation should be using something like puppet or ansible to achieve this.
2017-03-03 15:57:41 +01:00
Lucas Bickel 21a319767f Fix missing AMQPConnection errors in setup
Also fixes them elsewhere, apart from having switched to a vendorized version, I also used one that is already namespaced.

The easy way out here is to use it in the namespaced fashion, it is only used in a few places and I know the library well enough to be certain that nothing much changed apart from the namespacing.
2017-03-02 12:38:44 +01:00
Lucas Bickel 625f92fe44 Vendorize ZF1, fix PHPUnit and configure travis
This a a rather large commit due to the nature of the stuff it is touching. To get PHPUnit up and running again I had to update some deps and I did so by vendorizing them. The vendorizing of zf1 makes sense since distros are already considering to drop it from their repos.

* [x] install vendorized zf1 with composer
* [x] load composer autoloader before zf1
* [x] Implement headAction for all Zend_Rest_Controller based controllers
* [x] switch to yml dataset to get around string only limitations of xml sets (also removed warning in readme)
* [x] use year 2044 as hardcoded date for tests since it is in the future and has the same days like previously used 2016
* [x] make tests easier to run when accessing phpunit directly
* [x] clean up test helper to always use airtime.conf
* [x] switch test dbname to libretime_test
* [x] test db username password switched to libretime/libretime
* [x] install phpunit with composer in a clear version (make tests easier to reproduce on other platforms)
* [x] remove local libs from airtime repo (most of airtime_mvc/library was not needed of in vendor already)
* [x] configure composer autoloading and use it (also removed requires that are not needed anymore)
* [x] add LibreTime prefix for FileNotFoundException (phing had a similar class and these are all pre-namespace style)
* [x] add .travis.yml file
* [x] make etc and logdir configurable with LIBRETIME_CONF_DIR and LIBRETIME_LOG_DIR env (so travis can change it)
* [x] slight cleanup in config for travis not to fail
* [x] add cloud_storage.conf for during test runs
* [x] rewrite mvc testing docs and move them to docs/ folder
* [x] don't use `static::class` in a class that does not have a parent class, use `__CLASS__` instead.
* [x] don't use `<ClassName>::class`, since we already know what class we want `"<ClassName>"` ist just fine.
* [x] fix "can't use method in write context" errors on 5.4 (also helps the optimizer)
* [x] add build status badge on main README.md

Fixes https://github.com/LibreTime/libretime/issues/4

The PHP parts of https://github.com/LibreTime/libretime/pull/10 get obsoleted by this change and it will need rebasing.

This also contains https://github.com/LibreTime/libretime/pull/8, the late static binding compat code was broken for no reason and until CentOS drops php 5.4 there is no reason I'm aware of not to support it. I inlined #8 since the test would be failing on php 5.4 without the change.

If you want to run tests you need to run `composer install` in the root directory and then `cd airtime_mvc/tests && ../../vendor/bin/phpunit`. For the tests to run the user `libretime` needs to be allowed to create the `libretime_test` database. See `docs/TESTING.md` for more info on getting set up.
2017-02-27 17:59:01 +01:00
Albert Santoni 591f7d59f0 Slightly better error handling for uploads 2015-11-13 10:53:47 -05:00
Duncan Sommerville 8d2e476ff1 SAAS-868 - Refactor third party + celery workflow, implement locking on TaskManager 2015-06-16 15:10:08 -04:00
Duncan Sommerville 3902c8c746 Add SoundCloud delete functionality and fixes; implement TaskManager to run background jobs 2015-06-15 15:12:37 -04:00
Duncan Sommerville 15c7ef5885 Celery backend and support for dev-env worker parallelization 2015-06-12 12:31:55 -04:00
Duncan Sommerville 626489bb3b SAAS-853 - Celery backend for SoundCloud uploads 2015-06-10 15:04:49 -04:00
Duncan Sommerville 49165e91d9 SAAS-854 - celery-based SoundCloud backend uploader 2015-06-09 14:02:29 -04:00
Albert Santoni ae3fef383e Removed station_domain from messages to airtime_analyzer, unused. 2015-05-19 16:20:51 -04:00
Albert Santoni 689a431867 Deprecated RabbitMQ::SendMessageToHaproxyConfigDaemon() 2015-05-11 14:34:21 -04:00
Albert Santoni 51aa846a4c Merge branch 'cc-5709-airtime-analyzer-refactor' into saas-media-refactor
Conflicts:
	airtime_mvc/application/models/RabbitMq.php
	python_apps/airtime_analyzer/airtime_analyzer/analyzer_pipeline.py
	python_apps/airtime_analyzer/airtime_analyzer/message_listener.py
2015-02-20 18:25:38 -05:00
Albert Santoni c868136d26 Make airtime_analyzer respect the storage_backend setting passed to it
by Airtime
2015-02-20 18:21:49 -05:00
drigato cee0ff4881 SAAS-560: Deploy separate cloud storage config files for each development environment
Default to production config files if dev env specific files are not
found.
Fix analyzer unit tests.
2015-02-05 14:31:20 -05:00
drigato 7b3f9af04c SAAS-560: Deploy separate cloud storage config files for each development environment
Changed analyzer upstart to take the cloud storage config file as a command line option
Dropped the dev env portion from the rabbitmq-analyzer.ini filename
2015-02-03 15:55:47 -05:00
drigato 5040eb498d SAAS-560: Deploy separate cloud storage config files for each development environment 2015-02-02 12:54:56 -05:00
Albert Santoni 8e2366f6fb Remove Rabbitmq.php dependency on Amazon S3 stuff (which was the main purpose of the last commit)... 2015-01-26 13:19:48 -05:00
Albert Santoni dbba5a7427 Decouple Billing and S3 cloud storage stuff from Zend 2015-01-26 13:10:10 -05:00
drigato 57a7218a79 SAAS-540: Change the Provisioning Controller's terminate endpoint to reflect new S3 file prefix 2015-01-16 11:09:13 -05:00
drigato 02e4c18931 SAAS-531: Finalize S3 folder hierarchy 2015-01-12 14:50:42 -05:00
drigato 19e6f1a535 SAAS-526: Change prefix from station name to station id
Done.
2014-12-17 16:48:20 -05:00
drigato b094e59df3 SAAS-526: Change prefix from station name to station id
Just seeing if we can get the hosting id from a function in the Billing Controller
2014-12-17 15:39:18 -05:00
drigato ec1c8669c8 Merge branch 'cc-5709-airtime-analyzer-cloud-storage' into cc-5709-airtime-analyzer-cloud-storage-saas 2014-12-17 14:14:03 -05:00
drigato 1de326283e SAAS-527: Allow files to be uploaded to either the cloud or on local file storage
Not quite done.
2014-12-16 18:47:42 -05:00
drigato 57868d2351 Merge branch 'cc-5709-airtime-analyzer-cloud-storage' into cc-5709-airtime-analyzer-cloud-storage-saas 2014-12-10 12:47:22 -05:00
drigato d73b331376 SAAS-515: Prefix object names with station name 2014-12-10 12:40:08 -05:00
drigato cf9eabbc74 Merge branch 'cc-5709-airtime-analyzer-cloud-storage' into cc-5709-airtime-analyzer-cloud-storage-saas
Conflicts:
	airtime_mvc/application/Bootstrap.php
	airtime_mvc/application/models/Schedule.php
	airtime_mvc/application/modules/rest/controllers/MediaController.php
	airtime_mvc/build/sql/schema.sql
	python_apps/airtime_analyzer/airtime_analyzer/analyzer_pipeline.py
2014-12-03 13:35:32 -05:00
drigato 432245b18e SAAS-502: Analyzer -> Set the station id and domain in the cloud object's metadata
Set the domain name in the cloud object's metadata
2014-11-27 16:54:22 -05:00
Duncan Sommerville 3f754c032a Updated Show model to include show image path 2014-09-16 18:28:39 -04:00
Duncan Sommerville cb80423fdd Work on adding image upload to add-show form 2014-09-12 18:05:24 -04:00
drigato ca62086e16 Removed cloud file deletion from Airtime Analyzer. Deletion is done from PHP now. 2014-08-12 12:59:50 -04:00
drigato aaee522ec6 CC-5888: Handle file deletion if the file is stored in the cloud 2014-07-15 17:20:04 -04:00
drigato 8e714bcb64 CC-5888: Handle file deletion if the file is stored in the cloud 2014-07-15 07:26:39 -04:00
Albert Santoni 43483dc112 Added dev env to RabbitMQ stuff for Analyzer (fixed) 2014-04-22 12:28:20 -04:00
Albert Santoni a79f53758f Fixed the RabbitMQ thingy 2014-04-22 11:40:35 -04:00
Albert Santoni f106bf8fad Separate RabbitMQ settings by development environment 2014-04-22 11:13:15 -04:00
Albert Santoni e3757d892b CC-5709: Airtime Analyzer
* Fix hack for Airtime Pro
2014-04-02 17:27:10 -04:00
Albert Santoni 7ea2eef233 CC-5709: Airtime Analyzer
* Use system-wide config for Airtime PHP->airtime_analzyer RabbitMQ
  communication on Airtime Pro
2014-04-01 12:07:29 -04:00
Albert Santoni 1c5e2d6205 Merge branch 'cc-5709-airtime-analyzer' into cc-5709-airtime-analyzer-saas
Conflicts:
	airtime_mvc/public/index.php

* Reverted some SaaS-only thing Martin did a year ago. Looks benign but
  only one way to find out...
2014-03-27 16:38:03 -04:00
Albert Santoni 50a42f12bb CC-5709: Airtime Analyzer
* File import via the Add Media page now works!
* Reworked StoredFile::copyFileToStor() because it's still needed.
* Reworked the way file paths are reported in airtime_analyzer
  and in the RESTful media API
2014-03-17 10:19:39 -04:00
Albert Santoni 451b19150b CC-5709: Airtime Analyzer
* Notify airtime_analyzer of new uploads with RabbitMQ
* Use a durable exchange for airtime-uploads
2014-03-13 13:35:48 -04:00
Albert Santoni e6cbbdff33 CC-5709: Airtime Analyzer
* Added session auth to the Media API (if you're logged in)
* Started reworking our Plupload interaction with the server to be less
  awkward.
* Basic uploading works with the Add Media page again, but messages
  aren't dispatched to airtime_analyzer yet (coming next...)
2014-03-13 11:14:30 -04:00
Martin Konecny 1c80701488 Merge branch '2.3.x' into 2.3.x-saas 2013-03-05 16:21:47 -05:00
Martin Konecny 00d577fd5b CC-4985: Ensure files deleted via the UI are deleted from stor directory.
-temporary fix. We know rabbitmq received the message, but we don't know
if media-monitor actually acted on it.
2013-03-04 15:22:09 -05:00
Martin Konecny 8cd6bd9aa4 Merge branch 'devel' into 2.3.x-saas
Conflicts:
	airtime_mvc/application/controllers/PreferenceController.php
	airtime_mvc/application/forms/AddShowWhen.php
	airtime_mvc/application/forms/GeneralPreferences.php
	airtime_mvc/application/forms/LiveStreamingPreferences.php
	airtime_mvc/application/forms/SoundcloudPreferences.php
	airtime_mvc/application/forms/SupportSettings.php
	airtime_mvc/application/views/scripts/form/preferences.phtml
	airtime_mvc/application/views/scripts/form/preferences_email_server.phtml
	airtime_mvc/application/views/scripts/form/preferences_general.phtml
	airtime_mvc/application/views/scripts/form/preferences_livestream.phtml
	airtime_mvc/application/views/scripts/form/support-setting.phtml
	airtime_mvc/application/views/scripts/schedule/add-
show-form.phtml
	airtime_mvc/public/js/airtime/preferences/preferences.js
	python_apps/api_clients/api_client.py
	python_apps/pypo/listenerstat.py
2013-01-15 13:44:44 -05:00
James 5a97fb69f2 CC-4384: Remove annoying usage of $CC_CONFIG
- done
2013-01-14 16:16:14 -05:00
James b8d6132b52 - saas patch #1 2012-10-23 18:47:15 -04:00
Martin Konecny be80eeb5fd CC-4404: restart airtime-liquidsoap will interrupt the output stream and never resume until restart playout engine
-fixed
2012-09-14 18:20:46 -04:00
Martin Konecny a06eeaa76a -fix silly mistake after refactoring
again
2012-09-11 11:20:42 -04:00
Martin Konecny 41d9b2490a -fix silly mistake after refactoring 2012-09-11 11:14:47 -04:00