Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ethereum-package
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
ethereum-package
Commits
326b058a
Commit
326b058a
authored
Nov 02, 2022
by
Gyanendra Mishra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added prometheus
parent
59337e91
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
3 deletions
+74
-3
README.md
README.md
+3
-3
forkmon_launcher.star
src/forkmon/forkmon_launcher.star
+1
-0
prometheus_launcher.star
src/prometheus/prometheus_launcher.star
+70
-0
No files found.
README.md
View file @
326b058a
...
@@ -6,13 +6,13 @@ This is the Startosis version of the popular [eth2-merge-kurtosis-module](https:
...
@@ -6,13 +6,13 @@ This is the Startosis version of the popular [eth2-merge-kurtosis-module](https:
### CI Missing Tasks
### CI Missing Tasks
-
[
]
Setup Releaser
-
[
x
]
Setup Releaser
### Parity Missing Tasks
### Parity Missing Tasks
-
[
]
Module IO (this is blocked on Startosis Args working)
-
[
]
Module IO (this is blocked on Startosis Args working)
-
[
]
forkmon (this is blocked on CL clients running)
-
[
x
]
forkmon (this is blocked on CL clients running)
-
[
]
prometheus (this is blocked on CL clients running)
-
[
x
]
prometheus (this is blocked on CL clients running)
-
[
]
grafana (this is blocked on prometheus running)
-
[
]
grafana (this is blocked on prometheus running)
-
[
]
testnet_verifier (this is blocked on CL/EL clients running)
-
[
]
testnet_verifier (this is blocked on CL/EL clients running)
-
[
]
transaction_spammer (this is blocked on EL clients running)
-
[
]
transaction_spammer (this is blocked on EL clients running)
...
...
src/forkmon/forkmon_launcher.star
View file @
326b058a
...
@@ -34,6 +34,7 @@ def launch_forkmon(
...
@@ -34,6 +34,7 @@ def launch_forkmon(
template_data_json = json.encode(template_data)
template_data_json = json.encode(template_data)
template_and_data = new_template_and_data(config_template, template_data_json)
template_and_data = new_template_and_data(config_template, template_data_json)
template_and_data_by_rel_dest_filepath = {}
template_and_data_by_rel_dest_filepath[FORKMON_CONFIG_FILENAME] = template_and_data
template_and_data_by_rel_dest_filepath[FORKMON_CONFIG_FILENAME] = template_and_data
config_files_artifact_uuid = render_templates(template_and_data_by_rel_dest_filepath)
config_files_artifact_uuid = render_templates(template_and_data_by_rel_dest_filepath)
...
...
src/prometheus/prometheus_launcher.star
0 → 100644
View file @
326b058a
load("github.com/kurtosis-tech/eth2-module/src/shared_utils/shared_utils.star", "new_port_spec", "new_template_and_data", "path_join")
SERVICE_ID = "prometheus"
# TODO I'm not sure if we should use latest version or ping an specific version instead
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: new_port_spec(HTTP_PORT_NUMBER, HTTP_PORT_PROTOCOL)
}
def launch_prometheus(config_template, cl_client_contexts):
all_cl_nodes_metrics_info = []
for client in cl_client_contexts:
all_cl_nodes_metrics_info.append(client.cl_nodes_metrics_info)
template_data = new_config_template_data(all_cl_nodes_metrics_info)
template_data_json = json.encode(template_data)
template_and_data = new_template_and_data(config_template, template_data_json)
template_and_data_by_rel_dest_filepath = {}
template_and_data_by_rel_dest_filepath[CONFIG_FILENAME] = template_and_data
config_files_artifact_uuid = render_templates(template_and_data_by_rel_dest_filepath)
service_config = get_service_config(config_files_artifact_uuid)
prometheus_service = add_service(SERVICE_ID, service_config)
private_ip_address = prometheus_service.ip_address
prometheus_service_http_port = prometheus_service.ports[HTTP_PORT_ID].number
return "http://{0}:{1}".format(private_ip_address, prometheus_service_http_port)
def get_service_config(config_files_artifact_uuid):
config_file_path = path_join(CONFIG_DIR_MOUNTPOINT_ON_PROMETHEUS, path_base(CONFIG_FILENAME))
return struct(
container_image_name = IMAGE_NAME,
used_ports = USED_PORTS,
files_artifact_mount_dirpaths = {
config_files_artifact_uuid : CONFIG_DIR_MOUNTPOINT_ON_PROMETHEUS
},
cmd_args = [
# You can check all the cli flags starting the container and going to the flags section
# in Prometheus admin page "{{prometheusPublicURL}}/flags" section
"--config.file=" + config_file_path,
"--storage.tsdb.path=/prometheus",
"--storage.tsdb.retention.time=1d",
"--storage.tsdb.retention.size=512MB",
"--storage.tsdb.wal-compression",
"--web.console.libraries=/etc/prometheus/console_libraries",
"--web.console.templates=/etc/prometheus/consoles",
"--web.enable-lifecycle",
]
)
def new_config_template_data(cl_nodes_metrics_info):
return {
"CLNodesMetricsInfo": cl_nodes_metrics_info
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment