SEARCH-1650 Support master-master and master-slave.

This commit is contained in:
Tom Page
2019-11-19 09:18:09 +00:00
parent 36013f31a2
commit 0ae6c97d29
5 changed files with 28 additions and 24 deletions

View File

@@ -60,10 +60,14 @@ module.exports = class extends Generator {
},
{
whenFunction: response => response.httpMode == 'http',
type: 'confirm',
type: 'list',
name: 'replication',
message: 'Would you like to use SOLR Replication (2 nodes in master-slave)?',
default: false
message: 'Would you like to use SOLR Replication?',
choices: [
{ name: "No", value: "" },
{ name: "Yes - two nodes in a master-slave configuration", value: "master-slave" },
{ name: "Yes - two nodes in a master-master configuration", value: "master-master" }
]
},
// Enterprise only options
{
@@ -199,7 +203,7 @@ module.exports = class extends Generator {
port: (this.props.httpWebMode == 'http' ? '8080' : '443'),
secureComms: (this.props.httpMode == 'http' ? 'none' : 'https'),
alfrescoPort: (this.props.httpMode == 'http' ? '8080' : '8443'),
replication: (this.props.replication ? "true" : "false"),
replication: this.props.replication,
searchSolrHost: (this.props.replication ? "solr6secondary" : "solr6"),
searchPath: searchBasePath,
zeppelin: (this.props.zeppelin ? "true" : "false"),

View File

@@ -47,7 +47,7 @@ services:
ALFRESCO_HOSTNAME: alfresco
ALFRESCO_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
TRUSTSTORE_TYPE: JCEKS
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication == 'true') { %>
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication) { %>
ENABLE_MASTER: "true"
ENABLE_SLAVE: "false" <% } %>
mem_limit: 1200m
@@ -78,7 +78,7 @@ services:
volumes:
- ./keystores/solr:/opt/<%=searchPath%>/keystore <% } %>
<% if (replication == 'true') { %>
<% if (replication) { %>
solr6secondary:
build:
context: ./search
@@ -88,9 +88,9 @@ services:
ALFRESCO_HOSTNAME: alfresco
ALFRESCO_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
TRUSTSTORE_TYPE: JCEKS
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication == 'true') { %>
ENABLE_MASTER: "false"
ENABLE_SLAVE: "true"
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication) { %>
ENABLE_MASTER: <% if (replication == 'master-master') { %>"true"<% } else { %>"false"<% } %>
ENABLE_SLAVE: <% if (replication == 'master-master') { %>"false"<% } else { %>"true"<% } %>
MASTER_HOST: solr6 <% } %>
mem_limit: 1200m
environment:

View File

@@ -57,7 +57,7 @@ services:
ALFRESCO_HOSTNAME: alfresco
ALFRESCO_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
TRUSTSTORE_TYPE: JCEKS
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication == 'true') { %>
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication) { %>
ENABLE_MASTER: "true"
ENABLE_SLAVE: "false" <% } %> <% if (sharding == 'true') { %>
ENABLE_SHARDING: "true"
@@ -103,7 +103,7 @@ services:
volumes:
- ./keystores/solr:/opt/<%=searchPath%>/keystore <% } %>
<% if (sharding == 'true' || replication == 'true') { %>
<% if (sharding == 'true' || replication) { %>
solr6secondary:
build:
context: ./search
@@ -113,9 +113,9 @@ services:
ALFRESCO_HOSTNAME: alfresco
ALFRESCO_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
TRUSTSTORE_TYPE: JCEKS
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication == 'true') { %>
ENABLE_MASTER: "false"
ENABLE_SLAVE: "true"
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication) { %>
ENABLE_MASTER: <% if (replication == 'master-master') { %>"true"<% } else { %>"false"<% } %>
ENABLE_SLAVE: <% if (replication == 'master-master') { %>"false"<% } else { %>"true"<% } %>
MASTER_HOST: solr6 <% } %> <% if (sharding == 'true') { %>
ENABLE_SHARDING: "true"
NUM_SHARDS: "2"

View File

@@ -63,7 +63,7 @@ services:
ALFRESCO_HOSTNAME: alfresco
ALFRESCO_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
TRUSTSTORE_TYPE: JCEKS
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication == 'true') { %>
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication) { %>
ENABLE_MASTER: "true"
ENABLE_SLAVE: "false" <% } %>
mem_limit: 1200m
@@ -94,7 +94,7 @@ services:
volumes:
- ./keystores/solr:/opt/<%=searchPath%>/keystore <% } %>
<% if (replication == 'true') { %>
<% if (replication) { %>
solr6secondary:
build:
context: ./search
@@ -104,9 +104,9 @@ services:
ALFRESCO_HOSTNAME: alfresco
ALFRESCO_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
TRUSTSTORE_TYPE: JCEKS
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication == 'true') { %>
ENABLE_MASTER: "false"
ENABLE_SLAVE: "true"
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication) { %>
ENABLE_MASTER: <% if (replication == 'master-master') { %>"true"<% } else { %>"false"<% } %>
ENABLE_SLAVE: <% if (replication == 'master-master') { %>"false"<% } else { %>"true"<% } %>
MASTER_HOST: solr6 <% } %>
mem_limit: 1200m
environment:

View File

@@ -66,7 +66,7 @@ services:
ALFRESCO_HOSTNAME: alfresco
ALFRESCO_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
TRUSTSTORE_TYPE: JCEKS
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication == 'true') { %>
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication) { %>
ENABLE_MASTER: "true"
ENABLE_SLAVE: "false" <% } %> <% if (sharding == 'true') { %>
ENABLE_SHARDING: "true"
@@ -112,7 +112,7 @@ services:
volumes:
- ./keystores/solr:/opt/<%=searchPath%>/keystore <% } %>
<% if (sharding == 'true' || replication == 'true') { %>
<% if (sharding == 'true' || replication) { %>
solr6secondary:
build:
context: ./search
@@ -122,9 +122,9 @@ services:
ALFRESCO_HOSTNAME: alfresco
ALFRESCO_COMMS: <%=secureComms%> <% if (httpMode == 'https') { %>
TRUSTSTORE_TYPE: JCEKS
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication == 'true') { %>
ENABLE_MASTER: "false"
ENABLE_SLAVE: "true"
KEYSTORE_TYPE: JCEKS <% } %> <% if (replication) { %>
ENABLE_MASTER: <% if (replication == 'master-master') { %>"true"<% } else { %>"false"<% } %>
ENABLE_SLAVE: <% if (replication == 'master-master') { %>"false"<% } else { %>"true"<% } %>
MASTER_HOST: solr6 <% } %> <% if (sharding == 'true') { %>
ENABLE_SHARDING: "true"
NUM_SHARDS: "2"