Installing BigchainDB on LXC containers using LXDΒΆ

You can visit this link to install LXD (instructions here): LXD Install

(assumption is that you are using Ubuntu 14.04 for host/container)

Let us create an LXC container (via LXD) with the following command:

lxc launch ubuntu:14.04 bigchaindb

(ubuntu:14.04 - this is the remote server the command fetches the image from) (bigchaindb - is the name of the container)

Below is the install.sh script you will need to install BigchainDB within your container.

Here is my install.sh:

#!/bin/bash
set -ex
export DEBIAN_FRONTEND=noninteractive
apt-get install -y wget
source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
apt-get update
apt-get install -y rethinkdb python3-pip
pip3 install --upgrade pip wheel setuptools
pip install ptpython bigchaindb

Copy/Paste the above install.sh into the directory/path you are going to execute your LXD commands from (ie. the host).

Make sure your container is running by typing:

lxc list

Now, from the host (and the correct directory) where you saved install.sh, run this command:

cat install.sh | lxc exec bigchaindb /bin/bash

If you followed the commands correctly, you will have successfully created an LXC container (using LXD) that can get you up and running with BigchainDB in <5 minutes (depending on how long it takes to download all the packages).

From this point onwards, you can follow the Python Example .