From 9a62f40356066ed8ddbea2f9220b1dd37a6dadd3 Mon Sep 17 00:00:00 2001 From: Paul Brodner Date: Mon, 25 Mar 2019 09:50:08 +0000 Subject: [PATCH] SEARCH-1125: start SS with master master configuration --- e2e-test/qa/search/master-master/.env | 11 +++ e2e-test/qa/search/master-master/README.md | 22 ++++++ .../search/master-master/docker-compose.yml | 72 +++++++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 e2e-test/qa/search/master-master/.env create mode 100644 e2e-test/qa/search/master-master/README.md create mode 100644 e2e-test/qa/search/master-master/docker-compose.yml diff --git a/e2e-test/qa/search/master-master/.env b/e2e-test/qa/search/master-master/.env new file mode 100644 index 000000000..4b81b609b --- /dev/null +++ b/e2e-test/qa/search/master-master/.env @@ -0,0 +1,11 @@ +# docker-compose related environments +ALFRESCO_IMAGE=alfresco/alfresco-content-repository +ALFRESCO_TAG=6.1.0-EA3 +SHARE_IMAGE=alfresco/alfresco-share +SHARE_TAG=6.0 +POSTGRES_IMAGE=postgres +POSTGRES_TAG=10.1 +SEARCH_IMAGE=quay.io/alfresco/search-services +SEARCH_TAG=latest +ACTIVEMQ_IMAGE=alfresco/alfresco-activemq +ACTIVEMQ_TAG=5.15.6 \ No newline at end of file diff --git a/e2e-test/qa/search/master-master/README.md b/e2e-test/qa/search/master-master/README.md new file mode 100644 index 000000000..9a7c342f2 --- /dev/null +++ b/e2e-test/qa/search/master-master/README.md @@ -0,0 +1,22 @@ +# About + +Start Alfresco services and scale SOLR to multiple instances, behind a LB. + +# Steps + +* **a)** Start Alfresco + +``` +docker-compose up -d +``` + +* **b)** Scale SOLR to 2 instances + +``` +docker-compose scale solr=2 +``` + +>it's possible at this time to restart `alfresco` service if there are not results returned by LB +``` + docker-compose restart alfresco + ``` \ No newline at end of file diff --git a/e2e-test/qa/search/master-master/docker-compose.yml b/e2e-test/qa/search/master-master/docker-compose.yml new file mode 100644 index 000000000..b7047bcd4 --- /dev/null +++ b/e2e-test/qa/search/master-master/docker-compose.yml @@ -0,0 +1,72 @@ +version: '3' +services: + alfresco: + image: ${ALFRESCO_IMAGE}:${ALFRESCO_TAG} + environment: + JAVA_OPTS : " + -Ddb.driver=org.postgresql.Driver + -Ddb.username=alfresco + -Ddb.password=alfresco + -Ddb.url=jdbc:postgresql://postgres:5432/alfresco + -Dsolr.host=search + -Dsolr.port=80 + -Dsolr.secureComms=none + -Dsolr.base.url=/solr + -Dindex.subsystem.name=solr6 + -Dalfresco.restApi.basicAuthScheme=true + -Ddeployment.method=DOCKER_COMPOSE + -Dcsrf.filter.enabled=false + -Dmessaging.broker.url=\"failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true\" + " + ports: + - "7203:7203" #JMX connect via service:jmx:rmi:///jndi/rmi://localhost:7203/jmxrmi + - "5005:5005" #Java debugging + - "8081:8080" #Browser port for Alfresco + + share: + image: ${SHARE_IMAGE}:${SHARE_TAG} + environment: + - REPO_HOST=alfresco + - REPO_PORT=8080 + ports: + - 8082:8080 #Browser port for Share + + postgres: + image: ${POSTGRES_IMAGE}:${POSTGRES_TAG} + environment: + - POSTGRES_PASSWORD=alfresco + - POSTGRES_USER=alfresco + - POSTGRES_DB=alfresco + ports: + - 5432:5432 + + search: + image: dockercloud/haproxy + links: + - solr + ports: + - 8083:80 #Browser port + volumes: + - /var/run/docker.sock:/var/run/docker.sock + + solr: + image: ${SEARCH_IMAGE}:${SEARCH_TAG} + environment: + #Solr needs to know how to register itself with Alfresco + - SOLR_ALFRESCO_HOST=alfresco + - SOLR_ALFRESCO_PORT=8080 + #Alfresco needs to know how to call solr + - SOLR_SOLR_HOST=search + - SOLR_SOLR_PORT=8983 + #Create the default alfresco and archive cores + - SOLR_CREATE_ALFRESCO_DEFAULTS=alfresco,archive + ports: + - 8983 #Browser port + + activemq: + image: ${ACTIVEMQ_IMAGE}:${ACTIVEMQ_TAG} + ports: + - 8161:8161 # Web Console + - 5672:5672 # AMQP + - 61616:61616 # OpenWire + - 61613:61613 # STOMP \ No newline at end of file