Makahiki Testing Part 1: Localhost Installation

After playing on a demo server for the Makahiki-based Kukui Cup (see Five Days with the Kukui Cup Demo), this week I set up the Makahiki server on a virtual machine by following the tutorials in the Makahiki documentation. The entire process took me about 1 hour, spread over several sessions.

Makahiki running on localhost.

Makahiki running on localhost.

Operating System

I installed Makahiki on a virtual machine running a 32-bit version of Ubuntu 12.04.1 LTS. As I’ve mentioned in previous posts, Makahiki and its dependencies are easier to install in Linux or OS X than in Windows. As my host machine is Windows 7, I find it easier to work with virtual machines than to try to dual-boot, though this does prevent the virtual machine from accessing all available RAM resources. Though I’ve used 12.04.1 here, the current Long-Term Support version is 12.04.2, and Makahiki should support most recent versions of Ubuntu. The installation guide recommends 8 GB RAM for a production server or 4 GB RAM for a demonstration server, but on my current laptop, 1.75 GB is about as high as a virtual machine can go; it’s more likely that a production machine would be installed on its own dedicated machine anyway.

Strengths and weaknesses of the tutorial

For the most part, the instructions for installing Makahiki on Linux are straightforward. The only difficult step might be the PostgreSQL configuration, which I was already familiar with from previous Heroku units in my course. The instructions state that pg_hba.conf needs to be modified, but it does not specify its usual location (/etc/postgres/9.1/main/ on Ubuntu). It’s possible to search for it using find or similar commands as long as you know that most configuration files are in /etc/, but novice users who installed Linux just to set up Makahiki will be less willing to go this far.

More difficult still is following the guide’s optional recommendation to install PostgreSQL 9.1.3 instead of the default PostgreSQL 9.1.* version (currently 9.1.8) that is made available with the Ubuntu standard repositories. No explanation was given as to why 9.1.3 was recommended. After following an official FAQ which instructed me to add an additional repository, I was unable to find any version of 9.1.3 in the PostgreSQL repository. The second repository described in the FAQ also did not have version 9.1.3. I concluded that I would need to install PostgreSQL 9.1.3 after compiling it from source code. I decided it would be faster to install 9.1.8 instead and see if it worked. Fortunately, it did.

Though I have some Linux experience from competing in CCDC and presenting demonstrations for Greyhats, the LAMP (Linux, Apache, MySQL / PostgreSQL, PHP) servers I set up were not meant for production use. Makahiki has some similarities to these systems: Django or gunicorn function as the web server, while Django also functions as a CMS in place of another system such as WordPress or Drupal. In general, I worked mostly with virtual machines that were not allocated enough RAM to be useful as production machines.

In many respects, however, Makahiki does not compare to a fully manual LAMP installation. Many of the tools are installed by using pip with the requirements.txt file or package manager and require no additional configuration, so it has more in common with a pre-packaged LAMP installer such as XAMPP, where most of the configuration details are already prepared for you. The works-out-of-the-box nature of the Django server and gunicorn makes it much easier to get started, avoiding the problem of editing configuration files to make sure all the dependencies are “aware” of each other.

Suggested Improvements

For the most part, this guide was easy to follow. My only suggestion has to do with the postGreSQL section. First, an example of the usual location of the pg_hba.conf configuration file would be useful, The guide assumes the use of a Debian-based distribution that uses apt as its package manager, so there will probably not be much variation in the location of the file. Second, if 9.1.3 is recommended, a little more explanation should be given as to why it is recommended. Though the average Linux user is probably capable of compiling and installing a legacy version of PostgreSQL from its source code, the average Makahiki user is unlikely to attempt it due to the additional complexity it adds. If it’s absolutely essential for 9.1.3 to be used, additional instructions for compiling and installing 9.1.3 should be provided, and the rationale behind its use should be explained.

Advertisements