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.

2.1.1.1.1.1. 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.
2.1.1.1.1.2. Install Python
I checked the version: already installed.
2.1.1.1.1.3. Install C Compiler
I checked the version: already installed.
2.1.1.1.1.4. Install Git
I checked the version: already installed.
2.1.1.1.1.5. Install Pip
I checked the version: already installed.
2.1.1.1.1.6. 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.

2.1.1.1.1.7. 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.
2.1.1.1.1.8. 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
2.1.1.1.1.9. Install Memcache
As instructed, I used apt-get to install memcached and libmemcached-dev.
2.1.1.1.1.10. Download the Makahiki source
As instructed.
2.1.1.1.1.11. Workon makahiki
Once I fixed the part I accidentally skipped in step 6, this worked fine.
2.1.1.1.1.12. Install required packages
As instructed. The download and install took a while (5 minutes) with a lot of output and warnings, but no errors.
2.1.1.1.1.13. 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.
2.1.1.1.1.14. Initialize Makahiki
As instructed.
2.1.1.1.1.15. Start the server
As instructed. Both servers worked for me.
2.1.1.1.1.16. 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