From f6ce84387434e88b776f15f98b996084983e693e Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Tue, 24 Oct 2023 11:19:12 +0200 Subject: [PATCH 01/13] swap solr6 and elasticsearch services and configs --- docker-compose/docker-compose.yml | 69 ++++++++++++------- .../solr6-override-docker-compose.yml | 53 ++++++++++++++ 2 files changed, 98 insertions(+), 24 deletions(-) create mode 100644 docker-compose/solr6-override-docker-compose.yml diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index 7141c4ed0..f423d6cd6 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -35,16 +35,15 @@ services: -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.url=jdbc:postgresql://postgres:5432/alfresco - -Dsolr.host=solr6 - -Dsolr.port=8983 - -Dsolr.secureComms=secret - -Dsolr.sharedSecret=secret - -Dsolr.base.url=/solr - -Dindex.subsystem.name=solr6 + -Dindex.subsystem.name=elasticsearch + -Delasticsearch.createIndexIfNotExists=true + -Delasticsearch.host=elasticsearch + -Delasticsearch.port=9200 -Dshare.host=127.0.0.1 -Dshare.port=8080 -Dalfresco.host=localhost -Dalfresco.port=8080 + -Dcsrf.filter.enabled=false -Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos -Dmessaging.broker.url="failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true" -Ddeployment.method=DOCKER_COMPOSE @@ -52,7 +51,6 @@ services: -Dtransform.service.url=http://transform-router:8095 -Dsfs.url=http://shared-file-store:8099/ -DlocalTransform.core-aio.url=http://transform-core-aio:8090/ - -Dcsrf.filter.enabled=false -Ddsync.service.uris=http://localhost:9090/alfresco -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 @@ -121,25 +119,48 @@ services: command: postgres -c max_connections=300 -c log_min_messages=LOG ports: - "5432:5432" - solr6: - image: quay.io/alfresco/search-services:2.0.9 - mem_limit: 2g + elasticsearch: + image: elasticsearch:7.10.1 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: "solr6" - SOLR_SOLR_PORT: "8983" - # Create the default alfresco and archive cores - SOLR_CREATE_ALFRESCO_DEFAULTS: "alfresco,archive" - # HTTPS or SECRET - ALFRESCO_SECURE_COMMS: "secret" - # SHARED SECRET VALUE - JAVA_TOOL_OPTIONS: >- - -Dalfresco.secureComms.secret=secret + - xpack.security.enabled=false + - discovery.type=single-node + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + cap_add: + - IPC_LOCK ports: - - "8083:8983" # Browser port + - 9200:9200 + - 9300:9300 + search: + image: quay.io/alfresco/alfresco-elasticsearch-live-indexing:4.0.0-M1 + depends_on: + - elasticsearch + - alfresco + environment: + ALFRESCO_ACCEPTED_CONTENT_MEDIA_TYPES_CACHE_BASE_URL: >- + http://transform-core-aio:8090/transform/config + ALFRESCO_SHAREDFILESTORE_BASEURL: >- + http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file/ + SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 + SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200 + search-reindexing: + image: quay.io/alfresco/alfresco-elasticsearch-reindexing:4.0.0-M1 + depends_on: + - alfresco + restart: on-failure:10 + environment: + ALFRESCO_ACCEPTED_CONTENT_MEDIA_TYPES_CACHE_BASE_URL: >- + http://transform-core-aio:8090/transform/config + SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 + SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/alfresco + SPRING_DATASOURCE_USERNAME: alfresco + SPRING_DATASOURCE_PASSWORD: alfresco + SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200 activemq: image: alfresco/alfresco-activemq:5.18-jre17-rockylinux8 mem_limit: 1g diff --git a/docker-compose/solr6-override-docker-compose.yml b/docker-compose/solr6-override-docker-compose.yml new file mode 100644 index 000000000..6d35f6632 --- /dev/null +++ b/docker-compose/solr6-override-docker-compose.yml @@ -0,0 +1,53 @@ +version: "2" +services: + alfresco: + environment: + JAVA_OPTS: >- + -Ddb.driver=org.postgresql.Driver + -Ddb.username=alfresco + -Ddb.password=alfresco + -Ddb.url=jdbc:postgresql://postgres:5432/alfresco + -Dsolr.host=solr6 + -Dsolr.port=8983 + -Dsolr.secureComms=secret + -Dsolr.sharedSecret=secret + -Dsolr.base.url=/solr + -Dindex.subsystem.name=solr6 + -Dshare.host=127.0.0.1 + -Dshare.port=8080 + -Dalfresco.host=localhost + -Dalfresco.port=8080 + -Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos + -Dmessaging.broker.url="failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true" + -Ddeployment.method=DOCKER_COMPOSE + -Dtransform.service.enabled=true + -Dtransform.service.url=http://transform-router:8095 + -Dsfs.url=http://shared-file-store:8099/ + -DlocalTransform.core-aio.url=http://transform-core-aio:8090/ + -Dcsrf.filter.enabled=false + -Ddsync.service.uris=http://localhost:9090/alfresco + -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=80 + solr6: + image: quay.io/alfresco/search-services:2.0.8.1 + mem_limit: 2g + 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: "solr6" + SOLR_SOLR_PORT: "8983" + # Create the default alfresco and archive cores + SOLR_CREATE_ALFRESCO_DEFAULTS: "alfresco,archive" + # HTTPS or SECRET + ALFRESCO_SECURE_COMMS: "secret" + # SHARED SECRET VALUE + JAVA_TOOL_OPTIONS: >- + -Dalfresco.secureComms.secret=secret + ports: + - "8083:8983" # Browser port + # Disable the default solr6 service + search: + image: alpine:latest + command: "true" From b00da04ebd3d064c81ca17ee64ed37b7b6a13643 Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Tue, 24 Oct 2023 15:17:50 +0200 Subject: [PATCH 02/13] disable search enterprise in solr6 override --- docker-compose/solr6-override-docker-compose.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docker-compose/solr6-override-docker-compose.yml b/docker-compose/solr6-override-docker-compose.yml index 6d35f6632..cb2cf8edc 100644 --- a/docker-compose/solr6-override-docker-compose.yml +++ b/docker-compose/solr6-override-docker-compose.yml @@ -47,7 +47,13 @@ services: -Dalfresco.secureComms.secret=secret ports: - "8083:8983" # Browser port - # Disable the default solr6 service + # Disable the default elastcisearch service search: image: alpine:latest command: "true" + search-reindexing: + image: alpine:latest + command: "true" + elasticsearch: + image: alpine:latest + command: "true" From d3d088accbc3066e6389bd1a334acac8f01f7bf2 Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Tue, 24 Oct 2023 16:00:01 +0200 Subject: [PATCH 03/13] remove elasticsearch override --- .../elasticsearch-override-docker-compose.yml | 74 ------------------- 1 file changed, 74 deletions(-) delete mode 100644 docker-compose/elasticsearch-override-docker-compose.yml diff --git a/docker-compose/elasticsearch-override-docker-compose.yml b/docker-compose/elasticsearch-override-docker-compose.yml deleted file mode 100644 index 2bd635af2..000000000 --- a/docker-compose/elasticsearch-override-docker-compose.yml +++ /dev/null @@ -1,74 +0,0 @@ -version: "2" -services: - alfresco: - environment: - JAVA_OPTS: >- - -Ddb.driver=org.postgresql.Driver - -Ddb.username=alfresco - -Ddb.password=alfresco - -Ddb.url=jdbc:postgresql://postgres:5432/alfresco - -Dindex.subsystem.name=elasticsearch - -Delasticsearch.createIndexIfNotExists=true - -Delasticsearch.host=elasticsearch - -Delasticsearch.port=9200 - -Dshare.host=127.0.0.1 - -Dshare.port=8080 - -Dalfresco.host=localhost - -Dalfresco.port=8080 - -Dcsrf.filter.enabled=false - -Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos - -Dmessaging.broker.url="failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true" - -Ddeployment.method=DOCKER_COMPOSE - -Dtransform.service.enabled=true - -Dtransform.service.url=http://transform-router:8095 - -Dsfs.url=http://shared-file-store:8099/ - -DlocalTransform.core-aio.url=http://transform-core-aio:8090/ - -Ddsync.service.uris=http://localhost:9090/alfresco - -XX:MinRAMPercentage=50 - -XX:MaxRAMPercentage=80 - elasticsearch: - image: elasticsearch:7.10.1 - environment: - - xpack.security.enabled=false - - discovery.type=single-node - ulimits: - memlock: - soft: -1 - hard: -1 - nofile: - soft: 65536 - hard: 65536 - cap_add: - - IPC_LOCK - ports: - - 9200:9200 - - 9300:9300 - search: - image: quay.io/alfresco/alfresco-elasticsearch-live-indexing:4.0.0.1 - depends_on: - - elasticsearch - - alfresco - environment: - ALFRESCO_ACCEPTED_CONTENT_MEDIA_TYPES_CACHE_BASE_URL: >- - http://transform-core-aio:8090/transform/config - ALFRESCO_SHAREDFILESTORE_BASEURL: >- - http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file/ - SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 - SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200 - search-reindexing: - image: quay.io/alfresco/alfresco-elasticsearch-reindexing:4.0.0.1 - depends_on: - - alfresco - restart: on-failure:10 - environment: - ALFRESCO_ACCEPTED_CONTENT_MEDIA_TYPES_CACHE_BASE_URL: >- - http://transform-core-aio:8090/transform/config - SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 - SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/alfresco - SPRING_DATASOURCE_USERNAME: alfresco - SPRING_DATASOURCE_PASSWORD: alfresco - SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200 - # Disable the default solr6 service - solr6: - image: alpine:latest - command: "true" From 899bf33a7d70c188ea73341bb0f95fbe129b3537 Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Mon, 22 Jan 2024 14:17:07 +0100 Subject: [PATCH 04/13] bump solr6 image in compose override --- docker-compose/solr6-override-docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose/solr6-override-docker-compose.yml b/docker-compose/solr6-override-docker-compose.yml index cb2cf8edc..ef3a48860 100644 --- a/docker-compose/solr6-override-docker-compose.yml +++ b/docker-compose/solr6-override-docker-compose.yml @@ -29,7 +29,7 @@ services: -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 solr6: - image: quay.io/alfresco/search-services:2.0.8.1 + image: quay.io/alfresco/search-services:2.0.9 mem_limit: 2g environment: # Solr needs to know how to register itself with Alfresco From b871d87f0d03472a5302137c9e80017974698956 Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Mon, 22 Jan 2024 14:30:09 +0100 Subject: [PATCH 05/13] bump ASE images --- docker-compose/docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index f423d6cd6..26871f02b 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -137,7 +137,7 @@ services: - 9200:9200 - 9300:9300 search: - image: quay.io/alfresco/alfresco-elasticsearch-live-indexing:4.0.0-M1 + image: quay.io/alfresco/alfresco-elasticsearch-live-indexing:4.0.0.1 depends_on: - elasticsearch - alfresco @@ -149,7 +149,7 @@ services: SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200 search-reindexing: - image: quay.io/alfresco/alfresco-elasticsearch-reindexing:4.0.0-M1 + image: quay.io/alfresco/alfresco-elasticsearch-reindexing:4.0.0.1 depends_on: - alfresco restart: on-failure:10 From 518fb34058bb9b137bdff96a81ed7bbd129722c8 Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Mon, 22 Jan 2024 16:28:29 +0100 Subject: [PATCH 06/13] apply strict dependencies for search tests to pass --- docker-compose/docker-compose.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index 26871f02b..a117bbc89 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -54,6 +54,13 @@ services: -Ddsync.service.uris=http://localhost:9090/alfresco -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/probes/-ready-"] + interval: 30s + timeout: 3s + retries: 3 + start_period: 1m + start_interval: 20s transform-router: mem_limit: 512m image: quay.io/alfresco/alfresco-transform-router:4.0.1 @@ -67,7 +74,7 @@ services: http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file ports: - "8095:8095" - links: + depends_on: - activemq transform-core-aio: image: alfresco/alfresco-transform-core-aio:5.0.1 @@ -81,7 +88,7 @@ services: http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file ports: - "8090:8090" - links: + depends_on: - activemq shared-file-store: image: quay.io/alfresco/alfresco-shared-file-store:4.0.1 @@ -150,8 +157,6 @@ services: SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200 search-reindexing: image: quay.io/alfresco/alfresco-elasticsearch-reindexing:4.0.0.1 - depends_on: - - alfresco restart: on-failure:10 environment: ALFRESCO_ACCEPTED_CONTENT_MEDIA_TYPES_CACHE_BASE_URL: >- @@ -161,6 +166,11 @@ services: SPRING_DATASOURCE_USERNAME: alfresco SPRING_DATASOURCE_PASSWORD: alfresco SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200 + depends_on: + postgres: + condition: service_started + alfresco: + condition: service_healthy activemq: image: alfresco/alfresco-activemq:5.18-jre17-rockylinux8 mem_limit: 1g @@ -189,13 +199,9 @@ services: proxy: image: alfresco/alfresco-acs-nginx:3.4.2 mem_limit: 128m - depends_on: - - alfresco - - digital-workspace - - control-center ports: - "8080:8080" - links: + depends_on: - digital-workspace - alfresco - share From 188f6cdfaf19baea1342bc4ccc281e5dac12944f Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Mon, 22 Jan 2024 16:35:38 +0100 Subject: [PATCH 07/13] remove engine specific podman tests --- .../acs-test-docker-compose-collection.json | 79 ------------------- 1 file changed, 79 deletions(-) diff --git a/test/postman/docker-compose/acs-test-docker-compose-collection.json b/test/postman/docker-compose/acs-test-docker-compose-collection.json index 8940e1cc5..3cabbe492 100644 --- a/test/postman/docker-compose/acs-test-docker-compose-collection.json +++ b/test/postman/docker-compose/acs-test-docker-compose-collection.json @@ -685,85 +685,6 @@ }, "response": [] }, - { - "name": "solr-validation", - "event": [ - { - "listen": "test", - "script": { - "type": "text/javascript", - "exec": [ - "pm.globals.get(\"url\");", - "", - "/* Search and discovery team needs to add solr tests here", - "the following failed while they worked on the insight-engine integration", - "*/", - "", - " ", - "pm.test(\"solrStatusCodeTest\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"solrResponseTest\", function() {", - " var jsonData = pm.response.json();", - " var modulesArray= jsonData.resultset.queryInfo;", - " for(var key in modulesArray)", - " {", - " var obj = modulesArray[key];", - " var id = obj.numberFound;", - " console.log(id);", - " pm.expect(id).to.be.eql(\"189\");", - " } ", - "});", - "", - "" - ] - } - } - ], - "request": { - "auth": { - "type": "basic", - "basic": [ - { - "key": "username", - "value": "admin", - "type": "string" - }, - { - "key": "password", - "value": "admin", - "type": "string" - }, - { - "key": "saveHelperData", - "type": "any" - }, - { - "key": "showPassword", - "value": false, - "type": "boolean" - } - ] - }, - "method": "GET", - "header": [], - "url": { - "raw": "{{protocol}}://{{url}}/alfresco/s/api/solrstats", - "protocol": "{{protocol}}", - "host": [ - "{{url}}" - ], - "path": [ - "alfresco", - "s", - "api", - "solrstats" - ] - } - }, - "response": [] - }, { "name": "share-alfresco-proxy", "event": [ From 71e52a8ff42762c2c8c814509a24debebe23c891 Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Mon, 22 Jan 2024 16:52:51 +0100 Subject: [PATCH 08/13] remove options incompatible with pre 25.x dockerd --- docker-compose/docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index a117bbc89..bbc6d6f4e 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -60,7 +60,6 @@ services: timeout: 3s retries: 3 start_period: 1m - start_interval: 20s transform-router: mem_limit: 512m image: quay.io/alfresco/alfresco-transform-router:4.0.1 From c137541fd5275cf8cea0e221aba330efe1ab3c7d Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Mon, 22 Jan 2024 17:25:04 +0100 Subject: [PATCH 09/13] copy config to 23.N compose file --- docker-compose/23.N-docker-compose.yml | 94 +++++++++++++++++--------- docker-compose/docker-compose.yml | 8 ++- 2 files changed, 70 insertions(+), 32 deletions(-) diff --git a/docker-compose/23.N-docker-compose.yml b/docker-compose/23.N-docker-compose.yml index 67b58e585..09dfafb35 100644 --- a/docker-compose/23.N-docker-compose.yml +++ b/docker-compose/23.N-docker-compose.yml @@ -35,16 +35,15 @@ services: -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.url=jdbc:postgresql://postgres:5432/alfresco - -Dsolr.host=solr6 - -Dsolr.port=8983 - -Dsolr.secureComms=secret - -Dsolr.sharedSecret=secret - -Dsolr.base.url=/solr - -Dindex.subsystem.name=solr6 + -Dindex.subsystem.name=elasticsearch + -Delasticsearch.createIndexIfNotExists=true + -Delasticsearch.host=elasticsearch + -Delasticsearch.port=9200 -Dshare.host=127.0.0.1 -Dshare.port=8080 -Dalfresco.host=localhost -Dalfresco.port=8080 + -Dcsrf.filter.enabled=false -Daos.baseUrlOverwrite=http://localhost:8080/alfresco/aos -Dmessaging.broker.url="failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true" -Ddeployment.method=DOCKER_COMPOSE @@ -52,10 +51,19 @@ services: -Dtransform.service.url=http://transform-router:8095 -Dsfs.url=http://shared-file-store:8099/ -DlocalTransform.core-aio.url=http://transform-core-aio:8090/ - -Dcsrf.filter.enabled=false -Ddsync.service.uris=http://localhost:9090/alfresco -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 + healthcheck: + test: + - CMD + - curl + - -f + - http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/probes/-ready- + interval: 30s + timeout: 3s + retries: 3 + start_period: 1m transform-router: mem_limit: 512m image: quay.io/alfresco/alfresco-transform-router:4.0.1 @@ -69,7 +77,7 @@ services: http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file ports: - "8095:8095" - links: + depends_on: - activemq transform-core-aio: image: alfresco/alfresco-transform-core-aio:5.0.1 @@ -83,7 +91,7 @@ services: http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file ports: - "8090:8090" - links: + depends_on: - activemq shared-file-store: image: quay.io/alfresco/alfresco-shared-file-store:4.0.1 @@ -121,25 +129,53 @@ services: command: postgres -c max_connections=300 -c log_min_messages=LOG ports: - "5432:5432" - solr6: - image: quay.io/alfresco/search-services:2.0.9 - mem_limit: 2g + elasticsearch: + image: elasticsearch:7.10.1 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: "solr6" - SOLR_SOLR_PORT: "8983" - # Create the default alfresco and archive cores - SOLR_CREATE_ALFRESCO_DEFAULTS: "alfresco,archive" - # HTTPS or SECRET - ALFRESCO_SECURE_COMMS: "secret" - # SHARED SECRET VALUE - JAVA_TOOL_OPTIONS: >- - -Dalfresco.secureComms.secret=secret + - xpack.security.enabled=false + - discovery.type=single-node + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + cap_add: + - IPC_LOCK ports: - - "8083:8983" # Browser port + - 9200:9200 + - 9300:9300 + search: + image: quay.io/alfresco/alfresco-elasticsearch-live-indexing:4.0.0.1 + depends_on: + - elasticsearch + - alfresco + environment: + ALFRESCO_ACCEPTED_CONTENT_MEDIA_TYPES_CACHE_BASE_URL: >- + http://transform-core-aio:8090/transform/config + ALFRESCO_SHAREDFILESTORE_BASEURL: >- + http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file/ + SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 + SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200 + search-reindexing: + image: quay.io/alfresco/alfresco-elasticsearch-reindexing:4.0.0.1 + restart: on-failure:10 + environment: + ALFRESCO_ACCEPTED_CONTENT_MEDIA_TYPES_CACHE_BASE_URL: >- + http://transform-core-aio:8090/transform/config + SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 + SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/alfresco + SPRING_DATASOURCE_USERNAME: alfresco + SPRING_DATASOURCE_PASSWORD: alfresco + SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200 + depends_on: + postgres: + condition: service_started + elasticsearch: + condition: service_started + alfresco: + condition: service_healthy activemq: image: alfresco/alfresco-activemq:5.18-jre17-rockylinux8 mem_limit: 1g @@ -172,13 +208,9 @@ services: - alfresco - digital-workspace - control-center + - share ports: - "8080:8080" - links: - - digital-workspace - - alfresco - - share - - control-center sync-service: image: quay.io/alfresco/service-sync:4.0.1 mem_limit: 1g diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index bbc6d6f4e..1833348a5 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -55,7 +55,11 @@ services: -XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80 healthcheck: - test: ["CMD", "curl", "-f", "http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/probes/-ready-"] + test: + - CMD + - curl + - -f + - http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/probes/-ready- interval: 30s timeout: 3s retries: 3 @@ -168,6 +172,8 @@ services: depends_on: postgres: condition: service_started + elasticsearch: + condition: service_started alfresco: condition: service_healthy activemq: From 212cbd79a19eecc5d085366eec7f6a33c42f313e Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Mon, 22 Jan 2024 17:53:12 +0100 Subject: [PATCH 10/13] update updatecli pipeline builder for new compose layout --- updatecli-matrix-targets.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/updatecli-matrix-targets.yaml b/updatecli-matrix-targets.yaml index 105818ca1..acbd8d215 100644 --- a/updatecli-matrix-targets.yaml +++ b/updatecli-matrix-targets.yaml @@ -26,8 +26,6 @@ matrix: helm_key: $.share.image.tag search: version: - compose_target: *composeNext - compose_key: $.services.solr6.image helm_target: *helmvaluesNext helm_keys: &search_helm_keys search: $.alfresco-search.searchServicesImage.tag @@ -37,6 +35,10 @@ matrix: search-enterprise: version: pattern: + compose_target: *composeNext + compose_keys: + live-indexing: $.services.search.image + reindexing: $.services.search-reindexing.image helm_target: *helmvaluesNext helm_keys: Reindexing: $.alfresco-search-enterprise.reindexing.image.tag @@ -142,7 +144,7 @@ matrix: helm_key: $.share.image.tag search: version: - compose_target: *compose23n + compose_target: docker-compose/solr6-override-docker-compose.yml compose_key: $.services.solr6.image helm_target: *helmvalues23n helm_keys: *search_helm_keys @@ -151,8 +153,7 @@ matrix: search-enterprise: version: pattern: - compose_target: >- - docker-compose/elasticsearch-override-docker-compose.yml + compose_target: *compose23n compose_keys: live-indexing: $.services.search.image reindexing: $.services.search-reindexing.image From ae3dcc01ad15a9ffee8be919a2481fc272748098 Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Mon, 22 Jan 2024 18:39:57 +0100 Subject: [PATCH 11/13] add mem_limit for ASE --- docker-compose/docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index 1833348a5..340a9fa9e 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -148,6 +148,7 @@ services: - 9300:9300 search: image: quay.io/alfresco/alfresco-elasticsearch-live-indexing:4.0.0.1 + mem_limit: 1g depends_on: - elasticsearch - alfresco @@ -160,6 +161,7 @@ services: SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200 search-reindexing: image: quay.io/alfresco/alfresco-elasticsearch-reindexing:4.0.0.1 + mem_limit: 1g restart: on-failure:10 environment: ALFRESCO_ACCEPTED_CONTENT_MEDIA_TYPES_CACHE_BASE_URL: >- From 6c2c0481edfba61e08fb489cb2a262306a7bb8b3 Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Mon, 22 Jan 2024 18:40:12 +0100 Subject: [PATCH 12/13] update doc --- docs/docker-compose/README.md | 78 ++++++++++++++++++++++++++--------- 1 file changed, 59 insertions(+), 19 deletions(-) diff --git a/docs/docker-compose/README.md b/docs/docker-compose/README.md index 87a3ce87d..3506d125a 100644 --- a/docs/docker-compose/README.md +++ b/docs/docker-compose/README.md @@ -1,6 +1,7 @@ # Alfresco Content Services Docker Compose Deployment -This page describes how to quickly deploy Alfresco Content Services (ACS) using Docker Compose. +This page describes how to quickly deploy Alfresco Content Services (ACS) using +Docker Compose. Using one of the Enterprise compose files will deploy the following system: @@ -12,53 +13,78 @@ Using the Community compose file will deploy the following system: ## Considerations -The Docker Compose file is undergoing continual development and improvement, and should not be used "as is" for your production environments, but should help you save time and effort deploying Alfresco Content Services for your organisation. +The Docker Compose files are provided to easy spin up ACS environments. It is +suited for test or demo environment but certainly not for production use. ## Prerequisites -As well as the prerequisites mentioned on the [main README](/README.md#prerequisites) you will need a machine with at least 13GB of memory and the following software installed: +As well as the prerequisites mentioned on the [main +README](/README.md#prerequisites) you will need a machine with at least 13GB of +free memory and the following software installed: * [Docker](https://www.docker.com/products/docker-desktop) * [Docker Compose](https://docs.docker.com/compose/install) ## Configure Docker for Desktop -In order to deploy onto Docker for Desktop we need to allocate at least [13 Gb](../../docker-compose/docker-compose.yml) (preferably 16 Gb) to the Docker Engine on the "Resources" tab in Docker for Desktop's preferences pane as shown in the screenshot below. This is required because insufficient memory will cause containers to exit without warning. +In order to deploy onto Docker for Desktop we need to allocate at least 16Gb to +the Docker engine on the "Resources" tab in Docker for Desktop's preferences +pane as shown in the screenshot below. +This is required because insufficient memory will cause containers to exit +without warning (the very minimum is 13GB but 16 brings some freedom to your +Docker Daemon). ![Resources](../../docs/helm/diagrams/dfd-resources.png) ## Deploy -1. Clone this repository or download one of the docker compose files from [here](../../docker-compose) -2. Navigate to the folder where the docker compose file you want to use is located -3. Log in to Quay.io with your credentials: ```docker login quay.io``` (only required if you're running an Enterprise version) -4. Run ```docker-compose up``` to use the latest version of ACS Enterprise or ```docker-compose -f major.minor.N-docker-compose.yml up``` to use a specific version of ACS +1. Clone this repository or download one of the docker compose files from + [here](../../docker-compose) +2. Navigate to the folder where the docker compose file you want to use is + located +3. Log in to Quay.io with your credentials: `docker login quay.io` (only + required if you're running an Enterprise version) +4. Run `docker-compose up` to use the latest version of ACS Enterprise or + `docker-compose -f major.minor.N-docker-compose.yml up` to use a specific + version of ACS 5. Open the following URLs in your browser to check that everything starts up: * Administration and REST APIs: [http://:8080/alfresco](http://localhost:8080/alfresco) * Control Center: [http://:8080/admin](http://localhost:8080/admin) * Alfresco Digital Workspace: [http://:8080/workspace](http://localhost:8080/workspace) * Share: [http://:8080/share](http://localhost:8080/share) * Search administration: [http://:8083/solr](http://localhost:8083/solr) -6. If you requested an extended trial license navigate to the Admin Console and apply your license: - * [http://:8080/alfresco/service/enterprise/admin/admin-license](http://localhost:8080/alfresco/service/enterprise/admin/admin-license) (`````` will usually just be ```localhost```) - * Default username and password is ```admin``` +6. If you requested an extended trial license navigate to the Admin Console and + apply your license: + * [http://:8080/alfresco/service/enterprise/admin/admin-license](http://localhost:8080/alfresco/service/enterprise/admin/admin-license) (`` will usually just be `localhost`) + * Default username and password is `admin` * See [Uploading a new license](https://docs.alfresco.com/content-services/latest/admin/license/#uploadlicense) for more details -### Search Enterprise 3.0 (Elasticsearch) +### Choosing a search engine -You can provision the latest Alfresco with the new search subsystem based on Elasticsearch rather than solr with: +Alfresco comes either with Solr or Elasticsearch as a Full Text Search engine. +By default ACS enterprise flavor 23 and above are shiped with Elasticsearch. +Versions 7.x enterprise and all Community versions are shipped with Solr. + +It is of course possible to keep on using Solr on the latest Enterprise +versions. To do so just use the extra argument shown bellow: ```bash -docker-compose -f docker-compose.yml -f elasticsearch-override-docker-compose.yml up -d +docker-compose -f docker-compose.yml -f solr6-override-docker-compose.yml up -d ``` ### Troubleshooting Search Enterprise -Make sure that exposed ports are open on your host. Check the _docker-compose.yml_ file to determine the exposed ports - refer to the ```host:container``` port definitions. You'll see they include 5432, 8080, 8083 and others. +Make sure that exposed ports are open on your host. Check the +_docker-compose.yml_ file to determine the exposed ports - refer to the +`host:container` port definitions. You'll see they include 5432, 8080, 8083 and +others. -If Docker is running on your local machine, the IP address will be just _localhost_. +If Docker is running on your local machine, the IP address will be just +_localhost_. -If you're using the [Docker Toolbox](https://docs.docker.com/toolbox/toolbox_install_windows), run the following command to find the IP address: +If you're using the [Docker +Toolbox](https://docs.docker.com/toolbox/toolbox_install_windows), run the +following command to find the IP address: ```bash docker-machine ip @@ -66,7 +92,9 @@ docker-machine ip ## Configure -The provided Docker compose file provides some default configuration, the sections below show the full set of environment variables exposed by each of the containers in the deployment. +The provided Docker compose file provides some default configuration, the +sections below show the full set of environment variables exposed by each of +the containers in the deployment. ### Alfresco Content Repository (alfresco) @@ -88,7 +116,7 @@ The provided Docker compose file provides some default configuration, the sectio ```yml share: - image: quay.io/alfresco/alfresco-share:7.1.1 + image: quay.io/alfresco/alfresco-share:23.1.1 mem_limit: 1g environment: REPO_HOST: "alfresco" @@ -166,6 +194,18 @@ share: | APP_CONFIG_AUTH_TYPE | The authentication type. To use Single Sign-on mode you must change this property to OAUTH. | BASIC | | APP_CONFIG_PROVIDER | config provider | ECM | +### Alfresco Search Enterprise (elasticsearch) + +| Property | Description | Default value | +|------------------------------------------------------|-----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------| +| ALFRESCO_ACCEPTED_CONTENT_MEDIA_TYPES_CACHE_BASE_URL | URL where to fetch supported media type (typically t-router URL) | `http://transform-core-aio:8090/transform/config` | +| ALFRESCO_SHAREDFILESTORE_BASEURL | URL where to fetch renditions from (typically the shared filestore URL) | `http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file/` | +| SPRING_ACTIVEMQ_BROKERURL | URL of the ACTIVEMQ message broker | `nio://activemq:61616` | +| SPRING_ELASTICSEARCH_REST_URIS | URL of the Elastisearch REST API | `http://elasticsearch:9200` | +| SPRING_DATASOURCE_URL (reindexing only) | JDBC URL of the repository database | `jdbc:postgresql://postgres:5432/alfresco` | +| SPRING_DATASOURCE_USERNAME (reindexing only) | Username to authenticate to the repository database | `alfresco` | +| SPRING_DATASOURCE_PASSWORD (reindexing only) | Password to authenticate to the repository database | `alfresco` | + ### Alfresco Search Services (solr6) | Property | Description | Default value | From 031968373d7f4df637b73e7437096df1d84b5d5c Mon Sep 17 00:00:00 2001 From: Alexandre Chapellon Date: Tue, 23 Jan 2024 10:32:49 +0100 Subject: [PATCH 13/13] review comments --- docker-compose/solr6-override-docker-compose.yml | 8 +++++--- docs/docker-compose/README.md | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docker-compose/solr6-override-docker-compose.yml b/docker-compose/solr6-override-docker-compose.yml index ef3a48860..5ff322ca3 100644 --- a/docker-compose/solr6-override-docker-compose.yml +++ b/docker-compose/solr6-override-docker-compose.yml @@ -1,3 +1,5 @@ +# Check documentation below if need help using this file: +# https://github.com/Alfresco/acs-deployment/tree/master/docs/docker-compose#choosing-a-search-engine version: "2" services: alfresco: @@ -49,11 +51,11 @@ services: - "8083:8983" # Browser port # Disable the default elastcisearch service search: - image: alpine:latest + image: busybox:musl command: "true" search-reindexing: - image: alpine:latest + image: busybox:musl command: "true" elasticsearch: - image: alpine:latest + image: busybox:musl command: "true" diff --git a/docs/docker-compose/README.md b/docs/docker-compose/README.md index 3506d125a..9e440c119 100644 --- a/docs/docker-compose/README.md +++ b/docs/docker-compose/README.md @@ -62,7 +62,7 @@ Docker Daemon). ### Choosing a search engine Alfresco comes either with Solr or Elasticsearch as a Full Text Search engine. -By default ACS enterprise flavor 23 and above are shiped with Elasticsearch. +By default ACS enterprise flavor 23 and above are shipped with Elasticsearch. Versions 7.x enterprise and all Community versions are shipped with Solr. It is of course possible to keep on using Solr on the latest Enterprise