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 (623)
Showing
with 1540 additions and 629 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,15 +2,18 @@
*/.classpath
*/.settings
*/*.log
*/*.iml
**/*.iml
.project
.classpath
.settings
.idea
duniter4j-cesium/src/cesium/**/*.*
target
*/target
duniter4j-elasticsearch/src/main/misc/.index.sh.kate-swp
duniter4j-elasticsearch/src/main/misc/fr-cities.ods
duniter4j-elasticsearch/src/main/misc/geoflar-communes-2015.geojson
duniter4j.iml
\ No newline at end of file
*.iml
.local
/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
Version 3, 29 June 2007
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
......@@ -7,17 +7,15 @@
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The GNU Affero General Public License is a free, copyleft license for
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
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
software for all its users. We, the Free Software Foundation, use the
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.
software for all its users.
When we speak of free software, we are referring to freedom, not
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
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.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
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.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
......@@ -72,7 +60,7 @@ modification follow.
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
works, such as semiconductor masks.
......@@ -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
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
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
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
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
be similar in spirit to the present version, but may differ in detail to
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
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
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
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.
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
to choose that version for the Program.
......@@ -635,40 +633,29 @@ the "copyright" line and a pointer to where the full notice is found.
Copyright (C) <year> <name of author>
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
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
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/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
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".
If your software can interact with users remotely through a computer
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
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
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.
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/>.
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"/>
## Architecture
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 four main components :
- duniter4j-core-shared: common classes
- duniter4j-core-client: a Client API to access to a Duniter network.
- duniter4j-elasticsearch: a ES plugin, to store blockchain, registry, market and more.
## Install
## Install as ES plugin
Follow the [installation documentation](http://doc.e-is.pro/cesium-plus-pod/install.html) to install a Cesium+ Pod.
### Install Java
## Documentation
- 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](https://download.libsodium.org/doc/index.html) (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 ElasticSearch 2.3.3
Download lastest release of ElasticSearch
### Install ElasticSearch plugins
```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
```
### 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
```
wget -kL https://github.com/jedisct1/libsodium/releases/download/1.0.11/libsodium-1.0.11.tar.gz
tar -xvf libsodium-1.0.11.tar.gz
```
- Installation:
```
cd libsodium-1.0.11
sudo apt-get install build-essential
sudo ./configure
sudo make && make check
sudo make install
```
## Install from standalone bundle
- 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
- Unzip
```bash
unzip duniter4j-elasticsearch-X.Y-standalone.zip
cd duniter4j-elasticsearch-X.Y/config
```
- Edit the configuration file `config/elasticsearch.yml`, in particular this properties:
```bash
# cluster.name: my-application
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: cgeek.fr
duniter.port: 9330
# Should synchronize node blockchain ?
duniter.blockchain.sync.enable: true
```
- Launch the node
```bash
cd duniter4j-elasticsearch-X.Y/bin
./elasticsearch
```
Output example (on [test_net](https://en.duniter.org/try/) 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 ] [test_net] [cgeek.fr:9330] Indexing last blocks...
[2016-09-24 00:17:08,026][INFO ][duniter.blockchain ] [test_net] [cgeek.fr:9330] Indexing block #999 / 41282 (2%)...
[2016-09-24 00:17:08,045][INFO ][duniter.blockchain ] [test_net] [cgeek.fr:9330] Indexing block #1998 / 41282 (4%)...
[2016-09-24 00:17:09,026][INFO ][duniter.blockchain ] [test_net] [cgeek.fr:9330] Indexing block #2997 / 41282 (6%)...
[2016-09-24 00:17:10,057][INFO ][duniter.blockchain ] [test_net] [cgeek.fr:9330] Indexing block #3996 / 41282 (8%)...
...
[2016-09-24 00:17:11,026][INFO ][duniter.blockchain ] [test_net] [cgeek.fr:9330] Indexing block #41282 - hash [00000AAD73B0E76B870E6779CD7ACCCE175802D7867C13B5C8ED077F380548C5]
```
## Use API (Developer)
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/test_net/block/0 -> with some additional metadata given by ES
http://localhost:9200/test_net/block/0/_source -> the original JSON block
- Block #125 with only hash, dividend and memberCount:
http://localhost:9200/test_net/block/125/_source?_source=number,hash,dividend,membersCount
- All blocks using a pubkey (or whatever):
http://localhost:9200/test_net/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/test_net/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
- Allow to store data in embedded database (SQLLite or HsqlDB)
- Add an embedded [Cesium](https://www.github.com/duniter/cesium) inside the ElasticSearch plugin
- Detect blockchain rollback
## 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
See the [documentation web site](http://doc.e-is.pro/cesium-plus-pod/) to learn how to contribute, build from source, etc.
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
......@@ -7,17 +7,15 @@
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The GNU Affero General Public License is a free, copyleft license for
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
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
software for all its users. We, the Free Software Foundation, use the
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.
software for all its users.
When we speak of free software, we are referring to freedom, not
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
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.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
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.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
......@@ -72,7 +60,7 @@ modification follow.
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
works, such as semiconductor masks.
......@@ -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
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
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
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
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
be similar in spirit to the present version, but may differ in detail to
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
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
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
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.
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
to choose that version for the Program.
......@@ -635,40 +633,29 @@ the "copyright" line and a pointer to where the full notice is found.
Copyright (C) <year> <name of author>
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
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
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/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
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".
If your software can interact with users remotely through a computer
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
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
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.
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/>.
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,169 +2,69 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.duniter</groupId>
<artifactId>duniter4j</artifactId>
<version>0.3.5-SNAPSHOT</version>
<groupId>org.duniter.cesium</groupId>
<artifactId>cesium-plus-pod</artifactId>
<version>1.11.0</version>
</parent>
<groupId>org.duniter</groupId>
<artifactId>duniter4j-elasticsearch</artifactId>
<packaging>jar</packaging>
<name>Duniter4j :: ElasticSearch Plugin</name>
<artifactId>cesium-plus-pod-assembly</artifactId>
<packaging>pom</packaging>
<name>Cesium+ pod :: Assembly</name>
<description>Build releases of Cesium+ pod</description>
<properties>
<!-- bundle configuration -->
<bundlePrefix>duniter4j-elasticsearch-${project.version}</bundlePrefix>
<bundlePrefix>${project.parent.artifactId}-${project.version}</bundlePrefix>
<!-- i18n configuration -->
<i18n.bundleOutputName>duniter4j-elasticsearch-i18n</i18n.bundleOutputName>
<i18n.bundleOutputName>${project.parent.artifactId}-i18n</i18n.bundleOutputName>
<i18n.generateCsvFile>true</i18n.generateCsvFile>
<i18n.bundleCsvFile>
${maven.gen.dir}/resources/META-INF/${i18n.bundleOutputName}.csv
</i18n.bundleCsvFile>
<config.i18nBundleName>${i18n.bundleOutputName}</config.i18nBundleName>
<duniter4j-elasticsearch.config>${project.basedir}/src/test/resources/duniter4j-elasticsearch-test.properties</duniter4j-elasticsearch.config>
<assembly.skip>false</assembly.skip>
</properties>
<dependencies>
<dependency>
<groupId>org.duniter</groupId>
<artifactId>duniter4j-core-client</artifactId>
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
</exclusions>
<groupId>javax.websocket</groupId>
<artifactId>javax.websocket-api</artifactId>
<version>1.1</version>
</dependency>
<!-- LOGGING DEPENDENCIES - SLF4J -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<optional>true</optional>
<scope>runtime</scope>
</dependency>
<!-- Elastic Search -->
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<scope>provided</scope>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-client</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-container-grizzly-client</artifactId>
</dependency>
<!-- JNA (need for OS shutdown hook) -->
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId>
<exclusions>
<exclusion>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--
<dependency>
<groupId>com.github.spullara.mustache.java</groupId>
<artifactId>compiler</artifactId>
<version>0.8.13</version>
<scope>compile</scope>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
</dependency>
-->
<dependency>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-server</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-container-grizzly-server</artifactId>
</dependency>
<!-- Unit test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/filtered-resources</directory>
<filtering>true</filtering>
<includes>
<include>*.config</include>
<include>**/*.properties</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.nuiton.i18n</groupId>
<artifactId>i18n-maven-plugin</artifactId>
<executions>
<execution>
<id>scan-sources</id>
<configuration>
<entries>
<entry>
<specificGoal>parserValidation</specificGoal>
<basedir>${maven.src.dir}/main/java/</basedir>
<includes>
<param>**/**-validation.xml</param>
</includes>
</entry>
</entries>
</configuration>
<goals>
<goal>parserJava</goal>
<goal>parserValidation</goal>
<goal>gen</goal>
</goals>
</execution>
<execution>
<id>make-bundle</id>
<goals>
<goal>bundle</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<!-- unpack ES -->
<execution>
<id>unpack-elasticsearch</id>
<goals>
......@@ -185,6 +85,8 @@
<skip>${assembly.skip}</skip>
</configuration>
</execution>
<!-- unpack attachment plugin -->
<execution>
<id>unpack-mapper-attachments-plugin</id>
<goals>
......@@ -205,30 +107,78 @@
<skip>${assembly.skip}</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<!-- unpack ES core plugin -->
<execution>
<id>assembly-plugin</id>
<phase>package</phase>
<id>unpack-es-core-plugin</id>
<goals>
<goal>single</goal>
<goal>unpack</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<attach>true</attach>
<appendAssemblyId>false</appendAssemblyId>
<finalName>${bundlePrefix}</finalName>
<descriptors>
<descriptor>
${basedir}/src/main/assembly/plugin.xml
</descriptor>
</descriptors>
<skipAssembly>${assembly.skip}</skipAssembly>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>${project.parent.artifactId}-core</artifactId>
<version>${project.version}</version>
<type>zip</type>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/elasticsearch-${elasticsearch.version}/plugins/cesium-plus-pod-core</outputDirectory>
<silent>true</silent>
<skip>${assembly.skip}</skip>
</configuration>
</execution>
<!-- unpack ES user plugin -->
<execution>
<id>unpack-es-user-plugin</id>
<goals>
<goal>unpack</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>${project.parent.artifactId}-user</artifactId>
<version>${project.version}</version>
<type>zip</type>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/elasticsearch-${elasticsearch.version}/plugins/cesium-plus-pod-user</outputDirectory>
<silent>true</silent>
<skip>${assembly.skip}</skip>
</configuration>
</execution>
<!-- unpack ES subscription plugin -->
<execution>
<id>unpack-es-subscription-plugin</id>
<goals>
<goal>unpack</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>${project.parent.artifactId}-subscription</artifactId>
<version>${project.version}</version>
<type>zip</type>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/elasticsearch-${elasticsearch.version}/plugins/cesium-plus-pod-subscription</outputDirectory>
<silent>true</silent>
<skip>${assembly.skip}</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>assembly-standalone</id>
<phase>package</phase>
......@@ -291,10 +241,20 @@
<!-- reuse standalone files -->
<then>
<delete failonerror="false">
<fileset dir="${run.es.home}/plugins/${project.artifactId}" includes="${project.artifactId}-*.jar" />
<fileset dir="${run.es.home}/plugins" includes="**/cesium-plus-pod-*.jar" />
</delete>
<copy todir="${run.es.home}/plugins/${project.artifactId}" overwrite="true">
<fileset dir="${project.build.directory}" includes="*.jar">
<copy todir="${run.es.home}/plugins/cesium-plus-pod-core" overwrite="true">
<fileset dir="../cesium-plus-pod-model/target" includes="cesium-plus-pod-model-${project.version}.jar">
</fileset>
<fileset dir="../cesium-plus-pod-core/target" includes="cesium-plus-pod-core-${project.version}.jar">
</fileset>
</copy>
<copy todir="${run.es.home}/plugins/cesium-plus-pod-user" overwrite="true">
<fileset dir="../cesium-plus-pod-user/target" includes="cesium-plus-pod-*${project.version}.jar">
</fileset>
</copy>
<copy todir="${run.es.home}/plugins/cesium-plus-pod-subscription" overwrite="true">
<fileset dir="../cesium-plus-pod-subscription/target" includes="cesium-plus-pod-*${project.version}.jar">
</fileset>
</copy>
</then>
......@@ -313,6 +273,12 @@
<fileset dir="${project.basedir}/src/test/es-home" includes="**/*.*">
</fileset>
</copy>
<!-- Use .local/elasticsearch.yml -->
<copy todir="${run.es.home}/config" overwrite="true">
<fileset dir="${project.basedir}/../.local" includes="elasticsearch.yml">
</fileset>
</copy>
</target>
</configuration>
</execution>
......@@ -333,6 +299,22 @@
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>${jna.version}</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId>
<version>${jna.version}</version>
<exclusions>
<exclusion>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>javax.websocket</groupId>
<artifactId>javax.websocket-api</artifactId>
......@@ -343,31 +325,20 @@
<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>
<groupId>org.glassfish.tyrus</groupId>
<artifactId>tyrus-container-grizzly-client</artifactId>
<version>${tyrus.version}</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>${jna.version}</version>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<version>${jakarta-mail.version}</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId>
<version>${jna.version}</version>
<exclusions>
<exclusion>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
</exclusion>
</exclusions>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
<version>${jakarta-activation.version}</version>
</dependency>
</dependencies>
<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"
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please see the documentation for further information on configuration options:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration.html>
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
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 ------------------------------------
#
# Use a descriptive name for the node: (default: will be generated)
#
# node.name: node-1
#
# Add custom attributes to the node: (Default: none)
#
# node.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
# path.data: /path/to/data
#
# Path to log files:
#
# path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
# bootstrap.mlockall: true
#
# Make sure that the `ES_HEAP_SIZE` environment variable is set to about half the memory
# available on the system and that the owner of the process is allowed to use this limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
# network.host: 192.168.233.118
#
# Set a custom port for HTTP:
#
# http.port: 9200-9300
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
#
# transport.tcp.port: 9210-9220
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html>
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
# discovery.zen.ping.unicast.hosts: ["host1", "host2"]
# 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):
#
# discovery.zen.minimum_master_nodes: 3
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery.html>
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
# gateway.recover_after_nodes: 3
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway.html>
#
# ---------------------------------- Various -----------------------------------
#
# Disable starting multiple nodes on a single system:
#
# node.max_local_storage_nodes: 1
#
# Require explicit names when deleting indices:
#
# action.destructive_requires_name: true
#
# Security to isolate plugin classpath - /!\ WARNING: should always be DISABLE
#
security.manager.enabled: false
#
# ---------------------------------- Cesium+ Pod ---------------------------------
#
# Enable Cesium+ pod core plugin (default: true)
#
# 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
#
# duniter.indices.reload: true
#
# Default string analyzer
#
duniter.string.analyzer: french
#
# 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.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'
#
# duniter.blockchain.reload: true
# duniter.blockchain.reload.from: 18900
# duniter.blockchain.reload.to: 19000
#
# Duniter node address
#
duniter.host: g1.duniter.org
duniter.port: 10901
# duniter.useSsl: true
#
# Network timeout, in millisecond (default: 20000 = 20s)
#
# duniter.network.timeout: 5000
#
# Compute statistics on indices (each hour) ? (default: true)
#
# duniter.stats.enable: false
#
# 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.).
# If not set, random keys will be generated.
#
# duniter.keyring.salt:
# duniter.keyring.password:
#
# Enable security - will restrict HTTP access to only ES known indices
# /!\ WARNING: should be enable for production use
#
duniter.security.enable: true
#
# 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)
#
# duniter.p2p.enable: false
#
# Enable P2P synchronisation using websocket ? (default: true)
#
# duniter.p2p.ws.enable: false
#
# Time delay (in seconds) to request last documents to peer (e.g. if peer's clock is late). (default: 3600s = 1h)
#
# duniter.p2p.peerTimeOffset: 3600
#
# Enable discovery on network peers, to automatically synchronize this peers (default: true)
#
# duniter.p2p.discovery.enable: false
#
# Pass a list of hosts to always synchronize (default: <empty>)
#
duniter.p2p.includes.endpoints: [
"ES_CORE_API g1.data.e-is.pro 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>)
#
# 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})
#
# 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)
#
# 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 ?
#
duniter.mail.enable: false
#
# Mail: SMTP server configuration (host and port)
#
# duniter.mail.smtp.host: localhost
# duniter.mail.smtp.port: 25
#
# Mail: SMTP server SSL security
#
# duniter.mail.smtp.ssl: true
# duniter.mail.smtp.starttls: true
#
# Mail: SMTP server authentication
#
# duniter.mail.smtp.username:
# duniter.mail.smtp.password:
#
# Mail: 'from' address
#
# duniter.mail.from: no-reply@domain.com
#
# Mail: admin address
#
# duniter.mail.admin: user@domain.com
#
# Mail: subject prefix (default: '[Cesium+]')
#
# duniter.mail.subject.prefix: '[Cesium+]'
#
# ---------------------------------- 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.user.document.like.issuer.requirements: ['wasMember', 'member', 'profile']
#
# ---------------------------------- Cesium+ Pod > Subscription module -------------------
#
# Enable subscription module (Need to enable mail features) (default: true)
#
# 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)
#
# duniter.subscription.email.dayOfWeek: 2
#
# Email subscription: Hour in day to trigger daily email subscription (default: 3 AM)
#
# 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}'
#
# Default image to share (min size of 200x200px) for `og:image` (default: https://demo.cesium.app/img/logo_200px.png)
#
# duniter.share.image.default.url: 'https://domain.com/cesium/img/logo_200px.png'
#
\ No newline at end of file
......@@ -14,15 +14,20 @@ logger:
com.amazonaws.jmx.SdkMBeanRegistrySupport: ERROR
com.amazonaws.metrics.AwsSdkMetrics: ERROR
org.apache.http: INFO
duniter: INFO
#duniter.p2p: TRACE
security: INFO
cluster.metadata: ERROR
cluster.routing.allocation: ERROR
org.duniter: INFO
#org.duniter.elasticsearch: DEBUG
org.nuiton.i18n: WARN
org.nuiton.i18n: ERROR
org.nuiton.config: ERROR
org.nuiton.converter: WARN
org.apache.http: WARN
org.apache.http.client: ERROR
org.glassfish.grizzly: WARN
org.glassfish.tyrus: WARN
# gateway
#gateway: DEBUG
......
......@@ -38,6 +38,7 @@
<outputDirectory/>
<excludes>
<exclude>bin/elasticsearch</exclude>
<exclude>bin/elasticsearch.in.sh</exclude>
<exclude>bin/plugin</exclude>
<exclude>config/elasticsearch.yml</exclude>
<exclude>config/logging.yml</exclude>
......@@ -53,70 +54,41 @@
<fileMode>0755</fileMode>
</fileSet>
<!-- default configuration file -->
<!-- configuration files -->
<fileSet>
<directory>src/main/assembly/config</directory>
<outputDirectory>config</outputDirectory>
<includes>
<include>elasticsearch.yml</include>
<include>logging.yml</include>
</includes>
</fileSet>
<fileSet>
<directory>target</directory>
<outputDirectory>plugins/${project.artifactId}</outputDirectory>
<includes>
<include>${project.build.finalName}.${project.packaging}</include>
</includes>
</fileSet>
<fileSet>
<directory>target/classes</directory>
<outputDirectory>plugins/${project.artifactId}</outputDirectory>
<directory>src/main/assembly</directory>
<outputDirectory/>
<includes>
<include>plugin-descriptor.properties</include>
<include>plugin-security.policy</include>
<include>config/elasticsearch.yml</include>
<include>config/logging.yml</include>
</includes>
</fileSet>
<!-- executable files -->
<fileSet>
<outputDirectory>plugins/${project.artifactId}</outputDirectory>
<directory>src/main/assembly</directory>
<outputDirectory/>
<includes>
<include>LICENSE</include>
<include>bin/elasticsearch.in.sh</include>
<include>bin/cesium-plus-pod</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<outputDirectory>plugins/${project.artifactId}</outputDirectory>
<useProjectArtifact>true</useProjectArtifact>
<useTransitiveFiltering>true</useTransitiveFiltering>
<excludes>
<exclude>org.elasticsearch:elasticsearch</exclude>
<exclude>net.java.dev.jna:jna</exclude>
<exclude>com.fasterxml.jackson.core:jackson-core</exclude>
<exclude>log4j:log4j</exclude>
<exclude>com.google.guava:guava</exclude>
<!-- lib to include in elasticsearch/libs/ -->
<exclude>javax.websocket:javax.websocket-api</exclude>
<exclude>org.glassfish.tyrus:tyrus-client</exclude>
<exclude>org.glassfish.tyrus:tyrus-container-grizzly-client</exclude>
</excludes>
<fileMode>0555</fileMode>
</dependencySet>
<dependencySet>
<outputDirectory>lib</outputDirectory>
<useProjectArtifact>true</useProjectArtifact>
<useProjectArtifact>false</useProjectArtifact>
<useTransitiveFiltering>true</useTransitiveFiltering>
<includes>
<include>javax.websocket:javax.websocket-api</include>
<include>org.glassfish.tyrus:tyrus-client</include>
<include>org.glassfish.tyrus:tyrus-container-grizzly-client</include>
<include>com.sun.mail:jakarta.mail</include>
<include>com.sun.activation:jakarta.activation</include>
</includes>
<fileMode>0555</fileMode>
<fileMode>0664</fileMode>
</dependencySet>
</dependencySets>
</assembly>
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please see the documentation for further information on configuration options:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/setup-configuration.html>
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
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 ------------------------------------
#
# Use a descriptive name for the node: (default: will be generated)
#
# node.name: node-1
#
# Add custom attributes to the node: (Default: none)
#
# node.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
# path.data: /path/to/data
#
# Path to log files:
#
# path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
# bootstrap.mlockall: true
#
# Make sure that the `ES_HEAP_SIZE` environment variable is set to about half the memory
# available on the system and that the owner of the process is allowed to use this limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
network.host: localhost
#
# Set a custom port for HTTP:
#
# http.port: 9200-9300
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
#
# transport.tcp.port: 9210-9220
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html>
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when new node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
# discovery.zen.ping.unicast.hosts: ["host1", "host2"]
# 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):
#
discovery.zen.minimum_master_nodes: 1
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery.html>
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
# gateway.recover_after_nodes: 3
#
# For more information, see the documentation at:
# <http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-gateway.html>
#
# ---------------------------------- Various -----------------------------------
#
# Disable starting multiple nodes on a single system:
#
# node.max_local_storage_nodes: 1
#
# Require explicit names when deleting indices:
#
# action.destructive_requires_name: true
#
# Security to isolate plugin classpath - /!\ WARNING: should always be DISABLE
#
security.manager.enabled: false
#
# ---------------------------------- Cesium+ Pod ---------------------------------
#
# Enable Cesium+ pod core plugin (default: true)
#
# 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
#
# duniter.indices.reload: true
#
# Default string analyzer
#
duniter.string.analyzer: french
#
# 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
#
# 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'
#
# duniter.blockchain.reload: true
# duniter.blockchain.reload.from: 207000
# duniter.blockchain.reload.to: 207190
#
# Duniter node address
#
duniter.host: g1.duniter.org
duniter.port: 10901
# duniter.useSsl: true
#
# Network timeout, in millisecond (default: 20000 = 20s)
#
# duniter.network.timeout: 5000
#
# Compute statistics on indices (each hour) ? (default: true)
#
# duniter.stats.enable: false
#
# 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.).
# If not set, random keys will be generated.
#
duniter.keyring.salt: 'abc'
duniter.keyring.password: 'def'
#
# Enable security - will restrict HTTP access to only ES known indices
# /!\ WARNING: should be enable for production use
#
duniter.security.enable: true
#
# 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)
#
# duniter.p2p.enable: false
#
# Enable P2P synchronisation using websocket ? (default: true)
#
# duniter.p2p.ws.enable: false
#
# Time delay (in seconds) to request last documents to peer (e.g. if peer's clock is late). (default: 3600s = 1h)
#
# duniter.p2p.peerTimeOffset: 3600
#
# Enable discovery on network peers, to automatically synchronize this peers (default: true)
#
duniter.p2p.discovery.enable: false
#
# Pass a list of hosts to always synchronize (default: <empty>)
#
duniter.p2p.includes.endpoints: [
"ES_CORE_API g1.data.e-is.pro 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>)
#
# 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})
#
# 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"
]
#
# 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 ?
#
duniter.mail.enable: false
#
# Mail: SMTP server configuration (host and port)
#
# duniter.mail.smtp.host: localhost
# duniter.mail.smtp.port: 25
#
# Mail: SMTP server SSL security
#
# duniter.mail.smtp.ssl: true
# duniter.mail.smtp.starttls: true
#
# Mail: SMTP server authentication
#
# duniter.mail.smtp.username:
# duniter.mail.smtp.password:
#
# Mail: 'from' address
#
# duniter.mail.from: no-reply@domain.com
#
# Mail: admin address
#
# duniter.mail.admin: user@domain.com
#
# Mail: subject prefix (default: '[Cesium+]')
#
# duniter.mail.subject.prefix: '[Cesium+]'
#
# ---------------------------------- 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.user.document.like.issuer.requirements: ['wasMember', 'member', 'profile']
#
# ---------------------------------- Cesium+ Pod > Subscription module -------------------
#
# Enable subscription module (Need to enable mail features) (default: true)
#
# 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)
#
# duniter.subscription.email.dayOfWeek: 2
#
# Email subscription: Hour in day to trigger daily email subscription (default: 3 AM)
#
# 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}'
#
# Default image to share (min size of 200x200px) for `og:image` (default: https://demo.cesium.app/img/logo_200px.png)
#
# duniter.share.image.default.url: 'https://domain.com/cesium/img/logo_200px.png'
#
\ No newline at end of file
# you can override this using by setting a system property, for example -Des.logger.level=DEBUG
es.logger.level: INFO
rootLogger: ${es.logger.level}, console, file
logger:
# log action execution errors for easier debugging
action: DEBUG
# deprecation logging, turn to DEBUG to see them
deprecation: INFO, deprecation_log_file
# reduce the logging for aws, too much is logged under the default INFO
com.amazonaws: WARN
# aws will try to do some sketchy JMX stuff, but its not needed.
com.amazonaws.jmx.SdkMBeanRegistrySupport: ERROR
com.amazonaws.metrics.AwsSdkMetrics: ERROR
duniter: DEBUG
#duniter.core: DEBUG
duniter.security: WARN
duniter.p2p: DEBUG
duniter.dao.member: WARN
duniter.threadpool: INFO
duniter.blockchain.membership: DEBUG
#duniter.user.event: DEBUG
#duniter.network.p2p: DEBUG
#duniter.network.peer: DEBUG
#duniter.mail: DEBUG
#duniter.subscription: DEBUG
#duniter.p2p: TRACE
security: DEBUG
cluster.metadata: ERROR
cluster.routing.allocation: ERROR
org.duniter: INFO
#org.duniter.core.util.LockManager: DEBUG
#org.duniter.core.beans: DEBUG
org.duniter.core.service: DEBUG
#org.duniter.core.client.service: DEBUG
#org.duniter.elasticsearch: DEBUG
#org.duniter.elasticsearch.service: DEBUG
#org.duniter.elasticsearch.user.service: DEBUG
#org.duniter.elasticsearch.subscription.service: INFO
org.nuiton.i18n: ERROR
org.nuiton.config: ERROR
org.nuiton.converter: WARN
org.apache.http: WARN
org.apache.http.client: ERROR
org.glassfish.grizzly: WARN
org.glassfish.tyrus: WARN
# gateway
#gateway: DEBUG
#index.gateway: DEBUG
# peer shard recovery
#indices.recovery: DEBUG
# discovery
#discovery: TRACE
index.search.slowlog: TRACE, index_search_slow_log_file
index.indexing.slowlog: TRACE, index_indexing_slow_log_file
additivity:
index.search.slowlog: false
index.indexing.slowlog: false
deprecation: false
appender:
console:
type: console
layout:
type: consolePattern
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
file:
type: dailyRollingFile
file: ${path.logs}/${cluster.name}.log
datePattern: "'.'yyyy-MM-dd"
layout:
type: pattern
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %.10000m%n"
# Use the following log4j-extras RollingFileAppender to enable gzip compression of log files.
# For more information see https://logging.apache.org/log4j/extras/apidocs/org/apache/log4j/rolling/RollingFileAppender.html
#file:
#type: extrasRollingFile
#file: ${path.logs}/${cluster.name}.log
#rollingPolicy: timeBased
#rollingPolicy.FileNamePattern: ${path.logs}/${cluster.name}.log.%d{yyyy-MM-dd}.gz
#layout:
#type: pattern
#conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
deprecation_log_file:
type: dailyRollingFile
file: ${path.logs}/${cluster.name}_deprecation.log
datePattern: "'.'yyyy-MM-dd"
layout:
type: pattern
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
index_search_slow_log_file:
type: dailyRollingFile
file: ${path.logs}/${cluster.name}_index_search_slowlog.log
datePattern: "'.'yyyy-MM-dd"
layout:
type: pattern
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"
index_indexing_slow_log_file:
type: dailyRollingFile
file: ${path.logs}/${cluster.name}_index_indexing_slowlog.log
datePattern: "'.'yyyy-MM-dd"
layout:
type: pattern
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"