From a447269f3036d545e25fad092887ac21aeca2a65 Mon Sep 17 00:00:00 2001 From: pmacius Date: Wed, 17 Jul 2024 17:41:07 +0200 Subject: [PATCH 1/6] OPSEXP-2734 Add search enterprise path image Dockerfile --- .github/workflows/build_and_test.yml | 8 +++++++- search/enterprise/{metadata => common}/Dockerfile | 4 ++-- search/enterprise/{metadata => common}/entrypoint.sh | 0 3 files changed, 9 insertions(+), 3 deletions(-) rename search/enterprise/{metadata => common}/Dockerfile (68%) rename search/enterprise/{metadata => common}/entrypoint.sh (100%) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index e2ade56c..a1f38d45 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -11,7 +11,13 @@ jobs: - artifact: alfresco-elasticsearch-live-indexing-metadata version: 4.0.1 name: alfresco-enterprise-search-metadata - path: search/enterprise/metadata + path: search/enterprise/common + classifier: -app.jar + group: org.alfresco + - artifact: alfresco-elasticsearch-live-indexing-path + version: 4.0.1 + name: alfresco-enterprise-search-path + path: search/enterprise/common classifier: -app.jar group: org.alfresco diff --git a/search/enterprise/metadata/Dockerfile b/search/enterprise/common/Dockerfile similarity index 68% rename from search/enterprise/metadata/Dockerfile rename to search/enterprise/common/Dockerfile index cba8b51b..e0ec51da 100644 --- a/search/enterprise/metadata/Dockerfile +++ b/search/enterprise/common/Dockerfile @@ -3,10 +3,10 @@ FROM quay.io/alfresco/alfresco-base-java:jre17-rockylinux9 ENV PORT=8080 EXPOSE 8080 -ADD search/enterprise/metadata/*-app.jar /opt/app.jar +ADD search/enterprise/common/*-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 -COPY search/enterprise/metadata/entrypoint.sh /entrypoint.sh +COPY search/enterprise/common/entrypoint.sh /entrypoint.sh CMD ["/entrypoint.sh"] diff --git a/search/enterprise/metadata/entrypoint.sh b/search/enterprise/common/entrypoint.sh similarity index 100% rename from search/enterprise/metadata/entrypoint.sh rename to search/enterprise/common/entrypoint.sh From a2d6d8f5023fcd1cd7aa161357821d0fe5080797 Mon Sep 17 00:00:00 2001 From: pmacius Date: Wed, 17 Jul 2024 17:42:58 +0200 Subject: [PATCH 2/6] add readme and compose --- docker-compose/docker-compose.yml | 5 +++++ search/enterprise/README.md | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/docker-compose/docker-compose.yml b/docker-compose/docker-compose.yml index 12a0c11c..a52d5d14 100644 --- a/docker-compose/docker-compose.yml +++ b/docker-compose/docker-compose.yml @@ -186,6 +186,11 @@ services: environment: SPRING_ELASTICSEARCH_REST_URIS: http://elastic:9200 SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 + live-indexing-path: + image: alfresco-enterprise-search-path:test + environment: + SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200 + SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 volumes: shared-file-store-volume: driver_opts: diff --git a/search/enterprise/README.md b/search/enterprise/README.md index ea229842..ca5c17c9 100644 --- a/search/enterprise/README.md +++ b/search/enterprise/README.md @@ -16,3 +16,18 @@ live-indexing-metadata: - `SPRING_ELASTICSEARCH_REST_URIS` - Elasticsearch server, by default `http://elasticsearch:9200` - `SPRING_ACTIVEMQ_BROKERURL` - Alfresco ActiveMQ, by default `nio://activemq:61616` + +## path + +```yaml + +live-indexing-path: + image: alfresco-enterprise-search-path:YOUR-TAG + environment: + SPRING_ELASTICSEARCH_REST_URIS: http://elasticsearch:9200 + SPRING_ACTIVEMQ_BROKERURL: nio://activemq:61616 + +``` + +- `SPRING_ELASTICSEARCH_REST_URIS` - Elasticsearch server, by default `http://elasticsearch:9200` +- `SPRING_ACTIVEMQ_BROKERURL` - Alfresco ActiveMQ, by default `nio://activemq:61616` From d96783dd6dfe65e247c9d156502d13276280331a Mon Sep 17 00:00:00 2001 From: pmacius Date: Wed, 17 Jul 2024 17:48:44 +0200 Subject: [PATCH 3/6] fix --- .github/workflows/build_and_test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index a1f38d45..d7a33adc 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -70,7 +70,7 @@ jobs: - name: Upload image as a tar for next job uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # 4.3.4 with: - name: images + name: ${{ matrix.images.name }}-${{ github.run_number }} path: /tmp/${{ matrix.images.name }}.tar compose: @@ -84,7 +84,6 @@ jobs: - name: Download artifacts uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8 with: - name: images path: /tmp - name: Load Docker images From abd47ce958e75533d0b0fdddc0dbb64b4f31bb68 Mon Sep 17 00:00:00 2001 From: pmacius Date: Wed, 17 Jul 2024 17:57:14 +0200 Subject: [PATCH 4/6] fix --- .github/workflows/build_and_test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index d7a33adc..c1dadcd8 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -85,6 +85,7 @@ jobs: uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8 with: path: /tmp + pattern: "*-${{ github.run_number }}" - name: Load Docker images run: | From e2e5202b5e679b72930b8a05e7a2d909e48c3309 Mon Sep 17 00:00:00 2001 From: pmacius Date: Wed, 17 Jul 2024 18:03:40 +0200 Subject: [PATCH 5/6] fix --- .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 c1dadcd8..12c99e5b 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -89,7 +89,7 @@ jobs: - name: Load Docker images run: | - ls -1 /tmp/*.tar | xargs --no-run-if-empty -L 1 docker load -i + ls -1 /tmp/*${{ github.run_number }} | xargs --no-run-if-empty -L 1 docker load -i docker image ls -a - name: Verify docker-compose From ddd2323c2e787735ca2c2087eed90c3dfb5c1e00 Mon Sep 17 00:00:00 2001 From: pmacius Date: Wed, 17 Jul 2024 18:15:02 +0200 Subject: [PATCH 6/6] same save path --- .github/workflows/build_and_test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 12c99e5b..3089ad97 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -86,10 +86,11 @@ jobs: with: path: /tmp pattern: "*-${{ github.run_number }}" + merge-multiple: true - name: Load Docker images run: | - ls -1 /tmp/*${{ github.run_number }} | xargs --no-run-if-empty -L 1 docker load -i + ls -1 /tmp/*.tar | xargs --no-run-if-empty -L 1 docker load -i docker image ls -a - name: Verify docker-compose