TurnKey Linux Virtual Appliance Library

Ampache TKLPatch

Six students at Chelsea School have completed a TKLPatch for Ampache. Ampache is a web-based streaming media server and file manager. The attached patch is intended to be applied to the TurnKey Linux’s LAMP stack to produce a bootable, installable Ampache disc image. The intent is to make deployment of an Ampache solution as effortless as possible for educators.

Attached: ampache.tar.gz (product of tklpatch-bundle)

Build notes, the text of the conf script, usage notes, and an ISO produced from the patch are available at http://9while9.com .

Note that while the disc installs the LAMP stack and Ampache, it does not configure Ampache. We are puzzled about how to accomplish that and welcome suggestions.Configuration is web-based and contingent on their being a root MySQL account. During configuration, Ampache confirms existence of dependencies, requests a name and password for the Ampache DB, and then asks for admin account user name and password. It then offers you a file called ampache.cfg.php to download. The user must then upload that file back to Ampache in a subdirectory called config. The docs for the configuration process are at the Ampache site here .

We look forward to comments, suggestions, revision ideas, etc. The students are still new at this and eager for feedback.

Attached: 
Jeremy's picture

Awesome work Rik & students!

I look forward to finding some time to have a play with your Ampache appliance. I can't really give any constructive feedback until then.

It seems like you may still have a little work to get it to the point you want (ie fully configured) but still I think it's quite an impressive accomplishment and your students should be proud of themselves.

Part of my employment is with my local State Education Dept (in Australia) and I reckon some of your students now know more about Linux than most of the IT staff here!

Alon Swartz's picture

Great work!

I applaud your efforts as well as those of your students, good job!
I have added Ampache to the development wiki, feel free to tweak the entry as you see fit.

Once I have looked at the patch, and played around with Ampache (been meaning to do so for ages), I would be happy to provide feedback.

What type of configuration are you referring to? The more specific you can be, the easier it would be to help. A commonly asked question from tklpatch developers is how to add configuration screens to the installer (di-live). Take a look at this thread for some info. OTOH, for sake of simplicity, a simple shell script would suffice for the tklpatch, and the core team could write the di-live component at a later stage, when Ampache is added to the TurnKey library.

Thanks & Config

Thank you for the kind words of encouragement. We look forward to your thoughts.

I've revised the post above to outline the configuration process for Ampache. It's basically creation and insertion of the database and the creation of the admin user account.


Puzzled

Modifying the shell script is something we can work toward. Di-live looks like more than we could get a handle on before their summer starts.

The part that's puzzling me is how to get LAMP to configure the root password for MySQL during the patch, rather than prompting the user for it during installation.

Otherwise, I think the rest of the configuration is within reach from bash script: creating the Ampache database and db password, creating the Ampache admin account, editing and overlaying the ampache.cfg.php file should be within our reach with a little research. It's entirely possible that I don't understand at all, though.


Liraz Siri's picture

Set the mysql root password by invoking the di-live hook

You can set the mysql password the same way di-live sets the mysql password - using the di-live hook, like this:
/usr/lib/di-live.d/72mysql-conf --chroot=/ --user root --pass MYNEWPASSWORD
Liraz Siri's picture

Feedback

Alright, I applied the attached Ampache tklpatch without issues to the LAMP appliance and installed the appliance to a new VM. I noticed you installed Samba and configured it to provide access to the media storage directory. Nice! Connecting to the web application brings Ampache installation screen. So far so good. 

A couple of comments:

  1. Ampache has only been partially installed: pointing the web browser to the application brings up the Ampache installer. I don't hold that against you guys because completing installation of a web application from a script/tklpatch can be one of the most challenging bits to figure out. Even for experts like us. Often it involves understanding what the installation process changed (e.g., database, files, etc.) and then reproducing that "artificially" in order to eliminate any required human intervention. This can require lots of trial and error and technical expertise which may be beyond the skillset you have access to. OTOH, if you're up to the challenge this could be a great learning opportunity. If so, you might want to try and dissect the Drupal5 example patch for clues on how to massage a web application past installation. I won't kid you though, this stuff can be complicated...
  2. Ampache installed from upstream tarball instead of through the package management system: Ampache can be installed via the package management system in both Ubuntu Hardy (version 3.3.3) and Debian Lenny (3.4.1-2). When possible we usually prefer to install web applications through the package management system because it's easier and also - that way we get security updates. Patching web applications by hand when a security hotfix comes out isn't any fun.

Other then that, great job!

Revised Patch Expected Monday

Thanks for the feedback. Revised patch should be posted Monday.

Point 1: We anticipated this one and have been working arduously on it with kind and patient support from the folks at Freenode.net #ampache. We're ready for that hurdle. It's been tested and is ready to go. Once we understood the process, it wasn't bad. Getting there took some hours on IRC, however.
Point 2: I understand why using apt to install Ampache works better for your purposes. We will modify the patch so it works on the package rather than latest stable. Minor changes is all that will take.

Thanks for the sincere feedback. We'll take this on THR, FRI, and Monday. The students will love the feedback, and will appreciate the rationale for Point 2 as soon as I make it clear to them.

Rik Goldman


Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)