Forum archive
Turnkey Moodle Upgrade Process - Frustrating
Howdy all,
First post here. Brace yourself for a multi-week PIA story. I'll try to be brief where I can. Been using Turnkey on a few projects in the past and currently our business is using a Turnkey Moodle appliance for sales training and it has worked well. We're on Turnkey Linux 12.1 with Moodle version 2.4.3. This was implemented about a year ago now. For testing purposes, I'm using a dev VM, which is a copy of the live production VM. Once I get this squared-up, I'll document the solution and implement it on my production server.
A while back, we started receiving emails from the moodle server saying that moodle needs to be upgraded. No problem right? I'll just log in to the moodle site and hope there's a built-in upgrade tool. Wrong... nothing there. Ok, I'll try an apt-get. I update the apt-get and search the cache for moodle. Then I run a moodle upgrade like this: apt-get upgrade moodle. It's does it's thing with a few prompts along the way, all of which i reply with "y" or "yes". Upon completion I check the moodle server... nope still on version 2.4.3. Hmmm, ok so now I add mirrors.kernel.org/ubuntu repository thinking maybe the built-in repositories don't have the newer(est) version(s) of moodle... yea in short don't do that. I broke apt-get as it was throwing dpkg errors... so I quit fighting that a reloaded the VM.
Alright, back to square one here. I can't use apt-get to upgrade moodle in turnkey. So I start reading about tklbam. Cool, I'll give that a try. Enter your API-KEY... what's that? I continue reading. Ah, apparently it wants me to sign-up for an Amazon S3 account or like. No thanks, I don't want to do that. I just want to upgrade Moodle!!
Now I should mention that I'm a RedHat guy, in that I'm much more proficient and comfortable there. Debian-based systems like Turnkey/Ubuntu are fine but just not my expertise. So I think, hey maybe I can just migrate the moodle site from Turnkey over to a CentOS implementation. Well in short that didn't work either. I was able to get it to work, kinda. But not entirely so rather than continuing to fight with it, I thought I'd cry out to the Turnkey community for help. I can't be the only one in this boat... Anyone been able to successfully upgrade moodle to the latest version (2.7)? When I started this a few weeks back, the current moodle version was 2.6. Here's a link to my Spiceworks thread for support on this same topic: http://community.spiceworks.com/topic/484963-moodle-upgrade
Firstly I just wanted to apologise for a tardy response...
TBH I'm not quite where to start in responding to you! :) I think first things first; TKL is no longer based on Ubuntu. It hasn't been since v11.x. As of v12.0 it has moved to Debian. We made that decision based on the fact that Debian is more stable and more secure (Ubuntu only has security updates for packages in the 'main' repo; whereas Debian does them all!). Hence I suspect why things broke badly when you added an Ubuntu repo...
Secondly as a seasoned Linux user (albeit RPM based rather than DEB based) you'd understand that it is not uncommon for packages to have security patches backported rather than versions updated. But as you also noticed, the TKL Moodle appliance is not installed from package management. The reasons for that are 2 fold. Firstly, when we built v11.0, the version of Moodle in Ubuntu 10.04 (the basis of TKL v11.x) repos was badly broken so we moved to upstream install. Then when we transitioned to Debian Squeeze (for v12.0) we stuck with upstream install as the Moodle version in Debian was earlier to what was in v11.x (and we didn't want to go backwards...).
I just read your thread over on SpiceWorks and I think another thing that may have been getting in your way a little is the default Debian style Apache config. Rather than a monolithic conf file (as i understand the case to be in RHEL et al) in Debian it is broken up and in various conf files in /etc/apache2.
I haven't actually tested it but IMO the upgrade.php method should work. I'm unfamilir with the intracies of Moodle, but often those upgrade.php type upgrades can be run from a web browser (but you'll first need to give www-data ownership of the /var/www/moddle directory tree). Otherwise run from commandline as root (www-data account has login disabled by default) although you'll need to change the permissions after running it as root will take ownership and Apache won't be able to run the php files properly after the upgrade... FYI the default TKL ownership settings can be found in the TKLDev build Main conf file.
Also FWIW as of v1.4 TKLBAM doesn't require a Hub/AWS account now although IIRC you'll need to download and apply the profile manually. I don't think that TKLBAM 1.4 is available in v12.x (although maybe? You could try apt-get install tklbam (although manually migrating may be easier than setting up TKLBAM v1.4 manually). Profiles can be found here. Note that they are not complete within themselves, i.e. the Moodle profile would also rely on the LAMP profile which in turn relies on the Core profile.
Finally, please don't ever be scared to post here... I have a SpiceWorks account and when I set it up I had intended to help out over there (as I noticed that there are quite a few TKL related threads) but in the interests of transparency I noted that I work for TurnKey and now they consider me a 'vendor' (which I suppose I am) but vendors can't post on any of the threads unless you pay a yearly subscription fee... I guess it's a way of encouraging organisations like us to pay to be on there, or push SpiceWorks users to preference software vendors that do pay. I guess it's a win-win for SpiceWorks and those vendors that do pay, but not so great for little guys like us that can't really justify the subscription fees... I also don't think that it gives the best outcomes for SpiceWorks users unless of course they use the software of paid up vendors...
Anyway let us know how you go and I'll help where I can.