Skip to content

Commit

Permalink
Fix more references
Browse files Browse the repository at this point in the history
  • Loading branch information
ladatz committed Jan 24, 2024
1 parent 88954b1 commit be51ac7
Show file tree
Hide file tree
Showing 62 changed files with 316 additions and 312 deletions.
2 changes: 1 addition & 1 deletion .cargo/config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[env]
DEFAULT_CHARIOTT_URL = "http://0.0.0.0:4243"
DEFAULT_INTENT_BROKER_URL = "http://0.0.0.0:4243"

[target.'cfg(all())']
rustflags = ["-D", "warnings"]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/containerize.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Containerize and Push to Container Registry

# Containerizes and pushes a build of the Chariott to a container registry.
# Containerizes and pushes a build of Chariott Intent Brokering to a container registry.
#
# To use this in your own clone of this repo, you need to configure three Github Action secrets:
# 1. CONTAINER_REGISTRY_ENDPOINT: The DNS endpoint of your container registry (eg. sdv.azurecr.io)
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/e2e-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build Chariott Container
- name: Build Intent Brokering service Container
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile.intent_brokering
load: true
tags: chariott:1
tags: intent_brokering:1

- name: Build KV-App Container
uses: docker/build-push-action@v3
Expand All @@ -63,12 +63,12 @@ jobs:
load: true
tags: kv-app:1

- name: Start Chariott
- name: Start Intent Brokering
run: |
docker run -d --name chariott --network host \
docker run -d --name intent_brokering --network host \
-e RUST_LOG=debug \
-e CHARIOTT_REGISTRY_TTL_SECS \
chariott:1
intent_brokering:1
- name: Start KV-App
run: |
Expand All @@ -78,17 +78,17 @@ jobs:
run: |
cargo test --test "*e2e"
- name: Print Chariott log output
- name: Print Intent Brokering log output
if: ${{ always() }}
run: |
docker logs chariott > chariott.log
docker logs chariott
docker logs intent_brokering > intent_brokering.log
docker logs intent_brokering
- name: Archive Chariott log output
- name: Archive Intent Brokering log output
uses: actions/upload-artifact@v1
with:
name: Chariott E2E log
path: chariott.log
name: Intent Brokering E2E log
path: intent_brokering.log

- name: Print KV App log output
if: ${{ always() }}
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/lt-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,21 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build chariott container
- name: Build intent brokering container
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile.intent_brokering
load: true
tags: chariott:1
tags: intent_brokering:1

- name: Build valgrind enabled chariott container
- name: Build valgrind enabled intent brokering container
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile.intent_brokering.valgrind
load: true
tags: val-chariott:1
tags: intent_brokering.valgrind:1

- name: Build lt-provider-app container
uses: docker/build-push-action@v3
Expand All @@ -78,9 +78,9 @@ jobs:
load: true
tags: lt-provider-app:1

