Commit e478f3a2 authored by Matija Obreza's avatar Matija Obreza
Browse files

Merge branch 'master' into staging

* master:
  [maven-release-plugin] prepare for next development iteration
  [maven-release-plugin] prepare release genesys2-server-1.1.0
  Made Elasticsearch HTTP configurable
  Allow for configuration of Elasticsearch and Hazelcast clusters
  Regenerate ES index in batch mode
  Unlinked entity PDCI from AccessionId
  Using aliases for ES indexes
  Make entity Crop cacheable
  Added /c/ to list all crops and included CROPNAME in Excel MCPD export
  Use MCPD#cropName instead of taxonomy to determine crop of accession
  Accession passport data basics updated
parents 8210ec96 c41ed39a
......@@ -23,7 +23,7 @@
<name>Genesys 2 Server</name>
<packaging>war</packaging>
<version>1.1.0-SNAPSHOT</version>
<version>1.2.0-SNAPSHOT</version>
<url>https://www.genesys-pgr.org</url>
<description>Genesys 2 Server</description>
......@@ -410,7 +410,7 @@
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch</artifactId>
<version>1.3.2</version>
<version>1.5.2</version>
</dependency>
<dependency>
......
......@@ -16,6 +16,7 @@
package org.genesys2.spring.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
......@@ -25,13 +26,17 @@ import org.springframework.data.elasticsearch.client.TransportClientFactoryBean;
@Profile({ "aws", "cacher" })
public class ElasticsearchConfigAWS {
private String clusterName = "elasticsearch-genesys";
@Value("${elasticsearch.cluster.name}")
private String clusterName;
@Value("${elasticsearch.cluster.nodes}")
private String clusterNodes;
@Bean
public TransportClientFactoryBean tcfb() {
TransportClientFactoryBean tcfb = new TransportClientFactoryBean();
tcfb.setClusterName(clusterName);
tcfb.setClusterNodes("localhost:9300");
tcfb.setClusterNodes(clusterNodes);
tcfb.setClientPingTimeout("10s");
return tcfb;
}
......
......@@ -16,6 +16,7 @@
package org.genesys2.spring.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
......@@ -25,13 +26,20 @@ import org.springframework.data.elasticsearch.client.NodeClientFactoryBean;
@Profile({ "dev" })
public class ElasticsearchConfigDev {
private String clusterName = "elasticsearch-genesys";
@Value("${elasticsearch.cluster.name}")
private String clusterName;
/**
* Allow HTTP traffic on port 9200. Useful for querying ES with curl.
*/
@Value("${elasticsearch.enable.http}")
private boolean enableHttp;
@Bean
public NodeClientFactoryBean ncfb() {
NodeClientFactoryBean ncfb = new NodeClientFactoryBean(true);
ncfb.setClusterName(clusterName);
ncfb.setEnableHttp(true);
ncfb.setEnableHttp(enableHttp);
return ncfb;
}
}
......@@ -106,10 +106,11 @@ executor.queue.capacity=100
#scheduler properties
scheduler.max.pool.size=16
# Hazelcast
hazelcast.instanceName=hz-genesys
hazelcast.name=genesys-hz-3.5
hazelcast.password=hazelcasts
# Hazelcast instance name
hazelcast.instanceName=hz-genesys-instance1
# Hazelcast cluster configuration
hazelcast.name=hz-genesys-development
hazelcast.password=hazelcastdevelopment
hazelcast.port=5701
# AWS Autodetection
......@@ -136,9 +137,12 @@ cache.tileserver.max-idle-seconds=0
cache.tileserver.eviction-policy=LRU
# Connection to Elasticsearch
elasticsearch.url=http://localhost:9200/
elasticsearch.cluster.name=es-genesys-development
# Allow HTTP connections on port 9200
elasticsearch.enable.http=true
# Connect to external ES nodes. Comma separated list of hostname:port
# elasticsearch.cluster.nodes=localhost:9300,otherhost:9300
elasticsearch.cluster.nodes=
transifex.project=genesys-dev
transifex.username=Alexandr19011990
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment