diff --git a/docs/source/appendices/index.rst b/docs/source/appendices/index.rst index 52b9038e..1a247fcd 100755 --- a/docs/source/appendices/index.rst +++ b/docs/source/appendices/index.rst @@ -15,4 +15,5 @@ Appendices firewall-notes ntp-notes example-rethinkdb-storage-setups - licenses \ No newline at end of file + licenses + install-with-lxd \ No newline at end of file diff --git a/docs/source/appendices/install-with-lxd.md b/docs/source/appendices/install-with-lxd.md new file mode 100644 index 00000000..7e231ee0 --- /dev/null +++ b/docs/source/appendices/install-with-lxd.md @@ -0,0 +1,43 @@ +# Installing bigchainDB on LXC containers using LXD + +You can visit this link to install LXD (instructions here): [LXD Install](https://linuxcontainers.org/lxd/getting-started-cli/) + +(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](https://bigchaindb.readthedocs.io/en/latest/drivers-clients/python-server-api-examples.html) . \ No newline at end of file