Skip to content

Commit

Permalink
Merge pull request #37 from ObolNetwork/stipe/parallel_cluster_runs
Browse files Browse the repository at this point in the history
parallel execution added + fix for lodestar/nimbus BNs
  • Loading branch information
sugh01 authored Nov 27, 2024
2 parents 563f7c1 + 23350c3 commit 3d7953b
Show file tree
Hide file tree
Showing 139 changed files with 88 additions and 110,286 deletions.
12 changes: 6 additions & 6 deletions Makefile_k8s
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ recreate-k8s-pods-lighthouse:
kubectl apply -f vc-2-geth-lighthouse.yaml -n kt-kurtosis-geth-lighthouse
kubectl apply -f vc-3-geth-lighthouse.yaml -n kt-kurtosis-geth-lighthouse
kubectl apply -f vc-1-geth-lighthouse-service.yaml -n kt-kurtosis-geth-lighthouse
kubectl apply -f vc-2-geth-lighthouse-service.yaml -n kt-kurtosis-geth-lighthouse
kubectl apply -f vc-3-geth-lighthouse-service.yaml -n kt-kurtosis-geth-lighthouse
kubectl apply -f vc-2-geth-lighthouse-service.yaml -n kt-kurtosis-geth-lighthouse
kubectl apply -f vc-3-geth-lighthouse-service.yaml -n kt-kurtosis-geth-lighthouse

run-charon-nimbus:
mkdir -p data/nimbus/vc{0,1,2}
Expand All @@ -98,8 +98,8 @@ recreate-k8s-pods-nimbus:
kubectl apply -f vc-2-geth-nimbus.yaml -n kt-kurtosis-geth-nimbus
kubectl apply -f vc-3-geth-nimbus.yaml -n kt-kurtosis-geth-nimbus
kubectl apply -f vc-1-geth-nimbus-service.yaml -n kt-kurtosis-geth-nimbus
kubectl apply -f vc-2-geth-nimbus-service.yaml -n kt-kurtosis-geth-nimbus
kubectl apply -f vc-3-geth-nimbus-service.yaml -n kt-kurtosis-geth-nimbus
kubectl apply -f vc-2-geth-nimbus-service.yaml -n kt-kurtosis-geth-nimbus
kubectl apply -f vc-3-geth-nimbus-service.yaml -n kt-kurtosis-geth-nimbus

run-charon-lodestar:
mkdir -p data/lodestar/vc{0,1,2}/{caches,keystores,validator-db}
Expand All @@ -115,8 +115,8 @@ recreate-k8s-pods-lodestar:
kubectl apply -f vc-2-geth-lodestar.yaml -n kt-kurtosis-geth-lodestar
kubectl apply -f vc-3-geth-lodestar.yaml -n kt-kurtosis-geth-lodestar
kubectl apply -f vc-1-geth-lodestar-service.yaml -n kt-kurtosis-geth-lodestar
kubectl apply -f vc-2-geth-lodestar-service.yaml -n kt-kurtosis-geth-lodestar
kubectl apply -f vc-3-geth-lodestar-service.yaml -n kt-kurtosis-geth-lodestar
kubectl apply -f vc-2-geth-lodestar-service.yaml -n kt-kurtosis-geth-lodestar
kubectl apply -f vc-3-geth-lodestar-service.yaml -n kt-kurtosis-geth-lodestar

run-charon-prysm:
docker compose up node0 node1 node2 vc0-prysm vc1-prysm vc2-prysm prometheus -d
Expand Down
26 changes: 11 additions & 15 deletions docker-compose-k8.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
x-node-base:
# Pegged charon version (update this for each release).
&node-base
image: obolnetwork/charon:latest
image: obolnetwork/charon:v1.2.0-rc2
restart: unless-stopped
networks: [network1]
# network_mode: "host"
Expand All @@ -26,7 +26,7 @@ services:
# \___|_| |_|\__,_|_| \___/|_| |_| \___|_|_|\___|_| |_|\__|___/
node0:
<<: *node-base
container_name: node0
container_name: node0-${CL_NAME}
environment:
<<: *node-env
CHARON_PRIVATE_KEY_FILE: /opt/charon/.charon/cluster/node0/charon-enr-private-key
Expand All @@ -44,7 +44,7 @@ services:

node1:
<<: *node-base
container_name: node1
container_name: node1-${CL_NAME}
environment:
<<: *node-env
CHARON_PRIVATE_KEY_FILE: /opt/charon/.charon/cluster/node1/charon-enr-private-key
Expand All @@ -62,7 +62,7 @@ services:

node2:
<<: *node-base
container_name: node2
container_name: node2-${CL_NAME}
environment:
<<: *node-env
CHARON_PRIVATE_KEY_FILE: /opt/charon/.charon/cluster/node2/charon-enr-private-key
Expand Down Expand Up @@ -151,7 +151,7 @@ services:
- ./testnet:/opt/lighthouse/network-configs

vc0-teku:
image: consensys/teku:${TEKU_VERSION:-24.8}
image: consensys/teku:${TEKU_VERSION:-24.10.3}
networks: [network1]
# network_mode: "host"
depends_on: [node0]
Expand All @@ -160,7 +160,6 @@ services:
validator-client
--beacon-node-api-endpoint="http://node0:3600"
--config-file "/opt/charon/teku/teku-config.yaml"
--Xblock-v3-enabled true
--validators-external-signer-slashing-protection-enabled true
--validators-proposer-blinded-blocks-enabled ${BUILDER_API_ENABLED:-true}
--validators-builder-registration-default-enabled ${BUILDER_API_ENABLED:-true}
Expand All @@ -172,7 +171,7 @@ services:
- ./testnet/config.yaml:/opt/teku/config.yaml

