Commit 9bb76d57 authored by Peeeekay's avatar Peeeekay Committed by GitHub

Merge pull request #47 from kurtosis-tech/pk/expose_application_protocol_to_users

added support for application protocol to eth2 package
parents 879038a5 43c36af1
# TBD
### Breaking Change
- Introduced optional application protocol and renamed protocol to transport_protocol
# 0.1.0
### Breaking changes
......
......@@ -6,14 +6,13 @@ IMAGE_NAME = "ralexstokes/ethereum_consensus_monitor:latest"
HTTP_PORT_ID = "http"
HTTP_PORT_NUMBER = 80
HTTP_PROTOCOL = "TCP"
FORKMON_CONFIG_FILENAME = "forkmon-config.toml"
FORKMON_CONFIG_MOUNT_DIRPATH_ON_SERVICE = "/config"
USED_PORTS = {
HTTP_PORT_ID: shared_utils.new_port_spec(HTTP_PORT_NUMBER, HTTP_PROTOCOL)
HTTP_PORT_ID:shared_utils.new_port_spec(HTTP_PORT_NUMBER, shared_utils.TCP_PROTOCOL, shared_utils.HTTP_APPLICATION_PROTOCOL)
}
......
shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_utils/shared_utils.star")
static_files = import_module("github.com/kurtosis-tech/eth2-package/src/static_files/static_files.star")
SERVICE_ID = "grafana"
IMAGE_NAME = "grafana/grafana-enterprise:9.2.3"
HTTP_PORT_ID = "http"
HTTP_PORT_NUMBER_UINT16 = 3000
HTTP_PORT_PROTOCOL= "TCP"
DATASOURCE_CONFIG_REL_FILEPATH = "datasources/datasource.yml"
......@@ -23,7 +21,7 @@ GRAFANA_DASHBOARDS_FILEPATH_ON_SERVICE = GRAFANA_DASHBOARDS_DIRPATH_ON_SERVICE +
USED_PORTS = {
HTTP_PORT_ID: shared_utils.new_port_spec(HTTP_PORT_NUMBER_UINT16, HTTP_PORT_PROTOCOL)
HTTP_PORT_ID: shared_utils.new_port_spec(HTTP_PORT_NUMBER_UINT16, shared_utils.TCP_PROTOCOL, shared_utils.HTTP_APPLICATION_PROTOCOL)
}
......
......@@ -48,13 +48,13 @@ PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER"
BEACON_USED_PORTS = {
BEACON_TCP_DISCOVERY_PORT_ID: shared_utils.new_port_spec(BEACON_DISCOVERY_PORT_NUM, shared_utils.TCP_PROTOCOL),
BEACON_UDP_DISCOVERY_PORT_ID: shared_utils.new_port_spec(BEACON_DISCOVERY_PORT_NUM, shared_utils.UDP_PROTOCOL),
BEACON_HTTP_PORT_ID: shared_utils.new_port_spec(BEACON_HTTP_PORT_NUM, shared_utils.TCP_PROTOCOL),
BEACON_METRICS_PORT_ID: shared_utils.new_port_spec(BEACON_METRICS_PORT_NUM, shared_utils.TCP_PROTOCOL),
BEACON_HTTP_PORT_ID: shared_utils.new_port_spec(BEACON_HTTP_PORT_NUM, shared_utils.TCP_PROTOCOL, shared_utils.HTTP_APPLICATION_PROTOCOL),
BEACON_METRICS_PORT_ID: shared_utils.new_port_spec(BEACON_METRICS_PORT_NUM, shared_utils.TCP_PROTOCOL, shared_utils.HTTP_APPLICATION_PROTOCOL),
}
VALIDATOR_USED_PORTS = {
VALIDATOR_HTTP_PORT_ID: shared_utils.new_port_spec(VALIDATOR_HTTP_PORT_NUM, shared_utils.TCP_PROTOCOL),
VALIDATOR_METRICS_PORT_ID: shared_utils.new_port_spec(VALIDATOR_METRICS_PORT_NUM, shared_utils.TCP_PROTOCOL),
VALIDATOR_METRICS_PORT_ID: shared_utils.new_port_spec(VALIDATOR_METRICS_PORT_NUM, shared_utils.TCP_PROTOCOL, shared_utils.HTTP_APPLICATION_PROTOCOL),
}
LIGHTHOUSE_LOG_LEVELS = {
......
......@@ -7,17 +7,14 @@ IMAGE_NAME = "prom/prometheus:latest"
HTTP_PORT_ID = "http"
HTTP_PORT_NUMBER = 9090
HTTP_PORT_PROTOCOL = "TCP"
CONFIG_FILENAME = "prometheus-config.yml"
CONFIG_DIR_MOUNTPOINT_ON_PROMETHEUS = "/config"
USED_PORTS = {
HTTP_PORT_ID: shared_utils.new_port_spec(HTTP_PORT_NUMBER, HTTP_PORT_PROTOCOL)
HTTP_PORT_ID: shared_utils.new_port_spec(HTTP_PORT_NUMBER, shared_utils.TCP_PROTOCOL, shared_utils.HTTP_APPLICATION_PROTOCOL)
}
def launch_prometheus(config_template, cl_client_contexts):
all_cl_nodes_metrics_info = []
for client in cl_client_contexts:
......
TCP_PROTOCOL = "TCP"
UDP_PROTOCOL = "UDP"
HTTP_APPLICATION_PROTOCOL = "http"
NOT_PROVIDED_APPLICATION_PROTOCOL = ""
def new_template_and_data(template, template_data_json):
return struct(template = template, data = template_data_json)
......@@ -24,5 +24,5 @@ def path_dir(path):
return "/".join(split_path) or "/"
def new_port_spec(number, protocol):
return PortSpec(number = number, protocol = protocol)
def new_port_spec(number, transport_protocol, application_protocol= NOT_PROVIDED_APPLICATION_PROTOCOL):
return PortSpec(number = number, transport_protocol = transport_protocol, application_protocol=application_protocol)
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