Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
b0b813d
try w/ bak
magick93 Mar 23, 2025
0a9e927
branches
magick93 Mar 23, 2025
a8e72f6
Update DockerHub login method in workflow
magick93 Mar 23, 2025
ab4ded2
Add debug step to output Docker username in workflow
magick93 Mar 23, 2025
a60b7ba
Update DockerHub credentials in workflow to use secrets
magick93 Mar 23, 2025
fb47a5f
Refactor DockerHub login to use environment variables for credentials
magick93 Mar 23, 2025
7d1c640
Enhance Docker workflow by adding fail-fast strategy and increasing t…
magick93 Mar 23, 2025
032168a
Fix Docker workflow by updating secret variable for Docker password a…
magick93 Mar 24, 2025
8cce1d0
Update debug step in Docker workflow to format Docker username output
magick93 Mar 24, 2025
2a86cb2
Add context to Docker build and cross build binaries step in workflow
magick93 Mar 24, 2025
01b5d79
Add debugging steps to Docker workflow for current and bin directory …
magick93 Mar 24, 2025
db2af1a
Update Docker workflow context and change COPY to ADD for binary in c…
magick93 Mar 24, 2025
10d1fd0
Add debug step to check for eleel binary in Docker build context
magick93 Mar 24, 2025
6dbd7cb
Comment out multiarch Docker build steps in workflow
magick93 Mar 24, 2025
c2088cc
Update .dockerignore to exclude bin directory from being ignored
magick93 Mar 24, 2025
ecc371f
Remove .dockerignore file to simplify Docker build context
magick93 Mar 24, 2025
2fedbea
Add source context to Docker bake action in workflow
magick93 Mar 24, 2025
e446bd4
re add and remove debugs
magick93 Mar 24, 2025
e38ec1f
Update Docker bake configuration to simplify description for Eleel mu…
magick93 Mar 24, 2025
dd881ff
fix for "ERROR: ./docker-bake.hcl:6,8-16: Invalid name; name requires…
magick93 Mar 24, 2025
44d10f2
Refactor Docker workflow by removing debug steps and updating tag for…
magick93 Mar 24, 2025
f871bd2
no need to specify arch
magick93 Mar 24, 2025
4a83a05
Add description to Docker bake manifest for Eleel multiplexer
magick93 Mar 24, 2025
5d03e1e
try with var
magick93 Mar 24, 2025
fc144dd
try using env
magick93 Mar 24, 2025
5cec76b
Update Docker workflow to use x86_64 architecture only. test equals o…
magick93 Mar 24, 2025
ab96d3f
Enable support for both aarch64 and x86_64 architectures in Docker wo…
magick93 Mar 24, 2025
0294a87
Add attestations for provenance and SBOM in Docker bake manifest
magick93 Mar 24, 2025
7320683
try with platforms under "default"
magick93 Mar 24, 2025
dfaa7c8
Add GITHUB_REPO variable to Docker bake and update workflow environment
magick93 Mar 24, 2025
dc30639
without specifying platorms
magick93 Mar 24, 2025
207d21d
try to push in a separate job
magick93 Mar 25, 2025
2a8c581
Update Docker tags to use 'eleel' repository for consistency
magick93 Mar 25, 2025
6ee1685
Refactor Docker workflow to use full repository name for tagging and …
magick93 Mar 25, 2025
d116e12
Enhance Docker workflow by adding debug step to list and verify Docke…
magick93 Mar 25, 2025
7d54cc8
Add load option to Docker job to ensure image is loaded into local Do…
magick93 Mar 25, 2025
a564a82
w/o matrix - use make to build all platforms, and bake to build docke…
magick93 Mar 25, 2025
af7f246
Add 'make-and-bake' trigger to Docker workflow
magick93 Mar 25, 2025
80fbd0f
Simplify Docker build job by removing architecture-specific naming an…
magick93 Mar 25, 2025
c99007c
try without attest entries from Docker bake configuration
magick93 Mar 25, 2025
bb66109
Add multiarch manifest job and version extraction workflow to Docker …
magick93 Mar 25, 2025
6c5d35d
Refactor Docker workflow to use environment variable for image name a…
magick93 Mar 25, 2025
8b20068
Add debug step to output IMAGE_NAME in Docker workflow
magick93 Mar 25, 2025
bf6fc5a
Remove versioning from Docker image tags in workflow
magick93 Mar 25, 2025
d42ac8d
Update Docker workflow to use environment variable for image name in …
magick93 Mar 25, 2025
226fa87
Enhance multiarch manifest creation by adding --append and --debug op…
magick93 Mar 25, 2025
41b479f
Refactor Docker workflow to separate build and push jobs, and add ver…
magick93 Mar 25, 2025
8944fa9
Refactor Docker workflow by removing redundant push step and improvin…
magick93 Mar 25, 2025
232d549
Update Docker workflow to include architecture in image tags for bett…
magick93 Mar 25, 2025
9f66824
Update Docker workflow to limit CPU architecture to aarch64 and add d…
magick93 Mar 25, 2025
9644a0b
try reversing images
magick93 Mar 25, 2025
72c3e3e
undo reverse and add push
magick93 Mar 25, 2025
34535ee
re-re-reverse
magick93 Mar 25, 2025
901f573
Refactor Docker workflow to enhance multiarch manifest creation and i…
magick93 Mar 25, 2025
7f3d4a0
Set default values for VERSION and VERSION_SUFFIX in extract-version …
magick93 Mar 25, 2025
e76fa4e
Fix image tagging format in Docker workflow to include IMAGE_NAME prefix
magick93 Mar 25, 2025
10cf99a
Update Docker workflow to create multiarch manifest with specific tag…
magick93 Mar 26, 2025
0aaec36
Update multiarch manifest creation to use repository name for archite…
magick93 Mar 26, 2025
6e6b76f
Refactor Docker bake configuration to use repository name for tags an…
magick93 Mar 26, 2025
4d11d55
Add Docker image build instructions to README
magick93 Mar 26, 2025
4a85759
Add description variable to Docker bake configuration for clarity
magick93 Mar 26, 2025
25f334a
Add .qodo to .gitignore to exclude Qodo files from version control
magick93 Mar 26, 2025
0af1a12
Merge branch 'make-and-bake'
magick93 Mar 26, 2025
cad835e
fix fmt
magick93 Mar 26, 2025
efccd50
Remove 'make-and-bake' branch from GitHub Actions workflow triggers
magick93 Mar 26, 2025
884413f
Add tag triggers to Docker workflow for versioned releases
magick93 Mar 26, 2025
0a22bda
Add Helm chart and tests for Eleel deployment
magick93 May 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
target/
!target/
119 changes: 60 additions & 59 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,81 +1,82 @@
name: docker

