Skip to content

Commit

Permalink
Merge pull request #126 from ethpandaops/pk910/custom-devnet-config
Browse files Browse the repository at this point in the history
check for custom local devnet config in `make devnet-run`
  • Loading branch information
pk910 authored Sep 9, 2024
2 parents 8c39877 + 0eb9495 commit 63ab501
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ log-*
tmp-*

.hack/devnet/generated-**
.hack/devnet/custom-**
14 changes: 13 additions & 1 deletion .hack/devnet/run.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/bin/bash
__dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

if [ -f "${__dir}/custom-kurtosis.devnet.config.yaml" ]; then
config_file="${__dir}/custom-kurtosis.devnet.config.yaml"
else
config_file="${__dir}/kurtosis.devnet.config.yaml"
fi

## Run devnet using kurtosis
ENCLAVE_NAME="${ENCLAVE_NAME:-dora}"
if kurtosis enclave inspect "$ENCLAVE_NAME" > /dev/null; then
Expand All @@ -9,7 +15,7 @@ else
kurtosis run github.com/ethpandaops/ethereum-package \
--image-download always \
--enclave "$ENCLAVE_NAME" \
--args-file "${__dir}/kurtosis.devnet.config.yaml"
--args-file "${config_file}"
fi

# Get chain config
Expand Down Expand Up @@ -52,6 +58,9 @@ $(for node in $BEACON_NODES; do
name=$(docker inspect -f "{{ with index .Config.Labels \"com.kurtosistech.id\"}}{{.}}{{end}}" $node)
ip=$(echo '127.0.0.1')
port=$(docker inspect --format='{{ (index (index .NetworkSettings.Ports "4000/tcp") 0).HostPort }}' $node)
if [ -z "$port" ]; then
port="65535"
fi
echo " - { name: $name, url: http://$ip:$port }"
done)
executionapi:
Expand All @@ -61,6 +70,9 @@ $(for node in $EXECUTION_NODES; do
name=$(docker inspect -f "{{ with index .Config.Labels \"com.kurtosistech.id\"}}{{.}}{{end}}" $node)
ip=$(echo '127.0.0.1')
port=$(docker inspect --format='{{ (index (index .NetworkSettings.Ports "8545/tcp") 0).HostPort }}' $node)
if [ -z "$port" ]; then
port="65535"
fi
echo " - { name: $name, url: http://$ip:$port }"
done)
indexer:
Expand Down

0 comments on commit 63ab501

Please sign in to comment.