Skip to content

Commit

Permalink
fix: remove image name for ethereum-metrics-exporter (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa committed Oct 25, 2023
1 parent de5eee8 commit 4bac042
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
shared_utils = import_module("../shared_utils/shared_utils.star")
constants = import_module("../package_io/constants.star")
static_files = import_module("../static_files/static_files.star")
ethereum_metrics_exporter_context = import_module(
"../ethereum_metrics_exporter/ethereum_metrics_exporter_context.star"
Expand All @@ -8,19 +7,20 @@ ethereum_metrics_exporter_context = import_module(
HTTP_PORT_ID = "http"
METRICS_PORT_NUMBER = 9090

DEFAULT_ETHEREUM_METRICS_EXPORTER_IMAGE = "ethpandaops/ethereum-metrics-exporter:0.22.0"


def launch(
plan,
pair_name,
ethereum_metrics_exporter_service_name,
ethereum_metrics_exporter_image,
el_client_context,
cl_client_context,
):
exporter_service = plan.add_service(
ethereum_metrics_exporter_service_name,
ServiceConfig(
image=ethereum_metrics_exporter_image,
image=DEFAULT_ETHEREUM_METRICS_EXPORTER_IMAGE,
ports={
HTTP_PORT_ID: shared_utils.new_port_spec(
METRICS_PORT_NUMBER,
Expand Down
5 changes: 0 additions & 5 deletions src/package_io/constants.star
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,8 @@ MAX_ENODE_ENTRIES = 20

GENESIS_VALIDATORS_ROOT_PLACEHOLDER = "GENESIS_VALIDATORS_ROOT_PLACEHOLDER"

DEFAULT_SNOOPER_IMAGE = "ethpandaops/json-rpc-snoop:1.1.0"

DEFAULT_ETHEREUM_METRICS_EXPORTER_IMAGE = "ethpandaops/ethereum-metrics-exporter:0.22.0"

ARCHIVE_MODE = True


GENESIS_DATA_MOUNTPOINT_ON_CLIENTS = "/data"
GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER = (
GENESIS_DATA_MOUNTPOINT_ON_CLIENTS + "/data/custom_config_data"
Expand Down
7 changes: 0 additions & 7 deletions src/participant_network.star
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,9 @@ def launch_participant_network(
snooper_service_name = "snooper-{0}-{1}-{2}".format(
index_str, cl_client_type, el_client_type
)
snooper_image = constants.DEFAULT_SNOOPER_IMAGE
snooper_engine_context = snooper.launch(
plan,
snooper_service_name,
snooper_image,
el_client_context,
)
plan.print(
Expand Down Expand Up @@ -355,15 +353,10 @@ def launch_participant_network(
"ethereum-metrics-exporter-{0}".format(pair_name)
)

ethereum_metrics_exporter_image = (
constants.DEFAULT_ETHEREUM_METRICS_EXPORTER_IMAGE
)

ethereum_metrics_exporter_context = ethereum_metrics_exporter.launch(
plan,
pair_name,
ethereum_metrics_exporter_service_name,
ethereum_metrics_exporter_image,
el_client_context,
cl_client_context,
)
Expand Down
10 changes: 6 additions & 4 deletions src/snooper/snooper_engine_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@ SNOOPER_BINARY_COMMAND = "./json_rpc_snoop"

PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER"

DEFAULT_SNOOPER_IMAGE = "ethpandaops/json-rpc-snoop:1.1.0"

SNOOPER_USED_PORTS = {
SNOOPER_ENGINE_RPC_PORT_ID: shared_utils.new_port_spec(
SNOOPER_ENGINE_RPC_PORT_NUM, shared_utils.TCP_PROTOCOL, wait="5s"
),
}


def launch(plan, service_name, image, el_client_context):
def launch(plan, service_name, el_client_context):
snooper_service_name = "{0}".format(service_name)

snooper_config = get_config(image, service_name, el_client_context)
snooper_config = get_config(service_name, el_client_context)

snooper_service = plan.add_service(snooper_service_name, snooper_config)
snooper_http_port = snooper_service.ports[SNOOPER_ENGINE_RPC_PORT_ID]
Expand All @@ -29,7 +31,7 @@ def launch(plan, service_name, image, el_client_context):
)


def get_config(image, service_name, el_client_context):
def get_config(service_name, el_client_context):
engine_rpc_port_num = "http://{0}:{1}".format(
el_client_context.ip_addr,
el_client_context.engine_rpc_port_num,
Expand All @@ -42,7 +44,7 @@ def get_config(image, service_name, el_client_context):
]

return ServiceConfig(
image=image,
image=DEFAULT_SNOOPER_IMAGE,
ports=SNOOPER_USED_PORTS,
cmd=cmd,
private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@
},
"timepicker": {},
"timezone": "",
"title": "Validator Participation Rates Dashboardssss",
"title": "Validator Participation Rates Dashboards",
"uid": "participation_rates_dashboards",
"version": 1,
"weekStart": ""
Expand Down

0 comments on commit 4bac042

Please sign in to comment.