on:
push:
branches:
- main
push:
branches:
- main
- stable
- unstable
tags:
- v*

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_BUILD_SUMMARY: true
REPO_NAME: $GITHUB_REPOSITORY
IMAGE_NAME: ${{ github.repository }}:${{ github.ref_name }}

jobs:
build-docker-single-arch:
name: build-docker-${{ matrix.cpu_arch }}
extract-version:
uses: ./.github/workflows/extract-version.yml
build-docker:
name: build-docker
runs-on: ubuntu-22.04
strategy:
matrix:
cpu_arch: [aarch64, x86_64]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Update Rust
run: rustup update stable
- name: Dockerhub login
run: |
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin
- name: Cross build binaries
run: |
cargo install cross
make build-${{ matrix.cpu_arch }}

- name: Make bin dir
run: mkdir ./bin
- uses: actions/checkout@v4
- name: Update Rust
run: rustup update stable
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}

- name: Move cross-built binary into Docker scope
run: mv ./target/${{ matrix.cpu_arch }}-unknown-linux-gnu/release/eleel ./bin
- name: Debug IMAGE_NAME
run: echo "IMAGE_NAME=${{ env.IMAGE_NAME }}"

- name: Cross build binaries
run: |
cargo install cross
make build
timeout-minutes: 100

- name: Map aarch64 to arm64 short arch
if: startsWith(matrix.cpu_arch, 'aarch64')
run: echo "SHORT_ARCH=arm64" >> $GITHUB_ENV
- name: Install QEMU
run: sudo apt-get update && sudo apt-get install -y qemu-user-static

- name: Map x86_64 to amd64 short arch
if: startsWith(matrix.cpu_arch, 'x86_64')
run: echo "SHORT_ARCH=amd64" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Install QEMU
run: sudo apt-get update && sudo apt-get install -y qemu-user-static
- name: Build and push using Bake
uses: docker/bake-action@v6
with:
files: ./docker-bake.hcl
source: .
push: true
load: true
set: |
*.context=.
*.tags=${{ env.IMAGE_NAME }}
env:
GITHUB_REPO: ${{ github.repository }}
DOCKER_BUILD_RECORD_UPLOAD: true

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_USERNAME }}
password: ${{ env.DOCKER_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v5
with:
file: ./Dockerfile.cross
context: .
platforms: linux/${{ env.SHORT_ARCH }}
push: true
tags: |
${{ github.repository_owner }}/eleel:latest-${{ env.SHORT_ARCH }}
- name: Create and push multiarch manifest
run: |
docker buildx imagetools create -t ${{ env.IMAGE_NAME }} --append --debug \
${{ github.repository }}-arm64 \
${{ github.repository }}-amd64

build-docker-multiarch:
name: build-docker-eleel-multiarch
runs-on: ubuntu-22.04
needs: [build-docker-single-arch]
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Dockerhub login
run: |
echo "${DOCKER_PASSWORD}" | docker login --username ${DOCKER_USERNAME} --password-stdin

- name: Create and push multiarch manifests
run: |
docker buildx imagetools create -t ${{ github.repository_owner}}/eleel:latest \
${{ github.repository_owner}}/eleel:latest-arm64 \
${{ github.repository_owner}}/eleel:latest-amd64;
49 changes: 49 additions & 0 deletions .github/workflows/extract-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Extract Version

on:
workflow_call:
outputs:
VERSION:
description: "The extracted version (latest or vX.Y.Z)"
value: ${{ jobs.extract-version.outputs.VERSION || 'latest' }}
VERSION_SUFFIX:
description: "The version suffix (empty or -unstable)"
value: ${{ jobs.extract-version.outputs.VERSION_SUFFIX }}

jobs:
extract-version:
runs-on: ubuntu-22.04
outputs:
VERSION: ${{ env.VERSION }}
VERSION_SUFFIX: ${{ env.VERSION_SUFFIX }}
steps:


- name: Extract version (if stable)
if: github.event.ref == 'refs/heads/stable'
run: |
echo "VERSION=latest" >> $GITHUB_ENV
echo "VERSION_SUFFIX=" >> $GITHUB_ENV

- name: Extract version (if unstable)
if: github.event.ref == 'refs/heads/unstable'
run: |
echo "VERSION=latest" >> $GITHUB_ENV
echo "VERSION_SUFFIX=-unstable" >> $GITHUB_ENV

- name: Extract version (if other branch)
if: github.event.ref != 'refs/heads/stable' && github.event.ref != 'refs/heads/unstable' && !startsWith(github.event.ref, 'refs/tags')
run: |
echo "VERSION=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "VERSION_SUFFIX=" >> $GITHUB_ENV

- name: Extract version (if tagged release)
if: startsWith(github.event.ref, 'refs/tags')
run: |
echo "VERSION=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
echo "VERSION_SUFFIX=" >> $GITHUB_ENV

- name: Debug - Print environment variables
run: |
echo "[debug] VERSION=${{ env.VERSION }}"
echo "[debug] VERSION_SUFFIX=${{ env.VERSION_SUFFIX }}"
19 changes: 19 additions & 0 deletions .github/workflows/helm-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Helm Chart Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install helm-unittest plugin
run: helm plugin install https://github.com/helm-unittest/helm-unittest.git

- name: Run Helm unit tests
run: helm unittest charts/eleel -f "charts/eleel/tests/*_test.yaml"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
*.swp
*.toml
.qodo
11 changes: 6 additions & 5 deletions Dockerfile.cross
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
# It assumes the eleel binary has already been
# compiled for `$TARGETPLATFORM` and moved to `./bin`.
FROM --platform=$TARGETPLATFORM ubuntu:24.04
ARG TARGET_ARCH
RUN apt-get update && apt-get install -y --no-install-recommends \
libssl-dev \
ca-certificates \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY ./bin/eleel /usr/local/bin/eleel
libssl-dev \
ca-certificates \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ADD ./target/$TARGET_ARCH/release/eleel /usr/local/bin/eleel
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ build-x86_64:
build-aarch64:
cross build --bin eleel --target aarch64-unknown-linux-gnu --profile release --locked

build: build-x86_64 build-aarch64

.PHONY: build-x86_64 build-aarch64
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ Eleel is written in Rust and makes use of components from [Lighthouse][].

A binary will be installed to `~/.cargo/bin/eleel`.

### Build docker images

### Using `bake`

See https://docs.docker.com/build/building/multi-platform/.

`docker buildx bake -f docker-bake.hcl`

## Getting started

Eleel needs to connect to a _real_ execution node, e.g. Geth/Nethermind/Besu. You
Expand Down
7 changes: 7 additions & 0 deletions charts/eleel/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v2
name: eleel
description: A Helm chart for Kubernetes to deploy Eleel Ethereum execution engine multiplexer
type: application
version: 0.1.0
appVersion: "1.0.0"
kubeVersion: ">=1.19.0-0"
66 changes: 66 additions & 0 deletions charts/eleel/rendered.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
# Source: eleel/templates/statefulset.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: eleel-test
labels:
app.kubernetes.io/name: eleel
app.kubernetes.io/instance: eleel-test
app.kubernetes.io/managed-by: Helm
helm.sh/chart: eleel-0.1.0
app.kubernetes.io/version: "1.0.0"
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: eleel
app.kubernetes.io/instance: eleel-test
serviceName: eleel-test
template:
metadata:
labels:
app.kubernetes.io/name: eleel
app.kubernetes.io/instance: eleel-test
spec:
containers:
- name: eleel
image: "eleel:test"
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 8552
protocol: TCP
env:
- name: RUST_LOG
value: "eleel=debug"
- name: LISTEN_ADDRESS
value: "0.0.0.0"
- name: LISTEN_PORT
value: "8552"
- name: EE_URL
value: "http://test-engine:8551"
- name: NETWORK
value: "mainnet"
- name: EE_JWT_SECRET
value: "/test-secrets/ee.jwt"
- name: CONTROLLER_JWT_SECRET
value: "/test-secrets/controller.jwt"
- name: CLIENT_JWT_SECRETS
value: "/test-secrets/clients.toml"
volumeMounts:
- name: jwt-secrets
mountPath: /test-secrets
readOnly: true
livenessProbe:
httpGet:
path: /health
port: http
readinessProbe:
httpGet:
path: /health
port: http
volumes:
- name: jwt-secrets
secret:
secretName: "eleel-test-jwt-secrets"
Loading