Commit 4bac0424 authored by Barnabas Busa's avatar Barnabas Busa Committed by GitHub

fix: remove image name for ethereum-metrics-exporter (#335)

parent de5eee82
shared_utils = import_module("../shared_utils/shared_utils.star") 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") static_files = import_module("../static_files/static_files.star")
ethereum_metrics_exporter_context = import_module( ethereum_metrics_exporter_context = import_module(
"../ethereum_metrics_exporter/ethereum_metrics_exporter_context.star" "../ethereum_metrics_exporter/ethereum_metrics_exporter_context.star"
...@@ -8,19 +7,20 @@ ethereum_metrics_exporter_context = import_module( ...@@ -8,19 +7,20 @@ ethereum_metrics_exporter_context = import_module(
HTTP_PORT_ID = "http" HTTP_PORT_ID = "http"
METRICS_PORT_NUMBER = 9090 METRICS_PORT_NUMBER = 9090
DEFAULT_ETHEREUM_METRICS_EXPORTER_IMAGE = "ethpandaops/ethereum-metrics-exporter:0.22.0"
def launch( def launch(
plan, plan,
pair_name, pair_name,
ethereum_metrics_exporter_service_name, ethereum_metrics_exporter_service_name,
ethereum_metrics_exporter_image,
el_client_context, el_client_context,
cl_client_context, cl_client_context,
): ):
exporter_service = plan.add_service( exporter_service = plan.add_service(
ethereum_metrics_exporter_service_name, ethereum_metrics_exporter_service_name,
ServiceConfig( ServiceConfig(
image=ethereum_metrics_exporter_image, image=DEFAULT_ETHEREUM_METRICS_EXPORTER_IMAGE,
ports={ ports={
HTTP_PORT_ID: shared_utils.new_port_spec( HTTP_PORT_ID: shared_utils.new_port_spec(
METRICS_PORT_NUMBER, METRICS_PORT_NUMBER,
......
...@@ -29,13 +29,8 @@ MAX_ENODE_ENTRIES = 20 ...@@ -29,13 +29,8 @@ MAX_ENODE_ENTRIES = 20
GENESIS_VALIDATORS_ROOT_PLACEHOLDER = "GENESIS_VALIDATORS_ROOT_PLACEHOLDER" 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 ARCHIVE_MODE = True
GENESIS_DATA_MOUNTPOINT_ON_CLIENTS = "/data" GENESIS_DATA_MOUNTPOINT_ON_CLIENTS = "/data"
GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER = ( GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER = (
GENESIS_DATA_MOUNTPOINT_ON_CLIENTS + "/data/custom_config_data" GENESIS_DATA_MOUNTPOINT_ON_CLIENTS + "/data/custom_config_data"
......
...@@ -279,11 +279,9 @@ def launch_participant_network( ...@@ -279,11 +279,9 @@ def launch_participant_network(
snooper_service_name = "snooper-{0}-{1}-{2}".format( snooper_service_name = "snooper-{0}-{1}-{2}".format(
index_str, cl_client_type, el_client_type index_str, cl_client_type, el_client_type
) )
snooper_image = constants.DEFAULT_SNOOPER_IMAGE
snooper_engine_context = snooper.launch( snooper_engine_context = snooper.launch(
plan, plan,
snooper_service_name, snooper_service_name,
snooper_image,
el_client_context, el_client_context,
) )
plan.print( plan.print(
...@@ -355,15 +353,10 @@ def launch_participant_network( ...@@ -355,15 +353,10 @@ def launch_participant_network(
"ethereum-metrics-exporter-{0}".format(pair_name) "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( ethereum_metrics_exporter_context = ethereum_metrics_exporter.launch(
plan, plan,
pair_name, pair_name,
ethereum_metrics_exporter_service_name, ethereum_metrics_exporter_service_name,
ethereum_metrics_exporter_image,
el_client_context, el_client_context,
cl_client_context, cl_client_context,
) )
......
...@@ -10,6 +10,8 @@ SNOOPER_BINARY_COMMAND = "./json_rpc_snoop" ...@@ -10,6 +10,8 @@ SNOOPER_BINARY_COMMAND = "./json_rpc_snoop"
PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER" PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER"
DEFAULT_SNOOPER_IMAGE = "ethpandaops/json-rpc-snoop:1.1.0"
SNOOPER_USED_PORTS = { SNOOPER_USED_PORTS = {
SNOOPER_ENGINE_RPC_PORT_ID: shared_utils.new_port_spec( SNOOPER_ENGINE_RPC_PORT_ID: shared_utils.new_port_spec(
SNOOPER_ENGINE_RPC_PORT_NUM, shared_utils.TCP_PROTOCOL, wait="5s" SNOOPER_ENGINE_RPC_PORT_NUM, shared_utils.TCP_PROTOCOL, wait="5s"
...@@ -17,10 +19,10 @@ SNOOPER_USED_PORTS = { ...@@ -17,10 +19,10 @@ SNOOPER_USED_PORTS = {
} }
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_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_service = plan.add_service(snooper_service_name, snooper_config)
snooper_http_port = snooper_service.ports[SNOOPER_ENGINE_RPC_PORT_ID] snooper_http_port = snooper_service.ports[SNOOPER_ENGINE_RPC_PORT_ID]
...@@ -29,7 +31,7 @@ def launch(plan, service_name, image, el_client_context): ...@@ -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( engine_rpc_port_num = "http://{0}:{1}".format(
el_client_context.ip_addr, el_client_context.ip_addr,
el_client_context.engine_rpc_port_num, el_client_context.engine_rpc_port_num,
...@@ -42,7 +44,7 @@ def get_config(image, service_name, el_client_context): ...@@ -42,7 +44,7 @@ def get_config(image, service_name, el_client_context):
] ]
return ServiceConfig( return ServiceConfig(
image=image, image=DEFAULT_SNOOPER_IMAGE,
ports=SNOOPER_USED_PORTS, ports=SNOOPER_USED_PORTS,
cmd=cmd, cmd=cmd,
private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER, private_ip_address_placeholder=PRIVATE_IP_ADDRESS_PLACEHOLDER,
......
...@@ -358,7 +358,7 @@ ...@@ -358,7 +358,7 @@
}, },
"timepicker": {}, "timepicker": {},
"timezone": "", "timezone": "",
"title": "Validator Participation Rates Dashboardssss", "title": "Validator Participation Rates Dashboards",
"uid": "participation_rates_dashboards", "uid": "participation_rates_dashboards",
"version": 1, "version": 1,
"weekStart": "" "weekStart": ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment