Has anyone installed Moodle on google app engine?

904 views
Skip to first unread message

Hafiz Junaid

unread,
Aug 10, 2015, 6:09:22 AM8/10/15
to Google App Engine
I'm trying to install Moodle on google app engine. While uploading files from my local deployment, the 10,000 files maximum limit is reached so I'm unable to push my code base to the live server. Has anyone else tried this before? Is there a different way to achieve this? Please share your experiences if you have tried something similar.

Thanks.

Nick (Cloud Platform Support)

unread,
Aug 10, 2015, 2:01:37 PM8/10/15
to Google App Engine
Hi Hafiz,

It's possible that a number of those files are unnecessary, and you could try to see if there is functionality you don't need represented by these files. Other than this, you could try to see if you've configured any static file handlers which also use "application_readable", which would mean these files get counted twice. 

Unfortunately the 10,000 file limit is a hard limit and unless you can cut out some modules, some theme packs, or some other bloat which is inflating the size of the package, you'll need to host your website on compute engine.

In general, a thread like this shouldn't be posted to Google Groups, but rather to stackoverflow, since this thread deals with a specific technical issue, rather than general discussion of the platform and services. If your thread was asking about the 10,000 file limit, or various implications this might have for applications, it would be more on-topic.

Best wishes,

Nick

Nick (Cloud Platform Support)

unread,
Aug 10, 2015, 2:05:21 PM8/10/15
to Google App Engine
Hey Hafiz,

Just to be clear, however, your thread does somewhat stand on the boundary and is somewhat on-topic, so don't let this dissuade other users from commenting with any advice, although I think I've covered the major points.

Best wishes,

Nick

Ronoaldo Pereira

unread,
Aug 20, 2015, 4:43:11 PM8/20/15
to Google App Engine
I have done several attempts to run Moodle on App Engine, and it is not a easy task. Moodle itself is designed as if it was hosted on a stateful server, and uses the moodledata directory to write (and lock) lot's of files and caches. It also has some built-in mechanisms to cache static assets "on the fly", and this causes a lot of filesystem reads. This invalidates my attempt to put moodledata on a Cloud Storage bucket, that would make it work on App Engine but, due to locking and due to the HUGE filesystem access, this doesn't work neither scales well.

I ended up doing a somewhat resilient setup on Compute Engine, hosting on a g1-small machine and using a D0 Cloud SQL instance for the database. The results were reasonable, as the site does not handle a lot of traffic. You can also start with the Moodle click-to-deploy solution, and it will work on an f1-small instance as well (recommended to set up swap space!) if your site has very low traffic, so you end up with more savings and less hassle to install.

Here is the approach I took in order to make it easy to upgrade and to make it more resilient by separating the workload between the web server VM and the Cloud SQL instance: http://devblog.ronoaldo.net/2015/04/setting-up-moodle-on-google-compute-engine-and-cloud-sql.html

I would suggest you to put your Moodle site as a "subdomain", and implement a scalable landing page as well as some course overview pages to host on GAE. This way you have the best of both worlds: if interested students want to access the course material and data, they end up in the moodle domain that is served from the VM. And you have the App Engine front-end serving the traffic spikes of the user and bot-visible website. 

Finally, you can even make the Moodle VM be served by a reverse-proxy GAE handler, say, /moodle/. This could give you more flexibility in terms of keeping user sessions, and putting some assets to be served by the GAE edge caching.

Hope this helps!
Reply all
Reply to author
Forward
0 new messages