It's quite easy to provision and run a Vagrant VM:
- Install Vagrant in your host system following instructions here
- In your VM-to-be's home directory create the
VagrantFile
and the bash script to provision the machine (config.sh
)
VagrantFile
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision "shell", path: "config.sh"
config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 7000, host: 7000
config.vm.network "forwarded_port", guest: 5000, host: 5000
end
config.sh
apt-get -qqy update
apt-get -qqy upgrade
apt-get -qqy install build-essential
apt-get -qqy install curl
apt-get -qqy install git
apt-get -qqy install libssl-dev
apt-get -qqy install python3-pip
apt-get -qqy install rethinkdb
python3 -m pip install --upgrade pip
python3 -m pip install bigchaindb
- run
vagrant up
to start provisioning (SO and libraries get installed) - run
vagrant ssh
to log in the newly created machine - test if working, from VM's command line:
$> python3
>>> from bigchaindb.core import Bigchain
>>> bigchain = Bigchain()
>>> print(bigchain.host)
localhost
>>> print(bigchain.me)
<print the public key of the instance>
using this now, with some success - i've set it up more as a dev environment so the local copy of bigchaindb is used:
Vagrantfile
config.sh
Note: I had to copy the requirements into a file from setup.py, since this project doesn't have one (as of this writing)