Wednesday, February 17, 2016

Setting up openblockchain from github

IBM recently open sourced it's codebase on openblockchain. This is aligned to its support for the Hyper Ledger project from Linux Foundation.

For those of you, who believe in working through a new technology, rather than talking/preaching through it - one of the first milestones would be to set up your own development environment of the obc-peer project.

The openblockchain project uses Vagrant and Docker to create a reproducible and consistent development environment - making the setup instructions a piece of cake!

https://github.com/openblockchain/obc-docs/blob/master/dev-setup/devenv.md

Irrespective, I ran into a few glitches in my attempt to set up the environment and hopefully this post will save you to 15 minute head scratching if you venture into the same thorny undergrowth.

First of all, there is a hard dependency on the minimum version of Vagrant (1.7.4) and Virtual Box (5.0). If you are working on Ubuntu 14.04 (i386) - DO NOT, repeat DO NOT use sudo apt-get to install vagrant and virtual box. The trusty repository has older versions of both these softwares. Installing them will result in weird errors when you try to get your vagrant up. Instead, download the deb files from respective websites and install via `sudo dpkg -i`

Specifically vagrant will complain that box/obc-dev is not found and secondly box_version should not be there.

Lastly, just in case, like me you have done a sudo apt-get install, you can recover by:

1. Doing a sudo dpkg -i on the vagrant .deb file which you have downloaded. Dpkg nicely upgrades the vagrant installation.

2. Unfortunately virtualbox refuses to be upgraded like above. You have to remove it first and then install the .deb file via dpkg.

Hope this helps!

No comments: