Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • clients/cesium-grp/cesium-plus-pod
  • clients/java/duniter4j
  • ji_emme/duniter4j
  • dvermd/cesium-plus-pod
  • okayotanoka/cesium-plus-pod
  • pokapow/cesium-plus-pod
  • pini-gh/cesium-plus-pod
7 results
Show changes
Commits on Source (441)
Showing
with 1337 additions and 495 deletions
docker/Dockerfile*
This project is now tracked on our hosted gitlab server at:
> https://git.duniter.org/clients/cesium-grp/cesium-plus-pod
The current github repository is a simple clone taken up to date at each push on the main gitlab repository.
All contributions should be performed on the main gitlab repository.
Pull requests proposed on github would generate more work for the main contributors.
Issues can be submitted on github. However, all issues created on github will be duplicated on gitlab manually and closed with a link to the gitlab issue.
Please note that all issues should be preferentially opened at
https://git.duniter.org/clients/cesium-grp/cesium-plus-pod/issues/new?issue
If you open issue here, it will be duplicated manually on our hosted gitlab and closed here with a link to our main repository.
Thank you for your understanding.
This project is now tracked on our hosted gitlab server at:
> https://git.duniter.org/clients/cesium-grp/cesium-plus-pod
The current github repository is a simple clone taken up to date at each push on the main gitlab repository.
All contributions should be performed on the main gitlab repository.
Pull requests proposed on github would generate more work for the main contributors, therefore we would really appreciate if you can create instead merge requests on our hosted gitlab instance.
Thank you for your understanding.
# Initial disclaimer
This project is now tracked on our hosted gitlab server at:
https://git.duniter.org/clients/cesium-grp/cesium-plus-pod
The current github repository is a simple clone taken up to date at each push on the main gitlab repository.
All contributions should be performed on the main gitlab repository.
Pull requests proposed on github would generate more work for the main contributors.
Issues can be submitted on github. However, all issues created on github will be duplicated on gitlab manually and closed with a link to the gitlab issue.
# Original README.md
...@@ -2,12 +2,18 @@ ...@@ -2,12 +2,18 @@
*/.classpath */.classpath
*/.settings */.settings
*/*.log */*.log
*/*.iml **/*.iml
.project .project
.classpath .classpath
.settings .settings
.idea .idea
target target
*/target */target
duniter4j.iml *.iml
LICENSE.txt .local
\ No newline at end of file /pom.xml.releaseBackup
/cesium-plus-pod-user/pom.xml.releaseBackup
/cesium-plus-pod-subscription/pom.xml.releaseBackup
/cesium-plus-pod-core/pom.xml.releaseBackup
/cesium-plus-pod-assembly/pom.xml.releaseBackup
/release.properties
stages:
# - github-sync
push_to_github:
stage: github-sync
variables:
GIT_STRATEGY: none
tags:
- github
script:
- rm -rf ./*
- rm -rf .git
- git clone --mirror $CI_REPOSITORY_URL .
- git remote add github $GITHUB_URL_AND_KEY
- git config --global user.email "contact@duniter.org"
- git config --global user.name "Duniter"
# Job would fail if we don't remove refs about pull requests
- bash -c "cat packed-refs | grep -v 'refs/pull' > packed-refs-new; echo 'Removed pull refs.'"
- mv packed-refs-new packed-refs
- bash -c "git push --force --mirror github 2>&1 | grep -v duniter-gitlab; echo $?"
.enforce_readme:
stage: github-sync
variables:
GIT_STRATEGY: none
tags:
- github
script:
- rm -rf ./*
- rm -rf .git
- git clone $GITHUB_URL_AND_KEY .
- git config --global user.email "contact@duniter.org"
- git config --global user.name "Duniter"
- git checkout master
- cat .github/github_disclaimer.md > README.md.new
- cat README.md >> README.md.new
- mv README.md.new README.md
- git commit -am "Enforce github readme"
- git push origin master
[submodule "duniter4j-cesium/src/main/cesium"]
path = duniter4j-cesium/src/main/cesium
url = git://github.com/duniter/cesium.git
[submodule "duniter4j-elasticsearch/src/main/resources/cities"]
path = duniter4j-elasticsearch/src/main/resources/cities
url = git://github.com/David-Haim/CountriesToCitiesJSON.git
GNU GENERAL PUBLIC LICENSE GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 29 June 2007 Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
...@@ -7,17 +7,15 @@ ...@@ -7,17 +7,15 @@
Preamble Preamble
The GNU General Public License is a free, copyleft license for The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works. software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast, to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the software for all its users.
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you price. Our General Public Licenses are designed to make sure that you
...@@ -26,44 +24,34 @@ them if you wish), that you receive source code or can get it if you ...@@ -26,44 +24,34 @@ them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things. free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you Developers that use our General Public Licenses protect your rights
these rights or asking you to surrender the rights. Therefore, you have with two steps: (1) assert copyright on the software, and (2) offer
certain responsibilities if you distribute copies of the software, or if you this License which gives you legal permission to copy, distribute
you modify it: responsibilities to respect the freedom of others. and/or modify the software.
For example, if you distribute copies of such a program, whether A secondary benefit of defending all users' freedom is that
gratis or for a fee, you must pass on to the recipients the same improvements made in alternate versions of the program, if they
freedoms that you received. You must make sure that they, too, receive receive widespread use, become available for other developers to
or can get the source code. And you must show them these terms so they incorporate. Many developers of free software are heartened and
know their rights. encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
Developers that use the GNU GPL protect your rights with two steps: The GNU General Public License permits making a modified version and
(1) assert copyright on the software, and (2) offer you this License letting the public access it on a server without ever releasing its
giving you legal permission to copy, distribute and/or modify it. source code to the public.
For the developers' and authors' protection, the GPL clearly explains The GNU Affero General Public License is designed specifically to
that there is no warranty for this free software. For both users' and ensure that, in such cases, the modified source code becomes available
authors' sake, the GPL requires that modified versions be marked as to the community. It requires the operator of a network server to
changed, so that their problems will not be attributed erroneously to provide the source code of the modified version running there to the
authors of previous versions. users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
Some devices are designed to deny users access to install or run code of the modified version.
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of An older license, called the Affero General Public License and
protecting users' freedom to change the software. The systematic published by Affero, was designed to accomplish similar goals. This is
pattern of such abuse occurs in the area of products for individuals to a different license, not a version of the Affero GPL, but Affero has
use, which is precisely where it is most unacceptable. Therefore, we released a new version of the Affero GPL which permits relicensing under
have designed this version of the GPL to prohibit the practice for those this license.
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and The precise terms and conditions for copying, distribution and
modification follow. modification follow.
...@@ -72,7 +60,7 @@ modification follow. ...@@ -72,7 +60,7 @@ modification follow.
0. Definitions. 0. Definitions.
"This License" refers to version 3 of the GNU General Public License. "This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks. works, such as semiconductor masks.
...@@ -549,35 +537,45 @@ to collect a royalty for further conveying from those to whom you convey ...@@ -549,35 +537,45 @@ to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program. License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License. 13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have Notwithstanding any other provision of this License, you have
permission to reference or combine any covered work with a work licensed permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work, License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License, but the work with which it is combined will remain governed by version
section 13, concerning interaction through a network will apply to the 3 of the GNU General Public License.
combination as such.
14. Revised Versions of this License. 14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will the GNU Affero General Public License from time to time. Such new versions
be similar in spirit to the present version, but may differ in detail to will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns. address new problems or concerns.
Each version is given a distinguishing version number. If the Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation. by the Free Software Foundation.
If the Program specifies that a proxy can decide which future If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you public statement of acceptance of a version permanently authorizes you
to choose that version for the Program. to choose that version for the Program.
...@@ -635,40 +633,29 @@ the "copyright" line and a pointer to where the full notice is found. ...@@ -635,40 +633,29 @@ the "copyright" line and a pointer to where the full notice is found.
Copyright (C) <year> <name of author> Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU Affero General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail. Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short If your software can interact with users remotely through a computer
notice like this when it starts in an interactive mode: network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
<program> Copyright (C) <year> <name of author> interface could display a "Source" link that leads users to an archive
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. of the code. There are many ways you could offer source, and different
This is free software, and you are welcome to redistribute it solutions will be better for different programs; see section 13 for the
under certain conditions; type `show c' for details. specific requirements.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school, You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary. if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>. <http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
duniter4j Cesium+ Pod
====== ===========
Cesium+ pod is used by [Duniter](http://duniter.org)'s client applications ([Cesium](https://git.duniter.org/clients/cesium-grp/cesium), [WotMap](https://duniter.normandie-libre.fr/wotmap/), [WorldWotMap](https://zettascript.org/tux/g1/worldwotmap.html)) to store additional data **outside the blockchain** of the crypto-currency (Ğ1, Ğ1-test).
duniter4j is a Java Client API for [Duniter](http://duniter.org). <img src="./src/site/resources/images/logos/logo_duniter.png"/>
## Components Cesium+ Pod comes with a public RESTfull [HTTP API](./src/site/markdown/REST_API.html) to store and retrieve all this data.
It use [ElastiSearch](https://www.elastic.co/fr/products/elasticsearch) for storage and full-text capabilities.
Duniter4j has tree main components :
- a command line tool (duniter4j-client), to execute basic operation on a Duniter currency : transfer, view peers, ... ## Install
- an API (duniter4j-core-client), that allow developer to access to a Duniter network.
- a ElastiSearch node (duniter4j-elasticsearch), to add store & full-text capabilities, on blockchain data, user profiles (Cesium+) and more (private message). Follow the [installation documentation](http://doc.e-is.pro/cesium-plus-pod/install.html) to install a Cesium+ Pod.
## Command line tool ## Documentation
- Download the file `duniter4j-client-<version>-full-<platform>.zip` from the [lastest releases page](/releases) See the [documentation web site](http://doc.e-is.pro/cesium-plus-pod/) to learn how to contribute, build from source, etc.
- Unzip the archive
- The open a terminal and call duniter4j.sh
## ElastiSearch node
### Prerequisites
#### Install Java
- Install Java JRE 8 or more.
- Windows: see [Oracle web site](http://oracle.com/java/index.html)
- Linux (Ubuntu):
```bash
sudo apt-get install openjdk-8-jre
```
### 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.
- Get libsodium (version 1.0.11 or newer)
```
wget -kL https://github.com/jedisct1/libsodium/releases/download/1.0.14/libsodium-1.0.14.tar.gz
tar -xvf libsodium-1.0.14.tar.gz
```
- Installation:
```
cd libsodium-1.0.14
sudo apt-get install build-essential
sudo ./configure
sudo make && make check
sudo make install
```
### Install bundle (ElasticSearch + Duniter4j)
- Download [lastest release](https://github.com/duniter/duniter4j/releases) of file duniter4j-es-X.Y-standalone.zip
- Unzip
```bash
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
# Your ES cluster name
cluster.name: duniter4j-elasticsearch
# Use a descriptive name for the node:
node.name: ES-NODE-1
# Set the bind address to a specific IP (IPv4 or IPv6):
network.host: 192.168.0.28
# Set a custom port for HTTP:
http.port: 9203
# Duniter node to connect with
duniter.host: g1-test.duniter.org
duniter.port: 10900
# 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-es-X.Y/bin
./elasticsearch
```
Output example (on [G1-test](http://g1-test.duniter.fr) currency):
```bash
$ ./elasticsearch
[2016-09-24 00:16:45,803][INFO ][node ] [ES-NODE-1] version[2.3.3], pid[15365], build[218bdf1/2016-05-17T15:40:04Z]
[2016-09-24 00:16:45,804][INFO ][node ] [ES-NODE-1] initializing ...
[2016-09-24 00:16:46,257][INFO ][plugins ] [ES-NODE-1] modules [reindex, lang-expression, lang-groovy], plugins [mapper-attachments, duniter4j-elasticsearch], sites [duniter4j-elasticsearch]
[2016-09-24 00:16:46,270][INFO ][env ] [ES-NODE-1] using [1] data paths, mounts [[/home (/dev/mapper/isw_defjaaicfj_Volume1p1)]], net usable_space [1tb], net total_space [1.7tb], spins? [possibly], types [ext4]
[2016-09-24 00:16:46,270][INFO ][env ] [ES-NODE-1] heap size [989.8mb], compressed ordinary object pointers [true]
[2016-09-24 00:16:47,757][INFO ][node ] [ES-NODE-1] initialized
[2016-09-24 00:16:47,757][INFO ][node ] [ES-NODE-1] starting ...
[2016-09-24 00:16:47,920][INFO ][transport ] [ES-NODE-1] publish_address {192.168.0.5:9300}, bound_addresses {192.168.0.5:9300}
[2016-09-24 00:16:47,924][INFO ][discovery ] [ES-NODE-1] duniter4j-elasticsearch/jdzzh_jUTbuN26Enl-9whQ
[2016-09-24 00:16:50,982][INFO ][cluster.service ] [ES-NODE-1] detected_master {EIS-DEV}{FD0IzkxETM6tyOqzrKuVYw}{192.168.0.28}{192.168.0.28:9300}, added {{EIS-DEV}{FD0IzkxETM6tyOqzrKuVYw}{192.168.0.28}{192.168.0.28:9300},}, reason: zen-disco-receive(from master [{EIS-DEV}{FD0IzkxETM6tyOqzrKuVYw}{192.168.0.28}{192.168.0.28:9300}])
[2016-09-24 00:16:53,570][INFO ][http ] [ES-NODE-1] publish_address {192.168.0.5:9203}, bound_addresses {192.168.0.5:9203}
[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 ] [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 ] [g1-gtest] [g1-test.duniter.org:10900] Indexing block #41282 - hash [00000AAD73B0E76B870E6779CD7ACCCE175802D7867C13B5C8ED077F380548C5]
```
### Test your node
#### Using a web browser
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:
- in the Cesium+ settings, replace the data node address;
- check if graph and profil avatar are display correctly.
## 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/g1-test/block/0 -> with some additional metadata given by ES
http://localhost:9200/gtest/block/0/_source -> the original JSON block
- Block #125 with only hash, dividend and memberCount:
http://localhost:9200/gtest/block/125/_source?_source=number,hash,dividend,membersCount
- All blocks using a pubkey (or whatever):
http://localhost:9200/gtest/block/_search?q=9sbUKBMvJVxtEVhC4N9zV1GFTdaempezehAmtwA8zjKQ1
- All blocks with a dividend, with only some selected fields (like dividend, number, hahs).
Note : Query executed in command line, using CURL:
```bash
curl -XGET 'http://localhost:9200/gtest/block/_search' -d '{
"query": {
"filtered" : {
"filter": {
"exists" : { "field" : "dividend" }
}
}
},
"_source": ["number", "dividend", "hash", "membersCount"]
}'
```
More documentation here :
- ElasticSearch [official web site](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/docs-get.html#get-source-filtering)
- a good [tutorial](http://okfnlabs.org/blog/2013/07/01/elasticsearch-query-tutorial.html)
## Compile from source
Install required dependencies:
- Install Java JDK (8 or more)
- Install [libsodium](http://doc.libsodium.org/installation/index.html)
- Linux: after [installation](http://doc.libsodium.org/installation/index.html), make sure the file 'libsodium.so' exists on: /usr/local/lib or /opt/local/lib.
If not, create a symbolic link.
- Windows: copy the file 'sodium.dll' into directory 'duniter4j-core/lib/'
- Install [Maven 3](http://maven.apache.org/).
```
sudo apt-get install maven
```
- Get the source code, then compile using Maven:
```
git clone https://github.com/duniter/duniter4j.git
cd duniter4j
git submodule init
git submodule sync
git submodule update
mvn install -DskipTests
```
To package binaries :
```bash
$ mvn install -DskipTests -DperformRelease
```
## Roadmap
- Maintain a updated list of peers
- Add a new index for TX, with validation percentage
- Enable P2P synchronisation between Duniter4j ES nodes
## Troubleshooting
### Could not find an implementation class.
Message:
```
java.lang.RuntimeException: java.lang.RuntimeException: Could not find an implementation class.
at org.duniter.core.util.websocket.WebsocketClientEndpoint.<init>(WebsocketClientEndpoint.java:56)
at org.duniter.core.client.service.bma.BlockchainRemoteServiceImpl.addNewBlockListener(BlockchainRemoteServiceImpl.java:545)
at org.duniter.elasticsearch.service.BlockchainService.listenAndIndexNewBlock(BlockchainService.java:106)
```
Cause:
Plugin use Websocket to get notification from a Duniter nodes. The current library ([Tyrus](https://tyrus.java.net/)) is loaded throw java Service Loader, that need access to file `META-INF/services/javax.websocket.ContainerProvider` contains by Tyrus.
ElasticSearch use separated classloader, for each plugin, that disable access to META-INF resource.
Solution :
Move Tyrus libraries into elasticsearch `lib/` directory :
```
cd <ES_HOME>
mv plugins/duniter4j-elasticsearch/tyrus-*.jar lib
mv plugins/duniter4j-elasticsearch/javax.websocket-api-*.jar lib
```
\ No newline at end of file
GNU GENERAL PUBLIC LICENSE GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 29 June 2007 Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies Everyone is permitted to copy and distribute verbatim copies
...@@ -7,17 +7,15 @@ ...@@ -7,17 +7,15 @@
Preamble Preamble
The GNU General Public License is a free, copyleft license for The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works. software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast, to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the software for all its users.
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you price. Our General Public Licenses are designed to make sure that you
...@@ -26,44 +24,34 @@ them if you wish), that you receive source code or can get it if you ...@@ -26,44 +24,34 @@ them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things. free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you Developers that use our General Public Licenses protect your rights
these rights or asking you to surrender the rights. Therefore, you have with two steps: (1) assert copyright on the software, and (2) offer
certain responsibilities if you distribute copies of the software, or if you this License which gives you legal permission to copy, distribute
you modify it: responsibilities to respect the freedom of others. and/or modify the software.
For example, if you distribute copies of such a program, whether A secondary benefit of defending all users' freedom is that
gratis or for a fee, you must pass on to the recipients the same improvements made in alternate versions of the program, if they
freedoms that you received. You must make sure that they, too, receive receive widespread use, become available for other developers to
or can get the source code. And you must show them these terms so they incorporate. Many developers of free software are heartened and
know their rights. encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
Developers that use the GNU GPL protect your rights with two steps: The GNU General Public License permits making a modified version and
(1) assert copyright on the software, and (2) offer you this License letting the public access it on a server without ever releasing its
giving you legal permission to copy, distribute and/or modify it. source code to the public.
For the developers' and authors' protection, the GPL clearly explains The GNU Affero General Public License is designed specifically to
that there is no warranty for this free software. For both users' and ensure that, in such cases, the modified source code becomes available
authors' sake, the GPL requires that modified versions be marked as to the community. It requires the operator of a network server to
changed, so that their problems will not be attributed erroneously to provide the source code of the modified version running there to the
authors of previous versions. users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
Some devices are designed to deny users access to install or run code of the modified version.
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of An older license, called the Affero General Public License and
protecting users' freedom to change the software. The systematic published by Affero, was designed to accomplish similar goals. This is
pattern of such abuse occurs in the area of products for individuals to a different license, not a version of the Affero GPL, but Affero has
use, which is precisely where it is most unacceptable. Therefore, we released a new version of the Affero GPL which permits relicensing under
have designed this version of the GPL to prohibit the practice for those this license.
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and The precise terms and conditions for copying, distribution and
modification follow. modification follow.
...@@ -72,7 +60,7 @@ modification follow. ...@@ -72,7 +60,7 @@ modification follow.
0. Definitions. 0. Definitions.
"This License" refers to version 3 of the GNU General Public License. "This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks. works, such as semiconductor masks.
...@@ -549,35 +537,45 @@ to collect a royalty for further conveying from those to whom you convey ...@@ -549,35 +537,45 @@ to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program. License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License. 13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have Notwithstanding any other provision of this License, you have
permission to reference or combine any covered work with a work licensed permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work, License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License, but the work with which it is combined will remain governed by version
section 13, concerning interaction through a network will apply to the 3 of the GNU General Public License.
combination as such.
14. Revised Versions of this License. 14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will the GNU Affero General Public License from time to time. Such new versions
be similar in spirit to the present version, but may differ in detail to will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns. address new problems or concerns.
Each version is given a distinguishing version number. If the Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation. by the Free Software Foundation.
If the Program specifies that a proxy can decide which future If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you public statement of acceptance of a version permanently authorizes you
to choose that version for the Program. to choose that version for the Program.
...@@ -635,40 +633,29 @@ the "copyright" line and a pointer to where the full notice is found. ...@@ -635,40 +633,29 @@ the "copyright" line and a pointer to where the full notice is found.
Copyright (C) <year> <name of author> Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU Affero General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail. Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short If your software can interact with users remotely through a computer
notice like this when it starts in an interactive mode: network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
<program> Copyright (C) <year> <name of author> interface could display a "Source" link that leads users to an archive
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. of the code. There are many ways you could offer source, and different
This is free software, and you are welcome to redistribute it solutions will be better for different programs; see section 13 for the
under certain conditions; type `show c' for details. specific requirements.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school, You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary. if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>. <http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
...@@ -2,21 +2,22 @@ ...@@ -2,21 +2,22 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>org.duniter</groupId> <groupId>org.duniter.cesium</groupId>
<artifactId>duniter4j</artifactId> <artifactId>cesium-plus-pod</artifactId>
<version>1.0.0</version> <version>1.11.0</version>
</parent> </parent>
<artifactId>duniter4j-es-assembly</artifactId> <artifactId>cesium-plus-pod-assembly</artifactId>
<name>Duniter4j :: ElasticSearch Assembly</name>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>Cesium+ pod :: Assembly</name>
<description>Build releases of Cesium+ pod</description>
<properties> <properties>
<!-- bundle configuration --> <!-- bundle configuration -->
<bundlePrefix>duniter4j-es-${project.version}</bundlePrefix> <bundlePrefix>${project.parent.artifactId}-${project.version}</bundlePrefix>
<!-- i18n configuration --> <!-- i18n configuration -->
<i18n.bundleOutputName>duniter4j-es-i18n</i18n.bundleOutputName> <i18n.bundleOutputName>${project.parent.artifactId}-i18n</i18n.bundleOutputName>
<i18n.generateCsvFile>true</i18n.generateCsvFile> <i18n.generateCsvFile>true</i18n.generateCsvFile>
<i18n.bundleCsvFile> <i18n.bundleCsvFile>
${maven.gen.dir}/resources/META-INF/${i18n.bundleOutputName}.csv ${maven.gen.dir}/resources/META-INF/${i18n.bundleOutputName}.csv
...@@ -34,38 +35,26 @@ ...@@ -34,38 +35,26 @@
<dependency> <dependency>
<groupId>org.glassfish.tyrus</groupId> <groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-client</artifactId> <artifactId>tyrus-client</artifactId>
<version>${tyrus.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-server</artifactId>
<version>${tyrus.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.glassfish.tyrus</groupId> <groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-container-grizzly-client</artifactId> <artifactId>tyrus-container-grizzly-client</artifactId>
<version>${tyrus.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-container-grizzly-server</artifactId>
<version>${tyrus.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.java.dev.jna</groupId> <groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId> <artifactId>jna</artifactId>
<version>${jna.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.java.dev.jna</groupId> <groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId> <artifactId>jna-platform</artifactId>
<version>${jna.version}</version> </dependency>
<exclusions> <dependency>
<exclusion> <groupId>com.sun.mail</groupId>
<groupId>net.java.dev.jna</groupId> <artifactId>jakarta.mail</artifactId>
<artifactId>jna</artifactId> </dependency>
</exclusion> <dependency>
</exclusions> <groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
...@@ -129,13 +118,13 @@ ...@@ -129,13 +118,13 @@
<configuration> <configuration>
<artifactItems> <artifactItems>
<artifactItem> <artifactItem>
<groupId>org.duniter</groupId> <groupId>${project.groupId}</groupId>
<artifactId>duniter4j-es-core</artifactId> <artifactId>${project.parent.artifactId}-core</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>zip</type> <type>zip</type>
</artifactItem> </artifactItem>
</artifactItems> </artifactItems>
<outputDirectory>${project.build.directory}/elasticsearch-${elasticsearch.version}/plugins/duniter4j-es-core</outputDirectory> <outputDirectory>${project.build.directory}/elasticsearch-${elasticsearch.version}/plugins/cesium-plus-pod-core</outputDirectory>
<silent>true</silent> <silent>true</silent>
<skip>${assembly.skip}</skip> <skip>${assembly.skip}</skip>
</configuration> </configuration>
...@@ -151,13 +140,13 @@ ...@@ -151,13 +140,13 @@
<configuration> <configuration>
<artifactItems> <artifactItems>
<artifactItem> <artifactItem>
<groupId>org.duniter</groupId> <groupId>${project.groupId}</groupId>
<artifactId>duniter4j-es-user</artifactId> <artifactId>${project.parent.artifactId}-user</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>zip</type> <type>zip</type>
</artifactItem> </artifactItem>
</artifactItems> </artifactItems>
<outputDirectory>${project.build.directory}/elasticsearch-${elasticsearch.version}/plugins/duniter4j-es-user</outputDirectory> <outputDirectory>${project.build.directory}/elasticsearch-${elasticsearch.version}/plugins/cesium-plus-pod-user</outputDirectory>
<silent>true</silent> <silent>true</silent>
<skip>${assembly.skip}</skip> <skip>${assembly.skip}</skip>
</configuration> </configuration>
...@@ -173,13 +162,13 @@ ...@@ -173,13 +162,13 @@
<configuration> <configuration>
<artifactItems> <artifactItems>
<artifactItem> <artifactItem>
<groupId>org.duniter</groupId> <groupId>${project.groupId}</groupId>
<artifactId>duniter4j-es-subscription</artifactId> <artifactId>${project.parent.artifactId}-subscription</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<type>zip</type> <type>zip</type>
</artifactItem> </artifactItem>
</artifactItems> </artifactItems>
<outputDirectory>${project.build.directory}/elasticsearch-${elasticsearch.version}/plugins/duniter4j-es-subscription</outputDirectory> <outputDirectory>${project.build.directory}/elasticsearch-${elasticsearch.version}/plugins/cesium-plus-pod-subscription</outputDirectory>
<silent>true</silent> <silent>true</silent>
<skip>${assembly.skip}</skip> <skip>${assembly.skip}</skip>
</configuration> </configuration>
...@@ -252,26 +241,20 @@ ...@@ -252,26 +241,20 @@
<!-- reuse standalone files --> <!-- reuse standalone files -->
<then> <then>
<delete failonerror="false"> <delete failonerror="false">
<fileset dir="${run.es.home}/plugins" includes="**/duniter4j-*.jar" /> <fileset dir="${run.es.home}/plugins" includes="**/cesium-plus-pod-*.jar" />
</delete> </delete>
<copy todir="${run.es.home}/plugins/duniter4j-es-core" overwrite="true"> <copy todir="${run.es.home}/plugins/cesium-plus-pod-core" overwrite="true">
<fileset dir="../duniter4j-core-client/target" includes="duniter4j-*${project.version}.jar"> <fileset dir="../cesium-plus-pod-model/target" includes="cesium-plus-pod-model-${project.version}.jar">
</fileset> </fileset>
<fileset dir="../duniter4j-core-shared/target" includes="duniter4j-*${project.version}.jar"> <fileset dir="../cesium-plus-pod-core/target" includes="cesium-plus-pod-core-${project.version}.jar">
</fileset>
<fileset dir="../duniter4j-es-core/target" includes="duniter4j-*${project.version}.jar">
</fileset>
</copy>
<copy todir="${run.es.home}/plugins/duniter4j-es-core" overwrite="true">
<fileset dir="../duniter4j-es-core/target" includes="duniter4j-*${project.version}.jar">
</fileset> </fileset>
</copy> </copy>
<copy todir="${run.es.home}/plugins/duniter4j-es-user" overwrite="true"> <copy todir="${run.es.home}/plugins/cesium-plus-pod-user" overwrite="true">
<fileset dir="../duniter4j-es-user/target" includes="duniter4j-*${project.version}.jar"> <fileset dir="../cesium-plus-pod-user/target" includes="cesium-plus-pod-*${project.version}.jar">
</fileset> </fileset>
</copy> </copy>
<copy todir="${run.es.home}/plugins/duniter4j-es-subscription" overwrite="true"> <copy todir="${run.es.home}/plugins/cesium-plus-pod-subscription" overwrite="true">
<fileset dir="../duniter4j-es-subscription/target" includes="duniter4j-*${project.version}.jar"> <fileset dir="../cesium-plus-pod-subscription/target" includes="cesium-plus-pod-*${project.version}.jar">
</fileset> </fileset>
</copy> </copy>
</then> </then>
...@@ -290,6 +273,12 @@ ...@@ -290,6 +273,12 @@
<fileset dir="${project.basedir}/src/test/es-home" includes="**/*.*"> <fileset dir="${project.basedir}/src/test/es-home" includes="**/*.*">
</fileset> </fileset>
</copy> </copy>
<!-- Use .local/elasticsearch.yml -->
<copy todir="${run.es.home}/config" overwrite="true">
<fileset dir="${project.basedir}/../.local" includes="elasticsearch.yml">
</fileset>
</copy>
</target> </target>
</configuration> </configuration>
</execution> </execution>
...@@ -342,14 +331,14 @@ ...@@ -342,14 +331,14 @@
<version>${tyrus.version}</version> <version>${tyrus.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.glassfish.tyrus</groupId> <groupId>com.sun.mail</groupId>
<artifactId>tyrus-server</artifactId> <artifactId>jakarta.mail</artifactId>
<version>${tyrus.version}</version> <version>${jakarta-mail.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.glassfish.tyrus</groupId> <groupId>com.sun.activation</groupId>
<artifactId>tyrus-container-grizzly-server</artifactId> <artifactId>jakarta.activation</artifactId>
<version>${tyrus.version}</version> <version>${jakarta-activation.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
<executions> <executions>
......
#!/bin/bash
CMD=$1
shift
# Get to the ES HOME
if [[ "_" == "_${ES_HOME}" ]]; then
SCRIPT_DIR=$(dirname $0)
ES_HOME=$(cd ${SCRIPT_DIR}/.. && pwd)
fi;
PID_FILE="${ES_HOME}/data/service.pid"
EXEC_CMD="./elasticsearch $*"
LOG_DIR=${ES_HOME}/log
start() {
echo "Starting Cesium+ Pod..."
echo " - HOME: $ES_HOME"
echo " - CMD: $EXEC_CMD"
echo " - log: $LOG_DIR"
cd $ES_HOME/bin
PID=`nohup $EXEC_CMD >> /dev/null 2>> /dev/null & echo $!`
}
case "$CMD" in
start)
if [ -f $PID_FILE ]; then
PID=`cat $PID_FILE`
if [ -z "`ps axf | grep ${PID} | grep -v grep`" ]; then
start
else
echo "Already running [$PID]"
exit 0
fi
else
start
fi
if [ -z $PID ]; then
echo "Failed starting"
exit 1
else
echo $PID > $PID_FILE
echo "Started [$PID]"
exit 0
fi
;;
status)
if [ -f $PID_FILE ]; then
PID=`cat $PID_FILE`
if [ -z "`ps axf | grep ${PID} | grep -v grep`" ]; then
echo "Not running (process dead but PID file exists)"
exit 1
else
echo "Running [$PID]"
exit 0
fi
else
echo "Not running"
exit 0
fi
;;
stop)
if [ -f $PID_FILE ]; then
PID=`cat $PID_FILE`
if [ -z "`ps axf | grep ${PID} | grep -v grep`" ]; then
echo "Not running (process dead but PID file exists)"
rm -f $PID_FILE
exit 1
else
PID=`cat $PID_FILE`
kill -term $PID
echo "Stopped [$PID]"
rm -f $PID_FILE
exit 0
fi
else
echo "Not running (PID not found)"
exit 0
fi
;;
restart)
$0 stop
sleep 20s
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart|status} OPTIONS"
echo ""
echo "NAME"
echo ""
echo " start Start the Cesium+ Pod"
echo " stop Stop the Cesium+ Pod"
echo " restart Do a stop/start on the Cesium+ Pod"
echo " status Say if the the Cesium+ Pod is running"
echo ""
echo "OPTIONS"
echo ""
echo " -Dproperty=value Configures an Elasticsearch specific property, like -Dnetwork.host=127.0.0.1"
echo ""
echo " --property=value Configures an elasticsearch specific property, like --network.host 127.0.0.1"
echo " --property value"
echo ""
echo "PROPERTIES"
echo ""
echo " --cluster.remote.host Remote host to join the pod (outside your local network)"
echo " --cluster.remote.port Remote port to join the pod (outside your local network)"
echo " --network.host The local network interface to use"
echo " --http.port The local port to use. Can be a range, like --http.port 9200-9210"
exit 0
esac
\ No newline at end of file
#!/bin/sh
# check in case a user was using this mechanism
if [ "x$ES_CLASSPATH" != "x" ]; then
cat >&2 << EOF
Error: Don't modify the classpath with ES_CLASSPATH. Best is to add
additional elements via the plugin mechanism, or if code must really be
added to the main classpath, add jars to lib/ (unsupported).
EOF
exit 1
fi
ES_CLASSPATH="$ES_HOME/lib/elasticsearch-2.4.6.jar:$ES_HOME/lib/*"
if [ "x$ES_MIN_MEM" = "x" ]; then
ES_MIN_MEM=1g
fi
if [ "x$ES_MAX_MEM" = "x" ]; then
ES_MAX_MEM=4g
fi
if [ "x$ES_HEAP_SIZE" != "x" ]; then
ES_MIN_MEM=$ES_HEAP_SIZE
ES_MAX_MEM=$ES_HEAP_SIZE
fi
# min and max heap sizes should be set to the same value to avoid
# stop-the-world GC pauses during resize, and so that we can lock the
# heap in memory on startup to prevent any of it from being swapped
# out.
JAVA_OPTS="$JAVA_OPTS -Xms${ES_MIN_MEM}"
JAVA_OPTS="$JAVA_OPTS -Xmx${ES_MAX_MEM}"
# new generation
if [ "x$ES_HEAP_NEWSIZE" != "x" ]; then
JAVA_OPTS="$JAVA_OPTS -Xmn${ES_HEAP_NEWSIZE}"
fi
# max direct memory
if [ "x$ES_DIRECT_SIZE" != "x" ]; then
JAVA_OPTS="$JAVA_OPTS -XX:MaxDirectMemorySize=${ES_DIRECT_SIZE}"
fi
# set to headless, just in case
JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"
# Force the JVM to use IPv4 stack
if [ "x$ES_USE_IPV4" != "x" ]; then
JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true"
fi
# Add gc options. ES_GC_OPTS is unsupported, for internal testing
if [ "x$ES_GC_OPTS" = "x" ]; then
# BLA - 16/05/2022 - Remove JVM parameter 'UseParNewGC', not exists anymore in Java 11+
#ES_GC_OPTS="$ES_GC_OPTS -XX:+UseParNewGC"
ES_GC_OPTS="$ES_GC_OPTS -XX:+UseConcMarkSweepGC"
ES_GC_OPTS="$ES_GC_OPTS -XX:CMSInitiatingOccupancyFraction=75"
ES_GC_OPTS="$ES_GC_OPTS -XX:+UseCMSInitiatingOccupancyOnly"
fi
JAVA_OPTS="$JAVA_OPTS $ES_GC_OPTS"
# GC logging options
if [ -n "$ES_GC_LOG_FILE" ]; then
JAVA_OPTS="$JAVA_OPTS -XX:+PrintGCDetails"
JAVA_OPTS="$JAVA_OPTS -XX:+PrintGCTimeStamps"
JAVA_OPTS="$JAVA_OPTS -XX:+PrintGCDateStamps"
JAVA_OPTS="$JAVA_OPTS -XX:+PrintClassHistogram"
JAVA_OPTS="$JAVA_OPTS -XX:+PrintTenuringDistribution"
JAVA_OPTS="$JAVA_OPTS -XX:+PrintGCApplicationStoppedTime"
JAVA_OPTS="$JAVA_OPTS -Xloggc:$ES_GC_LOG_FILE"
# Ensure that the directory for the log file exists: the JVM will not create it.
mkdir -p "`dirname \"$ES_GC_LOG_FILE\"`"
fi
# Causes the JVM to dump its heap on OutOfMemory.
#JAVA_OPTS="$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError"
# The path to the heap dump location, note directory must exists and have enough
# space for a full heap dump.
#JAVA_OPTS="$JAVA_OPTS -XX:HeapDumpPath=$ES_HOME/logs/heapdump.hprof"
# Disables explicit GC
JAVA_OPTS="$JAVA_OPTS -XX:+DisableExplicitGC"
# Ensure UTF-8 encoding by default (e.g. filenames)
JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8"
# Use our provided JNA always versus the system one
JAVA_OPTS="$JAVA_OPTS -Djna.nosys=true"
...@@ -14,15 +14,27 @@ ...@@ -14,15 +14,27 @@
# #
# Use a descriptive name for your cluster: # Use a descriptive name for your cluster:
# #
cluster.name: duniter4j-es-g1 cluster.name: cesium-plus-pod-g1
#
# Host + port, to join your cluster, from external network
#
#cluster.remote.host: localhost
#
# Port for remote access to the cluster (Default: 80)
#
#cluster.remote.port: 9200
#
# Does remote access need SSL ? (default: 'true' if port=443, 'false' otherwise)
#
# cluster.remote.useSsl: true
# #
# ------------------------------------ Node ------------------------------------ # ------------------------------------ Node ------------------------------------
# #
# Use a descriptive name for the node: # Use a descriptive name for the node: (default: will be generated)
# #
# node.name: node-1 # node.name: node-1
# #
# Add custom attributes to the node: # Add custom attributes to the node: (Default: none)
# #
# node.rack: r1 # node.rack: r1
# #
...@@ -57,9 +69,13 @@ cluster.name: duniter4j-es-g1 ...@@ -57,9 +69,13 @@ cluster.name: duniter4j-es-g1
# #
# http.port: 9200-9300 # http.port: 9200-9300
http.cors.allow-origin: "/.*/"
http.cors.enabled: true http.cors.enabled: true
http.cors.allow-credentials: true
http.cors.allow-origin: "/.*/"
http.cors.allow-headers: X-Requested-With, X-Auth-Token, X-Real-IP, Content-Type, Content-Length, Authorization, Access-Control-Allow-Headers, Accept
#
#http.compression: true
#
# Internal transport layer # Internal transport layer
# #
# transport.tcp.port: 9210-9220 # transport.tcp.port: 9210-9220
...@@ -73,7 +89,7 @@ http.cors.enabled: true ...@@ -73,7 +89,7 @@ http.cors.enabled: true
# The default list of hosts is ["127.0.0.1", "[::1]"] # The default list of hosts is ["127.0.0.1", "[::1]"]
# #
# discovery.zen.ping.unicast.hosts: ["host1", "host2"] # discovery.zen.ping.unicast.hosts: ["host1", "host2"]
# discovery.zen.ping.unicast.hosts: ["127.0.0.1", ""] # discovery.zen.ping.unicast.hosts: ["127.0.0.1"]
# #
# Prevent the "split brain" by configuring the majority of nodes (total number of nodes / 2 + 1): # Prevent the "split brain" by configuring the majority of nodes (total number of nodes / 2 + 1):
# #
...@@ -101,15 +117,19 @@ http.cors.enabled: true ...@@ -101,15 +117,19 @@ http.cors.enabled: true
# #
# action.destructive_requires_name: true # action.destructive_requires_name: true
# #
# Security to isolate plugin classpath - /!\ WARNING: should be DISABLE for Duniter4j # Security to isolate plugin classpath - /!\ WARNING: should always be DISABLE
# #
security.manager.enabled: false security.manager.enabled: false
# #
# ---------------------------------- Duniter4j --------------------------------- # ---------------------------------- Cesium+ Pod ---------------------------------
#
# Enable Cesium+ pod core plugin (default: true)
#
# duniter.enable: false
# #
# Enable duniter4j plugins # Endpoint API for core module (indices on blockchain, peers, etc) (default: ES_CORE_API)
# #
# duniter.enabled: false # duniter.core.api: MY_CUSTOM_API
# #
# Delete then create all indices at startup - /!\ WARNING: DO NOT set to true in production # Delete then create all indices at startup - /!\ WARNING: DO NOT set to true in production
# #
...@@ -119,14 +139,41 @@ security.manager.enabled: false ...@@ -119,14 +139,41 @@ security.manager.enabled: false
# #
duniter.string.analyzer: french duniter.string.analyzer: french
# #
# Enabling blockchain synchronization (default: false) # Enabling blockchain synchronization (default: true)
#
# duniter.blockchain.enable: true
#
# Enabling blockchain movement indexation ? (default: ${duniter.blockchain.enable})
#
# duniter.blockchain.movement.enable: false
#
# Include/exclude blockchain movement, using regexp on `TX.comment` (default: <empty>)
#
# duniter.blockchain.movement.includes.comment: ["REMU:*", "GANNONCE:*", "GCHANGE:*"]
#
# duniter.blockchain.movement.excludes.comment: ["GANNONCE:CROWDF:*"]
#
# Enabling blockchain peers indexation ? (default: ${duniter.blockchain.enable})
# #
duniter.blockchain.enable: true # duniter.blockchain.peer.enable: false
#
# Enabling pending memberships indexation ? (default: ${duniter.blockchain.enable})
#
# duniter.blockchain.membership.pending.enable: false
#
# Enable user event on blockchain ? (default: true)
#
# duniter.blockchain.event.user.enable: false
#
# Enable events for the node admin (e.g. node start/stop) (default: true)
#
# duniter.blockchain.event.admin.enable: false
# #
# Force blockchain full synchronization - /!\ WARNING: all user events will be reset to 'unread' # Force blockchain full synchronization - /!\ WARNING: all user events will be reset to 'unread'
# #
# duniter.blockchain.reload: true # duniter.blockchain.reload: true
# duniter.blockchain.reload.from: 50999 # duniter.blockchain.reload.from: 18900
# duniter.blockchain.reload.to: 19000
# #
# Duniter node address # Duniter node address
# #
...@@ -134,11 +181,19 @@ duniter.host: g1.duniter.org ...@@ -134,11 +181,19 @@ duniter.host: g1.duniter.org
duniter.port: 10901 duniter.port: 10901
# duniter.useSsl: true # duniter.useSsl: true
# #
# Network timeout, in millisecond (default: 20000 = 20s)
#
# duniter.network.timeout: 5000
#
# Compute statistics on indices (each hour) ? (default: true) # Compute statistics on indices (each hour) ? (default: true)
# #
# duniter.stats.enable: false # duniter.stats.enable: false
# #
# ---------------------------------- Duniter4j security module ------------------- # Software name (used when calling GET request on /node/summary) (default: 'cesium-plus-pod')
#
# duniter.software.name: cesium-plus-pod
#
# ---------------------------------- Cesium+ Pod > security module -------------------
# #
# Keyring, use to sign emitted documents (user events, subscription, etc.). # Keyring, use to sign emitted documents (user events, subscription, etc.).
# If not set, random keys will be generated. # If not set, random keys will be generated.
...@@ -146,11 +201,26 @@ duniter.port: 10901 ...@@ -146,11 +201,26 @@ duniter.port: 10901
# duniter.keyring.salt: # duniter.keyring.salt:
# duniter.keyring.password: # duniter.keyring.password:
# #
# Enable security - will restrict HTTP access to only Duniter4j known indices - /!\ WARNING: should be enable for production use # Enable security - will restrict HTTP access to only ES known indices
# /!\ WARNING: should be enable for production use
# #
duniter.security.enable: true duniter.security.enable: true
# #
# ---------------------------------- Duniter4j P2P module ------------------------- # Enable quota by IP
# /!\ WARNING: should be enable for production use
#
# duniter.security.quota.enable: false
#
#
# IP address white list (no quota will be applied). Defaults: ["127.0.0.1", "::1"]
#
# duniter.security.whitelist: ["127.0.0.1", "::1"]
#
# IP address black list (never allow access). Defaults: []
#
# duniter.security.blacklist: []
#
# ---------------------------------- Cesium+ Pod > P2P module -------------------------
# #
# Enable P2P synchronize between ES peers ? (default: true) # Enable P2P synchronize between ES peers ? (default: true)
# #
...@@ -171,29 +241,69 @@ duniter.security.enable: true ...@@ -171,29 +241,69 @@ duniter.security.enable: true
# Pass a list of hosts to always synchronize (default: <empty>) # Pass a list of hosts to always synchronize (default: <empty>)
# #
duniter.p2p.includes.endpoints: [ duniter.p2p.includes.endpoints: [
"ES_USER_API g1.data.duniter.fr 443", "ES_CORE_API g1.data.e-is.pro 443",
"ES_SUBSCRIPTION_API g1.data.duniter.fr 443" "ES_USER_API g1.data.e-is.pro 443",
"ES_SUBSCRIPTION_API g1.data.e-is.pro 443"
] ]
# #
# Pass a list of pubkeys to always synchronize (default: <empty>) # Pass a list of pubkeys to always synchronize (default: <empty>)
# #
# duniter.p2p.includes.pubkeys: [""] # duniter.p2p.includes.pubkeys: [
# "38MEAZN68Pz1DTvT3tqgxx4yQP6snJCQhPqEFxbDk4aE"
# ]
#
# Enable a full synchro. This will compare each documents from other peers.
#
# duniter.p2p.fullResyncAtStartup: true
#
# Peer API to index (default : ["BASIC_MERKLE_API", "BMAS", "WS2P" ] UNION ${duniter.p2p.peering.targetedApis} UNION ${duniter.p2p.peering.publishedApis})
# #
# ---------------------------------- Duniter4j document moderation --------------- # duniter.p2p.peer.indexedApis: ["BASIC_MERKLE_API", "BMAS", "WS2P", "ES_CORE_API", "ES_USER_API", "ES_SUBSCRIPTION_API"]
#
# Enable publishing of pod endpoints to the network (see the peer document in Duniter protocol). (Default: '${duniter.p2p.enable}')
#
# duniter.p2p.peering.enable: false
#
# Define targeted API (for peers selection) where to send the peer document (if peering is enable). (Default: ["BASIC_MERKLED_API", "BMAS"])
# This API should accept a POST request to '/network/peering' (will send a peer document - see the Duniter protocol)
#
# duniter.p2p.peering.targetedApis: [
# "ES_CORE_API"
# ]
#
# Define cluster API to publish (if peering is enable). By default, all compatible API
#
# duniter.p2p.peering.publishedApis: [
# "ES_CORE_API", "ES_USER_API", "ES_SUBSCRIPTION_API"
# ]
#
# Interval for publishing peer document to the network, in seconds. (Default: 7200 =2h)
#
# duniter.p2p.peering.interval: 7200
#
# ---------------------------------- Cesium+ Pod > document moderation ---------------
# #
# Filter too old document, if time older that 'maxPastDelta' (in seconds). (default: 7200 =2h) # Filter too old document, if time older that 'maxPastDelta' (in seconds). (default: 7200 =2h)
# #
# duniter.document.time.maxPastDelta: 7200 # duniter.document.time.maxPastDelta: 7200
# #
# Filter document in the futur, if time greater that 'maxFutureDelta' (in seconds). (default: 600 =10min) # Filter document in the future, if time greater that 'maxFutureDelta' (in seconds). (default: 600 =10min)
# #
# duniter.document.time.maxFutureDelta: 600 # duniter.document.time.maxFutureDelta: 600
# #
# Allow admin (define in duniter.keyring) to delete documents ? (default: true) # Allow admin (define in duniter.keyring) to delete documents ? (default: true)
# #
# duniter.document.allowAdminDeletion: true # duniter.document.moderators.admin: false
#
# Public keys of moderators. Moderators can delete any user documents (profile, page comment, etc.) (default: <empty>)
# #
# ---------------------------------- Duniter4j Mail module ----------------------- duniter.document.moderators.pubkeys: [
'38MEAZN68Pz1DTvT3tqgxx4yQP6snJCQhPqEFxbDk4aE', # Benoit Lavenier
'47JpfrGkoHJWtumeu7f67fbAxkvaHYVQBNo5GszNs61Z', # Bertrand Presles
'HmH5beJqKGMeotcQUrSW7Wo5tKvAksHmfYXfiSQ9EbWz' # Le Sou Mayennais
]
#
# ---------------------------------- Cesium+ Pod > Mail module -----------------------
# #
# Enable mail module ? # Enable mail module ?
# #
...@@ -222,21 +332,42 @@ duniter.mail.enable: false ...@@ -222,21 +332,42 @@ duniter.mail.enable: false
# #
# duniter.mail.admin: user@domain.com # duniter.mail.admin: user@domain.com
# #
# Mail: subject prefix # Mail: subject prefix (default: '[Cesium+]')
# #
# duniter.mail.subject.prefix: '[Cesium+]' # duniter.mail.subject.prefix: '[Cesium+]'
# ---------------------------------- Duniter4j Websocket server ----------------------
# #
# Websocket port (default: 9400-9410) # ---------------------------------- Cesium+ Pod > User module ---------------------------
#
# Enable user module (Allow to store User profile, private message, page, group...) (default: true)
#
# duniter.user.enable: false
#
# Endpoint API for user data (use by P2P synchronization) (default: 'ES_USER_API')
#
# duniter.user.api: MY_CUSTOM_API
#
# Requirements to send abuse report on document (profile, page, etc.) (default: ['member'])
#
# duniter.user.document.abuse.issuer.requirements: ['wasMember', 'member', 'profile']
#
# Requirements to send likes on document (profile, page, etc.) (default: empty)
# #
duniter.ws.port: 9400-9410 # duniter.user.document.like.issuer.requirements: ['wasMember', 'member', 'profile']
# #
# ---------------------------------- Duniter4j Subscription module ------------------- # ---------------------------------- Cesium+ Pod > Subscription module -------------------
# #
# Enable subscription module (Need to enable mail features) # Enable subscription module (Need to enable mail features) (default: true)
# #
duniter.subscription.enable: false # duniter.subscription.enable: false
#
# Endpoint API for subscription data (use by P2P synchronization) (default: ES_SUBSCRIPTION_API)
#
# duniter.subscription.api: MY_CUSTOM_API
#
# Options to debug this features (DEV only)
#
# duniter.subscription.email.atStartup: false
# duniter.subscription.email.debug: false
# #
# Email subscription: Day of the week to trigger weekly (default: 2 = monday) # Email subscription: Day of the week to trigger weekly (default: 2 = monday)
# #
...@@ -246,6 +377,39 @@ duniter.subscription.enable: false ...@@ -246,6 +377,39 @@ duniter.subscription.enable: false
# #
# duniter.subscription.email.hourOfDay: 3 # duniter.subscription.email.hourOfDay: 3
# #
# Email subscription: URL to a Cesium site, for links in the email content (default: https://g1.duniter.fr) # Email subscription: URL to a web site, for links in the email content (default: <null>)
#
# duniter.subscription.email.link.url: 'https://demo.cesium.app'
#
# Name of the button in the email, to access to notifications (default: 'Cesium')
#
# duniter.subscription.email.link.name: 'My site name'
#
# Email logo (Should be PNG 128x128px) (default: '${duniter.subscription.email.link.url}/img/logo_128px.png')
#
# duniter.subscription.email.logo.url: https://path/to/logo
#
# Email header background color (default: '${duniter.subscription.email.link.url}/img/logo_128px.png')
#
# duniter.subscription.email.header.background.color: '#1a237e'
#
# ---------------------------------- Cesium+ Pod > Share module -------------------
#
# Share title: `og:site_name` (default: 'Cesium')
#
# duniter.share.site.name: 'Cesium - Ğ1'
#
# URL to a page (default: https://demo.cesium.app/#/app/page/view/{id}/{title} )
# Note: available variables are {id} and {title}
#
# duniter.share.page.link.url: 'https://domain.com/cesium/#/app/page/view/{id}/{title}'
#
# URL to a user profile (default: https://demo.cesium.app/#/app/wot/{pubkey}/{title} )
# Note: available variables are {pubkey} and {title}
#
# duniter.share.user.link.url: 'https://domain.com/cesium/#/app/wot/{pubkey}/{title}'
#
# Default image to share (min size of 200x200px) for `og:image` (default: https://demo.cesium.app/img/logo_200px.png)
# #
# duniter.subscription.email.cesium.url: 'http://domain.com/cesium' # duniter.share.image.default.url: 'https://domain.com/cesium/img/logo_200px.png'
\ No newline at end of file #
\ No newline at end of file
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
<outputDirectory/> <outputDirectory/>
<excludes> <excludes>
<exclude>bin/elasticsearch</exclude> <exclude>bin/elasticsearch</exclude>
<exclude>bin/elasticsearch.in.sh</exclude>
<exclude>bin/plugin</exclude> <exclude>bin/plugin</exclude>
<exclude>config/elasticsearch.yml</exclude> <exclude>config/elasticsearch.yml</exclude>
<exclude>config/logging.yml</exclude> <exclude>config/logging.yml</exclude>
...@@ -53,25 +54,26 @@ ...@@ -53,25 +54,26 @@
<fileMode>0755</fileMode> <fileMode>0755</fileMode>
</fileSet> </fileSet>
<!-- default configuration file --> <!-- configuration files -->
<fileSet> <fileSet>
<directory>src/main/assembly/config</directory> <directory>src/main/assembly</directory>
<outputDirectory>config</outputDirectory> <outputDirectory/>
<includes> <includes>
<include>elasticsearch.yml</include> <include>config/elasticsearch.yml</include>
<include>logging.yml</include> <include>config/logging.yml</include>
</includes> </includes>
</fileSet> </fileSet>
<!-- websocket lib (tyrus ) <!-- executable files -->
<fileSet> <fileSet>
<directory>target/elasticsearch-${elasticsearch.version}</directory> <directory>src/main/assembly</directory>
<outputDirectory>lib</outputDirectory> <outputDirectory/>
<includes> <includes>
<include>elasticsearch.yml</include> <include>bin/elasticsearch.in.sh</include>
<include>logging.yml</include> <include>bin/cesium-plus-pod</include>
</includes> </includes>
</fileSet>--> <fileMode>0755</fileMode>
</fileSet>
</fileSets> </fileSets>
<dependencySets> <dependencySets>
...@@ -83,10 +85,10 @@ ...@@ -83,10 +85,10 @@
<include>javax.websocket:javax.websocket-api</include> <include>javax.websocket:javax.websocket-api</include>
<include>org.glassfish.tyrus:tyrus-client</include> <include>org.glassfish.tyrus:tyrus-client</include>
<include>org.glassfish.tyrus:tyrus-container-grizzly-client</include> <include>org.glassfish.tyrus:tyrus-container-grizzly-client</include>
<include>org.glassfish.tyrus:tyrus-server</include> <include>com.sun.mail:jakarta.mail</include>
<include>org.glassfish.tyrus:tyrus-container-grizzly-server</include> <include>com.sun.activation:jakarta.activation</include>
</includes> </includes>
<fileMode>0555</fileMode> <fileMode>0664</fileMode>
</dependencySet> </dependencySet>
</dependencySets> </dependencySets>
</assembly> </assembly>
...@@ -14,15 +14,27 @@ ...@@ -14,15 +14,27 @@
# #
# Use a descriptive name for your cluster: # Use a descriptive name for your cluster:
# #
cluster.name: g1-es-data cluster.name: cesium-plus-cluster-DEV
#
# Host + port, to join your cluster, from external network
#
#cluster.remote.host: localhost
#
# Port for remote access to the cluster (Default: 80)
#
cluster.remote.port: 9200
#
# Does remote access need SSL ? (default: 'true' if port=443, 'false' otherwise)
#
# cluster.remote.useSsl: true
# #
# ------------------------------------ Node ------------------------------------ # ------------------------------------ Node ------------------------------------
# #
# Use a descriptive name for the node: # Use a descriptive name for the node: (default: will be generated)
# #
node.name: EIS-DEV # node.name: node-1
# #
# Add custom attributes to the node: # Add custom attributes to the node: (Default: none)
# #
# node.rack: r1 # node.rack: r1
# #
...@@ -51,15 +63,19 @@ node.name: EIS-DEV ...@@ -51,15 +63,19 @@ node.name: EIS-DEV
# #
# Set the bind address to a specific IP (IPv4 or IPv6): # Set the bind address to a specific IP (IPv4 or IPv6):
# #
# network.host: 192.168.233.118 network.host: localhost
# #
# Set a custom port for HTTP: # Set a custom port for HTTP:
# #
# http.port: 9200-9300 # http.port: 9200-9300
http.cors.allow-origin: "/.*/"
http.cors.enabled: true http.cors.enabled: true
http.cors.allow-credentials: true
http.cors.allow-origin: "/.*/"
http.cors.allow-headers: X-Requested-With, X-Auth-Token, X-Real-IP, Content-Type, Content-Length, Authorization, Access-Control-Allow-Headers, Accept
#
#http.compression: true
#
# Internal transport layer # Internal transport layer
# #
# transport.tcp.port: 9210-9220 # transport.tcp.port: 9210-9220
...@@ -73,11 +89,11 @@ http.cors.enabled: true ...@@ -73,11 +89,11 @@ http.cors.enabled: true
# The default list of hosts is ["127.0.0.1", "[::1]"] # The default list of hosts is ["127.0.0.1", "[::1]"]
# #
# discovery.zen.ping.unicast.hosts: ["host1", "host2"] # discovery.zen.ping.unicast.hosts: ["host1", "host2"]
#discovery.zen.ping.unicast.hosts: ["127.0.0.1", ""] # discovery.zen.ping.unicast.hosts: ["127.0.0.1"]
# #
# Prevent the "split brain" by configuring the majority of nodes (total number of nodes / 2 + 1): # Prevent the "split brain" by configuring the majority of nodes (total number of nodes / 2 + 1):
# #
# discovery.zen.minimum_master_nodes: 3 discovery.zen.minimum_master_nodes: 1
# #
# For more information, see the documentation at: # For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery.html> # <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery.html>
...@@ -99,17 +115,21 @@ http.cors.enabled: true ...@@ -99,17 +115,21 @@ http.cors.enabled: true
# #
# Require explicit names when deleting indices: # Require explicit names when deleting indices:
# #
# rest.destructive_requires_name: true # action.destructive_requires_name: true
# #
# Security to isolate plugin classpath - /!\ WARNING: should be DISABLE for Duniter4j # Security to isolate plugin classpath - /!\ WARNING: should always be DISABLE
# #
security.manager.enabled: false security.manager.enabled: false
# #
# ---------------------------------- Duniter4j --------------------------------- # ---------------------------------- Cesium+ Pod ---------------------------------
# #
# Enable duniter4j plugins # Enable Cesium+ pod core plugin (default: true)
# #
# duniter.enabled: false # duniter.enable: false
#
# Endpoint API for core module (indices on blockchain, peers, etc) (default: ES_CORE_API)
#
# duniter.core.api: MY_CUSTOM_API
# #
# Delete then create all indices at startup - /!\ WARNING: DO NOT set to true in production # Delete then create all indices at startup - /!\ WARNING: DO NOT set to true in production
# #
...@@ -119,26 +139,61 @@ security.manager.enabled: false ...@@ -119,26 +139,61 @@ security.manager.enabled: false
# #
duniter.string.analyzer: french duniter.string.analyzer: french
# #
# Enabling blockchain synchronization # Enabling blockchain synchronization (default: true)
#
# duniter.blockchain.enable: true
#
# Enabling blockchain movement indexation ? (default: ${duniter.blockchain.enable})
#
# duniter.blockchain.movement.enable: false
#
# Include/exclude blockchain movement, using regexp on `TX.comment` (default: <empty>)
#
# duniter.blockchain.movement.includes.comment: ["REMU:*", "GCHANGE:*"]
#
# duniter.blockchain.movement.excludes.comment: ["REMU:*"]
#
# Enabling blockchain peers indexation ? (default: ${duniter.blockchain.enable})
#
# duniter.blockchain.peer.enable: false
# #
duniter.blockchain.enable: true # Enabling pending memberships indexation ? (default: ${duniter.blockchain.enable})
#
# duniter.blockchain.membership.pending.enable: false
#
# Enable user event on blockchain ? (default: true)
#
# duniter.blockchain.event.user.enable: false
#
# Enable events for the node admin (e.g. node start/stop) (default: true)
#
# duniter.blockchain.event.admin.enable: false
# #
# Force blockchain full synchronization - /!\ WARNING: all user events will be reset to 'unread' # Force blockchain full synchronization - /!\ WARNING: all user events will be reset to 'unread'
# #
# duniter.blockchain.reload: true # duniter.blockchain.reload: true
# duniter.blockchain.reload.from: 50999 # duniter.blockchain.reload.from: 207000
# duniter.blockchain.reload.to: 207190
# #
# Duniter node address # Duniter node address
# #
duniter.host: g1.duniter.fr duniter.host: g1.duniter.org
duniter.port: 443 duniter.port: 10901
duniter.useSsl: true # duniter.useSsl: true
#
# Network timeout, in millisecond (default: 20000 = 20s)
#
# duniter.network.timeout: 5000
# #
# Compute statistics on indices (each hour) ? (default: true) # Compute statistics on indices (each hour) ? (default: true)
# #
# duniter.stats.enable: false # duniter.stats.enable: false
# #
# ---------------------------------- Duniter4j security module ------------------- # Software name (used when calling GET request on /node/summary) (default: 'cesium-plus-pod')
#
# duniter.software.name: cesium-plus-pod
#
# ---------------------------------- Cesium+ Pod > security module -------------------
# #
# Keyring, use to sign emitted documents (user events, subscription, etc.). # Keyring, use to sign emitted documents (user events, subscription, etc.).
# If not set, random keys will be generated. # If not set, random keys will be generated.
...@@ -146,19 +201,26 @@ duniter.useSsl: true ...@@ -146,19 +201,26 @@ duniter.useSsl: true
duniter.keyring.salt: 'abc' duniter.keyring.salt: 'abc'
duniter.keyring.password: 'def' duniter.keyring.password: 'def'
# #
# Enable security - will restrict HTTP access to only Duniter4j known indices - /!\ WARNING: should be enable for production use # Enable security - will restrict HTTP access to only ES known indices
# /!\ WARNING: should be enable for production use
# #
duniter.security.enable: true duniter.security.enable: true
# #
# Security token prefix (default: 'duniter-') # Enable quota by IP
# /!\ WARNING: should be enable for production use
# #
# duniter.auth.token.prefix: duniter- # duniter.security.quota.enable: false
# #
# Token validity duration, in seconds (default: 600)
# #
# duniter.auth.tokenValidityDuration: 3600 # = 1hour # IP address white list (no quota will be applied). Defaults: ["127.0.0.1", "::1"]
#
# ---------------------------------- Duniter4j P2P module ------------------------- # duniter.security.whitelist: ["127.0.0.1", "::1"]
#
# IP address black list (never allow access). Defaults: []
#
# duniter.security.blacklist: []
#
# ---------------------------------- Cesium+ Pod > P2P module -------------------------
# #
# Enable P2P synchronize between ES peers ? (default: true) # Enable P2P synchronize between ES peers ? (default: true)
# #
...@@ -179,20 +241,69 @@ duniter.p2p.discovery.enable: false ...@@ -179,20 +241,69 @@ duniter.p2p.discovery.enable: false
# Pass a list of hosts to always synchronize (default: <empty>) # Pass a list of hosts to always synchronize (default: <empty>)
# #
duniter.p2p.includes.endpoints: [ duniter.p2p.includes.endpoints: [
"ES_USER_API g1.data.duniter.fr 443", "ES_CORE_API g1.data.e-is.pro 443",
"ES_SUBSCRIPTION_API g1.data.duniter.fr 443", "ES_USER_API g1.data.e-is.pro 443",
"ES_USER_API g1.data.le-sou.org 443", "ES_SUBSCRIPTION_API g1.data.e-is.pro 443"
"ES_SUBSCRIPTION_API g1.data.le-sou.org 443"
] ]
# #
# Pass a list of pubkeys to always synchronize (default: <empty>) # Pass a list of pubkeys to always synchronize (default: <empty>)
# #
duniter.p2p.includes.pubkeys: [ # duniter.p2p.includes.pubkeys: [
"38MEAZN68Pz1DTvT3tqgxx4yQP6snJCQhPqEFxbDk4aE" # "38MEAZN68Pz1DTvT3tqgxx4yQP6snJCQhPqEFxbDk4aE"
# ]
#
# Enable a full synchro. This will compare each documents from other peers.
#
# duniter.p2p.fullResyncAtStartup: true
#
# Peer API to index (default : ["BASIC_MERKLE_API", "BMAS", "WS2P" ] UNION ${duniter.p2p.peering.targetedApis} UNION ${duniter.p2p.peering.publishedApis})
#
# duniter.p2p.peer.indexedApis: ["BASIC_MERKLE_API", "BMAS", "WS2P", "ES_CORE_API", "ES_USER_API", "ES_SUBSCRIPTION_API"]
#
# Enable publishing of pod endpoints to the network (see the peer document in Duniter protocol). (Default: '${duniter.p2p.enable}')
#
duniter.p2p.peering.enable: false
#
# Define targeted API (for peers selection) where to send the peer document (if peering is enable). (Default: ["BASIC_MERKLED_API", "BMAS"])
# This API should accept a POST request to '/network/peering' (will send a see the Duniter protocol)
#
duniter.p2p.peering.targetedApis: [
"ES_CORE_API"
] ]
#duniter.p2p.fullResyncAtStartup: true
# #
# ---------------------------------- Duniter4j Mail module ----------------------- # Define cluster API to publish (if peering is enable). By default, all compatible API
#
# duniter.p2p.peering.publishedApis: [
# "ES_CORE_API", "ES_USER_API", "ES_SUBSCRIPTION_API"
# ]
#
# Interval for publishing peer document to the network, in seconds. (Default: 7200 =2h)
#
duniter.p2p.peering.interval: 60
#
# ---------------------------------- Cesium+ Pod > document moderation ---------------
#
# Filter too old document, if time older that 'maxPastDelta' (in seconds). (default: 7200 =2h)
#
# duniter.document.time.maxPastDelta: 7200
#
# Filter document in the future, if time greater that 'maxFutureDelta' (in seconds). (default: 600 =10min)
#
# duniter.document.time.maxFutureDelta: 600
#
# Allow admin (define in duniter.keyring) to delete documents ? (default: true)
#
# duniter.document.moderators.admin: false
#
# Public keys of moderators. Moderators can delete any user documents (profile, page comment, etc.) (default: <empty>)
#
duniter.document.moderators.pubkeys: [
'38MEAZN68Pz1DTvT3tqgxx4yQP6snJCQhPqEFxbDk4aE', # Benoit Lavenier
'47JpfrGkoHJWtumeu7f67fbAxkvaHYVQBNo5GszNs61Z', # Bertrand Presles
'HmH5beJqKGMeotcQUrSW7Wo5tKvAksHmfYXfiSQ9EbWz' # Le Sou Mayennais
]
#
# ---------------------------------- Cesium+ Pod > Mail module -----------------------
# #
# Enable mail module ? # Enable mail module ?
# #
...@@ -200,56 +311,105 @@ duniter.mail.enable: false ...@@ -200,56 +311,105 @@ duniter.mail.enable: false
# #
# Mail: SMTP server configuration (host and port) # Mail: SMTP server configuration (host and port)
# #
#duniter.mail.smtp.host: localhost # duniter.mail.smtp.host: localhost
#duniter.mail.smtp.port: 25 # duniter.mail.smtp.port: 25
# #
# Mail: SMTP server SSL security # Mail: SMTP server SSL security
# #
#duniter.mail.smtp.ssl: true # duniter.mail.smtp.ssl: true
#duniter.mail.smtp.starttls: true # duniter.mail.smtp.starttls: true
# #
# Mail: SMTP server authentication # Mail: SMTP server authentication
# #
#duniter.mail.smtp.username: # duniter.mail.smtp.username:
#duniter.mail.smtp.password: # duniter.mail.smtp.password:
# #
# Mail: 'from' address # Mail: 'from' address
# #
#duniter.mail.from: no-reply@domain.com # duniter.mail.from: no-reply@domain.com
# #
# Mail: admin address # Mail: admin address
# #
#duniter.mail.admin: user@domain.com # duniter.mail.admin: user@domain.com
# #
# Mail: subject prefix # Mail: subject prefix (default: '[Cesium+]')
# #
#duniter.mail.subject.prefix: '[Cesium+]' # duniter.mail.subject.prefix: '[Cesium+]'
#
# ---------------------------------- Duniter4j Websocket server ---------------------- # ---------------------------------- Cesium+ Pod > User module ---------------------------
#
# Enable user module (Allow to store User profile, private message, page, group...) (default: true)
#
# duniter.user.enable: false
#
# Endpoint API for user data (use by P2P synchronization) (default: 'ES_USER_API')
# #
# Websocket port (default: 9400-9410) # duniter.user.api: MY_CUSTOM_API
# #
duniter.ws.port: 9400-9410 # Requirements to send abuse report on document (profile, page, etc.) (default: ['member'])
# #
# ---------------------------------- Duniter4j Subscription module ------------------- # duniter.user.document.abuse.issuer.requirements: ['wasMember', 'member', 'profile']
# #
# Enable subscription module (Need to enable mail features) # Requirements to send likes on document (profile, page, etc.) (default: empty)
# #
duniter.subscription.enable: true # duniter.user.document.like.issuer.requirements: ['wasMember', 'member', 'profile']
# #
# Opions to DEBUG this features # ---------------------------------- Cesium+ Pod > Subscription module -------------------
# #
#duniter.subscription.email.atStartup: false # Enable subscription module (Need to enable mail features) (default: true)
#duniter.subscription.email.debug: false #
# duniter.subscription.enable: false
#
# Endpoint API for subscription data (use by P2P synchronization) (default: ES_SUBSCRIPTION_API)
#
# duniter.subscription.api: MY_CUSTOM_API
#
# Options to debug this features (DEV only)
#
# duniter.subscription.email.atStartup: false
# duniter.subscription.email.debug: false
# #
# Email subscription: Day of the week to trigger weekly (default: 2 = monday) # Email subscription: Day of the week to trigger weekly (default: 2 = monday)
# #
#duniter.subscription.email.dayOfWeek: 2 # duniter.subscription.email.dayOfWeek: 2
# #
# Email subscription: Hour in day to trigger daily email subscription (default: 3 AM) # Email subscription: Hour in day to trigger daily email subscription (default: 3 AM)
# #
#duniter.subscription.email.hourOfDay: 3 # duniter.subscription.email.hourOfDay: 3
#
# Email subscription: URL to a web site, for links in the email content (default: <null>)
#
# duniter.subscription.email.link.url: 'https://demo.cesium.app'
#
# Name of the button in the email, to access to notifications (default: 'Cesium')
#
# duniter.subscription.email.link.name: 'My site name'
#
# Email logo (Should be PNG 128x128px) (default: '${duniter.subscription.email.link.url}/img/logo_128px.png')
#
# duniter.subscription.email.logo.url: https://path/to/logo
#
# Email header background color (default: '${duniter.subscription.email.link.url}/img/logo_128px.png')
#
# duniter.subscription.email.header.background.color: '#1a237e'
#
# ---------------------------------- Cesium+ Pod > Share module -------------------
#
# Share title: `og:site_name` (default: 'Cesium')
#
# duniter.share.site.name: 'Cesium - Ğ1'
#
# URL to a page (default: https://demo.cesium.app/#/app/page/view/{id}/{title} )
# Note: available variables are {id} and {title}
#
# duniter.share.page.link.url: 'https://domain.com/cesium/#/app/page/view/{id}/{title}'
#
# URL to a user profile (default: https://demo.cesium.app/#/app/wot/{pubkey}/{title} )
# Note: available variables are {pubkey} and {title}
#
# duniter.share.user.link.url: 'https://domain.com/cesium/#/app/wot/{pubkey}/{title}'
# #
# Email subscription: URL to a Cesium site, for links in the email content (default: https://g1.duniter.fr) # Default image to share (min size of 200x200px) for `og:image` (default: https://demo.cesium.app/img/logo_200px.png)
# #
#duniter.subscription.email.cesium.url: 'https://domain.com/cesium' # duniter.share.image.default.url: 'https://domain.com/cesium/img/logo_200px.png'
\ No newline at end of file #
\ No newline at end of file
...@@ -16,7 +16,11 @@ logger: ...@@ -16,7 +16,11 @@ logger:
duniter: DEBUG duniter: DEBUG
#duniter.core: DEBUG #duniter.core: DEBUG
#duniter.security: ERROR duniter.security: WARN
duniter.p2p: DEBUG
duniter.dao.member: WARN
duniter.threadpool: INFO
duniter.blockchain.membership: DEBUG
#duniter.user.event: DEBUG #duniter.user.event: DEBUG
#duniter.network.p2p: DEBUG #duniter.network.p2p: DEBUG
#duniter.network.peer: DEBUG #duniter.network.peer: DEBUG
...@@ -28,14 +32,15 @@ logger: ...@@ -28,14 +32,15 @@ logger:
cluster.metadata: ERROR cluster.metadata: ERROR
cluster.routing.allocation: ERROR cluster.routing.allocation: ERROR
org.duniter: DEBUG org.duniter: INFO
#org.duniter.core.util.LockManager: DEBUG #org.duniter.core.util.LockManager: DEBUG
#org.duniter.core.beans: DEBUG #org.duniter.core.beans: DEBUG
org.duniter.core.service: DEBUG
#org.duniter.core.client.service: DEBUG #org.duniter.core.client.service: DEBUG
#org.duniter.elasticsearch: DEBUG #org.duniter.elasticsearch: DEBUG
#org.duniter.elasticsearch.service: DEBUG #org.duniter.elasticsearch.service: DEBUG
#org.duniter.elasticsearch.user.service: DEBUG #org.duniter.elasticsearch.user.service: DEBUG
#org.duniter.elasticsearch.subscription.service: DEBUG #org.duniter.elasticsearch.subscription.service: INFO
org.nuiton.i18n: ERROR org.nuiton.i18n: ERROR
org.nuiton.config: ERROR org.nuiton.config: ERROR
......