From 4d64cdccb4026769927f0ce7756d5a0164ae6012 Mon Sep 17 00:00:00 2001 From: Roman <4833306+Filter94@users.noreply.github.com> Date: Fri, 5 Dec 2025 20:04:28 -0300 Subject: [PATCH 1/4] chore!: Using the conventional app script generated by gradle instead of the raw java + jar command --- .github/workflows/maru-build-and-publish.yml | 6 ++---- Makefile | 2 +- app/Dockerfile | 4 +++- chaos-testing/helm.mk | 2 +- docker/compose.dev.yaml | 11 ++++------- 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/maru-build-and-publish.yml b/.github/workflows/maru-build-and-publish.yml index 59afdc1eb..52463ed82 100644 --- a/.github/workflows/maru-build-and-publish.yml +++ b/.github/workflows/maru-build-and-publish.yml @@ -124,8 +124,7 @@ jobs: with: context: app build-contexts: | - libs=./app/build/install/app/lib/ - maru=./app/build/libs/ + app=./app/build/install/app/ platforms: linux/amd64 load: true push: false @@ -147,8 +146,7 @@ jobs: with: context: app build-contexts: | - libs=./app/build/install/app/lib/ - maru=./app/build/libs/ + app=./app/build/install/app/ platforms: linux/amd64,linux/arm64 push: true tags: ${{ env.TAGS }} diff --git a/Makefile b/Makefile index 5eae2fe01..5ef904ea8 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ clean: docker-build-local-image: ./gradlew :app:installDist - docker build app --build-context=libs=./app/build/install/app/lib/ -t consensys/maru:local + docker build app --build-context=app=./app/build/install/app/ -t consensys/maru:local docker-run-stack: CREATE_EMPTY_BLOCKS=true $(if $(MARU_TAG),MARU_TAG=$(MARU_TAG)) docker compose -f docker/compose.yaml -f docker/compose.dev.yaml up -d diff --git a/app/Dockerfile b/app/Dockerfile index 14d8b726e..47a1bc840 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -3,7 +3,7 @@ FROM eclipse-temurin:21-jre-noble WORKDIR /opt/consensys/maru -COPY --from=libs ./** ./ +COPY --from=app . . # Build-time metadata as defined at http://label-schema.org ARG BUILD_DATE @@ -18,3 +18,5 @@ LABEL org.label-schema.build-date=$BUILD_DATE \ org.label-schema.vendor="ConsenSys" \ org.label-schema.version=$VERSION \ org.label-schema.schema-version="1.0" + +ENTRYPOINT ["/opt/consensys/maru/bin/app"] diff --git a/chaos-testing/helm.mk b/chaos-testing/helm.mk index b26028157..bcd544b7b 100644 --- a/chaos-testing/helm.mk +++ b/chaos-testing/helm.mk @@ -146,7 +146,7 @@ helm-redeploy-linea: build-maru-image: @echo "Building Maru image" cd .. && ./gradlew :app:installDist - cd .. && docker build app --build-context=libs=./app/build/install/app/lib/ -t consensys/maru:local + cd .. && docker build app --build-context=app=./app/build/install/app/ -t consensys/maru:local build-and-import-maru-image: @$(MAKE) build-maru-image diff --git a/docker/compose.dev.yaml b/docker/compose.dev.yaml index de6a96077..0aabb7db1 100644 --- a/docker/compose.dev.yaml +++ b/docker/compose.dev.yaml @@ -4,19 +4,16 @@ name: maru services: maru: - # make build-local-image + # make docker-build-local-image # MARU_TAG=local make docker-run-stack image: consensys/maru:${MARU_TAG:-dbb6c73} container_name: maru depends_on: - sequencer - follower-geth - command: [ 'java', -# '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005' -# '-Dvertx.configurationFile=/opt/consensys/maru/configs/vertx-options.json', - '-Dlog4j2.configurationFile=configs/log4j.xml', - '-jar', "maru.jar", - '--maru-genesis-file', 'configs/genesis.json', + environment: + JAVA_OPTS: '-Dlog4j2.configurationFile=configs/log4j.xml' + command: [ '--maru-genesis-file', 'configs/genesis.json', '--config', 'configs/config.dev.toml' ] volumes: - ./maru/config.dev.toml:/opt/consensys/maru/configs/config.dev.toml:ro From ecba6792612def9ff641f7698defdbc892222531 Mon Sep 17 00:00:00 2001 From: Roman <4833306+Filter94@users.noreply.github.com> Date: Fri, 5 Dec 2025 20:07:40 -0300 Subject: [PATCH 2/4] Returning back useful java options --- docker/compose.dev.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/compose.dev.yaml b/docker/compose.dev.yaml index 0aabb7db1..ac567e7fe 100644 --- a/docker/compose.dev.yaml +++ b/docker/compose.dev.yaml @@ -12,6 +12,8 @@ services: - sequencer - follower-geth environment: + # '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005' + # '-Dvertx.configurationFile=/opt/consensys/maru/configs/vertx-options.json', JAVA_OPTS: '-Dlog4j2.configurationFile=configs/log4j.xml' command: [ '--maru-genesis-file', 'configs/genesis.json', '--config', 'configs/config.dev.toml' ] From 737cb5d996b05a527df29179a990ca3304c3026e Mon Sep 17 00:00:00 2001 From: Roman <4833306+Filter94@users.noreply.github.com> Date: Fri, 5 Dec 2025 20:58:06 -0300 Subject: [PATCH 3/4] Fixing the charts for the new image --- chaos-testing/Makefile | 2 +- chaos-testing/helm/charts/maru/templates/statefulset.yaml | 6 +----- chaos-testing/helm/charts/maru/values.yaml | 3 +++ 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/chaos-testing/Makefile b/chaos-testing/Makefile index 4ff1b193d..bf3381fcd 100644 --- a/chaos-testing/Makefile +++ b/chaos-testing/Makefile @@ -25,7 +25,7 @@ chaos-reload-k3s-and-chaos-mesh: chaos-full-reload: @$(MAKE) k3s-reload - @$(MAKE) chaos-redeploy-chaos-mesh-and-linea maru_image=$(if $(maru_image),$(maru_image)) + @$(MAKE) chaos-redeploy-chaos-mesh-and-linea maru _image=$(if $(maru_image),$(maru_image)) @if [ "$(skip_initial_health_check)" != "true" ]; then \ $(MAKE) chaos-health-check; \ else \ diff --git a/chaos-testing/helm/charts/maru/templates/statefulset.yaml b/chaos-testing/helm/charts/maru/templates/statefulset.yaml index 8a3a4a79d..fb00d92ab 100644 --- a/chaos-testing/helm/charts/maru/templates/statefulset.yaml +++ b/chaos-testing/helm/charts/maru/templates/statefulset.yaml @@ -27,12 +27,8 @@ spec: {{- with .Values.env }} {{- toYaml . | nindent 12 }} {{- end }} - command: - - java - - -Dlog4j2.configurationFile=configs/log4j.xml - - -jar - - maru.jar + - /opt/consensys/maru/bin/app - --maru-genesis-file - /opt/consensys/maru/configs/genesis.json - --config diff --git a/chaos-testing/helm/charts/maru/values.yaml b/chaos-testing/helm/charts/maru/values.yaml index daee434a2..79f638623 100644 --- a/chaos-testing/helm/charts/maru/values.yaml +++ b/chaos-testing/helm/charts/maru/values.yaml @@ -55,6 +55,9 @@ probes: timeoutSeconds: 5 successThreshold: 1 failureThreshold: 3 +env: + - name: JAVA_OPTS + value: "-Dlog4j2.configurationFile=configs/log4j.xml" configFiles: privateKey: | From 1f4b0ab85a7df3df7a87cb843ed56d7243581fa4 Mon Sep 17 00:00:00 2001 From: Roman <4833306+Filter94@users.noreply.github.com> Date: Fri, 5 Dec 2025 21:08:09 -0300 Subject: [PATCH 4/4] Fixing the charts for the new image --- chaos-testing/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chaos-testing/Makefile b/chaos-testing/Makefile index bf3381fcd..4ff1b193d 100644 --- a/chaos-testing/Makefile +++ b/chaos-testing/Makefile @@ -25,7 +25,7 @@ chaos-reload-k3s-and-chaos-mesh: chaos-full-reload: @$(MAKE) k3s-reload - @$(MAKE) chaos-redeploy-chaos-mesh-and-linea maru _image=$(if $(maru_image),$(maru_image)) + @$(MAKE) chaos-redeploy-chaos-mesh-and-linea maru_image=$(if $(maru_image),$(maru_image)) @if [ "$(skip_initial_health_check)" != "true" ]; then \ $(MAKE) chaos-health-check; \ else \