- name: Start chariott and lt-provider-app
- name: Start intent_brokering and lt-provider-app
run: |
docker run --init --detach --name chariott --network host chariott:1
docker run --init --detach --name intent_brokering --network host intent_brokering:1
docker run --init --detach --name lt-provider-app --network host lt-provider-app:1
- name: Run load tests
Expand All @@ -92,9 +92,9 @@ jobs:
- name: Stop containers
run: |
docker kill --signal=SIGINT lt-provider-app
docker kill --signal=SIGINT chariott
docker kill --signal=SIGINT intent_brokering
docker stop lt-provider-app
docker stop chariott
docker stop intent_brokering
- name: Print performance numbers
run: |
Expand All @@ -107,21 +107,21 @@ jobs:
- name: Print log output
if: ${{ always() }}
run: |
docker logs chariott
docker logs intent_brokering
docker logs lt-provider-app
for f in lt-output/*.log; do
echo -e "Printing output of file $f:\n"
cat "$f";
done
- name: Start chariott and lt-provider-app
- name: Start intent_brokering and lt-provider-app
run: |
docker rm lt-provider-app
docker rm chariott
docker rm intent_brokering
mkdir -p valgrind-output
sudo chown -R 10001:10001 valgrind-output
sudo chmod -R 777 valgrind-output
docker run --init --detach --name val-chariott --network host --volume $(pwd)/valgrind-output:/output val-chariott:1
docker run --init --detach --name intent_brokering.valgrind --network host --volume $(pwd)/valgrind-output:/output intent_brokering.valgrind:1
docker run --init --detach --name lt-provider-app --network host lt-provider-app:1
- name: Run Memory Profiling using load tests
Expand All @@ -134,9 +134,9 @@ jobs:
- name: Stop containers
run: |
docker kill --signal=SIGINT lt-provider-app
docker kill --signal=SIGINT val-chariott
docker kill --signal=SIGINT intent_brokering.valgrind
docker stop lt-provider-app
docker stop val-chariott
docker stop intent_brokering.valgrind
- name: Create valgrind benchmark report
run: |
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
uses: benchmark-action/github-action-benchmark@v1
if: ${{ github.event_name != 'workflow_dispatch' }}
with:
name: Chariott Benchmark
name: Intent Brokering Benchmark
tool: 'customSmallerIsBetter'
output-file-path: lt-output/all.json
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -181,7 +181,7 @@ jobs:
- name: Print log output
if: ${{ always() }}
run: |
docker logs val-chariott
docker logs intent_brokering.valgrind
docker logs lt-provider-app
for f in lt-output/*.log; do
echo -e "Printing output of file $f:\n"
Expand Down
15 changes: 8 additions & 7 deletions Dockerfile.intent_brokering
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@
ARG RUST_VERSION=1.70
FROM docker.io/library/rust:${RUST_VERSION} AS builder

# Dockerfile for building Eclipse Chariott runtime container
# Dockerfile for building Eclipse Chariott Intent Brokering runtime container
#
# This Dockerfile utilizes a two step build process. It builds Chariott with
# statically linked dependencies (using musl) for a x86_64 architecture.
# This Dockerfile utilizes a two step build process. It builds Intent Brokering
# service with statically linked dependencies (using musl) for a x86_64
# architecture.

# Chariott user id
ARG CHARIOTT_UID=10001

RUN apt update && apt upgrade -y
RUN apt install -y cmake protobuf-compiler

# unprivileged identity to run Chariott as
# unprivileged identity to run Chariott Intent Brokering service as
RUN adduser \
--disabled-password \
--gecos "" \
Expand All @@ -32,7 +33,7 @@ COPY ./ .

RUN rustup target add x86_64-unknown-linux-musl

RUN cargo build --release --target=x86_64-unknown-linux-musl -p chariott
RUN cargo build --release --target=x86_64-unknown-linux-musl -p intent-brokering

####################################################################################################
## Final image
Expand All @@ -46,9 +47,9 @@ COPY --from=builder /etc/group /etc/group
WORKDIR /sdv

# Copy our build
COPY --from=builder /sdv/target/x86_64-unknown-linux-musl/release/chariott /sdv/chariott
COPY --from=builder /sdv/target/x86_64-unknown-linux-musl/release/intent_brokering /sdv/intent_brokering

# Use the unprivileged chariott user during execution.
USER chariott:chariott

CMD ["./chariott"]
CMD ["./intent_brokering"]
16 changes: 8 additions & 8 deletions Dockerfile.intent_brokering.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
ARG RUST_VERSION=1.70
FROM docker.io/library/rust:${RUST_VERSION} AS builder

# Dockerfile for building Eclipse Chariott container for ARM64 with
# cross-compilation.
# Dockerfile for building Eclipse Chariott Intent Brokering service container
# for ARM64 with cross-compilation.
#
# This Dockerfile utilizes a two step build process. It builds the with
# statically linked dependencies (using musl vs. glibc to accomplish this) for a
# specific architecture such that we can utilize a scratch container without
# statically linked dependencies (using musl vs. glibc to accomplish this) for
# a specific architecture such that we can utilize a scratch container without
# further dependencies for our final container, minimizing container size.

# Chariott user id
Expand All @@ -19,7 +19,7 @@ ARG CHARIOTT_UID=10001
RUN apt update && apt upgrade -y
RUN apt install -y cmake protobuf-compiler gcc-aarch64-linux-gnu

# unprivileged identity to run Chariott as
# unprivileged identity to run Chariott Intent Brokering service as
RUN adduser \
--disabled-password \
--gecos "" \
Expand All @@ -35,7 +35,7 @@ COPY ./ .

RUN rustup target add aarch64-unknown-linux-musl

RUN cargo build --release --target=aarch64-unknown-linux-musl -p chariott
RUN cargo build --release --target=aarch64-unknown-linux-musl -p intent-brokering

#############################################################x#######################################
## Final image
Expand All @@ -49,9 +49,9 @@ COPY --from=builder /etc/group /etc/group
WORKDIR /sdv

# Copy our build
COPY --from=builder /sdv/target/aarch64-unknown-linux-musl/release/chariott /sdv/chariott
COPY --from=builder /sdv/target/aarch64-unknown-linux-musl/release/intent_brokering /sdv/intent_brokering

# Use the unprivileged Chariott user during execution.
USER chariott::chariott

CMD ["./chariott"]
CMD ["./intent_brokering"]
20 changes: 11 additions & 9 deletions Dockerfile.intent_brokering.valgrind
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,22 @@
ARG RUST_VERSION=1.70
FROM docker.io/library/rust:${RUST_VERSION} AS builder

# Dockerfile for building Eclipse Chariott container
# Dockerfile for building Eclipse Chariott Intent Brokering service container
# with valgrind
#
# This Dockerfile utilizes a two step build process. It builds Chariott with
# statically linked dependencies (using musl vs. glibc to accomplish this) for a
# specific architecture such that we can utilize a scratch container without
# further dependencies for our final container, minimizing container size.
# This Dockerfile utilizes a two step build process. It builds Chariott Intent
# Brokering with statically linked dependencies (using musl vs. glibc to
# accomplish this) for a specific architecture such that we can utilize a
# scratch container without further dependencies for our final container,
# minimizing container size.

# Chariott user id
ARG CHARIOTT_UID=10001

RUN apt update && apt upgrade -y
RUN apt install -y cmake protobuf-compiler wget

# unprivileged identity to run Chariott as
# unprivileged identity to run Chariott Intent Brokering service as
RUN adduser \
--disabled-password \
--gecos "" \
Expand All @@ -32,7 +34,7 @@ WORKDIR /sdv

COPY ./ .

RUN cargo build --release -p chariott
RUN cargo build --release -p intent-brokering

#############################################################x#######################################
## Final image
Expand All @@ -59,12 +61,12 @@ COPY --from=builder /etc/group /etc/group
WORKDIR /sdv

# Copy our build
COPY --from=builder /sdv/target/release/chariott /sdv/chariott
COPY --from=builder /sdv/target/release/intent_brokering /sdv/intent_brokering

# Give chariott user ownership of the /sdv directory
RUN chown -R chariott:chariott /sdv

# Use the unprivileged chariott user during execution.
USER chariott::chariott

CMD ["valgrind", "--tool=memcheck", "--xml=yes", "--xml-file=/output/out.xml", "./chariott"]
CMD ["valgrind", "--tool=memcheck", "--xml=yes", "--xml-file=/output/out.xml", "./intent_brokering"]
6 changes: 3 additions & 3 deletions build-all-containers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ if [ -z "$IMAGE_TAG" ]; then
fi

# Build base image for all example applications
docker build --tag "chariott:base" --file ./intent_brokering/examples/applications/Dockerfile.base .
docker build --tag "intent_brokering_examples:base" --file ./intent_brokering/examples/applications/Dockerfile.base .

# Build Chariott
docker build --tag "$(concat_image_registry chariott:"$IMAGE_TAG")" --file ./intent_brokering/examples/applications/Dockerfile.generic --build-arg APP_NAME=chariott .
# Build Intent Brokering service
docker build --tag "$(concat_image_registry intent_brokering:"$IMAGE_TAG")" --file ./intent_brokering/examples/applications/Dockerfile.generic --build-arg APP_NAME=intent_brokering .

# Build Examples
docker build --tag "$(concat_image_registry cloud-object-detection-app:"$IMAGE_TAG")" --file ./intent_brokering/examples/applications/Dockerfile.cloud-object-detection --build-arg APP_NAME=cloud-object-detection-app .
Expand Down
18 changes: 9 additions & 9 deletions docs/memory-profiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ In case you want to build from source you can follow this [documentation](https:
## Scenario

In order to have a consistent feedback loop for Chariott and valgrind, we'll use the
load test benchmarking available in Chariott.
In order to have a consistent feedback loop for Intent Brokering and valgrind, we'll use the
load test benchmarking available in Intent Brokering.

## Running memcheck

Memcheck is the default valgrind tool for memory profiling. The usage for Chariott
Memcheck is the default valgrind tool for memory profiling. The usage for Intent Brokering
together with the e2e tests is as follows:

In a dedicated terminal, run valgrind with Chariott
In a dedicated terminal, run valgrind with Intent Brokering

```bash
valgrind ./target/debug/chariott
valgrind ./target/debug/intent_brokering
```

In another terminal, run the e2e tests
Expand Down Expand Up @@ -69,13 +69,13 @@ the end of the output. It looks like this:
## Running massif

The other tool to use is **massif**. It writes its output to a file, which can be
visualized with the `ms_print` tool. The usage for Chariott together with the e2e
visualized with the `ms_print` tool. The usage for Intent Brokering together with the e2e
tests is as follows:

In a dedicated terminal, run massif with Chariott
In a dedicated terminal, run massif with Intent Brokering

```bash
valgrind --tool=massif ./target/debug/chariott
valgrind --tool=massif ./target/debug/intent_brokering
```

In another terminal, run the e2e tests
Expand All @@ -98,7 +98,7 @@ The output of `ms_print` looks like this (just a part of it):

```bash
--------------------------------------------------------------------------------
Command: ./target/debug/chariott
Command: ./target/debug/intent_brokering
Massif arguments: (none)
ms_print arguments: massif.out.7704
--------------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit be51ac7

Please sign in to comment.