Configure foundry container

Former-commit-id: b708bb2122
This commit is contained in:
David Boreham 2023-03-08 22:22:43 -07:00
parent c12418222a
commit 4fd9e71c84
4 changed files with 23 additions and 17 deletions

View File

@ -3,3 +3,5 @@ services:
foundry: foundry:
image: ghcr.io/foundry-rs/foundry:latest image: ghcr.io/foundry-rs/foundry:latest
command: ["while :; do sleep 600; done"] command: ["while :; do sleep 600; done"]
volumes:
- ../config/foundry/foundry.toml:/foundry.toml

View File

@ -24,7 +24,7 @@ if [ -z "$GETH_BASE_URL" ]; then
fi fi
function inc_status() { function inc_status() {
echo " DONE!" echo " done"
STATUS=$((STATUS + 1)) STATUS=$((STATUS + 1))
if [ $STATUS -lt ${#STATUSES[@]} ]; then if [ $STATUS -lt ${#STATUSES[@]} ]; then
echo -n "Waiting for ${STATUSES[$STATUS]}..." echo -n "Waiting for ${STATUSES[$STATUS]}..."

View File

@ -26,21 +26,22 @@ $ laconic-so --stack fixturenet-eth deploy-system up
## Check status ## Check status
``` ```
$ container-build/cerc-fixturenet-eth-lighthouse/scripts/status.sh $ laconic-so --stack fixturenet-eth deploy exec fixturenet-eth-bootnode-lighthouse /scripts/status-internal.sh
Waiting for geth to generate DAG ..................................................... DONE! Waiting for geth to generate DAG.... done
Waiting for beacon phase0 .... DONE! Waiting for beacon phase0.... done
Waiting for beacon altair .... DONE! Waiting for beacon altair.... done
Waiting for beacon bellatrix pre-merge .... DONE! Waiting for beacon bellatrix pre-merge.... done
Waiting for beacon bellatrix merge .... DONE! Waiting for beacon bellatrix merge.... done
$ docker ps -f 'name=laconic' --format 'table {{.Names}}\t{{.Ports}}' | cut -d'-' -f3- | sort $ laconic-so --stack fixturenet-eth deploy ps
NAMES PORTS Running containers:
fixturenet-eth-bootnode-geth-1 8545-8546/tcp, 30303/udp, 0.0.0.0:55847->9898/tcp, 0.0.0.0:55848->30303/tcp id: c6538b60c0328dadfa2c5585c4d09674a6a13e6d712ff1cd82a26849e4e5679b, name: laconic-b12fa16e999821562937781f8ab0b1e8-fixturenet-eth-bootnode-geth-1, ports: 0.0.0.0:58909->30303/tcp, 0.0.0.0:58910->9898/tcp
fixturenet-eth-bootnode-lighthouse-1 id: 5b70597a8211bc7e78d33e50486cb565a7f4a9ce581ce150b3bb450e342bdeda, name: laconic-b12fa16e999821562937781f8ab0b1e8-fixturenet-eth-bootnode-lighthouse-1, ports:
fixturenet-eth-geth-1-1 8546/tcp, 30303/tcp, 30303/udp, 0.0.0.0:55851->8545/tcp id: 19ed78867b6c534d893835cdeb1e89a9ea553b8e8c02ab02468e4bd1563a340f, name: laconic-b12fa16e999821562937781f8ab0b1e8-fixturenet-eth-geth-1-1, ports: 0.0.0.0:58911->40000/tcp, 0.0.0.0:58912->6060/tcp, 0.0.0.0:58913->8545/tcp
fixturenet-eth-geth-2-1 8545-8546/tcp, 30303/tcp, 30303/udp id: 8da0e30a1ce33122d8fd2225e4d26c7f30eb4bfbfa743f2af04d9db5d0bf7fa6, name: laconic-b12fa16e999821562937781f8ab0b1e8-fixturenet-eth-geth-2-1, ports:
fixturenet-eth-lighthouse-1-1 0.0.0.0:55858->8001/tcp id: 387a42a14971034588ba9aeb9b9e2ca7fc0cc61b96f8fe8c2ab770c9d6fb1e0f, name: laconic-b12fa16e999821562937781f8ab0b1e8-fixturenet-eth-lighthouse-1-1, ports: 0.0.0.0:58917->8001/tcp
fixturenet-eth-lighthouse-2-1 id: de5115bf89087bae03b291664a73ffe3554fe23e79e4b8345e088b040d5580ac, name: laconic-b12fa16e999821562937781f8ab0b1e8-fixturenet-eth-lighthouse-2-1, ports:
id: 2a7e5a0fb2be7fc9261a7b725a40818facbbe6d0cb2497d82c0e02de0a8e959b, name: laconic-b12fa16e999821562937781f8ab0b1e8-foundry-1, ports:
``` ```
## Additional pieces ## Additional pieces

View File

@ -22,7 +22,7 @@ import sys
from dataclasses import dataclass from dataclasses import dataclass
from decouple import config from decouple import config
import subprocess import subprocess
from python_on_whales import DockerClient from python_on_whales import DockerClient, DockerException
import click import click
import importlib.resources import importlib.resources
from pathlib import Path from pathlib import Path
@ -83,7 +83,10 @@ def command(ctx, include, exclude, cluster, command, extra_args):
container_exec_env = _make_runtime_env(ctx.obj) container_exec_env = _make_runtime_env(ctx.obj)
if verbose: if verbose:
print(f"Running compose exec {service_name} {command_to_exec}") print(f"Running compose exec {service_name} {command_to_exec}")
docker.compose.execute(service_name, command_to_exec, envs=container_exec_env) try:
docker.compose.execute(service_name, command_to_exec, envs=container_exec_env)
except DockerException as error:
print(f"container command returned error exit status")
elif command == "port": elif command == "port":
if extra_args_list is None or len(extra_args_list) < 2: if extra_args_list is None or len(extra_args_list) < 2:
print("Usage: port <service> <exposed-port>") print("Usage: port <service> <exposed-port>")