From 3f96bf73c574ead87d0102bbc800d429b901f25c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Arg=C3=A9rus?= Date: Wed, 20 Mar 2024 13:12:04 +0100 Subject: [PATCH] Fix build scripts etc.. - Fix build scripts - Update parts of doc - Add cache --- .dockerignore | 2 +- .github/workflows/check_license.yml | 9 +- .../workflows/kuksa_databroker-cli_build.yml | 67 +++-- .github/workflows/kuksa_databroker_build.yml | 247 ++++++++++++------ .github/workflows/pre-commit.yml | 3 +- .gitignore | 5 + Dockerfile | 10 +- README.md | 32 +-- build-all-targets-cli.sh | 66 +++-- build-all-targets.sh | 65 +++-- createbom/createbom.py | 0 databroker/src/main.rs | 6 +- doc/quickstart.md | 4 +- doc/user_guide.md | 46 ++-- integration_test/run.sh | 4 +- 15 files changed, 337 insertions(+), 229 deletions(-) mode change 100644 => 100755 createbom/createbom.py diff --git a/.dockerignore b/.dockerignore index f4ceea78..8b137891 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1 @@ -**/target/ + diff --git a/.github/workflows/check_license.yml b/.github/workflows/check_license.yml index df728a08..dbaab4b9 100755 --- a/.github/workflows/check_license.yml +++ b/.github/workflows/check_license.yml @@ -1,7 +1,9 @@ -name: spdx +name: Check SPDX headers on: - pull_request + pull_request: + workflow_call: + concurrency: group: ${{ github.ref }}-${{ github.workflow }} @@ -9,10 +11,11 @@ concurrency: jobs: check-spdx-headers: + name: Check SPDX headers + runs-on: ubuntu-latest steps: - - name: Checkout code uses: actions/checkout@v4 with: diff --git a/.github/workflows/kuksa_databroker-cli_build.yml b/.github/workflows/kuksa_databroker-cli_build.yml index b80c3a29..268dcf49 100644 --- a/.github/workflows/kuksa_databroker-cli_build.yml +++ b/.github/workflows/kuksa_databroker-cli_build.yml @@ -11,7 +11,7 @@ # * SPDX-License-Identifier: Apache-2.0 # ********************************************************************************/ -name: kuksa_databroker-cli_build +name: Build kuksa-databroker-cli on: push: @@ -32,25 +32,34 @@ concurrency: jobs: lint: - name: Linting + name: Lint runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: databroker-cli-lint-${{ hashFiles('**/Cargo.lock') }} - name: cargo fmt working-directory: ${{github.workspace}} run: cargo fmt -- --check - name: cargo clippy working-directory: ${{github.workspace}} run: cargo clippy --all-targets -- -W warnings -D warnings + check_ghcr_push: + name: Check access rights uses: eclipse-kuksa/kuksa-actions/.github/workflows/check_ghcr_push.yml@2 secrets: inherit -# Run on selfhosted, because our runner has native ARM build in a remote -# builder (no need for qemu) build-container: + name: Build multiarch container runs-on: ubuntu-latest needs: check_ghcr_push @@ -58,11 +67,24 @@ jobs: - uses: actions/checkout@v4 with: submodules: recursive - + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: databroker-cli-release-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }} + + - name: Install build prerequisites + working-directory: ${{github.workspace}}/ + run: | + which cargo-license || cargo install cargo-license + which cross || cargo install cross - name: Building working-directory: ${{github.workspace}}/ run: | - cargo install cargo-license cross ./build-all-targets-cli.sh - name: Docker meta @@ -71,7 +93,7 @@ jobs: with: # list of Docker images to use as base name for tags images: | - ghcr.io/eclipse-kuksa/kuksa-databrokerdatabroker-cli + ghcr.io/eclipse-kuksa/kuksa-databroker-cli # generate Docker tags based on the following events/attributes tags: | type=ref,event=branch @@ -80,9 +102,6 @@ jobs: type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v3 @@ -95,7 +114,7 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build kuksa.val databroker CLI container and push to ghcr.io (and ttl.sh) + - name: Build kuksa-databroker-cli container and push to ghcr.io (and ttl.sh) id: ghcr-build if: needs.check_ghcr_push.outputs.push == 'true' uses: docker/build-push-action@v5 @@ -109,13 +128,13 @@ jobs: push: true tags: | ${{ steps.meta.outputs.tags }} - ttl.sh/kuksa.val/kuksa-databroker-cli-${{github.sha}} + ttl.sh/eclipse-kuksa/kuksa-databroker-cli-${{github.sha}} labels: ${{ steps.meta.outputs.labels }} # Provenance to solve that an unknown/unkown image is shown on ghcr.io # Same problem as described in https://github.com/orgs/community/discussions/45969 provenance: false - - name: Build ephemeral KUKSA Databroker container and push to ttl.sh + - name: Build ephemeral kuksa-databroker-cli container and push to ttl.sh if: needs.check_ghcr_push.outputs.push == 'false' id: tmp-build uses: docker/build-push-action@v5 @@ -127,7 +146,7 @@ jobs: file: ./Dockerfile-cli context: . push: true - tags: "ttl.sh/kuksa.val/kuksa-databroker-cli-${{github.sha}}" + tags: "ttl.sh/eclipse-kuksa/kuksa-databroker-cli-${{github.sha}}" labels: ${{ steps.meta.outputs.labels }} # Provenance to solve that an unknown/unkown image is shown on ghcr.io # Same problem as described in https://github.com/orgs/community/discussions/45969 @@ -137,7 +156,7 @@ jobs: - name: Posting message uses: ./.github/actions/post-container-location with: - image: ttl.sh/kuksa.val/kuksa-databroker-cli-${{github.sha}} + image: ttl.sh/eclipse-kuksa/kuksa-databroker-cli-${{github.sha}} - name: "Archiving AMD64 artifacts" uses: actions/upload-artifact@v4 @@ -154,22 +173,30 @@ jobs: - name: "Archiving RISCV64 artifacts" uses: actions/upload-artifact@v4 with: - name: databroker--cli-riscv64 + name: databroker-cli-riscv64 path: ${{github.workspace}}/dist/riscv64 bom: - name: Bill of Material Check + name: Check Bill of Material runs-on: ubuntu-latest - needs: build-container steps: - uses: actions/checkout@v4 + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: databroker-cli-bom-${{ hashFiles('**/Cargo.lock') }} - name: "Createbom: License check and Dash output generation" working-directory: ${{github.workspace}}/createbom run: | - cargo install cargo-license + which cargo-license || cargo install cargo-license python3 createbom.py --dash ${{github.workspace}}/dash-databroker-deps ../databroker - name: Dash license check diff --git a/.github/workflows/kuksa_databroker_build.yml b/.github/workflows/kuksa_databroker_build.yml index cb8f0243..32fa530f 100644 --- a/.github/workflows/kuksa_databroker_build.yml +++ b/.github/workflows/kuksa_databroker_build.yml @@ -11,18 +11,12 @@ # * SPDX-License-Identifier: Apache-2.0 # ********************************************************************************/ -name: kuksa_databroker_build +name: Build kuksa-databroker on: push: branches: [ master ] pull_request: - paths: - - ".github/workflows/kuksa_databroker_build.yml" - - "**" - - "proto/**" - - "Cargo.*" - - "Cross.toml" workflow_call: workflow_dispatch: @@ -31,25 +25,27 @@ concurrency: cancel-in-progress: true jobs: - lint-and-test: - name: Linting and Testing + lint: + name: Lint runs-on: ubuntu-latest - + env: + CARGO_TERM_COLOR: always steps: - uses: actions/checkout@v4 - - # Seems not neccessary on ubuntu-latest runner - #- uses: dtolnay/rust-toolchain@stable - - - name: "Install cargo modules" - run: cargo install cargo-tarpaulin - + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: databroker-lint-${{ hashFiles('**/Cargo.lock') }} - name: Show toolchain information working-directory: ${{github.workspace}} run: | rustup toolchain list cargo --version - - name: cargo fmt working-directory: ${{github.workspace}} run: cargo fmt -- --check @@ -60,55 +56,121 @@ jobs: working-directory: ${{github.workspace}} run: cargo clippy --features viss --all-targets -- -W warnings -D warnings - - name: Run tests and report code coverage - run: | - cargo tarpaulin -o xml \ - --exclude-files databroker/tests/* \ - --exclude-files databroker/tests/world/* - - - name: Upload coverage report - uses: actions/upload-artifact@v4 + test: + name: Run unit tests + runs-on: ubuntu-latest + env: + CARGO_TERM_COLOR: always + steps: + - uses: actions/checkout@v4 + - uses: actions/cache@v4 with: - name: Code coverage report - path: cobertura.xml - - # - name: Publish coverage report as comment - # uses: 5monkeys/cobertura-action@v12 - # if: github.event_name == 'pull_request' - # with: - # path: cobertura.xml - # repo_token: ${{ secrets.GITHUB_TOKEN }} - # minimum_coverage: 40 + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: databroker-coverage-${{ hashFiles('**/Cargo.lock') }} + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - name: Generate code coverage + run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + files: lcov.info + build: + name: Build + runs-on: ubuntu-latest + env: + CARGO_TERM_COLOR: always + strategy: + matrix: + platform: + - name: amd64 + target: x86_64-unknown-linux-musl + - name: arm64 + target: aarch64-unknown-linux-musl + - name: riscv64 + target: riscv64gc-unknown-linux-gnu + steps: + - uses: actions/checkout@v4 + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: databroker-release-${{ matrix.platform.name }}-${{ hashFiles('**/Cargo.lock') }} + - name: Install build prerequisites + working-directory: ${{github.workspace}}/ + run: | + which cross || cargo install cross + - name: Build + working-directory: ${{github.workspace}}/ + run: | + cross build --target ${{ matrix.platform.target }} --bin databroker --release + mkdir -p "dist/${{ matrix.platform.name }}" + cp "target/${{ matrix.platform.target }}/release/databroker" "dist/${{ matrix.platform.name }}" + - name: Package dist files + shell: bash + working-directory: ${{github.workspace}} + run: | + tar -cf databroker-${{ matrix.platform.name }}.tar.gz dist + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: databroker-${{ matrix.platform.name }}.tar.gz + path: databroker-${{ matrix.platform.name }}.tar.gz + if-no-files-found: error check_ghcr_push: + name: Check access rights uses: eclipse-kuksa/kuksa-actions/.github/workflows/check_ghcr_push.yml@2 secrets: inherit - build-container: + create-container: + name: Create multiarch container runs-on: ubuntu-latest - needs: check_ghcr_push + needs: [build, bom, check_ghcr_push] steps: - uses: actions/checkout@v4 + - name: Retrieve artifacts + uses: actions/download-artifact@v4 with: - submodules: recursive - - - name: Building - working-directory: ${{github.workspace}}/ + path: artifacts + merge-multiple: true + + - name: Unpack binaries + env: + AMD64_DIR: ${{ github.workspace }}/target/x86_64-unknown-linux-musl/release + ARM64_DIR: ${{ github.workspace }}/target/aarch64-unknown-linux-musl/release + RISCV64_DIR: ${{ github.workspace }}/target/riscv64gc-unknown-linux-gnu/release run: | - cargo install cargo-license cross - ./build-all-targets.sh - - - name: Docker meta + tar xf artifacts/databroker-amd64.tar.gz + mkdir -p "$AMD64_DIR" + mv dist/amd64/databroker "$AMD64_DIR" + tar xf artifacts/databroker-arm64.tar.gz + mkdir -p "$ARM64_DIR" + mv dist/arm64/databroker "$ARM64_DIR" + tar xf artifacts/databroker-riscv64.tar.gz + mkdir -p "$RISCV64_DIR" + mv dist/riscv64/databroker "$RISCV64_DIR" + tar xf artifacts/thirdparty.tar.gz + - name: Set container metadata id: meta uses: docker/metadata-action@v5 with: # list of Docker images to use as base name for tags images: | - ghcr.io/eclipse-kuksa/kuksa-databrokerdatabroker + ghcr.io/eclipse-kuksa/kuksa-databroker # generate Docker tags based on the following events/attributes tags: | type=ref,event=branch @@ -117,11 +179,7 @@ jobs: type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} - # only needed for runners without buildx setup, will be slow - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx + - name: Setup Docker Buildx id: buildx uses: docker/setup-buildx-action@v3 @@ -133,7 +191,7 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build kuksa.val databroker container container and push to ghcr.io (and ttl.sh) + - name: Build kuksa-databroker container and push to ghcr.io (and ttl.sh) id: ghcr-build if: needs.check_ghcr_push.outputs.push == 'true' uses: docker/build-push-action@v5 @@ -147,13 +205,13 @@ jobs: push: true tags: | ${{ steps.meta.outputs.tags }} - ttl.sh/kuksa.val/kuksa-databroker-${{github.sha}} + ttl.sh/eclipse-kuksa/kuksa-databroker-${{github.sha}} labels: ${{ steps.meta.outputs.labels }} # Provenance to solve that an unknown/unkown image is shown on ghcr.io # Same problem as described in https://github.com/orgs/community/discussions/45969 provenance: false - - name: Build ephemeral KUKSA Databroker container and push to ttl.sh + - name: Build ephemeral kuksa-databroker container and push to ttl.sh if: needs.check_ghcr_push.outputs.push == 'false' id: tmp-build uses: docker/build-push-action@v5 @@ -165,7 +223,7 @@ jobs: file: ./Dockerfile context: . push: true - tags: "ttl.sh/kuksa.val/kuksa-databroker-${{github.sha}}" + tags: "ttl.sh/eclipse-kuksa/kuksa-databroker-${{github.sha}}" labels: ${{ steps.meta.outputs.labels }} # Provenance to solve that an unknown/unkown image is shown on ghcr.io # Same problem as described in https://github.com/orgs/community/discussions/45969 @@ -174,34 +232,33 @@ jobs: - name: Posting message uses: ./.github/actions/post-container-location with: - image: ttl.sh/kuksa.val/kuksa-databroker-${{github.sha}} + image: ttl.sh/eclipse-kuksa/kuksa-databroker-${{github.sha}} - - name: "Archiving AMD64 artifacts" - uses: actions/upload-artifact@v4 - with: - name: databroker-amd64 - path: ${{github.workspace}}/dist/amd64 + # - name: "Archiving AMD64 artifacts" + # uses: actions/upload-artifact@v4 + # with: + # name: databroker-amd64 + # path: ${{github.workspace}}/dist/amd64 - - name: "Archiving ARM64 artifacts" - uses: actions/upload-artifact@v4 - with: - name: databroker-arm64 - path: ${{github.workspace}}/dist/arm64 + # - name: "Archiving ARM64 artifacts" + # uses: actions/upload-artifact@v4 + # with: + # name: databroker-arm64 + # path: ${{github.workspace}}/dist/arm64 - - name: "Archiving RISCV64 artifacts" - uses: actions/upload-artifact@v4 - with: - name: databroker-riscv64 - path: ${{github.workspace}}/dist/riscv64 + # - name: "Archiving RISCV64 artifacts" + # uses: actions/upload-artifact@v4 + # with: + # name: databroker-riscv64 + # path: ${{github.workspace}}/dist/riscv64 integration-test: name: Run integration test runs-on: ubuntu-latest - needs: [build-container] + needs: [create-container] steps: - - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -209,40 +266,62 @@ jobs: - name: Run integration test on AMD64 container env: - DATABROKER_IMAGE: ttl.sh/kuksa.val/kuksa-databroker-${{github.sha}} + DATABROKER_IMAGE: ttl.sh/eclipse-kuksa/kuksa-databroker-${{github.sha}} CONTAINER_PLATFORM: linux/amd64 run: | ${{github.workspace}}/integration_test/run.sh - name: Run integration test on ARM64 container env: - DATABROKER_IMAGE: ttl.sh/kuksa.val/kuksa-databroker-${{github.sha}} + DATABROKER_IMAGE: ttl.sh/eclipse-kuksa/kuksa-databroker-${{github.sha}} CONTAINER_PLATFORM: linux/arm64 run: | ${{github.workspace}}/integration_test/run.sh - name: Run integration test on RISCV64 container env: - DATABROKER_IMAGE: ttl.sh/kuksa.val/kuksa-databroker-${{github.sha}} + DATABROKER_IMAGE: ttl.sh/eclipse-kuksa/kuksa-databroker-${{github.sha}} CONTAINER_PLATFORM: linux/riscv64 run: | ${{github.workspace}}/integration_test/run.sh bom: - name: Bill of Material Check + name: Check Bill of Material runs-on: ubuntu-latest - needs: build-container - steps: - uses: actions/checkout@v4 - - - name: "Createbom: License check and Dash output generation" + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: databroker-bom-${{ hashFiles('**/Cargo.lock') }} + + - name: Install prerequisites + working-directory: ${{github.workspace}}/createbom + run: | + which cargo-license || cargo install cargo-license + - name: License check and Dash output generation working-directory: ${{github.workspace}}/createbom run: | - cargo install cargo-license python3 createbom.py --dash ${{github.workspace}}/dash-databroker-deps ../databroker - - name: Dash license check uses: eclipse-kuksa/kuksa-actions/check-dash@2 with: dashinput: ${{github.workspace}}/dash-databroker-deps + - name: Generate Bill of Materials + working-directory: ${{github.workspace}}/createbom + run: | + rm -r ../databroker/thirdparty + python3 createbom.py ../databroker + cd .. + tar cf thirdparty.tar.gz databroker/thirdparty + - name: Upload Bill of Materials + uses: actions/upload-artifact@v4 + with: + name: Third party licenses + path: thirdparty.tar.gz + if-no-files-found: error diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index c70333c3..ec0a66f1 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,4 +1,4 @@ -name: pre-commit +name: Run pre-commit hook on: [pull_request] @@ -8,6 +8,7 @@ concurrency: jobs: pre-commit: + name: Run pre-commit hook runs-on: ubuntu-latest steps: diff --git a/.gitignore b/.gitignore index 2f7896d1..d866f6da 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,6 @@ target/ +dist/ +__pycache__ +databroker/thirdparty +databroker-cli/thirdparty +.venv/ diff --git a/Dockerfile b/Dockerfile index badaa829..679ab113 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,15 +44,15 @@ COPY ./target/riscv64gc-unknown-linux-gnu/release/databroker /app/databroker FROM target-$TARGETARCH as target ARG TARGETARCH -COPY ./dist/$TARGETARCH/thirdparty/ /app/thirdparty +COPY ./databroker/thirdparty/ /app/thirdparty COPY ./data/vss-core/vss_release_3.1.1.json vss_release_3.1.1.json COPY ./data/vss-core/vss_release_4.0.json vss_release_4.0.json -ENV KUKSA_DATA_BROKER_ADDR=0.0.0.0 -ENV KUKSA_DATA_BROKER_PORT=55555 -ENV KUKSA_DATA_BROKER_METADATA_FILE=vss_release_4.0.json +ENV KUKSA_DATABROKER_ADDR=0.0.0.0 +ENV KUKSA_DATABROKER_PORT=55555 +ENV KUKSA_DATABROKER_METADATA_FILE=vss_release_4.0.json -EXPOSE $KUKSA_DATA_BROKER_PORT +EXPOSE $KUKSA_DATABROKER_PORT ENTRYPOINT [ "/app/databroker" ] diff --git a/README.md b/README.md index 31b59f29..163688f2 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,13 @@
- Logo + Logo -

