Setting Up Moodle on Cloud Hosting with C9.io – Part 1

devI wanted to set up a new development server but my own PC is starting to show it’s age and struggles with running a local server. It is also Windows based and I wanted to have something that was Linux based to get used to command line setup.

Looking around I discovered some free cloud based hosting that as long as you are not after something too extravagant offer free hosting with the hope that you will upgrade to a paid hosting account. OwnCloud looked promising but I could not get up and running so looked for an alternative. That is when I discovered Cloud9 http://c9.io which is not only cloud hosting but has a built in IDE so all development can be competed online too, it also supports multiple developers at the same time! Having had a play with it for a few days I am very impressed and thought I would document how I have managed to get Moodle up and running.

First thing to do is to sign up. This is a couple of clicks if you already have a github account and want to link the two. Once an account is created you can start with a free basic account that offers a single workspace with 1Gb of storage and 512mb of RAM. This is not a enough for hosting an active Moodle site but should be more than enough for basic development purposes. Paid accounts offer more workspaces, storage and resources.

new workspaceOnce signed up you start at a dashboard which will include shortcuts to all of your github repositories. You can create a new workspace or clone one of you repositories into a new workspace. Workspaces can be started with configurations for working in a number of languages including C++, PHP, python and Ruby.

I chose to have PHP as this is what Moodle requires. Once your space is created you will be presented with your workspace which bears a resemblance to a desktop IDE with files in the left hand column, an editing space in the right and a terminal window for running commands.

One disadvantage of Cloud9 for me is that you can not directly upload files to it. You can use the command line to obtain files from git or you can use ftp or ssh from the command line to connect to your own server, you can not ftp from your PC to Cloud9.

To get started I followed the instructions at https://docs.moodle.org/28/en/Git_for_Administrators which will get a copy of Moodle into your workspace and also some of the additional modules.

My commands were as follows

git clone git://git.moodle.org/moodle.git
mv moodle/* moodle/.* .
git branch -a
git branch --track MOODLE_27_STABLE origin/MOODLE_27_STABLE
git checkout MOODLE_27_STABLE
cd theme/
git clone git://github.com/bmbrands/theme_bootstrap.git bootstrap 

This puts a copy of Moodle on to the server and a copy of Bas Brands Bootstrap 3 theme. N.B. line two moves all files from the /moodle folder into the root of the workspace.

Whilst this is enough to get Moodle on to the server there is still more work to do to set the server up and get Moodle running. Join me in part two to continue the setup…
http://matc-online.co.uk/2015/03/08/setting-up-moodle-on-c9-io-part-2/

Leave a Reply

Your email address will not be published. Required fields are marked *