Saturday, March 16, 2013

Local Makahiki Installation: A Reader's Guide

Today I worked through the installation of the Makahiki energy competition platform, as documented here. This is a record of how each step went for me. YMMV. Hardware requirements
Running on Debian 7 in a VirtualBox with 2GB of RAM (on Windows 7), as described earlier. Apparently I could have just grabbed a large VirtualBox image and worked from there. Instead, I followed the step-by-step Unix instructions within my existing system. Install Python
I checked the version: already installed. Install C Compiler
I checked the version: already installed. Install Git
I checked the version: already installed. Install Pip
I checked the version: already installed. Install Virtual Environment Wrapper
Followed instructions. As root: pip install virtualenvwrapper

I initially moved on at this point, but I later found that workon did not work. Don't forget to setup up your shell startup file as instructed. I chose to go with lazy initialization, and I changed PROJECT_HOME to just $HOME, since that's where I've been putting my projects so far. Install Python Imaging Library
As instructed, I used apt-get to install python-imaging and libjpeg-dev. (I already had python-dev.) I also had to set up the symlinks as instructed. Install PostgreSQL
PostgreSQL was already installed, but I did need to edit pg_hba.conf as instructed. The full path to this file was: /etc/postgresql/9.1/main/pg_hba.conf Install Memcache
As instructed, I used apt-get to install memcached and libmemcached-dev. Download the Makahiki source
As instructed. Workon makahiki
Once I fixed the part I accidentally skipped in step 6, this worked fine. Install required packages
As instructed. The download and install took a while (5 minutes) with a lot of output and warnings, but no errors. Setup environment variables
As instructed. I added the configuration to the end of ~/.virtualenvs/makahiki/bin/postactivate. If you copy-and-paste, don't forget to remove the % signs. I also reused my existing PostgreSQL user, django. (This may or may not be a good idea, so I don't necessarily recommend it. It worked fine for me, though.) Once I wrote these to the config file, I typed deactive and then workon makahiki to refresh the settings. Initialize Makahiki
As instructed. Start the server
As instructed. Both servers worked for me. Verify that Makahiki is running
Yay, it runs!

Conclusion: This process is fairly easy as long as you go carefully and don't miss a step. It is less difficult than installing the Django toolchain for Heroku, though you would need to make it through much of that process first if you want to deploy Makahiki to Heroku.

Total Time: 2.5 hours, including the time taken to document the process here. Probably only 1.5 hours or so if you were just following the directions.

No comments:

Post a Comment