Cosmo-Tech / azure-digital-twins-simulator-connector

Connector between Azure Digital Twins and CosmoTech Simulator
MIT License
0 stars 2 forks source link
app-deposite azure-client azure-digital-twins connector digital-twin digital-twins generic

Azure Digital Twins connector

The aim of this project is to :

Changelog

Version 2.5.0

New Features

Documentation:

Dependency updates

Version 2.4.0

New Features

Documentation:

Version 2.3.3

Fix:

Dependency updates:

Documentation:

Version 2.3.2

Version 2.3.1

Version 2.3.0

New Features

Performance Improvements

Dependency updates

Version 2.2.0

New Features

Bug fixes

Version 2.1.0

Version 2.0.1

Properties to overwrite :

Here is the list of properties that should be changed (in META-INF/microprofile-config.properties file):

If you want to overwrite these properties, you can write your own property values in the META-INF/microprofile-config.properties file, or set a property's system, or an environment variable named :

Log level

Default log level defined is "info". We use the logging API log4j2. You can change the log threshold by setting an environment variable named: LOG_THRESHOLD_LEVEL. Log levels used for identifying the severity of an event. Log levels are organized from most specific to least:

Application insights

FEATURE IS DISABLED IN V2 The connector comes with a javaagent for adding connector's outputs to an application insights.

Create an application insight through portal.azure and set the connection string into the file /src/main/jib/applicationinsights.json

Application Insights

Change the default container registry

Modify the pom.xml or set options directly in jib:build command

See [Jib project Configuration]("https://github.com/GoogleContainerTools/jib/tree/master/jib-maven-plugin#configuration") to set correctly your container registry (GCR, ECR, ACR, Docker Hub Registry)

Build your container image with:

```shell
mvn compile jib:build -Djib.allowInsecureRegistries=true

Subsequent builds are much faster than the initial build.

Build to GitHub Registry

This project defines a GitHub workflow which build to ghcr.io. Example:

mvn compile jib:build \
  -Djib.to.image="ghcr.io/cosmo-tech/azure-digital-twins-simulator-connector:latest" \
  -Djib.to.auth.username="${{ github.actor }}" \
  -Djib.to.auth.password="${GITHUB_TOKEN}"

Build to Docker daemon

Jib can also build your image directly to a Docker daemon. This uses the docker command line tool and requires that you have docker available on your PATH.

mvn compile jib:dockerBuild

For more information, see Jib project Build

Watch build

To watch for file modifications and do continuous build run

mvn fizzed-watcher:run

How to run your image locally

docker run \ 
-v <<local_export_dir_path>>:/tmp \
-e CSM_FETCH_ABSOLUTE_PATH=/tmp/ \
-e AZURE_DIGITAL_TWINS_URL=https://XXX.XXX.XXX.digitaltwins.azure.net \
-e AZURE_TENANT_ID=<<azure_tenant_id>> \
-e AZURE_CLIENT_ID=<<azure_client_id>> \
-e AZURE_CLIENT_SECRET=<<azure_client_secret>> \
<your_container_registry>/azure-digital-twins-simulator-connector

You can find all export files under the directory "local_export_dir_path" specified above

How-to

    <dependency>
      <groupId>com.github.Cosmo-Tech</groupId>
      <artifactId>azure-digital-twins-simulator-connector</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency>

Tasks :