Eclipse Kuksa.val™ Databroker

+

Eclipse Kuksa™ Databroker

- Kuksa.val Databroker is a gRPC service acting as a broker of vehicle data / data points / signals. + Kuksa Databroker is a gRPC service acting as a broker of vehicle data / data points / signals.
Explore the docs ยป
@@ -59,21 +59,21 @@ The [COVESA Vehicle Signal Specification](https://covesa.github.io/vehicle_signa However, VSS does not define how these signals are to be collected and managed within a vehicle, nor does it prescribe how other components in the vehicle can read or write signal values from and to the tree. -**Kuksa.val Databroker** is a resource efficient implementation of the VSS signal tree and is intended to be run within a vehicle on a microprocessor based platform. It allows applications in the vehicle to interact with the vehicle's sensors and actuators using a uniform, high level gRPC API for querying signals, updating current and target values of sensors and actuators and getting notified about changes to signals of interest. +**Kuksa Databroker** is a resource efficient implementation of the VSS signal tree and is intended to be run within a vehicle on a microprocessor based platform. It allows applications in the vehicle to interact with the vehicle's sensors and actuators using a uniform, high level gRPC API for querying signals, updating current and target values of sensors and actuators and getting notified about changes to signals of interest. ```mermaid flowchart LR A[Application] --VSS--- DB - DB[Kuksa.val Databroker] --VSS--- P - P[Kuksa.val Provider] --CAN frames etc---E + DB[Kuksa Databroker] --VSS--- P + P[Kuksa provider] --CAN frames etc---E E[ECU] --- Sensor E --- Actuator style DB fill:#999999,stroke:#444444,color:#ffffff ``` -At the right end, [Kuksa.val Providers](https://github.com/eclipse/kuksa.val.feeders) implement the link between the Databroker and a vehicle's Electronic Control Units (ECU) to which the hardware sensors and actuators are physically attached. +At the right end, Kuksa providers implement the link between the Databroker and a vehicle's Electronic Control Units (ECU) to which the hardware sensors and actuators are physically attached. Data is usually exchanged with ECUs by means of a CAN bus or Ethernet based protocols like SOME/IP. Providers translate between the low level messages used by these protocols and the Databroker's high level gRPC API calls to update a sensor's current reading or to forward a set-point value to an actuator via its controlling ECU. @@ -90,7 +90,7 @@ Data is usually exchanged with ECUs by means of a CAN bus or Ethernet based prot ## Getting started -The quickest possible way to get Kuksa.val Databroker up and running. +The quickest possible way to get Kuksa Databroker up and running. > :memo: **Note:** The examples in this section do not use TLS nor access control. Please refer to the [User Guide](./doc/user_guide.md) for more sophisticated usage examples. @@ -107,7 +107,7 @@ The quickest possible way to get Kuksa.val Databroker up and running. 1. Start Databroker in a container attached to the *kuksa* bridge network using hostname *Server*: ```sh - docker run -it --rm --name Server --network kuksa ghcr.io/eclipse-kuksa/kuksa-databrokerdatabroker:master --insecure + docker run -it --rm --name Server --network kuksa ghcr.io/eclipse-kuksa/kuksa-databroker:master --insecure ``` > :bulb: **Tip:** You can stop the container using `ctrl-c`. @@ -119,7 +119,7 @@ The quickest possible way to get Kuksa.val Databroker up and running. ```sh # in a new terminal - docker run -it --rm --network kuksa ghcr.io/eclipse-kuksa/kuksa-databrokerdatabroker-cli:master --server Server:55555 + docker run -it --rm --network kuksa ghcr.io/eclipse-kuksa/kuksa-databroker-cli:master --server Server:55555 ``` The CLI provides an interactive prompt which can be used to send commands to the Databroker. @@ -199,18 +199,18 @@ Run the cli with: ## Usage -Please refer to the [User Guide](./doc/user_guide.md) for details regarding how to run and interact with Kuksa.val Databroker. +Please refer to the [User Guide](./doc/user_guide.md) for details regarding how to run and interact with Kuksa Databroker.

(back to top)

## Building -Building Kuksa.val Databroker from source code requires +Building Kuksa Databroker from source code requires * a [Rust tool chain](https://www.rust-lang.org/tools/install) * a local workspace containing the source code ```shell - git clone https://github.com/eclipse/kuksa.val.git + git clone https://github.com/eclipse-kuksa/kuksa-databroker.git ```

(back to top)

@@ -244,18 +244,18 @@ cargo test --all-targets ## Contributing -Please refer to the [Kuksa.val Contributing Guide](../CONTRIBUTING.md). +Please refer to the [Kuksa Contributing Guide](CONTRIBUTING.md).

(back to top)

## License -Kuksa.val Databroker is provided under the terms of the [Apache Software License 2.0](../LICENSE). +Kuksa Databroker is provided under the terms of the [Apache Software License 2.0](LICENSE).

(back to top)

## Contact -Please feel free to create [GitHub Issues](https://github.com/eclipse-kuksa/kuksa-databrokerissues) for reporting bugs and/or ask questions in our [Gitter chat room](https://matrix.to/#/#kuksa-val_community:gitter.im). +Please feel free to create [GitHub Issues](https://github.com/eclipse-kuksa/kuksa-databroker/issues) for reporting bugs and/or ask questions in our [Gitter chat room](https://matrix.to/#/#kuksa-val_community:gitter.im).

(back to top)

diff --git a/build-all-targets-cli.sh b/build-all-targets-cli.sh index 341ad631..784baaf5 100755 --- a/build-all-targets-cli.sh +++ b/build-all-targets-cli.sh @@ -10,29 +10,16 @@ # # SPDX-License-Identifier: Apache-2.0 - # exit on error, to not waste any time set -e -CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse +SCRIPT_PATH=$(realpath "$0") +SCRIPT_DIR=$(dirname "$SCRIPT_PATH") -# Create thirdparty bom -cd createbom/ -rm -rf ../databroker/thirdparty || true -python3 createbom.py ../databroker-cli -cd .. - -# Starting a fresh build -echo "Cargo clean, to start fresh..." -cargo clean -rm -rf ../dist || true -mkdir ../dist +CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse -# Buidling AMD46 -echo "Building AMD64" -cross build --target x86_64-unknown-linux-musl --bin databroker-cli --release # We need to clean this folder in target, otherwise we get weird side -# effects building the aarch image, complaining libc crate can not find +# effects building for different archs, complaining libc crate can not find # GLIBC, i.e # Compiling libc v0.2.149 #error: failed to run custom build command for `libc v0.2.149` @@ -44,37 +31,46 @@ cross build --target x86_64-unknown-linux-musl --bin databroker-cli --release # # It seems cross/cargo is reusing something from previous builds it shouldn't. # the finished artifact resides in ../target/x86_64-unknown-linux-musl/release -# so deleting the temporary files in trget/releae is no problem -echo "Cleaning up...." -rm -rf ../target/release +# so deleting the temporary files in target/releae is no problem +cleanup_target_release_dir() { + echo "Clean up target dir..." + rm -rf "$SCRIPT_DIR/target/release" +} +# Create thirdparty bom +rm -rf "$SCRIPT_DIR/databroker/thirdparty" || true +pushd createbom/ +python3 createbom.py ../databroker-cli +popd -# Buidling ARM64 +# Building AMD46 +echo "Building AMD64" +cleanup_target_release_dir +cross build --target x86_64-unknown-linux-musl --bin databroker-cli --release + +# Building ARM64 echo "Building ARM64" +cleanup_target_release_dir cross build --target aarch64-unknown-linux-musl --bin databroker-cli --release -echo "Cleaning up...." -rm -rf ../target/release - # Build RISCV64, this is a glibc based build, as musl is not # yet supported echo "Building RISCV64" +cleanup_target_release_dir cross build --target riscv64gc-unknown-linux-gnu --bin databroker-cli --release -echo "Cleaning up...." -rm -rf ../target/release # Prepare dist folders echo "Prepare amd64 dist folder" -mkdir ../dist/amd64 -cp ../target/x86_64-unknown-linux-musl/release/databroker-cli ../dist/amd64 -cp -r ./databroker-cli/thirdparty ../dist/amd64 +mkdir -p "$SCRIPT_DIR/dist/amd64" +cp "$SCRIPT_DIR/target/x86_64-unknown-linux-musl/release/databroker-cli" "$SCRIPT_DIR/dist/amd64" +cp -r "$SCRIPT_DIR/databroker-cli/thirdparty" "$SCRIPT_DIR/dist/amd64" echo "Prepare arm64 dist folder" -mkdir ../dist/arm64 -cp ../target/aarch64-unknown-linux-musl/release/databroker-cli ../dist/arm64 -cp -r ./databroker-cli/thirdparty ../dist/arm64 +mkdir -p "$SCRIPT_DIR/dist/arm64" +cp "$SCRIPT_DIR/target/aarch64-unknown-linux-musl/release/databroker-cli" "$SCRIPT_DIR/dist/arm64" +cp -r "$SCRIPT_DIR/databroker-cli/thirdparty" "$SCRIPT_DIR/dist/arm64" echo "Prepare riscv64 dist folder" -mkdir ../dist/riscv64 -cp ../target/riscv64gc-unknown-linux-gnu/release/databroker-cli ../dist/riscv64 -cp -r ./databroker-cli/thirdparty ../dist/riscv64 +mkdir -p "$SCRIPT_DIR/dist/riscv64" +cp "$SCRIPT_DIR/target/riscv64gc-unknown-linux-gnu/release/databroker-cli" "$SCRIPT_DIR/dist/riscv64" +cp -r "$SCRIPT_DIR/databroker-cli/thirdparty" "$SCRIPT_DIR/dist/riscv64" diff --git a/build-all-targets.sh b/build-all-targets.sh index b5d72b74..7b995b2b 100755 --- a/build-all-targets.sh +++ b/build-all-targets.sh @@ -13,25 +13,13 @@ # exit on error, to not waste any time set -e -CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse - -# Create thirdparty bom -cd createbom/ -rm -rf ../databroker/thirdparty || true -python3 createbom.py ../databroker -cd .. +SCRIPT_PATH=$(realpath "$0") +SCRIPT_DIR=$(dirname "$SCRIPT_PATH") -# Starting a fresh build -echo "Cargo clean, to start fresh..." -cargo clean -rm -rf ../dist || true -mkdir ../dist +CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse -# Buidling AMD46 -echo "Building AMD64" -cross build --target x86_64-unknown-linux-musl --bin databroker --release # We need to clean this folder in target, otherwise we get weird side -# effects building the aarch image, complaining libc crate can not find +# effects building for different archs, complaining libc crate can not find # GLIBC, i.e # Compiling libc v0.2.149 #error: failed to run custom build command for `libc v0.2.149` @@ -43,37 +31,46 @@ cross build --target x86_64-unknown-linux-musl --bin databroker --release # # It seems cross/cargo is reusing something from previous builds it shouldn't. # the finished artifact resides in ../target/x86_64-unknown-linux-musl/release -# so deleting the temporary files in trget/releae is no problem -echo "Cleaning up...." -rm -rf ../target/release +# so deleting the temporary files in target/releae is no problem +cleanup_target_release_dir() { + echo "Clean up target dir..." + rm -rf "$SCRIPT_DIR/target/release" +} +# Create thirdparty bom +rm -rf "$SCRIPT_DIR/databroker/thirdparty" || true +pushd createbom/ +python3 createbom.py ../databroker +popd + +# Building AMD46 +echo "Building AMD64" +cleanup_target_release_dir +cross build --target x86_64-unknown-linux-musl --bin databroker --release -# Buidling ARM64 +# Building ARM64 echo "Building ARM64" +cleanup_target_release_dir cross build --target aarch64-unknown-linux-musl --bin databroker --release -echo "Cleaning up...." -rm -rf ../target/release - # Build RISCV64, this is a glibc based build, as musl is not # yet supported echo "Building RISCV64" +cleanup_target_release_dir cross build --target riscv64gc-unknown-linux-gnu --bin databroker --release -echo "Cleaning up...." -rm -rf ../target/release # Prepare dist folders echo "Prepare amd64 dist folder" -mkdir ../dist/amd64 -cp ../target/x86_64-unknown-linux-musl/release/databroker ../dist/amd64 -cp -r ./databroker/thirdparty ../dist/amd64 +mkdir -p "$SCRIPT_DIR/dist/amd64" +cp "$SCRIPT_DIR/target/x86_64-unknown-linux-musl/release/databroker" "$SCRIPT_DIR/dist/amd64" +cp -r "$SCRIPT_DIR/databroker/thirdparty" "$SCRIPT_DIR/dist/amd64" echo "Prepare arm64 dist folder" -mkdir ../dist/arm64 -cp ../target/aarch64-unknown-linux-musl/release/databroker ../dist/arm64 -cp -r ./databroker/thirdparty ../dist/arm64 +mkdir -p "$SCRIPT_DIR/dist/arm64" +cp "$SCRIPT_DIR/target/aarch64-unknown-linux-musl/release/databroker" "$SCRIPT_DIR/dist/arm64" +cp -r "$SCRIPT_DIR/databroker/thirdparty" "$SCRIPT_DIR/dist/arm64" echo "Prepare riscv64 dist folder" -mkdir ../dist/riscv64 -cp ../target/riscv64gc-unknown-linux-gnu/release/databroker ../dist/riscv64 -cp -r ./databroker/thirdparty ../dist/riscv64 +mkdir -p "$SCRIPT_DIR/dist/riscv64" +cp "$SCRIPT_DIR/target/riscv64gc-unknown-linux-gnu/release/databroker" "$SCRIPT_DIR/dist/riscv64" +cp -r "$SCRIPT_DIR/databroker/thirdparty" "$SCRIPT_DIR/dist/riscv64" diff --git a/createbom/createbom.py b/createbom/createbom.py old mode 100644 new mode 100755 diff --git a/databroker/src/main.rs b/databroker/src/main.rs index 4332dd8d..91c0fe15 100644 --- a/databroker/src/main.rs +++ b/databroker/src/main.rs @@ -203,7 +203,7 @@ async fn main() -> Result<(), Box> { .action(ArgAction::Set) .value_name("IP") .required(false) - .env("KUKSA_DATA_BROKER_ADDR") + .env("KUKSA_DATABROKER_ADDR") .default_value("127.0.0.1"), ) .arg( @@ -214,7 +214,7 @@ async fn main() -> Result<(), Box> { .action(ArgAction::Set) .value_name("PORT") .required(false) - .env("KUKSA_DATA_BROKER_PORT") + .env("KUKSA_DATABROKER_PORT") .value_parser(clap::value_parser!(u16)) .default_value("55555"), ) @@ -227,7 +227,7 @@ async fn main() -> Result<(), Box> { .action(ArgAction::Set) .value_delimiter(',') .value_name("FILE") - .env("KUKSA_DATA_BROKER_METADATA_FILE") + .env("KUKSA_DATABROKER_METADATA_FILE") .value_parser(clap::builder::NonEmptyStringValueParser::new()) .required(false), ) diff --git a/doc/quickstart.md b/doc/quickstart.md index ade0892f..21eacb3a 100644 --- a/doc/quickstart.md +++ b/doc/quickstart.md @@ -132,7 +132,7 @@ docker run -it --rm --net=host ghcr.io/eclipse-kuksa/kuksa-databrokerdatabroker: Using the databroker-cli ``` -docker run -it --rm --net=host -e KUKSA_DATA_BROKER_PORT=55556 ghcr.io/eclipse-kuksa/kuksa-databrokerdatabroker-cli:master +docker run -it --rm --net=host -e KUKSA_DATABROKER_PORT=55556 ghcr.io/eclipse-kuksa/kuksa-databrokerdatabroker-cli:master ``` Using kuksa-client CLI @@ -157,7 +157,7 @@ docker run -it --rm --publish 55556:55556 ghcr.io/eclipse-kuksa/kuksa-databroke From your host computer you can now reach databroker at `127.0.0.1:55556`. To connect from another container, you need to use your computers IP address (**not** 127.0.0.1), i.e. to use the client ``` -docker run -it --rm -e KUKSA_DATA_BROKER_PORT=55556 -e KUKSA_DATA_BROKER_ADDR= ghcr.io/eclipse-kuksa/kuksa-databrokerdatabroker-cli:master +docker run -it --rm -e KUKSA_DATABROKER_PORT=55556 -e KUKSA_DATABROKER_ADDR= ghcr.io/eclipse-kuksa/kuksa-databrokerdatabroker-cli:master ``` Recent versions of the databroker-cli also support command line arguments, so you can also write diff --git a/doc/user_guide.md b/doc/user_guide.md index 799121e0..d1067830 100644 --- a/doc/user_guide.md +++ b/doc/user_guide.md @@ -1,6 +1,6 @@ -# Eclipse Kuksa.val™ Databroker User Guide +# Eclipse Kuksa™ Databroker User Guide The following sections provide information for running and configuring Databroker as well as information necessary for developing client applications invoking Databroker's external API. @@ -26,15 +26,15 @@ The following sections provide information for running and configuring Databroke Get help, options and version number with: ```sh -docker run --rm -it ghcr.io/eclipse-kuksa/kuksa-databrokerdatabroker:master -h +docker run --rm -it ghcr.io/eclipse-kuksa/kuksa-databroker:master -h ``` ```console Usage: databroker [OPTIONS] Options: - --address Bind address [env: KUKSA_DATA_BROKER_ADDR=] [default: 127.0.0.1] - --port Bind port [env: KUKSA_DATA_BROKER_PORT=] [default: 55555] - --vss Populate data broker with VSS metadata from (comma-separated) list of files [env: KUKSA_DATA_BROKER_METADATA_FILE=] + --address Bind address [env: KUKSA_DATABROKER_ADDR=] [default: 127.0.0.1] + --port Bind port [env: KUKSA_DATABROKER_PORT=] [default: 55555] + --vss Populate data broker with VSS metadata from (comma-separated) list of files [env: KUKSA_DATABROKER_METADATA_FILE=] --jwt-public-key Public key used to verify JWT access tokens --disable-authorization Disable authorization --insecure Allow insecure connections @@ -51,7 +51,7 @@ Options: Before starting Databroker you must decide if you want to use TLS for incoming connections or not. It is recommended to use TLS which is enabled by providing a private key with `--tls-private-key` and a server certificate with `--tls-cert`. If you do not provide those options, Databroker will only accept insecure connections. The default behavior may change in the future, so if you want insecure connections it is recommended to use the `--insecure` argument. ```sh -docker run --rm -it -p 55555:55555 ghcr.io/eclipse-kuksa/kuksa-databrokerdatabroker:master --insecure +docker run --rm -it -p 55555:55555 ghcr.io/eclipse-kuksa/kuksa-databroker:master --insecure ``` > :warning: **Warning**: Default port not working on Mac OS @@ -59,7 +59,7 @@ docker run --rm -it -p 55555:55555 ghcr.io/eclipse-kuksa/kuksa-databrokerdatabro > On several versions of Mac OS applications cannot bind to port `55555`. Databroker needs to be configured to bind to a different (local) port in such cases: > > ```sh -> docker run --rm -it -p 55556:55555 ghcr.io/eclipse-kuksa/kuksa-databrokerdatabroker:master --insecure +> docker run --rm -it -p 55556:55555 ghcr.io/eclipse-kuksa/kuksa-databroker:master --insecure > ``` > > Please refer to [this support forum post](https://developer.apple.com/forums/thread/671197) for additional information. @@ -68,26 +68,26 @@ docker run --rm -it -p 55555:55555 ghcr.io/eclipse-kuksa/kuksa-databrokerdatabro ## Enabling Authorization -Kuksa.val Databroker supports authorizing client requests based on JSON Web Tokens (JWT) provided by clients in request messages. This requires configuration of a PEM file containing the public key that should be used for verifying the tokens' signature. +Kuksa Databroker supports authorizing client requests based on JSON Web Tokens (JWT) provided by clients in request messages. This requires configuration of a PEM file containing the public key that should be used for verifying the tokens' signature. -The Kuksa.val repository contains example keys and JWTs in the *certificates* and *jwt* folders respectively which can be used for testing purposes. In order to run the commands below, the repository first needs to be cloned to the local file system: +The repository contains example keys and JWTs in the *certificates* and *jwt* folders respectively which can be used for testing purposes. In order to run the commands below, the repository first needs to be cloned to the local file system: ```shell -git clone https://github.com/eclipse/kuksa.val.git +git clone https://github.com/eclipse-kuksa/kuksa-databroker.git ``` The Databroker can then be started with support for authorization from the repository root folder: ```shell # in repository root -docker run --rm -it --name Server --network kuksa -v ./certificates:/opt/kuksa ghcr.io/eclipse-kuksa/kuksa-databrokerdatabroker:master --insecure --jwt-public-key /opt/kuksa/jwt/jwt.key.pub +docker run --rm -it --name Server --network kuksa -v ./certificates:/opt/kuksa ghcr.io/eclipse-kuksa/kuksa-databroker:master --insecure --jwt-public-key /opt/kuksa/jwt/jwt.key.pub ``` The CLI can then be configured to use a corresponding token when connecting to the Databroker: ```shell # in repository root -docker run --rm -it --network kuksa -v ./jwt:/opt/kuksa ghcr.io/eclipse-kuksa/kuksa-databrokerdatabroker-cli:master --server Server:55555 --token-file /opt/kuksa/read-vehicle-speed.token +docker run --rm -it --network kuksa -v ./jwt:/opt/kuksa ghcr.io/eclipse-kuksa/kuksa-databroker-cli:master --server Server:55555 --token-file /opt/kuksa/read-vehicle-speed.token ``` The token contains a claim that authorizes the client to read the *Vehicle.Speed* signal only. @@ -114,20 +114,20 @@ Vehicle.Speed: ( NotAvailable ) ## Enabling TLS -Kuksa.val Databroker also supports using TLS for encrypting the traffic with clients. This requires configuration of both a PEM file containing the server's private key as well as a PEM file containing the server's X.509 certificate. +Kuksa Databroker also supports using TLS for encrypting the traffic with clients. This requires configuration of both a PEM file containing the server's private key as well as a PEM file containing the server's X.509 certificate. -The command below starts the Databroker using the example key and certificate from the Kuksa.val repository: +The command below starts the Databroker using the example key and certificate from the repository: ```sh # in repository root -docker run --rm -it --name Server --network kuksa -v ./certificates:/opt/kuksa ghcr.io/eclipse-kuksa/kuksa-databrokerdatabroker:master --tls-cert /opt/kuksa/Server.pem --tls-private-key /opt/kuksa/Server.key +docker run --rm -it --name Server --network kuksa -v ./certificates:/opt/kuksa ghcr.io/eclipse-kuksa/kuksa-databroker:master --tls-cert /opt/kuksa/Server.pem --tls-private-key /opt/kuksa/Server.key ``` The CLI can then be configured to use a corresponding trusted CA certificate store when connecting to the Databroker: ```shell # in repository root -docker run --rm -it --network kuksa -v ./certificates:/opt/kuksa ghcr.io/eclipse-kuksa/kuksa-databrokerdatabroker-cli:master --server Server:55555 --ca-cert /opt/kuksa/CA.pem +docker run --rm -it --network kuksa -v ./certificates:/opt/kuksa ghcr.io/eclipse-kuksa/kuksa-databroker-cli:master --server Server:55555 --ca-cert /opt/kuksa/CA.pem ```

(back to top)

@@ -153,7 +153,7 @@ Subscription is now running in the background. Received data is identified by [1 ## Using Custom VSS Data Entries -Kuksa.val Databroker supports management of data entries and branches as defined by the [Vehicle Signal Specification](https://covesa.github.io/vehicle_signal_specification/). +Kuksa Databroker supports management of data entries and branches as defined by the [Vehicle Signal Specification](https://covesa.github.io/vehicle_signal_specification/). In order to generate metadata from a VSS specification that can be loaded by the data broker, it's possible to use the `vspec2json.py` tool that's available in the [vss-tools](https://github.com/COVESA/vss-tools) repository: @@ -165,7 +165,7 @@ that's available in the [vss-tools](https://github.com/COVESA/vss-tools) reposit The Databroker can be configured to load the resulting `vss.json` file at startup: ```shell -docker run --rm -it -p 55555:55555 ghcr.io/eclipse-kuksa/kuksa-databrokerdatabroker:master --insecure --vss vss.json +docker run --rm -it -p 55555:55555 ghcr.io/eclipse-kuksa/kuksa-databroker:master --insecure --vss vss.json ```

(back to top)

@@ -220,9 +220,9 @@ The default configuration can be overridden by means of setting the correspondin | CLI option | Environment Variable | Default Value | Description | |---------------------|-----------------------------------|---------------|-------------| -|`--vss`,
`--metadata`| `KUKSA_DATA_BROKER_METADATA_FILE` | | Populate data broker with metadata from file | -|`--address` | `KUKSA_DATA_BROKER_ADDR` | `127.0.0.1` | Listen for rpc calls | -|`--port` | `KUKSA_DATA_BROKER_PORT` | `55555` | Listen for rpc calls | +|`--vss`,
`--metadata`| `KUKSA_DATABROKER_METADATA_FILE` | | Populate data broker with metadata from file | +|`--address` | `KUKSA_DATABROKER_ADDR` | `127.0.0.1` | Listen for rpc calls | +|`--port` | `KUKSA_DATABROKER_PORT` | `55555` | Listen for rpc calls | |`--jwt-public-key` | | | Public key used to verify JWT access tokens | |`--tls-cert` | | | TLS certificate file (.pem) | |`--tls-private-key` | | | TLS private key file (.key) | @@ -232,7 +232,7 @@ The default configuration can be overridden by means of setting the correspondin ## API -Kuksa.val Databroker provides [gRPC](https://grpc.io/) based API endpoints which can be used by +Kuksa Databroker provides [gRPC](https://grpc.io/) based API endpoints which can be used by clients to interact with the server. gRPC services are specified by means of `.proto` files which define the services and the data @@ -247,7 +247,7 @@ The same `.proto` file can be used to generate server skeleton and client stubs HTTP/2 is a binary replacement for HTTP/1.1 used for handling connections, multiplexing (channels) and providing a standardized way to add headers for authorization and TLS for encryption/authentication. It also supports bi-directional streaming between client and server. -Kuksa.val Databroker implements the following service interfaces: +Kuksa Databroker implements the following service interfaces: * [kuksa.val.v1.VAL](../databroker-proto/proto/kuksa/val/v1/val.proto) * [sdv.databroker.v1.Broker](../databroker-proto/proto/sdv/databroker/v1/broker.proto) diff --git a/integration_test/run.sh b/integration_test/run.sh index 30160f25..4e694d38 100755 --- a/integration_test/run.sh +++ b/integration_test/run.sh @@ -20,11 +20,11 @@ source .venv/bin/activate pip install -r "${SCRIPT_DIR}"/requirements.txt -DATABROKER_IMAGE=${DATABROKER_IMAGE:-"ghcr.io/eclipse-kuksa/kuksa-databrokerdatabroker:0.4.0"} +DATABROKER_IMAGE=${DATABROKER_IMAGE:-"ghcr.io/eclipse-kuksa/kuksa-databroker:0.4.0"} DATABROKER_ADDRESS=${DATABROKER_ADDRESS:-"127.0.0.1:55555"} CONTAINER_PLATFORM=${CONTAINER_PLATFORM:-"linux/amd64"} -VSS_DATA_DIR="$SCRIPT_DIR/../../data" +VSS_DATA_DIR="$SCRIPT_DIR/../data" echo "Starting databroker container (\"${DATABROKER_IMAGE}\") in insecure mode, requesting platform (\"${CONTAINER_PLATFORM}\")" RUNNING_IMAGE=$(