diff --git a/e2e-test/generator-alfresco-docker-compose/generators/app/index.js b/e2e-test/generator-alfresco-docker-compose/generators/app/index.js index e127caee3..ac5b2f4a2 100644 --- a/e2e-test/generator-alfresco-docker-compose/generators/app/index.js +++ b/e2e-test/generator-alfresco-docker-compose/generators/app/index.js @@ -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"), diff --git a/e2e-test/generator-alfresco-docker-compose/generators/app/templates/6.1/docker-compose-ce.yml b/e2e-test/generator-alfresco-docker-compose/generators/app/templates/6.1/docker-compose-ce.yml index 7c56d1bef..cf47d559b 100755 --- a/e2e-test/generator-alfresco-docker-compose/generators/app/templates/6.1/docker-compose-ce.yml +++ b/e2e-test/generator-alfresco-docker-compose/generators/app/templates/6.1/docker-compose-ce.yml @@ -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: diff --git a/e2e-test/generator-alfresco-docker-compose/generators/app/templates/6.1/docker-compose-ee.yml b/e2e-test/generator-alfresco-docker-compose/generators/app/templates/6.1/docker-compose-ee.yml index 711370373..31859c711 100755 --- a/e2e-test/generator-alfresco-docker-compose/generators/app/templates/6.1/docker-compose-ee.yml +++ b/e2e-test/generator-alfresco-docker-compose/generators/app/templates/6.1/docker-compose-ee.yml @@ -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" diff --git a/e2e-test/generator-alfresco-docker-compose/generators/app/templates/6.2/docker-compose-ce.yml b/e2e-test/generator-alfresco-docker-compose/generators/app/templates/6.2/docker-compose-ce.yml index 4378b58b4..451e57945 100755 --- a/e2e-test/generator-alfresco-docker-compose/generators/app/templates/6.2/docker-compose-ce.yml +++ b/e2e-test/generator-alfresco-docker-compose/generators/app/templates/6.2/docker-compose-ce.yml @@ -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: diff --git a/e2e-test/generator-alfresco-docker-compose/generators/app/templates/6.2/docker-compose-ee.yml b/e2e-test/generator-alfresco-docker-compose/generators/app/templates/6.2/docker-compose-ee.yml index b385c707f..6a4f4a7fd 100755 --- a/e2e-test/generator-alfresco-docker-compose/generators/app/templates/6.2/docker-compose-ee.yml +++ b/e2e-test/generator-alfresco-docker-compose/generators/app/templates/6.2/docker-compose-ee.yml @@ -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"