You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Warning: file logging is enabled, you may need to update permissions for the logs directory. e.g. with:\n\t`sudo chown -R 10001:10001 {}`",
593
577
log_dir.display()
594
578
);
579
+
println!()
595
580
}
596
581
597
-
println!("Compose file written to: {:?}", compose_path);
582
+
println!("Docker Compose file written to: {:?}", compose_path);
598
583
599
584
// write prometheus targets to file
600
585
if !targets.is_empty(){
601
-
let targets_str = serde_json::to_string_pretty(&targets)?;
602
-
let targets_path = Path::new(&output_dir).join(CB_TARGETS_FILE);
603
-
std::fs::write(&targets_path, targets_str)?;
604
-
println!("Prometheus targets file written to: {:?}", targets_path);
586
+
let targets = targets.join(", ");
587
+
println!("Note: Make sure to add these targets for Prometheus to scrape: {targets}");
588
+
println!("Check out the docs on how to configure Prometheus/Grafana/cAdvisor: https://commit-boost.github.io/commit-boost-client/get_started/running/metrics");
Copy file name to clipboardExpand all lines: docs/docs/get_started/configuration.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ port = 18550
20
20
url = ""
21
21
22
22
[metrics]
23
-
prometheus_config = "./docker/prometheus.yml"
23
+
use_metrics = true
24
24
```
25
25
26
26
You can find a list of MEV-Boost Holesky relays [here](https://www.coincashew.com/coins/overview-eth/mev-boost/mev-relay-list#holesky-testnet-relays).
@@ -282,8 +282,12 @@ A full example of a config file with Dirk can be found [here](https://github.com
282
282
## Custom module
283
283
We currently provide a test module that needs to be built locally. To build the module run:
284
284
```bash
285
-
bash scripts/build_local_modules.sh
285
+
just docker-build-test-modules
286
286
```
287
+
:::note
288
+
We use `just` as command runner. If you don't have it installed, either install it from https://github.com/casey/just or run the commands manually from the `justfile` at the root of the repo.
289
+
:::
290
+
287
291
This will create a Docker image called `test_da_commit` that periodically requests signatures from the validator, and a `test_builder_log` module that logs BuilderAPI events.
288
292
289
293
The `cb-config.toml` file needs to be updated as follows:
If you require `sudo` access to run Docker, you will need `sudo` to run some of the Commit-Boost commands. This is because under the hood Commit-Boost invokes the Docker API. You can double check this by running `docker info` in a terminal. Consider adding your user to the docker group following [ Docker’s official post-installation steps](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user)
63
-
:::
64
-
65
62
This will create two local images called `commitboost_pbs_default` and `commitboost_signer` for the Pbs and Signer module respectively. Make sure to use these images in the `docker_image` field in the `[pbs]` and `[signer]` sections of the `.toml` config file, respectively.
Copy file name to clipboardExpand all lines: docs/docs/get_started/running/docker.md
+6-10Lines changed: 6 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ description: Run Commit-Boost with Docker
3
3
---
4
4
5
5
# Docker
6
-
The Commit-Boost CLI will generate a dynamic `docker-compose.yml` file using the provided `.toml` config file. This is the recommended approach as Docker provides sandboxing of the containers from the rest of your system.
6
+
The Commit-Boost CLI generates a dynamic `docker-compose.yml` file using the provided `.toml` config file. This is the recommended approach as Docker provides sandboxing of the containers from the rest of your system.
7
7
8
8
## Init
9
9
@@ -20,28 +20,24 @@ This will create up to three files:
docker compose --env-file ".cb.env" -f ".cb.docker-compose.yml" up -d
24
24
```
25
25
26
-
This will run `docker compose up` with the correct envs, and start up the services including PBS, commit modules (if any), and metrics collection (if enabled).
26
+
This will run the all the configured services, including PBS, signer and modules (if any).
27
27
28
28
The MEV-Boost server will be exposed at `pbs.port` from the config, `18550` in our example. You'll need to point your CL/Validator client to this port to be able to source blocks from the builder market.
29
29
30
-
If enabled, this will also start a Prometheus server on port `9090` and a Grafana instance on port `3000`. In Grafana, you will also find some preset dashboards already connected.
This will currently show all logs from the different services via the Docker logs interface. Logs are also optionally saved to file, depending on your `[logs]` configuration.
40
36
41
37
## Stop
42
38
43
39
To stop all the services and cleanup, simply run:
44
40
```bash
45
-
commit-boost-cli stop
41
+
docker compose --env-file ".cb.env" -f ".cb.docker-compose.yml" down
46
42
```
47
43
This will wind down all services and clear internal networks and file mounts.
Commit-Boost can be configured to collect metrics from the different services and expose them to be scraped from Prometheus.
8
+
9
+
Make use to add the `[metrics]` section to your config file:
10
+
11
+
```toml
12
+
[metrics]
13
+
use_metrics = true
14
+
```
15
+
If the section is missing, metrics collection will be disabled. If you generated the `docker-compose.yml` file with `commit-boost-cli`, metrics ports will be automatically configured, and a sample `target.json` file will be created. If you're running the binaries directly, you will need to set the correct environment variables, as described in the [previous section](/get_started/running/binary#common).
16
+
17
+
## Example setup
18
+
19
+
:::note
20
+
The following examples assume you're running Prometheus/Grafana on the same machine as Commit-Boost. In general you should avoid this setup, and instead run them on a separate machine. cAdvisor should run in the same machine as the containers you want to monitor.
21
+
:::
22
+
23
+
24
+
### cAdvisor
25
+
[cAdvisor](https://github.com/google/cadvisor) is a tool for collecting and reporting resource usage and performance characteristics of running containers.
26
+
27
+
```yml title="cb.docker-compose.yml"
28
+
cb_cadvisor:
29
+
image: gcr.io/cadvisor/cadvisor
30
+
container_name: cb_cadvisor
31
+
ports:
32
+
- 127.0.0.1:8080:8080
33
+
volumes:
34
+
- /var/run/docker.sock:/var/run/docker.sock:ro
35
+
- /sys:/sys:ro
36
+
- /var/lib/docker/:/var/lib/docker:ro
37
+
```
38
+
39
+
### Prometheus
40
+
41
+
For more information on how to setup Prometheus, see the [Prometheus documentation](https://prometheus.io/docs/prometheus/latest/getting_started/).
Once Grafana is running, you can [import](https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/import-dashboards/) the Commit-Boost dashboards from [here](https://github.com/Commit-Boost/commit-boost-client/tree/main/provisioning/grafana), making sure to select the correct `Prometheus` datasource.
0 commit comments