vc1-teku:
image: consensys/teku:${TEKU_VERSION:-24.8}
image: consensys/teku:${TEKU_VERSION:-24.10.3}
networks: [network1]
# network_mode: "host"
depends_on: [node1]
Expand All @@ -181,7 +180,6 @@ services:
validator-client
--beacon-node-api-endpoint=http://node1:3600
--config-file "/opt/charon/teku/teku-config.yaml"
--Xblock-v3-enabled true
--validators-external-signer-slashing-protection-enabled true
--validators-proposer-blinded-blocks-enabled ${BUILDER_API_ENABLED:-true}
--validators-builder-registration-default-enabled ${BUILDER_API_ENABLED:-true}
Expand All @@ -193,7 +191,7 @@ services:
- ./testnet/config.yaml:/opt/teku/config.yaml

vc2-teku:
image: consensys/teku:${TEKU_VERSION:-24.8}
image: consensys/teku:${TEKU_VERSION:-24.10.3}
networks: [network1]
# network_mode: "host"
depends_on: [node2]
Expand All @@ -202,7 +200,6 @@ services:
validator-client
--beacon-node-api-endpoint=http://node2:3600
--config-file "/opt/charon/teku/teku-config.yaml"
--Xblock-v3-enabled true
--validators-external-signer-slashing-protection-enabled true
--validators-proposer-blinded-blocks-enabled ${BUILDER_API_ENABLED:-true}
--validators-builder-registration-default-enabled ${BUILDER_API_ENABLED:-true}
Expand Down Expand Up @@ -253,7 +250,7 @@ services:
- ./nimbus/run.sh:/home/user/data/run.sh

vc0-lodestar:
image: chainsafe/lodestar:${LODESTAR_VERSION:-v1.20.2}
image: chainsafe/lodestar:${LODESTAR_VERSION:-v1.23.0}
depends_on: [node0]
entrypoint: /opt/lodestar/run.sh
networks: [network1]
Expand All @@ -270,7 +267,7 @@ services:
restart: unless-stopped

vc1-lodestar:
image: chainsafe/lodestar:${LODESTAR_VERSION:-v1.20.2}
image: chainsafe/lodestar:${LODESTAR_VERSION:-v1.23.0}
depends_on: [node1]
entrypoint: /opt/lodestar/run.sh
networks: [network1]
Expand All @@ -288,7 +285,7 @@ services:
restart: unless-stopped

vc2-lodestar:
image: chainsafe/lodestar:${LODESTAR_VERSION:-v1.20.2}
image: chainsafe/lodestar:${LODESTAR_VERSION:-v1.23.0}
depends_on: [node2]
entrypoint: /opt/lodestar/run.sh
networks: [network1]
Expand Down Expand Up @@ -370,9 +367,8 @@ services:
# |_| |_| |_|\___/|_| |_|_|\__\___/|_| |_|_| |_|\__, |
# |___/
prometheus:
container_name: prometheus-${CL_NAME}
image: prom/prometheus:${PROMETHEUS_VERSION:-v2.44.0}
ports:
- "9090:9090"
networks: [network1]
volumes:
- ./prometheus/prometheustmp.yml:/etc/prometheus/prometheus.yml
Expand Down
5 changes: 1 addition & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
x-node-base:
# Pegged charon version (update this for each release).
&node-base
image: obolnetwork/charon-local:latest
image: obolnetwork/charon:v1.2.0-rc2
restart: unless-stopped
networks: [network1]
# network_mode: "host"
Expand Down Expand Up @@ -160,7 +160,6 @@ services:
validator-client
--beacon-node-api-endpoint="http://node0:3600"
--config-file "/opt/charon/teku/teku-config.yaml"
--Xblock-v3-enabled true
--validators-external-signer-slashing-protection-enabled true
--validators-proposer-blinded-blocks-enabled ${BUILDER_API_ENABLED:-true}
--validators-builder-registration-default-enabled ${BUILDER_API_ENABLED:-true}
Expand All @@ -181,7 +180,6 @@ services:
validator-client
--beacon-node-api-endpoint=http://node1:3600
--config-file "/opt/charon/teku/teku-config.yaml"
--Xblock-v3-enabled true
--validators-external-signer-slashing-protection-enabled true
--validators-proposer-blinded-blocks-enabled ${BUILDER_API_ENABLED:-true}
--validators-builder-registration-default-enabled ${BUILDER_API_ENABLED:-true}
Expand All @@ -202,7 +200,6 @@ services:
validator-client
--beacon-node-api-endpoint=http://node2:3600
--config-file "/opt/charon/teku/teku-config.yaml"
--Xblock-v3-enabled true
--validators-external-signer-slashing-protection-enabled true
--validators-proposer-blinded-blocks-enabled ${BUILDER_API_ENABLED:-true}
--validators-builder-registration-default-enabled ${BUILDER_API_ENABLED:-true}
Expand Down
13 changes: 13 additions & 0 deletions kill_ports.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

PORTS=("14000" "24000" "34000" "14003" "24003" "34003" "14004" "24004" "34004")

for PORT in "${PORTS[@]}"; do
PID=$(sudo lsof -ti :$PORT)
if [ ! -z "$PID" ]; then
echo "Killing process $PID on port $PORT"
sudo kill -9 $PID
else
echo "No process found on port $PORT"
fi
done

This file was deleted.

Loading

0 comments on commit 3d7953b

Please sign in to comment.