diff --git a/Cargo.toml b/Cargo.toml index e5db3b1..77f97c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ # The default resolver for workspaces is different than for regular packages, so use v2 to avoid warnings resolver = "2" members = [ - "cloud_connectors/azure/mqtt_connector", + "cloud_connectors/mqtt_connector", "freyja_apps/e2e", "freyja_apps/ibeji_integration", "freyja_apps/in_memory", diff --git a/cloud_connectors/azure/Dockerfile.dt_connector.amd64 b/cloud_connectors/azure/Dockerfile.dt_connector.amd64 deleted file mode 100644 index 3d79278..0000000 --- a/cloud_connectors/azure/Dockerfile.dt_connector.amd64 +++ /dev/null @@ -1,27 +0,0 @@ -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env -WORKDIR /App - -# Copy everything -COPY ./ . -WORKDIR /App/digital_twins_connector/src/core/ -# Restore as distinct layers -RUN dotnet restore -# Build and publish a release -RUN dotnet publish -c Release -o out -RUN cp -rn ./out /App/out - -# Build runtime image -FROM docker.io/library/ubuntu:22.04 AS final - -# Install dotnet and az cli -RUN apt update -y && apt install -y dotnet-sdk-6.0 curl -RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash - -WORKDIR /sdv - -COPY --from=build-env /App/out . -COPY --from=build-env /App/container/scripts/container_startup.sh /sdv/scripts/container_startup.sh - -ENV ASPNETCORE_URLS "http://0.0.0.0:5176" - -CMD ["/sdv/scripts/container_startup.sh"] diff --git a/cloud_connectors/azure/Dockerfile.dt_connector.arm64 b/cloud_connectors/azure/Dockerfile.dt_connector.arm64 deleted file mode 100644 index 9257d45..0000000 --- a/cloud_connectors/azure/Dockerfile.dt_connector.arm64 +++ /dev/null @@ -1,27 +0,0 @@ -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env -WORKDIR /App - -# Copy everything -COPY ./ . -WORKDIR /App/digital_twins_connector/src/core/ -# Restore as distinct layers -RUN dotnet restore -# Build and publish a release -RUN dotnet publish -c Release -o out -RUN cp -rn ./out /App/out - -# Build runtime image -FROM docker.io/arm64v8/ubuntu:22.04 AS final - -# Install dotnet and az cli -RUN apt update -y && apt install -y dotnet-sdk-6.0 curl -RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash - -WORKDIR /sdv - -COPY --from=build-env /App/out . -COPY --from=build-env /App/container/scripts/container_startup.sh /sdv/scripts/container_startup.sh - -ENV ASPNETCORE_URLS "http://0.0.0.0:5176" - -CMD ["/sdv/scripts/container_startup.sh"] diff --git a/cloud_connectors/azure/container/scripts/container_startup.sh b/cloud_connectors/azure/container/scripts/container_startup.sh deleted file mode 100755 index c39a7b8..0000000 --- a/cloud_connectors/azure/container/scripts/container_startup.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT license. -# SPDX-License-Identifier: MIT - -# Exits immediately on failure. -set -eu - -# Copy any configuration files present to service configuration. -cp -rf /mnt/config /sdv/ - -# Acquire access token scoped to the Azure Digital Twin Service. -az login --use-device-code --scope https://digitaltwins.azure.net/.default - -# Set azure subscription only if SUBSCRIPTION_ID is set. -if [ -n "$SUBSCRIPTION_ID" ]; then - az account set --subscription "$SUBSCRIPTION_ID" -fi - -# Start the Digital Twin Connector service. -dotnet ./DigitalTwinsConnector.dll \ No newline at end of file diff --git a/cloud_connectors/azure/mqtt_connector/Cargo.toml b/cloud_connectors/mqtt_connector/Cargo.toml similarity index 100% rename from cloud_connectors/azure/mqtt_connector/Cargo.toml rename to cloud_connectors/mqtt_connector/Cargo.toml diff --git a/cloud_connectors/azure/mqtt_connector/README.md b/cloud_connectors/mqtt_connector/README.md similarity index 98% rename from cloud_connectors/azure/mqtt_connector/README.md rename to cloud_connectors/mqtt_connector/README.md index 56c69ea..9b2f6f0 100644 --- a/cloud_connectors/azure/mqtt_connector/README.md +++ b/cloud_connectors/mqtt_connector/README.md @@ -86,8 +86,6 @@ The steps below will guide you on manually deploying the Azure Digital Twins res #### Automated Deployment -Before starting this section, please view [Prerequisites for Automated Deployment of Azure Resources](../README.md#prerequisites-for-automated-deployment-of-azure-resources). - 1. Sign in with Azure CLI. Follow the prompts after entering the following command. ```shell diff --git a/cloud_connectors/azure/mqtt_connector/build.rs b/cloud_connectors/mqtt_connector/build.rs similarity index 100% rename from cloud_connectors/azure/mqtt_connector/build.rs rename to cloud_connectors/mqtt_connector/build.rs diff --git a/cloud_connectors/azure/mqtt_connector/res/mqtt_config.template.json b/cloud_connectors/mqtt_connector/res/mqtt_config.template.json similarity index 100% rename from cloud_connectors/azure/mqtt_connector/res/mqtt_config.template.json rename to cloud_connectors/mqtt_connector/res/mqtt_config.template.json diff --git a/cloud_connectors/azure/mqtt_connector/src/main.rs b/cloud_connectors/mqtt_connector/src/main.rs similarity index 100% rename from cloud_connectors/azure/mqtt_connector/src/main.rs rename to cloud_connectors/mqtt_connector/src/main.rs diff --git a/cloud_connectors/azure/mqtt_connector/src/mqtt_connector.rs b/cloud_connectors/mqtt_connector/src/mqtt_connector.rs similarity index 100% rename from cloud_connectors/azure/mqtt_connector/src/mqtt_connector.rs rename to cloud_connectors/mqtt_connector/src/mqtt_connector.rs diff --git a/cloud_connectors/azure/mqtt_connector/src/mqtt_connector_config.rs b/cloud_connectors/mqtt_connector/src/mqtt_connector_config.rs similarity index 100% rename from cloud_connectors/azure/mqtt_connector/src/mqtt_connector_config.rs rename to cloud_connectors/mqtt_connector/src/mqtt_connector_config.rs diff --git a/cloud_connectors/azure/.globalconfig b/cloud_connectors/resources/.globalconfig similarity index 100% rename from cloud_connectors/azure/.globalconfig rename to cloud_connectors/resources/.globalconfig diff --git a/cloud_connectors/azure/mqtt_connector/azure_function/src/function.csproj b/cloud_connectors/resources/azure_function/src/function.csproj similarity index 100% rename from cloud_connectors/azure/mqtt_connector/azure_function/src/function.csproj rename to cloud_connectors/resources/azure_function/src/function.csproj diff --git a/cloud_connectors/azure/mqtt_connector/azure_function/src/function.json b/cloud_connectors/resources/azure_function/src/function.json similarity index 100% rename from cloud_connectors/azure/mqtt_connector/azure_function/src/function.json rename to cloud_connectors/resources/azure_function/src/function.json diff --git a/cloud_connectors/azure/mqtt_connector/azure_function/src/host.json b/cloud_connectors/resources/azure_function/src/host.json similarity index 100% rename from cloud_connectors/azure/mqtt_connector/azure_function/src/host.json rename to cloud_connectors/resources/azure_function/src/host.json diff --git a/cloud_connectors/azure/mqtt_connector/azure_function/src/local.settings.json b/cloud_connectors/resources/azure_function/src/local.settings.json similarity index 100% rename from cloud_connectors/azure/mqtt_connector/azure_function/src/local.settings.json rename to cloud_connectors/resources/azure_function/src/local.settings.json diff --git a/cloud_connectors/azure/mqtt_connector/azure_function/src/run.cs b/cloud_connectors/resources/azure_function/src/run.cs similarity index 100% rename from cloud_connectors/azure/mqtt_connector/azure_function/src/run.cs rename to cloud_connectors/resources/azure_function/src/run.cs diff --git a/cloud_connectors/azure/mqtt_connector/azure_function/tests/MQTTConnectorAzureFunction.Tests.cs b/cloud_connectors/resources/azure_function/tests/MQTTConnectorAzureFunction.Tests.cs similarity index 100% rename from cloud_connectors/azure/mqtt_connector/azure_function/tests/MQTTConnectorAzureFunction.Tests.cs rename to cloud_connectors/resources/azure_function/tests/MQTTConnectorAzureFunction.Tests.cs diff --git a/cloud_connectors/azure/mqtt_connector/azure_function/tests/MQTTConnectorAzureFunction.Tests.csproj b/cloud_connectors/resources/azure_function/tests/MQTTConnectorAzureFunction.Tests.csproj similarity index 100% rename from cloud_connectors/azure/mqtt_connector/azure_function/tests/MQTTConnectorAzureFunction.Tests.csproj rename to cloud_connectors/resources/azure_function/tests/MQTTConnectorAzureFunction.Tests.csproj diff --git a/cloud_connectors/azure/sample-dtdl/hvac.json b/cloud_connectors/resources/sample-dtdl/hvac.json similarity index 100% rename from cloud_connectors/azure/sample-dtdl/hvac.json rename to cloud_connectors/resources/sample-dtdl/hvac.json diff --git a/cloud_connectors/azure/sample-dtdl/obd.json b/cloud_connectors/resources/sample-dtdl/obd.json similarity index 100% rename from cloud_connectors/azure/sample-dtdl/obd.json rename to cloud_connectors/resources/sample-dtdl/obd.json diff --git a/cloud_connectors/azure/sample-dtdl/trailer.json b/cloud_connectors/resources/sample-dtdl/trailer.json similarity index 100% rename from cloud_connectors/azure/sample-dtdl/trailer.json rename to cloud_connectors/resources/sample-dtdl/trailer.json diff --git a/cloud_connectors/azure/sample-dtdl/vehicle.json b/cloud_connectors/resources/sample-dtdl/vehicle.json similarity index 100% rename from cloud_connectors/azure/sample-dtdl/vehicle.json rename to cloud_connectors/resources/sample-dtdl/vehicle.json diff --git a/cloud_connectors/azure/scripts/digital_twins_setup.sh b/cloud_connectors/resources/scripts/digital_twins_setup.sh similarity index 100% rename from cloud_connectors/azure/scripts/digital_twins_setup.sh rename to cloud_connectors/resources/scripts/digital_twins_setup.sh diff --git a/cloud_connectors/azure/scripts/digital_twins_setup_smart_trailer.sh b/cloud_connectors/resources/scripts/digital_twins_setup_smart_trailer.sh similarity index 100% rename from cloud_connectors/azure/scripts/digital_twins_setup_smart_trailer.sh rename to cloud_connectors/resources/scripts/digital_twins_setup_smart_trailer.sh diff --git a/cloud_connectors/azure/scripts/mqtt_connector_setup.sh b/cloud_connectors/resources/scripts/mqtt_connector_setup.sh similarity index 100% rename from cloud_connectors/azure/scripts/mqtt_connector_setup.sh rename to cloud_connectors/resources/scripts/mqtt_connector_setup.sh diff --git a/cloud_connectors/azure/scripts/mqtt_connector_setup.template.json b/cloud_connectors/resources/scripts/mqtt_connector_setup.template.json similarity index 100% rename from cloud_connectors/azure/scripts/mqtt_connector_setup.template.json rename to cloud_connectors/resources/scripts/mqtt_connector_setup.template.json diff --git a/container/README.md b/container/README.md index 56b9e58..92cfd07 100644 --- a/container/README.md +++ b/container/README.md @@ -25,17 +25,7 @@ information on how to build and run supported applications in a container. ### Freyja Cloud Connectors -To containerize the -[Azure Digitals Twin Cloud Connector](../cloud_connectors/azure/digital_twins_connector/README.md) -use one of the following dockerfiles: - -- [cloud_connectors/azure/Dockerfile.dt_connector.amd64](../cloud_connectors/azure/Dockerfile.dt_connector.amd64) - -For x86-64 architecture. -- [cloud_connectors/azure/Dockerfile.dt_connector.arm64](../cloud_connectors/azure/Dockerfile.dt_connector.arm64) - -For aarch64 architecture. - -See [Docker Containers](#docker-containers) or [Podman Containers](#podman-containers) for -information on how to build and run supported applications in a container. +The sample cloud connectors do not currently support containerization. ## Configuration Overrides diff --git a/freyja_apps/e2e/README.md b/freyja_apps/e2e/README.md index 1b87b5c..1742e0f 100644 --- a/freyja_apps/e2e/README.md +++ b/freyja_apps/e2e/README.md @@ -1,6 +1,6 @@ # End-To-End Freyja Example Application -This Freyja Example Application utilizes the [Ibeji Digital Twin Adapter](https://github.com/eclipse-ibeji/freyja/tree/main/adapters/digital_twin/ibeji_adapter/) and the [Standard GRPC Cloud Adapter](https://github.com/eclipse-ibeji/freyja/tree/main/adapters/cloud/grpc_cloud_adapter/) to show a minimal end-to-end example of how to sync data from the vehicle to the cloud. +This Freyja Example Application utilizes the [Standard GRPC Digital Twin Adapter](https://github.com/eclipse-ibeji/freyja/tree/main/adapters/digital_twin/grpc_digital_twin_adapter/) configured to connect to Ibeji and the [Standard GRPC Cloud Adapter](https://github.com/eclipse-ibeji/freyja/tree/main/adapters/cloud/grpc_cloud_adapter/) to show a minimal end-to-end example of how to sync data from the vehicle to the cloud. ## Build and Run diff --git a/freyja_apps/ibeji_integration/README.md b/freyja_apps/ibeji_integration/README.md index 110007e..6db69d6 100644 --- a/freyja_apps/ibeji_integration/README.md +++ b/freyja_apps/ibeji_integration/README.md @@ -1,6 +1,6 @@ # Freyja-Ibeji Integration Example Application -This Freyja Example Application utilizes the [Ibeji Digital Twin Adapter](https://github.com/eclipse-ibeji/freyja/tree/main/adapters/digital_twin/ibeji_adapter) and an in-memory mock cloud connector adapter to show a minimal connected local example of how to retrieve data from the vehicle. +This Freyja Example Application utilizes the [Standard GRPC Digital Twin Adapter](https://github.com/eclipse-ibeji/freyja/tree/main/adapters/digital_twin/grpc_digital_twin_adapter/) configured to connect to Ibeji, as well as the in-memory mock mapping service and cloud connector adapter to show a minimal connected local example of how to retrieve data from the vehicle. ## Build and Run diff --git a/freyja_apps/template/README.md b/freyja_apps/template/README.md index 4909e9c..d66984a 100644 --- a/freyja_apps/template/README.md +++ b/freyja_apps/template/README.md @@ -7,7 +7,7 @@ This is a template for creating a Freyja application. For more information about To create your own Freyja application, you can copy this template and make the following changes: 1. Choose the adapters to use. Freyja requires users to select a Cloud Adapter, a Digital Twin Adapter, a Mapping Adapter, at least one Data Adapter Factory, and at least one Service Discovery Adapter. Some potential choices are: - 1. Freyja-provided adapters. These are enumerated in [Appendix A of the Freyja quickstart documentation](https://github.com/eclipse-ibeji/freyja/blob/main/docs/tutorials/quickstart.md#appendix-a). + 1. Freyja-provided adapters. These are enumerated in [Appendix A of the Freyja custom adapters documentation](https://github.com/eclipse-ibeji/freyja/blob/main/docs/tutorials/custom-adapters.md#appendix-a). 1. A custom adapter implementation. For more information on how to write and use these, see the see the [Freyja custom adapter documentation](https://github.com/eclipse-ibeji/freyja/blob/main/docs/tutorials/custom-adapters.md). 1. Edit `Cargo.template.toml`: 1. Add dependencies for the package(s) you need for your adapters. You can implement adapters in the same crate and import their dependencies here, or you can implement them in separate crates and import those.