Skip to content
Snippets Groups Projects
Commit de5626a3 authored by Benoit Lavenier's avatar Benoit Lavenier
Browse files

[fix] Fix README for v0.16.x

parent 15c5dc8c
No related branches found
No related tags found
No related merge requests found
......@@ -37,13 +37,6 @@ Duniter4j has tree main components :
sudo apt-get install openjdk-8-jre
```
- Install [libsodium](https://download.libsodium.org/doc/index.html) v1.0.11 (Linux only)
- Linux: See [installation](https://download.libsodium.org/doc/installation/index.html). After installation, make sure the file 'libsodium.so'
exists on: /usr/local/lib or /opt/local/lib. If not, create a symbolic link.
No installation need for Windows (include in binaries)
#### Install libsodium
[The Sodium crypto library (libsodium)](https://download.libsodium.org/doc/installation/) is a modern, easy-to-use software library for encryption, decryption, signatures, password hashing and more.
......@@ -63,25 +56,21 @@ sudo apt-get install openjdk-8-jre
sudo make install
```
### Install bundle
### Install bundle (ElasticSearch + Duniter4j)
- Install Java (see on top)
- Install Libsodium (see on top)
- Download [lastest release](https://github.com/duniter/duniter4j/releases) of file duniter4j-elasticsearch-X.Y-standalone.zip
- Download [lastest release](https://github.com/duniter/duniter4j/releases) of file duniter4j-es-X.Y-standalone.zip
- Unzip
```bash
unzip duniter4j-elasticsearch-X.Y-standalone.zip
cd duniter4j-elasticsearch-X.Y/config
unzip duniter4j-es-X.Y-standalone.zip
cd duniter4j-es-X.Y/config
```
- Edit the configuration file `config/elasticsearch.yml`, in particular this properties:
```bash
# cluster.name: my-application
# Your ES cluster name
cluster.name: duniter4j-elasticsearch
# Use a descriptive name for the node:
......@@ -94,23 +83,25 @@ network.host: 192.168.0.28
http.port: 9203
# Duniter node to connect with
duniter.host: gtest.duniter.org
duniter.host: g1-test.duniter.org
duniter.port: 10900
# Should synchronize node blockchain ?
duniter.blockchain.sync.enable: true
# Initial list of hosts to perform synchronization
duniter.p2p.ping.endpoints: [
"g1-test:ES_USER_API g1-test.data.duniter.fr 443",
"g1-test:ES_SUBSCRIPTION_API g1-test.data.duniter.fr 443"
]
```
- Launch the node
```bash
cd duniter4j-elasticsearch-X.Y/bin
cd duniter4j-es-X.Y/bin
./elasticsearch
```
Output example (on [GTest](https://fr.duniter.org/monnaie-gtest/) currency):
Output example (on [G1-test](http://g1-test.duniter.fr) currency):
```bash
$ ./elasticsearch
......@@ -128,35 +119,36 @@ $ ./elasticsearch
[2016-09-24 00:16:53,570][INFO ][node ] [ES-NODE-1] started
[2016-09-24 00:16:57,850][INFO ][node ] Checking Duniter indices...
[2016-09-24 00:16:57,859][INFO ][node ] Checking Duniter indices... [OK]
[2016-09-24 00:17:08,026][INFO ][duniter.blockchain ] [gtest] [gtest.duniter.org:10900] Indexing last blocks...
[2016-09-24 00:17:08,026][INFO ][duniter.blockchain ] [gtest] [gtest.duniter.org:10900] Indexing block #999 / 41282 (2%)...
[2016-09-24 00:17:08,045][INFO ][duniter.blockchain ] [gtest] [gtest.duniter.org:10900] Indexing block #1998 / 41282 (4%)...
[2016-09-24 00:17:09,026][INFO ][duniter.blockchain ] [gtest] [gtest.duniter.org:10900] Indexing block #2997 / 41282 (6%)...
[2016-09-24 00:17:10,057][INFO ][duniter.blockchain ] [gtest] [gtest.duniter.org:10900] Indexing block #3996 / 41282 (8%)...
[2016-09-24 00:17:08,026][INFO ][duniter.blockchain ] [g1-test] [g1-test.duniter.org:10900] Indexing last blocks...
[2016-09-24 00:17:08,026][INFO ][duniter.blockchain ] [g1-test] [g1-test.duniter.org:10900] Indexing block #999 / 41282 (2%)...
[2016-09-24 00:17:08,045][INFO ][duniter.blockchain ] [g1-test] [g1-test.duniter.org:10900] Indexing block #1998 / 41282 (4%)...
[2016-09-24 00:17:09,026][INFO ][duniter.blockchain ] [g1-test] [g1-test.duniter.org:10900] Indexing block #2997 / 41282 (6%)...
[2016-09-24 00:17:10,057][INFO ][duniter.blockchain ] [g1-test] [g1-test.duniter.org:10900] Indexing block #3996 / 41282 (8%)...
...
[2016-09-24 00:17:11,026][INFO ][duniter.blockchain ] [gtest] [gtest.duniter.org:10900] Indexing block #41282 - hash [00000AAD73B0E76B870E6779CD7ACCCE175802D7867C13B5C8ED077F380548C5]
[2016-09-24 00:17:11,026][INFO ][duniter.blockchain ] [g1-gtest] [g1-test.duniter.org:10900] Indexing block #41282 - hash [00000AAD73B0E76B870E6779CD7ACCCE175802D7867C13B5C8ED077F380548C5]
```
### Test your node
### Install on an existing ElasticSearch node
#### Using a web browser
Make sure you have a ElasticSearch v1.4.5 installed.
The following web address should works: http://localhost:9200/node/summary
#### Using Cesium
You should also be able to use your node in the [Cesium](https://github.com/duniter/cesium) application:
Then install Duniter4j plugins :
- in the Cesium+ settings, replace the data node address;
- check if graph and profil avatar are display correctly.
```bash
/bin/plugin install mapper-attachments
/bin/plugin install https://github.com/duniter/duniter4j/releases/download/0.3.4/duniter4j-elasticsearch-0.3.4.zip
```
## Use API (Developer)
## Request the ES node
When a blockchain currency has been indexed, you can test some fun queries :
- get a block by number (e.g the block #0):
http://localhost:9200/gtest/block/0 -> with some additional metadata given by ES
http://localhost:9200/g1-test/block/0 -> with some additional metadata given by ES
http://localhost:9200/gtest/block/0/_source -> the original JSON block
......
......@@ -166,7 +166,10 @@ duniter.security.enable: true
#
# Pass an initial list of hosts to perform synchronization when new node is started:
#
duniter.p2p.ping.endpoints: ["g1:ES_USER_API g1.data.duniter.fr 443"]
duniter.p2p.ping.endpoints: [
"g1:ES_USER_API g1.data.duniter.fr 443",
"g1:ES_SUBSCRIPTION_API g1.data.duniter.fr 443"
]
#
# ---------------------------------- Duniter4j Mail module -----------------------
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment