From 5c146c067e6b0626c516f51f721dcb915146735c Mon Sep 17 00:00:00 2001 From: pmacius Date: Mon, 22 Jul 2024 09:51:28 +0200 Subject: [PATCH 01/13] OPSEXP-2735 Add search enterprise all-in-one image Dockerfile --- docker-bake.hcl | 2 +- search/enterprise/common/artifacts.json | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index 34308fcd..ede5e6d6 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -155,7 +155,7 @@ target "repository" { target "search_liveindexing" { matrix = { - liveindexing = ["metadata", "path"] + liveindexing = ["metadata", "path", "aio"] } name = "search_liveindexing-${liveindexing}" args = { diff --git a/search/enterprise/common/artifacts.json b/search/enterprise/common/artifacts.json index 01775474..a192bc2c 100644 --- a/search/enterprise/common/artifacts.json +++ b/search/enterprise/common/artifacts.json @@ -14,6 +14,13 @@ "path": "search/enterprise/common", "classifier": "-app.jar", "group": "org.alfresco" + }, + { + "name": "alfresco-elasticsearch-live-indexing", + "version": "4.0.1", + "path": "search/enterprise/common", + "classifier": "-aio-app.jar", + "group": "org.alfresco" } ] } From 42fab2ec885c08596457092120e2c4a76c3c91a6 Mon Sep 17 00:00:00 2001 From: pmacius Date: Mon, 22 Jul 2024 09:55:27 +0200 Subject: [PATCH 02/13] test --- docker-bake.hcl | 2 +- search/enterprise/common/artifacts.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index ede5e6d6..7d1e620e 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -155,7 +155,7 @@ target "repository" { target "search_liveindexing" { matrix = { - liveindexing = ["metadata", "path", "aio"] + liveindexing = ["metadata", "path", ""] } name = "search_liveindexing-${liveindexing}" args = { diff --git a/search/enterprise/common/artifacts.json b/search/enterprise/common/artifacts.json index a192bc2c..d396f06b 100644 --- a/search/enterprise/common/artifacts.json +++ b/search/enterprise/common/artifacts.json @@ -19,7 +19,7 @@ "name": "alfresco-elasticsearch-live-indexing", "version": "4.0.1", "path": "search/enterprise/common", - "classifier": "-aio-app.jar", + "classifier": "-app.jar", "group": "org.alfresco" } ] From 09ceea4af5ed89074f77c0fd78c55978a00b46ca Mon Sep 17 00:00:00 2001 From: pmacius Date: Mon, 22 Jul 2024 10:00:03 +0200 Subject: [PATCH 03/13] test --- docker-bake.hcl | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index 7d1e620e..88711e36 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -155,7 +155,7 @@ target "repository" { target "search_liveindexing" { matrix = { - liveindexing = ["metadata", "path", ""] + liveindexing = ["metadata", "path"] } name = "search_liveindexing-${liveindexing}" args = { @@ -173,3 +173,21 @@ target "search_liveindexing" { tags = ["alfresco-elasticsearch-live-indexing-${liveindexing}:latest"] output = ["type=docker"] } + +target "search_liveindexing-aio" { + name = "search_liveindexing-aio" + args = { + LIVEINDEXING = "alfresco-elasticsearch-live-indexing" + } + dockerfile = "./search/enterprise/common/Dockerfile" + inherits = ["java_base"] + contexts = { + java_base = "target:java_base" + } + labels = { + "org.opencontainers.image.title" = "${PRODUCT_LINE} Enterprise Search - All in one" + "org.opencontainers.image.description" = "${PRODUCT_LINE} Enterprise Search - All in one live indexing" + } + tags = ["alfresco-elasticsearch-live-indexing:latest"] + output = ["type=docker"] +} From cb28625aea91d57e8e6f1fd231133ce7f500901e Mon Sep 17 00:00:00 2001 From: pmacius Date: Mon, 22 Jul 2024 10:02:31 +0200 Subject: [PATCH 04/13] test --- docker-bake.hcl | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index 88711e36..1fab5e5d 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -175,7 +175,6 @@ target "search_liveindexing" { } target "search_liveindexing-aio" { - name = "search_liveindexing-aio" args = { LIVEINDEXING = "alfresco-elasticsearch-live-indexing" } From 97307e2fe5c4cc9877a5a50bfc0b5a9324740376 Mon Sep 17 00:00:00 2001 From: pmacius Date: Mon, 22 Jul 2024 10:11:07 +0200 Subject: [PATCH 05/13] test --- docker-bake.hcl | 19 +------------------ scripts/fetch-artifact.sh | 3 ++- search/enterprise/common/artifacts.json | 3 ++- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index 1fab5e5d..ede5e6d6 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -155,7 +155,7 @@ target "repository" { target "search_liveindexing" { matrix = { - liveindexing = ["metadata", "path"] + liveindexing = ["metadata", "path", "aio"] } name = "search_liveindexing-${liveindexing}" args = { @@ -173,20 +173,3 @@ target "search_liveindexing" { tags = ["alfresco-elasticsearch-live-indexing-${liveindexing}:latest"] output = ["type=docker"] } - -target "search_liveindexing-aio" { - args = { - LIVEINDEXING = "alfresco-elasticsearch-live-indexing" - } - dockerfile = "./search/enterprise/common/Dockerfile" - inherits = ["java_base"] - contexts = { - java_base = "target:java_base" - } - labels = { - "org.opencontainers.image.title" = "${PRODUCT_LINE} Enterprise Search - All in one" - "org.opencontainers.image.description" = "${PRODUCT_LINE} Enterprise Search - All in one live indexing" - } - tags = ["alfresco-elasticsearch-live-indexing:latest"] - output = ["type=docker"] -} diff --git a/scripts/fetch-artifact.sh b/scripts/fetch-artifact.sh index 5bc86fe7..f32d0b3f 100755 --- a/scripts/fetch-artifact.sh +++ b/scripts/fetch-artifact.sh @@ -16,8 +16,9 @@ for i in $(find . -name artifacts.json -mindepth 2); do ARTIFACT_EXT=$(jq -r ".artifacts.acs${INDEX_KEY}[$j].classifier" $i) ARTIFACT_GROUP=$(jq -r ".artifacts.acs${INDEX_KEY}[$j].group" $i) ARTIFACT_PATH=$(jq -r ".artifacts.acs${INDEX_KEY}[$j].path" $i) + ARRIFACT_NAME_ADDON=$(jq -r ".artifacts.acs${INDEX_KEY}[$j].name_addon" $i) echo "Downloading $ARTIFACT_GROUP:$ARTIFACT_NAME $ARTIFACT_VERSION from $ARTIFACT_BASEURL" wget "${ARTIFACT_BASEURL}/${ARTIFACT_GROUP/\./\/}/${ARTIFACT_NAME}/${ARTIFACT_VERSION}/${ARTIFACT_NAME}-${ARTIFACT_VERSION}${ARTIFACT_EXT}" \ - -O ${ARTIFACT_PATH}/${ARTIFACT_NAME}-${ARTIFACT_VERSION}${ARTIFACT_EXT} + -O ${ARTIFACT_PATH}/${ARTIFACT_NAME}${ARRIFACT_NAME_ADDON}-${ARTIFACT_VERSION}${ARTIFACT_EXT} done done diff --git a/search/enterprise/common/artifacts.json b/search/enterprise/common/artifacts.json index d396f06b..da0e288f 100644 --- a/search/enterprise/common/artifacts.json +++ b/search/enterprise/common/artifacts.json @@ -20,7 +20,8 @@ "version": "4.0.1", "path": "search/enterprise/common", "classifier": "-app.jar", - "group": "org.alfresco" + "group": "org.alfresco", + "name_addon": "-aio" } ] } From 0925148cb7b13e02efd6715b52911f8e4637a969 Mon Sep 17 00:00:00 2001 From: pmacius Date: Mon, 22 Jul 2024 10:14:55 +0200 Subject: [PATCH 06/13] add name addon to all --- repository/artifacts.json | 3 ++- search/enterprise/common/artifacts.json | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/repository/artifacts.json b/repository/artifacts.json index 7090e3d7..6bbaa103 100644 --- a/repository/artifacts.json +++ b/repository/artifacts.json @@ -6,7 +6,8 @@ "version": "23.2.2", "path": "repository", "classifier": ".zip", - "group": "org.alfresco" + "group": "org.alfresco", + "name_addon": "" } ] } diff --git a/search/enterprise/common/artifacts.json b/search/enterprise/common/artifacts.json index da0e288f..0226f882 100644 --- a/search/enterprise/common/artifacts.json +++ b/search/enterprise/common/artifacts.json @@ -6,14 +6,16 @@ "version": "4.0.1", "path": "search/enterprise/common", "classifier": "-app.jar", - "group": "org.alfresco" + "group": "org.alfresco", + "name_addon": "" }, { "name": "alfresco-elasticsearch-live-indexing-path", "version": "4.0.1", "path": "search/enterprise/common", "classifier": "-app.jar", - "group": "org.alfresco" + "group": "org.alfresco", + "name_addon": "" }, { "name": "alfresco-elasticsearch-live-indexing", From 3dc863532a6b73399213c948a148cec9c992accb Mon Sep 17 00:00:00 2001 From: pmacius Date: Mon, 22 Jul 2024 10:23:50 +0200 Subject: [PATCH 07/13] add readme --- search/enterprise/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/search/enterprise/README.md b/search/enterprise/README.md index ca5c17c9..9ae4f183 100644 --- a/search/enterprise/README.md +++ b/search/enterprise/README.md @@ -31,3 +31,20 @@ live-indexing-path: - `SPRING_ELASTICSEARCH_REST_URIS` - Elasticsearch server, by default `http://elasticsearch:9200` - `SPRING_ACTIVEMQ_BROKERURL` - Alfresco ActiveMQ, by default `nio://activemq:61616` + +## all-in-one + +```yaml + +live-indexing: + image: alfresco-enterprise-search-aio:YOUR-TAG + environment: + SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200 + SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 + ALFRESCO_SHAREDFILESTORE_BASEURL: http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file/ + +``` + +- `SPRING_ELASTICSEARCH_REST_URIS` - Elasticsearch server, by default `http://elasticsearch:9200` +- `SPRING_ACTIVEMQ_BROKERURL` - Alfresco ActiveMQ, by default `nio://activemq:61616` +- `ALFRESCO_SHAREDFILESTORE_BASEURL` - Alfresco Shared FileStore endpoint, by default `http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file/` From a1fbe6e881a629b552a07b44d7211cdae2c6fe24 Mon Sep 17 00:00:00 2001 From: pmacius Date: Mon, 22 Jul 2024 12:23:12 +0200 Subject: [PATCH 08/13] test --- docker-bake.hcl | 6 +++--- repository/artifacts.json | 3 +-- scripts/fetch-artifact.sh | 3 +-- search/enterprise/common/Dockerfile | 2 +- search/enterprise/common/artifacts.json | 9 +++------ 5 files changed, 9 insertions(+), 14 deletions(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index ede5e6d6..4c4b5a88 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -155,9 +155,9 @@ target "repository" { target "search_liveindexing" { matrix = { - liveindexing = ["metadata", "path", "aio"] + liveindexing = ["alfresco-elasticsearch-live-indexing-metadata", "alfresco-elasticsearch-live-indexing-path", "alfresco-elasticsearch-live-indexing"] } - name = "search_liveindexing-${liveindexing}" + name = "${liveindexing}" args = { LIVEINDEXING = "${liveindexing}" } @@ -170,6 +170,6 @@ target "search_liveindexing" { "org.opencontainers.image.title" = "${PRODUCT_LINE} Enterprise Search - ${liveindexing}" "org.opencontainers.image.description" = "${PRODUCT_LINE} Enterprise Search - ${liveindexing} live indexing" } - tags = ["alfresco-elasticsearch-live-indexing-${liveindexing}:latest"] + tags = ["${liveindexing}:latest"] output = ["type=docker"] } diff --git a/repository/artifacts.json b/repository/artifacts.json index 6bbaa103..7090e3d7 100644 --- a/repository/artifacts.json +++ b/repository/artifacts.json @@ -6,8 +6,7 @@ "version": "23.2.2", "path": "repository", "classifier": ".zip", - "group": "org.alfresco", - "name_addon": "" + "group": "org.alfresco" } ] } diff --git a/scripts/fetch-artifact.sh b/scripts/fetch-artifact.sh index f32d0b3f..5bc86fe7 100755 --- a/scripts/fetch-artifact.sh +++ b/scripts/fetch-artifact.sh @@ -16,9 +16,8 @@ for i in $(find . -name artifacts.json -mindepth 2); do ARTIFACT_EXT=$(jq -r ".artifacts.acs${INDEX_KEY}[$j].classifier" $i) ARTIFACT_GROUP=$(jq -r ".artifacts.acs${INDEX_KEY}[$j].group" $i) ARTIFACT_PATH=$(jq -r ".artifacts.acs${INDEX_KEY}[$j].path" $i) - ARRIFACT_NAME_ADDON=$(jq -r ".artifacts.acs${INDEX_KEY}[$j].name_addon" $i) echo "Downloading $ARTIFACT_GROUP:$ARTIFACT_NAME $ARTIFACT_VERSION from $ARTIFACT_BASEURL" wget "${ARTIFACT_BASEURL}/${ARTIFACT_GROUP/\./\/}/${ARTIFACT_NAME}/${ARTIFACT_VERSION}/${ARTIFACT_NAME}-${ARTIFACT_VERSION}${ARTIFACT_EXT}" \ - -O ${ARTIFACT_PATH}/${ARTIFACT_NAME}${ARRIFACT_NAME_ADDON}-${ARTIFACT_VERSION}${ARTIFACT_EXT} + -O ${ARTIFACT_PATH}/${ARTIFACT_NAME}-${ARTIFACT_VERSION}${ARTIFACT_EXT} done done diff --git a/search/enterprise/common/Dockerfile b/search/enterprise/common/Dockerfile index d01c5b87..d525d755 100644 --- a/search/enterprise/common/Dockerfile +++ b/search/enterprise/common/Dockerfile @@ -4,7 +4,7 @@ ARG LIVEINDEXING ENV PORT=8080 EXPOSE 8080 -ADD search/enterprise/common/*${LIVEINDEXING}*-app.jar /opt/app.jar +ADD search/enterprise/common/${LIVEINDEXING}*-app.jar /opt/app.jar HEALTHCHECK --interval=30s --timeout=3s --retries=3 --start-period=1m \ CMD curl -f http://localhost:8080/actuator/health || exit 1 diff --git a/search/enterprise/common/artifacts.json b/search/enterprise/common/artifacts.json index 0226f882..d396f06b 100644 --- a/search/enterprise/common/artifacts.json +++ b/search/enterprise/common/artifacts.json @@ -6,24 +6,21 @@ "version": "4.0.1", "path": "search/enterprise/common", "classifier": "-app.jar", - "group": "org.alfresco", - "name_addon": "" + "group": "org.alfresco" }, { "name": "alfresco-elasticsearch-live-indexing-path", "version": "4.0.1", "path": "search/enterprise/common", "classifier": "-app.jar", - "group": "org.alfresco", - "name_addon": "" + "group": "org.alfresco" }, { "name": "alfresco-elasticsearch-live-indexing", "version": "4.0.1", "path": "search/enterprise/common", "classifier": "-app.jar", - "group": "org.alfresco", - "name_addon": "-aio" + "group": "org.alfresco" } ] } From d3c4b62f068d2ee8ed28c8458d57559979096fb3 Mon Sep 17 00:00:00 2001 From: pmacius Date: Mon, 22 Jul 2024 12:34:45 +0200 Subject: [PATCH 09/13] test all in one image --- docker-compose/docker-compose.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index 59a5c2af..5a4b3a30 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -181,16 +181,12 @@ services: -XX:MaxRAMPercentage=80 ports: - "9090:9090" - live-indexing-metadata: - image: alfresco-elasticsearch-live-indexing-metadata:latest - environment: - SPRING_ELASTICSEARCH_REST_URIS: http://elastic:9200 - SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 - live-indexing-path: - image: alfresco-elasticsearch-live-indexing-path:latest + live-indexing: + image: alfresco-elasticsearch-live-indexing:latest environment: SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200 SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 + ALFRESCO_SHAREDFILESTORE_BASEURL: http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file/ volumes: shared-file-store-volume: driver_opts: From 546725549251d0e79abf7a5d8d665c14b57b219c Mon Sep 17 00:00:00 2001 From: pmacius Date: Mon, 22 Jul 2024 16:26:52 +0200 Subject: [PATCH 10/13] test --- .github/workflows/build_and_test.yml | 34 +++- docker-compose/docker-compose-components.yml | 194 +++++++++++++++++++ 2 files changed, 227 insertions(+), 1 deletion(-) create mode 100644 docker-compose/docker-compose-components.yml diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 48239ff0..9fc458f0 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -37,12 +37,44 @@ jobs: - name: Show all images run: docker images + - name: Docker save the images produced by the bake action with the name consisting alfresco + run: | + docker save -o alfresco-docker-images.tar $(docker images --format "{{.Repository}}:{{.Tag}}" | grep alfresco) + + - name: Upload image as a tar for next job + uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # 4.3.4 + with: + name: ${{ github.run_number }} + path: /tmp/alfresco-docker-images.tar + + compose-test: + name: compose-test ${{ matrix.docker-compose-file }} + needs: build-test + runs-on: ubuntu-latest + strategy: + matrix: + docker-compose-file: [docker-compose.yml, docker-compose-components.yml] + steps: + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@2ad185228a349d19414702819e06df9fa4314287 # 3.4.0 + + - name: Download artifacts + uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8 + with: + path: /tmp + name: "${{ github.run_number }}" + + - name: Load Docker images + run: | + ls -1 /tmp/*.tar | xargs --no-run-if-empty -L 1 docker load -i + docker image ls -a + - name: Verify docker-compose uses: Alfresco/alfresco-build-tools/.github/actions/dbp-charts/verify-compose@v5.34.0 timeout-minutes: 10 with: compose_pull: false - compose_file_path: docker-compose/docker-compose.yml + compose_file_path: docker-compose/${{ matrix.docker-compose-file }} quay_username: ${{ secrets.QUAY_USERNAME }} quay_password: ${{ secrets.QUAY_PASSWORD }} diff --git a/docker-compose/docker-compose-components.yml b/docker-compose/docker-compose-components.yml new file mode 100644 index 00000000..5a4b3a30 --- /dev/null +++ b/docker-compose/docker-compose-components.yml @@ -0,0 +1,194 @@ +version: "2" +services: + alfresco: + image: quay.io/alfresco/alfresco-content-repository:23.2.2 + mem_limit: 1900m + environment: + JAVA_TOOL_OPTIONS: >- + -Dencryption.keystore.type=JCEKS + -Dencryption.cipherAlgorithm=DESede/CBC/PKCS5Padding + -Dencryption.keyAlgorithm=DESede + -Dencryption.keystore.location=/usr/local/tomcat/shared/classes/alfresco/extension/keystore/keystore + -Dmetadata-keystore.password=mp6yc0UD9e + -Dmetadata-keystore.aliases=metadata + -Dmetadata-keystore.metadata.password=oKIWzVdEdA + -Dmetadata-keystore.metadata.algorithm=DESede + 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 + 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.1.2 + environment: + JAVA_OPTS: >- + -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=80 + ACTIVEMQ_URL: nio://activemq:61616 + CORE_AIO_URL: http://transform-core-aio:8090 + FILE_STORE_URL: >- + http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file + ports: + - "8095:8095" + depends_on: + - activemq + transform-core-aio: + image: alfresco/alfresco-transform-core-aio:5.1.2 + mem_limit: 1536m + environment: + JAVA_OPTS: >- + -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=80 + ACTIVEMQ_URL: nio://activemq:61616 + FILE_STORE_URL: >- + http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file + ports: + - "8090:8090" + depends_on: + - activemq + shared-file-store: + image: quay.io/alfresco/alfresco-shared-file-store:4.1.2 + mem_limit: 512m + environment: + JAVA_OPTS: >- + -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=80 + scheduler.content.age.millis: 86400000 + scheduler.cleanup.interval: 86400000 + ports: + - "8099:8099" + volumes: + - shared-file-store-volume:/tmp/Alfresco/sfs + share: + image: quay.io/alfresco/alfresco-share:23.2.1 + mem_limit: 1g + environment: + REPO_HOST: "alfresco" + REPO_PORT: "8080" + JAVA_OPTS: >- + -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=80 + -Dalfresco.host=localhost + -Dalfresco.port=8080 + -Dalfresco.context=alfresco + -Dalfresco.protocol=http + postgres: + image: postgres:14.4 + mem_limit: 512m + environment: + - POSTGRES_PASSWORD=alfresco + - POSTGRES_USER=alfresco + - POSTGRES_DB=alfresco + command: postgres -c max_connections=300 -c log_min_messages=LOG + ports: + - "5432:5432" + 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 + activemq: + image: alfresco/alfresco-activemq:5.18-jre17-rockylinux8 + mem_limit: 1g + ports: + - "8161:8161" # Web Console + - "5672:5672" # AMQP + - "61616:61616" # OpenWire + - "61613:61613" # STOMP + digital-workspace: + image: quay.io/alfresco/alfresco-digital-workspace:4.4.1 + mem_limit: 128m + environment: + APP_CONFIG_PROVIDER: "ECM" + APP_CONFIG_AUTH_TYPE: "BASIC" + BASE_PATH: ./ + APP_CONFIG_PLUGIN_PROCESS_SERVICE: "false" + APP_CONFIG_PLUGIN_MICROSOFT_ONLINE: "false" + APP_BASE_SHARE_URL: "http://localhost:8080/workspace/#/preview/s" + control-center: + image: quay.io/alfresco/alfresco-control-center:8.4.1 + mem_limit: 128m + environment: + APP_CONFIG_PROVIDER: "ECM" + APP_CONFIG_AUTH_TYPE: "BASIC" + BASE_PATH: ./ + proxy: + image: alfresco/alfresco-acs-nginx:3.4.2 + mem_limit: 128m + ports: + - "8080:8080" + depends_on: + - digital-workspace + - alfresco + - share + - control-center + sync-service: + image: quay.io/alfresco/service-sync:4.0.1 + mem_limit: 1g + environment: + JAVA_OPTS: >- + -Dsql.db.driver=org.postgresql.Driver + -Dsql.db.url=jdbc:postgresql://postgres:5432/alfresco + -Dsql.db.username=alfresco + -Dsql.db.password=alfresco + -Dmessaging.broker.host=activemq + -Drepo.hostname=alfresco + -Drepo.port=8080 + -Ddw.server.applicationConnectors[0].type=http + -XX:MinRAMPercentage=50 + -XX:MaxRAMPercentage=80 + ports: + - "9090:9090" + live-indexing: + image: alfresco-elasticsearch-live-indexing:latest + environment: + SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200 + SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 + ALFRESCO_SHAREDFILESTORE_BASEURL: http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file/ +volumes: + shared-file-store-volume: + driver_opts: + type: tmpfs + device: tmpfs From f380beccd0fe617bf4dba417ef283237c0164013 Mon Sep 17 00:00:00 2001 From: pmacius Date: Mon, 22 Jul 2024 16:33:12 +0200 Subject: [PATCH 11/13] test --- .github/workflows/build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 9fc458f0..523a55a2 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -39,7 +39,7 @@ jobs: - name: Docker save the images produced by the bake action with the name consisting alfresco run: | - docker save -o alfresco-docker-images.tar $(docker images --format "{{.Repository}}:{{.Tag}}" | grep alfresco) + docker save -o /tmp/alfresco-docker-images.tar $(docker images --format "{{.Repository}}:{{.Tag}}" | grep alfresco) - name: Upload image as a tar for next job uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # 4.3.4 From c585f51615f1964bd9bfa1559641df6dd62729c9 Mon Sep 17 00:00:00 2001 From: pmacius Date: Mon, 22 Jul 2024 16:38:31 +0200 Subject: [PATCH 12/13] add componets to docker file components --- docker-compose/docker-compose-components.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/docker-compose/docker-compose-components.yml b/docker-compose/docker-compose-components.yml index 5a4b3a30..fbb63eb2 100644 --- a/docker-compose/docker-compose-components.yml +++ b/docker-compose/docker-compose-components.yml @@ -181,12 +181,22 @@ services: -XX:MaxRAMPercentage=80 ports: - "9090:9090" - live-indexing: - image: alfresco-elasticsearch-live-indexing:latest + live-indexing-metadata: + image: alfresco-elasticsearch-live-indexing-metadata:latest + environment: + SPRING_ELASTICSEARCH_REST_URIS: http://elastic:9200 + SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 + live-indexing-path: + image: alfresco-elasticsearch-live-indexing-path:latest + environment: + SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200 + SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 + live-indexing-content: + image: alfresco-elasticsearch-live-indexing-content:latest environment: SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200 SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 - ALFRESCO_SHAREDFILESTORE_BASEURL: http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file/ + ALFRESCO_SHAREDFILESTORE_BASEURL: http://shared-file-store:8099/alfresco/api/-default-/private/sfs/versions/1/file volumes: shared-file-store-volume: driver_opts: From e15587a42296ae7bd0fdf2eb1957d5238aa876e3 Mon Sep 17 00:00:00 2001 From: pmacius Date: Tue, 23 Jul 2024 09:54:20 +0200 Subject: [PATCH 13/13] change matrix --- docker-bake.hcl | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index 4390a007..b1064ce4 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -155,11 +155,28 @@ target "repository" { target "search_liveindexing" { matrix = { - liveindexing = ["alfresco-elasticsearch-live-indexing-metadata", "alfresco-elasticsearch-live-indexing-path", "alfresco-elasticsearch-live-indexing-content", "alfresco-elasticsearch-live-indexing"] + liveindexing = [ + { + artifact = "alfresco-elasticsearch-live-indexing-metadata", + name = "metadata" + }, + { + artifact = "alfresco-elasticsearch-live-indexing-path", + name = "path" + }, + { + artifact = "alfresco-elasticsearch-live-indexing-content", + name = "content" + }, + { + artifact = "alfresco-elasticsearch-live-indexing", + name = "all-in-one" + } + ] } - name = "${liveindexing}" + name = "${liveindexing.artifact}" args = { - LIVEINDEXING = "${liveindexing}" + LIVEINDEXING = "${liveindexing.artifact}" } dockerfile = "./search/enterprise/common/Dockerfile" inherits = ["java_base"] @@ -167,9 +184,9 @@ target "search_liveindexing" { java_base = "target:java_base" } labels = { - "org.opencontainers.image.title" = "${PRODUCT_LINE} Enterprise Search - ${liveindexing}" - "org.opencontainers.image.description" = "${PRODUCT_LINE} Enterprise Search - ${liveindexing} live indexing" + "org.opencontainers.image.title" = "${PRODUCT_LINE} Enterprise Search - ${liveindexing.name}" + "org.opencontainers.image.description" = "${PRODUCT_LINE} Enterprise Search - ${liveindexing.name} live indexing" } - tags = ["${liveindexing}:latest"] + tags = ["${liveindexing.artifact}:latest"] output = ["type=docker"] }