-
Notifications
You must be signed in to change notification settings - Fork 77
Integration instructions
If you need help installing OT Node or troubleshooting your installation, your best bet is to join the community RocketChat channel and ask specific questions there. It's likely that somebody else has already tackled the same problem. You can also contact us directly via email at support@origin-trail.com
You can also check out our video
NOTE: For proper testing (from Luna release V0.3a) you have to install 2 nodes on two servers so that you can test data replication and payment mechanism. We also advise you not to install on local machines, you may encounter problems with connections between nodes. We recommend usage of services like Digital Ocean.
Please bear in mind that we are only able to give you limited support on testing the nodes since it is in early alpha stage, some features will probably change and we are aware of some bugs that may show up on different installation and usage scenarios. With this in mind, some limited support may be obtained on our chat https://chat.origintrail.io and Issues on this repository.
In order to install OT node, you should do following steps:
- Step 1 - Prepare data according to the Data Structure Guidelines. You can also find example data here.
- Step 2 - Install all prerequisites. There is an automatic installation script for Ubuntu 16.04 or you can do installation manually.
- Step 3 (only if manual installation) - Install OT node
- Step 4 - Create ETH wallet and get some test ETH. You can find instructions here
-
Step 5 - Configure
.env
file - Step 6 - Import data
- Node.js
- ArangoDB or Neo4j
- Python & pip
- Wallet and some Ether on Rinkeby Test Network
This will install all prerequisites in a single step.
wget https://raw.githubusercontent.com/OriginTrail/ot-node/master/install.sh
sh install.sh
Set your preferred storage database by passing --db=arangodb
or --db=neo4j
as a parameter to the install script.
If errors occurred during installation process, ot-node probably won't work properly. Errors during installation process happen due to various factors like lack of RAM or previous installations. We strongly recommend installation on clean system and at least 1GB of RAM (it may work with 512MB and swap file, but 1GB is recommended).
If you used this automatic installation script, you may skip the rest of this document and proceed to configuration.
Make sure to set the wallet and configure .env
file.
If you don't have Node.js installed head to https://nodejs.org/en/ and install current version.
Note: Make sure you have the latest version of Node.js installed. Some features will not work well on versions less than 9.x.
Before starting, make sure your server is up-to-date. You can do this with the following commands:
sudo apt-get update -y
sudo apt-get upgrade -y
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y nodejs
ArangoDB is a native multi-model, open-source database with flexible data models for documents, graphs, and key-values. We are using ArangoDB to store data. In order to run OT node with ArangoDB you need to have a local ArangoDB server installed and running.
Head to arangodb.com/download, select your operating system and download ArangoDB. You may also follow the instructions on how to install with a package manager, if available.
wget https://www.arangodb.com/repositories/arangodb3/xUbuntu_16.04/Release.key
sudo apt-key add Release.key
sudo apt-add-repository 'deb https://www.arangodb.com/repositories/arangodb3/xUbuntu_16.04/ /'
sudo apt-get update -y
sudo apt-get install arangodb3
When asked, enter the password for root user.
For Mac OS X, you can use homebrew to install ArangoDB. Run the following:
brew install arangodb
Once you installed ArangoDB you should create a database. Enter ArangoDB shell script
arangosh
and create database
db._createDatabase("origintrail", "", [{ username: "otuser", passwd: "otpass", active: true}])
Neo4j is a graph database management system with native graph storage and processing. Its architecture is designed for optimizing fast management, storage, and the traversal of nodes and relationships. In order to run OT node with Neo4j make sure to have it installed and running.
Head to neo4j.com/download, select your operating system and download Neo4j. You may also follow the instructions on how to install with a package manager, if available.
First you have to install Java 8 and set it as the default.
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo apt-get install -y oracle-java8-set-default
Run the following:
wget -O - https://debian.neo4j.org/neotechnology.gpg.key | sudo apt-key add -
echo 'deb https://debian.neo4j.org/repo stable/' | sudo tee /etc/apt/sources.list.d/neo4j.list
sudo apt-get update
sudo apt-get install neo4j
One way of installing neo4j would be to follow instruction from here. Alrenativelly, you can also use homebrew to install Neo4j.
brew cask install java
brew install neo4j
For storing node system information data we are using Sqlite3. In order to install Sqlite3 please follow these steps.
sudo apt-get update
sudo apt-get install sqlite3
For Mac OS X you can use homebrew to install sqlite.
Open the Terminal app and type brew update
.
After updating Homebrew
brew install sqlite
Make sure to install Python3. It will not work with Python2.
Ubuntu 16.04, Debian 8, and other versions of Debian Linux ship with both Python 3 and Python 2 pre-installed. To make sure that our versions are up-to-date, let’s update and upgrade the system with apt-get:
sudo apt-get update -y
sudo apt-get upgrade -y
Once the process is complete, we can check the version of Python 3 that is installed in the system by typing:
python3 -V
For Mac OS X you can use homebrew to install Python. Run the following:
brew install python3
Pip is the package manager that is specific to Python.
sudo apt-get install -y python3-pip
Unfortunately, homebrew doesn't know how to install pip. To install pip run the following lines in terminal.
curl -O http://python-distribute.org/distribute_setup.py
python3 distribute_setup.py
curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
python3 get-pip.py
Once you installed pip, install required packages:
pip3 install python-arango
pip3 install xmljson
pip3 install python-dotenv
Clone the repository
git clone -b master https://github.com/OriginTrail/ot-node.git
and run npm
cd ot-node && npm install
cp .env.example .env
For configuration instructions look here