Archive for the ‘software’ Category

Playing with Openshift Online Starter 3 – Installing Ampache

Friday, October 13th, 2017

Heres a blog outlining how to run Ampache in the Openshift Online Starter 3 platform. It assumes a degree of familiarity with Openshift and it’s resources.

First, in a new project, create a new PHP 5.6 application from the Ampache git repo. In the advanced options enable TLS.
Then, using add to project menu and browsing the storage catalogue, add a mariadb with persistant storage.

When the pods are ready navigate to the exposed route for ampache and run the Ampache deployment wizard which will create the ampache.cfg.php file. You will need to know the mariadb secrets for the root account password and the user.

When it’s all running review the ampache.cfg.php file in the ampache pod by using the terminal. At this point if the pod goes away for any reason (scaling to 0 or node errors) the config file will be lost.

Create a config map with a key named ampache.cfg.php and put the contents of the config file in the pod in the key value. I copied the config file from git and manually made the changes as it’s only the db information that needs to be changed.

Scale the ampache down to 0

Edit the deployment configuration for ampache app to add a config file a volume. the mount point for my pod was /opt/app-root/src/config. Note that if the other files that are existing in that directory are missing Ampache will still run as they are only used as templates for headers.

Saving the config will cause a new pod to be built. I had issues with getting the new pod running due to the small quota limit in the free starter account which is why I would recommend scaling the existing pod to 0 before the deployment build is running. Then, when the deployment has finished, rescale the ampache pod back up to 1.

Notes:

I would expect it to be possible to create the mariadb deployment and the config map before the ampache build but I’m not sure how the database would be populated in that scenario.

You can’t really expect to put any music in the deployment of the free account as you only have one persistent volume and that’s being used by mariadb. Ampache allows you to have another ampache instance as a music source and I used that to test. You could possibly put some music in the ampache pod but only have 1 GiB of space you’d have to keep doing it on every pod deployment. To do it at deployment you’d need to have the music in the git repo that you clone the code from. Also there will be no transcodeing.

Site Tinkering

Sunday, August 2nd, 2009

I’ve been doing some site tinkering, none of which you will see the benefit of but I will.

Oh apart from I’ve royally messed about with the gallery. but that’s what you get when you request a comments feature

iReport

Friday, May 8th, 2009

I played about with iReport 3.5.1 and its new list component, it’s rather good. Here’s what I did.

I have a report that gives food sales within a date range and groups them by the food group (Meat, Vegetables and cake, say). One thing I’ve wanted to do for a while was have the total for each group in the summary at the end of the report. (more…)