diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 018faa9b..af587a4e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,13 +20,8 @@ jobs: x86_64-apple-darwin, aarch64-apple-darwin, ] - names: - - binary: commit-boost - publish: commit-boost-cli - - binary: default-pbs - publish: commit-boost-pbs - - binary: signer-module - publish: commit-boost-signer + name: [commit-boost-cli, commit-boost-pbs, commit-boost-signer] + include: - target: x86_64-unknown-linux-gnu os: ubuntu-latest @@ -64,7 +59,7 @@ jobs: uses: actions-rs/cargo@v1 with: command: build - args: --release --target ${{ matrix.target }} --bin ${{ matrix.names.binary }} + args: --release --target ${{ matrix.target }} --bin ${{ matrix.name }} env: CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER: gcc @@ -72,20 +67,20 @@ jobs: if: runner.os != 'Windows' run: | cd target/${{ matrix.target }}/release - tar -czvf ${{ matrix.names.publish }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz ${{ matrix.names.binary }} - mv ${{ matrix.names.publish }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz ../../../ + tar -czvf ${{ matrix.name }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz ${{ matrix.name }} + mv ${{ matrix.name }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz ../../../ - name: Package binary (Windows) if: runner.os == 'Windows' run: | cd target/${{ matrix.target }}/release - 7z a ${{ matrix.names.publish }}-${{ github.ref_name }}-${{ matrix.target }}.zip ${{ matrix.names.binary }}.exe - move ${{ matrix.names.publish }}-${{ github.ref_name }}-${{ matrix.target }}.zip ../../../ + 7z a ${{ matrix.name }}-${{ github.ref_name }}-${{ matrix.target }}.zip ${{ matrix.name }}.exe + move ${{ matrix.name }}-${{ github.ref_name }}-${{ matrix.target }}.zip ../../../ - name: Upload binary to release uses: softprops/action-gh-release@v2 with: - files: ${{ matrix.names.publish }}-${{ github.ref_name }}-${{ matrix.target }}.${{ runner.os == 'Windows' && 'zip' || 'tar.gz' }} + files: ${{ matrix.name }}-${{ github.ref_name }}-${{ matrix.target }}.${{ runner.os == 'Windows' && 'zip' || 'tar.gz' }} draft: true token: ${{ secrets.GITHUB_TOKEN }} diff --git a/benches/pbs/README.md b/benches/pbs/README.md index be10c6d7..7393d101 100644 --- a/benches/pbs/README.md +++ b/benches/pbs/README.md @@ -90,13 +90,13 @@ docker rm --force mev_boost_bench #### Commit-Boost You can run the provided `docker-compose` file: ```bash -commit-boost start --docker benches/pbs/bench.docker-compose.yml +commit-boost-cli start --docker benches/pbs/bench.docker-compose.yml ``` -or regenerate it using `commit-boost init`. +or regenerate it using `commit-boost-cli init`. To clean up after then benchmark, run: ```bash -commit-boost stop --docker benches/pbs/bench.docker-compose.yml +commit-boost-cli stop --docker benches/pbs/bench.docker-compose.yml ``` ### Running the benchmark diff --git a/bin/Cargo.toml b/bin/Cargo.toml index 46fdb603..ed7493c5 100644 --- a/bin/Cargo.toml +++ b/bin/Cargo.toml @@ -24,13 +24,13 @@ eyre.workspace = true color-eyre.workspace = true [[bin]] -name = "commit-boost" -path = "commit_boost.rs" +name = "commit-boost-cli" +path = "cli.rs" [[bin]] -name = "default-pbs" -path = "default_pbs.rs" +name = "commit-boost-pbs" +path = "pbs.rs" [[bin]] -name = "signer-module" -path = "signer_module.rs" +name = "commit-boost-signer" +path = "signer.rs" diff --git a/bin/commit_boost.rs b/bin/cli.rs similarity index 100% rename from bin/commit_boost.rs rename to bin/cli.rs diff --git a/bin/default_pbs.rs b/bin/pbs.rs similarity index 100% rename from bin/default_pbs.rs rename to bin/pbs.rs diff --git a/bin/signer_module.rs b/bin/signer.rs similarity index 100% rename from bin/signer_module.rs rename to bin/signer.rs diff --git a/config.example.toml b/config.example.toml index 49b50dca..4da68ff2 100644 --- a/config.example.toml +++ b/config.example.toml @@ -132,7 +132,7 @@ SOME_ENV_VAR = "some_value" # - files: # - /etc/prometheus/targets.json # ``` -# and use the `targets.json` file generated by `commit-boost init` +# and use the `targets.json` file generated by `commit-boost-cli init` prometheus_config = "./docker/prometheus.yml" # Whether to start Grafana with built-in dashboards # OPTIONAL, DEFAULT: true diff --git a/crates/cli/src/docker_init.rs b/crates/cli/src/docker_init.rs index d2d9d9fa..c0769710 100644 --- a/crates/cli/src/docker_init.rs +++ b/crates/cli/src/docker_init.rs @@ -474,7 +474,7 @@ pub fn handle_docker_init(config_path: String, output_dir: String) -> Result<()> } if envs.is_empty() { - println!("Run with:\n\t`commit-boost start --docker {:?}`", compose_path); + println!("Run with:\n\t`commit-boost-cli start --docker {:?}`", compose_path); } else { // write envs to .env file let envs_str = { @@ -490,7 +490,7 @@ pub fn handle_docker_init(config_path: String, output_dir: String) -> Result<()> println!("Env file written to: {:?}", env_path); println!( - "Run with:\n\t`commit-boost start --docker {:?} --env {:?}`", + "Run with:\n\t`commit-boost-cli start --docker {:?} --env {:?}`", compose_path, env_path ); } diff --git a/docker/pbs.Dockerfile b/docker/pbs.Dockerfile index 77ce0e8d..2f4666af 100644 --- a/docker/pbs.Dockerfile +++ b/docker/pbs.Dockerfile @@ -11,7 +11,7 @@ COPY --from=planner /app/recipe.json recipe.json RUN cargo chef cook --release --recipe-path recipe.json COPY . . -RUN cargo build --release --bin default-pbs +RUN cargo build --release --bin commit-boost-pbs FROM debian:bookworm-slim AS runtime @@ -25,8 +25,8 @@ RUN apt-get update && apt-get install -y \ && apt-get clean autoclean \ && rm -rf /var/lib/apt/lists/* -COPY --from=builder /app/target/release/default-pbs /usr/local/bin -ENTRYPOINT ["/usr/local/bin/default-pbs"] +COPY --from=builder /app/target/release/commit-boost-pbs /usr/local/bin +ENTRYPOINT ["/usr/local/bin/commit-boost-pbs"] diff --git a/docker/signer.Dockerfile b/docker/signer.Dockerfile index a5de6829..d5835d81 100644 --- a/docker/signer.Dockerfile +++ b/docker/signer.Dockerfile @@ -11,7 +11,7 @@ COPY --from=planner /app/recipe.json recipe.json RUN cargo chef cook --release --recipe-path recipe.json COPY . . -RUN cargo build --release --bin signer-module +RUN cargo build --release --bin commit-boost-signer FROM debian:bookworm-slim AS runtime @@ -25,8 +25,8 @@ RUN apt-get update && apt-get install -y \ && apt-get clean autoclean \ && rm -rf /var/lib/apt/lists/* -COPY --from=builder /app/target/release/signer-module /usr/local/bin -ENTRYPOINT ["/usr/local/bin/signer-module"] +COPY --from=builder /app/target/release/commit-boost-signer /usr/local/bin +ENTRYPOINT ["/usr/local/bin/commit-boost-signer"] diff --git a/docs/docs/get_started/overview.md b/docs/docs/get_started/overview.md index be44b28a..b3dd3fac 100644 --- a/docs/docs/get_started/overview.md +++ b/docs/docs/get_started/overview.md @@ -51,10 +51,10 @@ You will need to build the CLI to create the `docker-compose` file: ```bash # Build the CLI -cargo build --release --bin commit-boost +cargo build --release --bin commit-boost-cli # Check that it works -./target/release/commit-boost --version +./target/release/commit-boost-cli --version ``` and the modules as Docker images @@ -73,10 +73,10 @@ This will create two local images called `commitboost_pbs_default` and `commitbo Alternatively, you can also build the modules from source and run them without Docker, in which case you can skip the CLI and only compile the modules: ```bash -# Build the PBS module, this corresponds to commit-boost-pbs in the releases -cargo build --release --bin default-pbs +# Build the PBS module +cargo build --release --bin commit-boost-pbs -# Build the Signer module, this corresponds to commit-boost-signer in the releases -cargo build --release --bin signer-module +# Build the Signer module +cargo build --release --bin commit-boost-signer ``` diff --git a/docs/docs/get_started/running/docker.md b/docs/docs/get_started/running/docker.md index 0d3f9b37..3dd1473d 100644 --- a/docs/docs/get_started/running/docker.md +++ b/docs/docs/get_started/running/docker.md @@ -9,7 +9,7 @@ The Commit-Boost CLI will generate a dynamic `docker-compose.yml` file using the First run: ```bash -commit-boost init --config cb-config.toml +commit-boost-cli init --config cb-config.toml ``` This will create up to three files: - `cb.docker-compose.yml`, which contains the full setup of the Commit-Boost services @@ -20,7 +20,7 @@ This will create up to three files: To start Commit-Boost run: ```bash -commit-boost start --docker cb.docker-compose.yml [--env .cb.env] +commit-boost-cli start --docker cb.docker-compose.yml [--env .cb.env] ``` 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). @@ -34,7 +34,7 @@ If enabled, this will also start a Prometheus server on port `9090` and a Grafan To check logs, run: ```bash -commit-boost logs +commit-boost-cli logs ``` 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. @@ -42,6 +42,6 @@ This will currently show all logs from the different services via the Docker log To stop all the services and cleanup, simply run: ```bash -commit-boost stop +commit-boost-cli stop ``` This will wind down all services and clear internal networks and file mounts. \ No newline at end of file