Richard Bucker

OpenBSD 5.0 + Mojolicious + Redis + Beanstalkd

Posted at — Nov 3, 2011

[update 2011-11-06] Recently I installed Mojolicious 2.22 without a hiccup.  Tonight I tried to install the latest 2.24 release.  The challenge tonight was that I needed to upgrade Test::Pod and Test::Pod::Coverage. I just guessed which modules were old based on the output from the build, however, it was 90% luck and 10% intuition. While I hate deep dependencies I wish they would have said something about this before leaving me to fend for myself. This is the sort of thing that make admin/DevOps work dangerous.[update 2011-11-04] I’m trying to run my test program and I’m finding errors with module dependencies. I’m making the corrections inside the doc.  CRAP! One more thing I found. This time it was my fault. One of the Mojo guys asked me to check the clock/Timezone.  I thought I had. Crap!  I missed it. The clock was wrong and in fact it was 4 days behind. Since the Mojo files were technically 4 days in the future they would not build properly.  When I re-installed NTPD and corrected the clock… Miraculously it installed from CPAN.[update 2011.11.03] looks like I managed to get everything to install. It’s not totally painless but it’s also not as involved as making code changes.I really like OpenBSD (OBSD) and I’ve used it for years. The only comparison to other OS' that I want to make is that while these guys are pushing development forward with new ideas they truly embrace the “Unix” way by making use that “the sum of the parts is bigger than the whole”. What I mean by that is that they build larger applications by incorporating specialized smaller ones. They are also more interested in security and correctness rather than security by constant change or obscurity.Enough of that.Armed with a current version of OBSD 5.0 installed in a working VMware instance… I wanted to install The tools I’d need for my next application idea. (skynet-pl). The installation of the primary framework tools was really simple.Install redis and beanstalk proper (you’ll need some basic packages from the CD; not listed here)cd /tmpwget https://github.com/downloads/kr/beanstalkd/beanstalkd-1.4.6.tar.gztar zxvf beanstalkd-1.4.6.tar.gz./configuregmakegmake installpkg_add http://ftp.openbsd.org/pub/OpenBSD/5.0/packages/i386/redis-2.2.12.tgzcd /tmpwget http://redis.googlecode.com/files/redis-2.2.15.tar.gztar zxvf redis-2.2.15.tar.gzcd redis-2.2.15gmakegmake install(gmake test; is recommended, however, you need to install TCL first)pkg_add http://ftp.openbsd.org/pub/OpenBSD/5.0/packages/i386/p5-Mojolicious-1.16.tgzcd /tmp wget http://cpan.metacpan.org/authors/id/S/SR/SRI/Mojolicious-2.22.tar.gz tar zxvf Mojolicious-2.22.tar.gz cd Mojolicious-2.22 /usr/bin/perl Makefile.PL touch Makefile.PL Makefile gmake gmake installInstall the libs from the CPAN (cpan and redis should be running in the background before you try to install the packages.)curl -L http://cpanmin.us | perl - –sudo App::cpanminussudo -s ‘cpanm Test::Pod’sudo -s ‘cpanm Test::Pod::Coverage’sudo -s ‘cpanm Mojolicious’sudo -s ‘cpanm AnyEvent::Redis’sudo -s ‘cpanm AnyEvent::Beanstalk’sudo -s ‘cpanm EV’sudo -s ‘cpanm JSON’Well, that installs everything, however, it is not current.  Redis and Mojolicious are still back level. I hope to resolve this shortly.PS: I tried to force Mojolicious 2.22 to be installed with the ports collection. FAIL. I also tried to install the latest redis too.  FAIL. I suppose I should try “OpenBSD 5.0 + TornadoWeb + Redis + Beanstalkd” next, however, initial tests are not looking good.