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

[fix] Prepare ES config & logging files for next release

parent c568defc
No related branches found
No related tags found
No related merge requests found
Showing
with 110 additions and 82 deletions
......@@ -14,7 +14,6 @@
#
# Use a descriptive name for your cluster:
#
# cluster.name: my-application
cluster.name: duniter4j-es-g1
#
# ------------------------------------ Node ------------------------------------
......@@ -74,7 +73,7 @@ http.cors.enabled: true
# 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", ""]
# 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):
#
......@@ -101,17 +100,18 @@ http.cors.enabled: true
# Require explicit names when deleting indices:
#
# rest.destructive_requires_name: true
#
# Security to isolate plugin classpath - /!\ WARNING: should be DISABLE for Duniter4j
#
security.manager.enabled: false
#
# ---------------------------------- Duniter4j ---------------------------------
#
# Disbale duniter4j plugin
# Enable duniter4j plugins
#
# duniter.enabled: false
#
# Delete then create all indices at startup - DO NOT set to true in production
# Delete then create all indices at startup - /!\ WARNING: DO NOT set to true in production
#
# duniter.indices.reload: true
#
......@@ -123,39 +123,47 @@ duniter.string.analyzer: french
#
duniter.blockchain.enable: true
#
# Force blockchain reload - WARNING: all user events will be resetted to 'unread'
# Force blockchain full synchronization - /!\ WARNING: all user events will be reset to 'unread'
#
#duniter.blockchain.reload: true
#duniter.blockchain.reload.from: 50999
# duniter.blockchain.reload: true
# duniter.blockchain.reload.from: 50999
#
# Duniter node address
#
duniter.host: g1.duniter.org
duniter.port: 10901
#duniter.useSsl: true
# duniter.useSsl: true
#
# Should maintain stats on index rows count ?
# Compute statistics on indices (each hour) ? (default: true)
#
#duniter.stats.enable: false
# duniter.stats.enable: false
#
# ---------------------------------- Duniter4j security module -------------------
#
# Keyring for the ES node
# Keyring, use to sign emitted documents (user events, subscription, etc.).
# If not set, random keys will be generated.
#
#duniter.keyring.salt:
#duniter.keyring.password:
# duniter.keyring.salt:
# duniter.keyring.password:
#
# Enable security - will restrict HTTP access to only Duniter4j known indices
# Enable security - will restrict HTTP access to only Duniter4j known indices - /!\ WARNING: should be enable for production use
#
duniter.security.enable: true
#
# ---------------------------------- Duniter4j P2P sync -------------------------
# ---------------------------------- Duniter4j P2P module -------------------------
#
# Should synchronize data from an existing ES node ?
# Enable P2P synchronize between ES peers ? (default: true)
#
# duniter.p2p.enable: false
#
# Enable P2P websocket direct synchronisation ? (default: true)
#
# duniter.p2p.ws.enable: false
#
# Max peer time offset, in seconds (max peer's clock error) - use to request peer's data. (default: 3600 = 1hour)
#
# duniter.p2p.peerTimeOffset: 3600
#
#duniter.p2p.enable: false
# ---------------------------------- Duniter4j Mail module -----------------------
#
# Enable mail module ?
......@@ -164,37 +172,37 @@ duniter.mail.enable: false
#
# Mail: SMTP server configuration (host and port)
#
#duniter.mail.smtp.host: localhost
#duniter.mail.smtp.port: 25
# 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
# duniter.mail.smtp.ssl: true
# duniter.mail.smtp.starttls: true
#
# Mail: SMTP server authentication
#
#duniter.mail.smtp.username:
#duniter.mail.smtp.password:
# duniter.mail.smtp.username:
# duniter.mail.smtp.password:
#
# Mail: 'from' address
#
#duniter.mail.from: no-reply@domain.com
# duniter.mail.from: no-reply@domain.com
#
# Mail: admin address
#
#duniter.mail.admin: user@domain.com
# duniter.mail.admin: user@domain.com
#
# Mail: subject prefix
#
#duniter.mail.subject.prefix: '[Cesium+]'
# duniter.mail.subject.prefix: '[Cesium+]'
# ---------------------------------- Duniter4j Websocket server ----------------------
#
# Websocket port (usefull for listen changes)
# Websocket port (default: 9400-9410)
#
duniter.ws.port: 9400-9410
#
# ---------------------------------- Duniter4j Subscription module -------------------
#
# Enable subscription module (Need to enable mail features)
......@@ -203,12 +211,12 @@ duniter.subscription.enable: false
#
# 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)
#
#duniter.subscription.email.hourOfDay: 3
# duniter.subscription.email.hourOfDay: 3
#
# Email subscription: URL to a Cesium site (for link in the email content)
# Email subscription: URL to a Cesium site, for links in the email content (default: https://g1.duniter.fr)
#
#duniter.subscription.email.cesium.url: 'http://domain.com/cesium'
\ No newline at end of file
# duniter.subscription.email.cesium.url: 'http://domain.com/cesium'
\ No newline at end of file
......@@ -15,6 +15,7 @@ logger:
com.amazonaws.metrics.AwsSdkMetrics: ERROR
duniter: INFO
#duniter.p2p: TRACE
security: INFO
cluster.metadata: ERROR
cluster.routing.allocation: ERROR
......
......@@ -14,7 +14,6 @@
#
# Use a descriptive name for your cluster:
#
# cluster.name: my-application
cluster.name: duniter4j-es-assembly-test
#
# ------------------------------------ Node ------------------------------------
......@@ -101,19 +100,20 @@ http.cors.enabled: true
# Require explicit names when deleting indices:
#
# rest.destructive_requires_name: true
#
# Security to isolate plugin classpath - /!\ WARNING: should be DISABLE for Duniter4j
#
security.manager.enabled: false
#
# ---------------------------------- Duniter4j ---------------------------------
#
# Disbale duniter4j plugin
# Enable duniter4j plugins
#
# duniter.enabled: false
#
# Delete then create all indices at startup - DO NOT set to true in production
# Delete then create all indices at startup - /!\ WARNING: DO NOT set to true in production
#
#duniter.indices.reload: true
# duniter.indices.reload: true
#
# Default string analyzer
#
......@@ -123,30 +123,30 @@ duniter.string.analyzer: french
#
duniter.blockchain.enable: true
#
# Force blockchain reload - WARNING: all user events will be resetted to 'unread'
# Force blockchain full synchronization - /!\ WARNING: all user events will be reset to 'unread'
#
#duniter.blockchain.reload: true
#duniter.blockchain.reload.from: 50999
# duniter.blockchain.reload: true
# duniter.blockchain.reload.from: 50999
#
# Duniter node address
#
duniter.host: g1.duniter.org
duniter.port: 10901
#duniter.useSsl: true
# duniter.useSsl: true
#
# Should maintain stats on index rows count ?
# Compute statistics on indices (each hour) ? (default: true)
#
#duniter.stats.enable: false
# duniter.stats.enable: false
#
# ---------------------------------- Duniter4j security module -------------------
#
# Keyring for the ES node
# 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 Duniter4j known indices
# Enable security - will restrict HTTP access to only Duniter4j known indices - /!\ WARNING: should be enable for production use
#
duniter.security.enable: true
#
......@@ -158,12 +158,20 @@ duniter.security.enable: true
#
# duniter.auth.tokenValidityDuration: 3600 # = 1hour
# ---------------------------------- Duniter4j P2P sync -------------------------
# ---------------------------------- Duniter4j P2P module -------------------------
#
# Should synchronize data from an existing ES node ?
# Enable P2P synchronize between ES peers ? (default: true)
#
# duniter.p2p.enable: false
#
# Enable P2P websocket direct synchronisation ? (default: true)
#
# duniter.p2p.ws.enable: false
#
# Max peer time offset, in seconds (max peer's clock error) - use to request peer's data. (default: 3600 = 1hour)
#
# duniter.p2p.peerTimeOffset: 3600
#
#duniter.p2p.enable: false
# ---------------------------------- Duniter4j Mail module -----------------------
#
# Enable mail module ?
......@@ -199,10 +207,10 @@ duniter.mail.enable: false
# ---------------------------------- Duniter4j Websocket server ----------------------
#
# Websocket port (usefull for listen changes)
# Websocket port (default: 9400-9410)
#
duniter.ws.port: 9400-9410
#
# ---------------------------------- Duniter4j Subscription module -------------------
#
# Enable subscription module (Need to enable mail features)
......
......@@ -14,7 +14,7 @@ logger:
com.amazonaws.jmx.SdkMBeanRegistrySupport: ERROR
com.amazonaws.metrics.AwsSdkMetrics: ERROR
duniter: INFO
duniter: DEBUG
#duniter.core: DEBUG
#duniter.security: ERROR
#duniter.user.event: DEBUG
......@@ -22,12 +22,13 @@ logger:
#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: DEBUG
#org.duniter.core.util.LockManager: DEBUG
#org.duniter.core.beans: DEBUG
#org.duniter.core.client.service: DEBUG
......
......@@ -48,3 +48,25 @@ curl -XPOST 'http://localhost:9200/g1/block/_search?pretty' -d '
}
}
}'
curl -XPOST 'http://localhost:9200/g1/peer/_search?pretty' -d '
{
"size" : 1000,
"query" : {
"constant_score" : {
"filter" : {
"bool" : {
"must" : [ {
"bool" : {
"must" : {
"term" : {
"api" : "ES_USER_API"
}
}
}
}]
}
}
}
}
}'
\ No newline at end of file
......@@ -219,15 +219,15 @@ public class PluginSettings extends AbstractLifecycleComponent<PluginSettings> {
}
public boolean enableSynchro() {
return settings.getAsBoolean("duniter.synchro.enable", true);
return settings.getAsBoolean("duniter.p2p.enable", true);
}
public boolean enableSynchroWebsocket() {
return settings.getAsBoolean("duniter.synchro.ws.enable", true);
return settings.getAsBoolean("duniter.p2p.ws.enable", true);
}
public int getSynchroTimeOffset() {
return settings.getAsInt("duniter.synchro.timeOffset", 60*60/*=1hour*/);
return settings.getAsInt("duniter.p2p.peerTimeOffset", 60*60/*=1hour*/);
}
......
......@@ -87,7 +87,7 @@ public abstract class AbstractSynchroAction extends AbstractService implements S
PluginSettings pluginSettings,
CryptoService cryptoService,
ThreadPool threadPool) {
super("duniter.synchro." + toIndex, client, pluginSettings, cryptoService);
super("duniter.p2p." + toIndex, client, pluginSettings, cryptoService);
this.fromIndex = fromIndex;
this.fromType = fromType;
this.toIndex = toIndex;
......
......@@ -81,7 +81,7 @@ public class SynchroService extends AbstractService {
PeerDao peerDao,
SynchroExecutionDao synchroExecutionDao,
final ServiceLocator serviceLocator) {
super("duniter.synchro", client, settings, cryptoService);
super("duniter.p2p", client, settings, cryptoService);
this.threadPool = threadPool;
this.currencyDao = currencyDao;
this.peerDao = peerDao;
......@@ -171,7 +171,7 @@ public class SynchroService extends AbstractService {
}
}
public SynchroResult synchronizePeer(final Peer peer, boolean listenChanges) {
public SynchroResult synchronizePeer(final Peer peer, boolean enableSynchroWebsocket) {
long now = System.currentTimeMillis();
SynchroResult result = new SynchroResult();
......@@ -201,7 +201,7 @@ public class SynchroService extends AbstractService {
saveExecution(peer, result);
// Start listen changes on this peer
if (listenChanges) {
if (enableSynchroWebsocket) {
startListenChangesOnPeer(peer, executedActions);
}
......
......@@ -149,9 +149,7 @@ duniter.security.enable: false
#
# Should synchronizePeer data using P2P
#
duniter.data.sync.enable: false
#duniter.data.sync.host: data.duniter.fr
#duniter.data.sync.port: 80
duniter.p2p.enable: false
# ---------------------------------- Duniter4j SMTP server -------------------------
#
......
......@@ -149,10 +149,8 @@ duniter.security.enable: false
#
# Should synchronize data using P2P
#
duniter.data.sync.enable: false
#duniter.data.sync.host: data.duniter.fr
#duniter.data.sync.port: 80
duniter.p2p.enable: false
#
# ---------------------------------- Duniter4j SMTP server ----------------------
#
# SMTP server configuration (host and port)
......
......@@ -158,15 +158,7 @@ duniter.security.enable: true
#
# Should synchronize data from an existing ES node ?
#
duniter.data.sync.enable: true
#duniter.data.sync.enable: true
duniter.data.sync.host: localhost
duniter.data.sync.port: 9200
#
# Should maintain stats on data ?
#
duniter.data.stats.enable: true
duniter.p2p.enable: false
# ---------------------------------- Duniter4j Mail module -----------------------
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment