From c769b179b0a3a12993a57408c73a0af24ccb20d8 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Thu, 17 Oct 2024 17:00:16 +0200 Subject: [PATCH 1/7] test renditions with latest --- .github/workflows/helm-enterprise.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/helm-enterprise.yml b/.github/workflows/helm-enterprise.yml index 5a3eeabeb..c4aa80f12 100644 --- a/.github/workflows/helm-enterprise.yml +++ b/.github/workflows/helm-enterprise.yml @@ -119,8 +119,7 @@ jobs: echo "Enabling clustered tests via auto-scaling: 2 replicas max" echo "Renditions tests will be skipped because particularly flaky on clustered runs" - echo "helm_install_params=--values test/autoscaling-hpa-test-values.yaml \ - --set dtas.additionalArgs[0]='-k not test_renditions'" >> "$GITHUB_OUTPUT" + echo "helm_install_params=--values test/autoscaling-hpa-test-values.yaml" >> "$GITHUB_OUTPUT" fi - name: Add dependency chart repos From 25c7f33426bce2dc4787ec68f8fad29bdec8ff6e Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Thu, 17 Oct 2024 17:49:46 +0200 Subject: [PATCH 2/7] add logs --- .github/workflows/helm-community.yml | 16 ++++++++++++++++ .github/workflows/helm-enterprise.yml | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/.github/workflows/helm-community.yml b/.github/workflows/helm-community.yml index 27c3097b2..102e7d1f7 100644 --- a/.github/workflows/helm-community.yml +++ b/.github/workflows/helm-community.yml @@ -91,6 +91,7 @@ jobs: helm repo add elastic https://helm.elastic.co/ - name: Helm install + id: helm_install run: | helm dep build . helm install ${{ matrix.name }} . \ @@ -128,3 +129,18 @@ jobs: helm ls --all-namespaces kubectl get all --all-namespaces kubectl describe pod + + - name: Collect logs from all containers + if: always() && steps.helm_install.outcome != 'skipped' + run: | + mkdir -p logs + for pod in $(kubectl get pods -n default -o jsonpath='{.items[*].metadata.name}'); do + kubectl logs $pod -n default > logs/${pod}.log + done + + - name: Upload logs as artifact + if: always() && steps.helm_install.outcome != 'skipped' + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 #v4.4.0 + with: + name: k8s-logs-${{ matrix.name }}-${{ matrix.values }} + path: logs diff --git a/.github/workflows/helm-enterprise.yml b/.github/workflows/helm-enterprise.yml index c4aa80f12..3567e9373 100644 --- a/.github/workflows/helm-enterprise.yml +++ b/.github/workflows/helm-enterprise.yml @@ -128,6 +128,7 @@ jobs: helm repo add elastic https://helm.elastic.co/ - name: Helm install + id: helm_install run: >- helm dep build ./helm/alfresco-content-services && helm install acs ./helm/alfresco-content-services @@ -217,3 +218,18 @@ jobs: kubectl get all --all-namespaces kubectl describe pod kubectl events --for deployment/acs-alfresco-repository + + - name: Collect logs from all containers + if: always() && steps.helm_install.outcome != 'skipped' + run: | + mkdir -p logs + for pod in $(kubectl get pods -n default -o jsonpath='{.items[*].metadata.name}'); do + kubectl logs $pod -n default > logs/${pod}.log + done + + - name: Upload logs as artifact + if: always() && steps.helm_install.outcome != 'skipped' + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 #v4.4.0 + with: + name: k8s-logs-${{ matrix.name }}-${{ matrix.values }} + path: logs From 65ca00cec4b40223a1e29bd710cd00feac3ba7ee Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Thu, 17 Oct 2024 18:01:31 +0200 Subject: [PATCH 3/7] fixup echos --- .github/workflows/helm-enterprise.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/helm-enterprise.yml b/.github/workflows/helm-enterprise.yml index 3567e9373..6e0d7c275 100644 --- a/.github/workflows/helm-enterprise.yml +++ b/.github/workflows/helm-enterprise.yml @@ -204,10 +204,10 @@ jobs: exit 1 else echo "Got $SETSIZE" - echo -n "Now waiting for scale down" + echo "Now waiting for scale down" kubectl patch hpa acs-alfresco-repository \ -p '{"spec": {"behavior": {"scaleDown": {"stabilizationWindowSeconds": 20}}}}' - echo -n "(speeding scale down up)... " + echo "(speeding scale down up)... " kubectl wait --timeout=2m --for=jsonpath='spec.replicas'=1 deployment/acs-alfresco-repository echo "Scale down completed" fi From 65e47cfcd3020e9d63fe6849bdb6f4757a4cc019 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Thu, 17 Oct 2024 18:03:48 +0200 Subject: [PATCH 4/7] fix helm watch --- test/enterprise-integration-test-values.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/enterprise-integration-test-values.yaml b/test/enterprise-integration-test-values.yaml index 085fec012..f7c3e58c2 100644 --- a/test/enterprise-integration-test-values.yaml +++ b/test/enterprise-integration-test-values.yaml @@ -46,6 +46,8 @@ elasticsearch: cpu: "1" memory: "1Gi" alfresco-search-enterprise: + reindexing: + hookExecution: false resources: requests: cpu: "0.1" From ec66f322509720e0b077ba1710bcd0dc1ac3554f Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Fri, 18 Oct 2024 16:38:45 +0200 Subject: [PATCH 5/7] replicaCount=2 everywhere --- .github/workflows/helm-enterprise.yml | 35 +-------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/.github/workflows/helm-enterprise.yml b/.github/workflows/helm-enterprise.yml index 6e0d7c275..ce8167ebc 100644 --- a/.github/workflows/helm-enterprise.yml +++ b/.github/workflows/helm-enterprise.yml @@ -115,12 +115,7 @@ jobs: - name: Check if we want additional helm customizations id: configurable-extra-values run: | - if [ "${{ matrix.values }}" = "values.yaml" -o "${{ matrix.values }}" = "pre-release_values.yaml" ]; then - echo "Enabling clustered tests via auto-scaling: 2 replicas max" - echo "Renditions tests will be skipped because particularly flaky on clustered runs" - - echo "helm_install_params=--values test/autoscaling-hpa-test-values.yaml" >> "$GITHUB_OUTPUT" - fi + echo "helm_install_params=--set alfresco-repository.replicaCount=2" >> "$GITHUB_OUTPUT" - name: Add dependency chart repos run: | @@ -191,34 +186,6 @@ jobs: kubectl describe pod kubectl events --for deployment/acs-alfresco-repository - - name: Check HPA behavior during tests - id: hpa_check - if: always() && (matrix.values == 'values.yaml' || matrix.values == 'pre-release_values.yaml') && steps.helm_test.outcome != 'skipped' - run: | - echo "Checking current repo hpa status" - kubectl get hpa acs-alfresco-repository - echo -n "Repository should have 2 replicas after Helm test... " - SETSIZE=$(kubectl get deployment/acs-alfresco-repository -o jsonpath='{@.spec.replicas}') - if [ "$SETSIZE" -ne 2 ]; then - echo "Got $SETSIZE instead" - exit 1 - else - echo "Got $SETSIZE" - echo "Now waiting for scale down" - kubectl patch hpa acs-alfresco-repository \ - -p '{"spec": {"behavior": {"scaleDown": {"stabilizationWindowSeconds": 20}}}}' - echo "(speeding scale down up)... " - kubectl wait --timeout=2m --for=jsonpath='spec.replicas'=1 deployment/acs-alfresco-repository - echo "Scale down completed" - fi - - - name: Spit cluster status after HPA check - if: always() && steps.hpa_check.outcome != 'skipped' - run: | - kubectl get all --all-namespaces - kubectl describe pod - kubectl events --for deployment/acs-alfresco-repository - - name: Collect logs from all containers if: always() && steps.helm_install.outcome != 'skipped' run: | From 17c6155cd8ac2fca40a956a3da352807443324b9 Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Fri, 18 Oct 2024 17:49:03 +0200 Subject: [PATCH 6/7] increase timeout --- .github/workflows/helm-enterprise.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/helm-enterprise.yml b/.github/workflows/helm-enterprise.yml index ce8167ebc..016ee2f42 100644 --- a/.github/workflows/helm-enterprise.yml +++ b/.github/workflows/helm-enterprise.yml @@ -56,7 +56,7 @@ jobs: helm_integration: runs-on: alfrescoPub-ubuntu2204-16G-4CPU - timeout-minutes: 12 + timeout-minutes: 20 needs: - build_vars name: ${{ matrix.values }} on ${{ matrix.name }} @@ -176,7 +176,7 @@ jobs: - name: Run helm test id: helm_test - run: helm test acs + run: helm test acs --timeout 10m - name: Spit cluster status after helm test if: always() && steps.helm_test.outcome != 'skipped' From aaa3f22fdd9a5f8b6fb881620ddf62a7238d1bfd Mon Sep 17 00:00:00 2001 From: Giovanni Toraldo Date: Mon, 21 Oct 2024 12:23:09 +0200 Subject: [PATCH 7/7] compose 2 replicas --- docker-compose/pre-release-docker-compose.yml | 68 ++++++++++++++++++- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/docker-compose/pre-release-docker-compose.yml b/docker-compose/pre-release-docker-compose.yml index e3ec72f6a..1f260ac82 100644 --- a/docker-compose/pre-release-docker-compose.yml +++ b/docker-compose/pre-release-docker-compose.yml @@ -14,7 +14,7 @@ # https://www.alfresco.com/platform/content-services-ecm/trial/download # services: - alfresco: + alfresco-1: image: quay.io/alfresco/alfresco-content-repository:23.4.0-M1 mem_limit: 1900m environment: @@ -71,6 +71,67 @@ services: - "traefik.http.routers.alfrescomicrometer.rule=PathRegexp(`^/alfresco/(wc)?s(ervice)?/prometheus`)" - "traefik.http.middlewares.prometheusipfilter.ipallowlist.sourcerange=127.0.0.0/8" - "traefik.http.routers.alfrescomicrometer.middlewares=prometheusipfilter@docker" + volumes: + - alf_data:/usr/local/tomcat/alf_data + alfresco-2: + image: quay.io/alfresco/alfresco-content-repository:23.4.0-M1 + 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 + labels: + - "traefik.enable=true" + - "traefik.http.routers.alfresco.rule=PathPrefix(`/`)" + - "traefik.http.services.alfresco.loadbalancer.server.port=8080" + - "traefik.http.routers.solrapideny.rule=PathRegexp(`^/alfresco/(wc)?s(ervice)?/api/solr/.*$`)" + - "traefik.http.middlewares.acsfakeauth.basicauth.users=fake:" + - "traefik.http.routers.solrapideny.middlewares=acsfakeauth@docker" + - "traefik.http.routers.alfrescomicrometer.rule=PathRegexp(`^/alfresco/(wc)?s(ervice)?/prometheus`)" + - "traefik.http.middlewares.prometheusipfilter.ipallowlist.sourcerange=127.0.0.0/8" + - "traefik.http.routers.alfrescomicrometer.middlewares=prometheusipfilter@docker" + volumes: + - alf_data:/usr/local/tomcat/alf_data transform-router: mem_limit: 512m image: quay.io/alfresco/alfresco-transform-router:4.1.5-A1 @@ -194,7 +255,9 @@ services: condition: service_started elasticsearch: condition: service_started - alfresco: + alfresco-1: + condition: service_healthy + alfresco-2: condition: service_healthy activemq: image: alfresco/alfresco-activemq:5.18-jre17-rockylinux8 @@ -283,3 +346,4 @@ volumes: driver_opts: type: tmpfs device: tmpfs + alf_data: