Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [basyx-dev] Enabling persistence for BaSyx AAS data over AKS using Azure Cosmos DB API for MongoDB
  • From: <Daniel.Espen@xxxxxxxxxxxxxxxxxx>
  • Date: Thu, 10 Feb 2022 14:27:54 +0000
  • Accept-language: de-DE, en-US
  • Delivered-to: basyx-dev@xxxxxxxxxxx
  • Ironport-data: A9a23:8EQi66oG/F+EFKyUTk+1P7lxFOleBmKtYhIvgKrLsJaIsI4StFCzt garIBmEM/uOa2f0LdglO4jn9xgGuZaHmtZrTgJq+HhjFStB9OPIVI+TRqvS04x+DSFjoGZPt Zh2hgzodZhsJpPkjk72dOWn8RGQ7InQLlbGILes1htZGEk0GE/NtTo5w7Rj2tQx2YDga++wk YqaT/P3aAfNNwFcbzp8B5Kr8HuDa9yr5Vv0FnRnDRx6lAe2e0s9VfrzFontR5fMebS4K8bhL wr1IBFVyUuCl/slIovNfr8W6STmSJaKVeSFoiI+t6RPHnGuqwRqupvXOsbwZm9WtAqr2Iprm ekSpN+9aTt5F5/VxMUSBkww/yFWZcWq+ZfEOj25vNHVzkDdfj3i2fxzCkExM4ACvOp6aY1M3 aVFc3ZcMFba3LnwmtpXScE07ignBOXiOoISvjdN1inUC94nTIvOBavQ7MJe3DA+i9oIEfu2i 88xMGMzNESZOU0n1lE/L50zt8WF2nLEUxJV8WmPrO0e5EnN01kkuFTqGICMIYXRFZQ9clyjj mjP5HXpRx0XKvSSwj6E6mmhwOjVkkvGtJk6Eqb+9/NxjRud3GUODh0RW1ah5/W04qKjZz5BA 00rxQhp97JjyBO6DdTdY02RkmfYnxFJDrK8DNYGwA2Kz6PV5SOQCW4FUiNNZbQaiSMmedA5/ gPYw4i1W1SDpJXKFi3Dq994uBvvYUAowXk+iTgsYSZtDzPLg4gylR/VVdJqDbK4lNud9drYn W/U8nNWa1k7t84G1qO/9FbLxgqir5zbJjPZCy3RRSSk4xh0IoC/bpGu6V/V4OwGIIvxori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QpElRGtldBilCe32mLnE=
  • Ironport-sdr: /1ccZBpinFyO+b91aVVCjZhZxHdSzpY6xK4ts4yYMDwU4zAUJ2pcp9DQHDf2d8toxgwTSZjtBv M7U52mU/d2sw==
  • Ironport-sdr: JYOHS8FfI69eYoIxxztpBazy48udIumtE2pUV+jt9zTeZ+V58zWIjuUpWMHzoY8AaLyBnGYGc5 +x6d8+USS3nDepiuuHBVZWW/hqIwgmaVy8ZTxGNyx6KCeXXPOvJeS9PQHunBnt6pxwDI20Ojwc wi+qFOH0I19k5CViTPLN9YHxyqrvYLsohLxOZxf0MNnyzvkekUE3E2FmxIkcPJt46tXyf6mHtH Q67R3C9wOycSCcd3k1HBZY3vYKAZpE+hr2WJ5yzn8gVb4/3EaO1UZMinOKIvP8y7Ujcpn8HMxw oYFhh84CenoF69/yyZC6Yc73
  • List-archive: <https://www.eclipse.org/mailman/private/basyx-dev/>
  • List-help: <mailto:basyx-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/basyx-dev>, <mailto:basyx-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/basyx-dev>, <mailto:basyx-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHYFzO6ZMcggHbJhkiLJRzioGEN6qyB08YAgArsb4CAAB/6YA==
  • Thread-topic: [basyx-dev] Enabling persistence for BaSyx AAS data over AKS using Azure Cosmos DB API for MongoDB

Hello Adwait,

 

We will update the documentation to include information about the environment variables in the near future. Until then, you can find more information about the naming schema for these environment variables here: https://github.com/eclipse-basyx/basyx-java-components/tree/main/basyx.components/basyx.components.lib/src/main/java/org/eclipse/basyx/components/configuration

 

Thus, for MongoDB, the prefix is “BaSyxMongoDB_” followed by the property name.

E.g. BaSyxMongoDB_dbconnectionstring

Another remark: There is no property for the mongodb user, but you can include this and multiple other connection options in the connection string. See more information about this here:

https://docs.mongodb.com/manual/reference/connection-string/

 

Best Regards

Daniel Espen

 

--

Daniel Espen

Engineer

Dept. Virtual Engineering

 

Fraunhofer IESE

Fraunhofer-Platz 1 | 67663 Kaiserslautern

+49 631 6800-2131

Daniel.Espen@xxxxxxxxxxxxxxxxxx

www.iese.fraunhofer.de

 

 

Von: basyx-dev <basyx-dev-bounces@xxxxxxxxxxx> Im Auftrag von adwait churi
Gesendet: Donnerstag, 10.
Februar 2022 14:11
An: basyx developer discussions <basyx-dev@xxxxxxxxxxx>
Betreff: Re: [basyx-dev] Enabling persistence for BaSyx AAS data over AKS using Azure Cosmos DB API for MongoDB

 

Hi Basyx community,

 

I followed the     https://github.com/eclipse-basyx/basyx-java-examples/, but found Environment variables does not reflect over Azure Kubernetes (AKS) Container.

Further I checked for environment variables for Kubernetes and found details - https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/

These found working and I came up with below structure

 

        env:
        - name: BaSyxContext_contextPath
          value: "/aasName"
        - name: BaSyxAas_aas.backend
          value: "MongoDB"
        - name: BaSyxMongodb_dbuser
          value: "cosmosdbapiformongo"
        - name: BaSyxMongodb_dbname
          value: "Data"
        - name: BaSyxMongodb_dbconnectionstring
          value: "ConnectionString"
        - name: BaSyxMongodb_dbcollectionAAS
          value: "assetadministrationshells"
        - name: BaSyxMongodb_dbcollectionSubmodels
          value: "submodels"

 

From this BaSyxContext_contextPath worked, and I can access the endpoint - http://IP:Port/aasName/shells

But I can't make connectivity with MongoDB and so aas.backend=InMemory remained as default. Reason could be - incorrect variable name format

 - name: BaSyxAas_aas.backend

 - name: BaSyxMongodb_dbuser

The name must have a specific format to follow and I am not sure where to learn it.

For example - BaSyxContext_contextPath

which is <Provider><PropertyFileName>_<PropertyName>

Here, provider is BaSyx. 

Context is name of Context.property file. 

contextPath is the property name in Context.property file

 

Could you please help me to have the names corrected?

 

Best Regards,

Adwait

 

On Thu, 3 Feb 2022 at 18:54, <Daniel.Espen@xxxxxxxxxxxxxxxxxx> wrote:

Hello Adwait,

 

Currently, it is possible to configure the components with environment variables instead of property files. Here you can find an example that shows how to do that:

-          https://github.com/eclipse-basyx/basyx-java-examples/blob/development/basyx.docker/simple-deployment/docker-compose.yml

The only “configuration” you cannot include as an environment variable is an actual .aasx-File.

 

To connect to any MongoDB, you can set up the connection using the MongoDB-Connection string:

https://wiki.eclipse.org/BaSyx_/_Documentation_/_Components_/_MongoDB

https://docs.mongodb.com/manual/reference/connection-string/


Since Azure Cosmos DB API for MongoDB should be compatible with the MongoDB API, using it should work by default. Yet, we did not test the Azure Cosmos DB API for MongoDB in specific. Therefore, we would be glad to get your hands-on input and feedback about this.

 

Best Regards

Daniel Espen

 

--

Daniel Espen

Engineer

Dept. Virtual Engineering

 

Fraunhofer IESE

Fraunhofer-Platz 1 | 67663 Kaiserslautern

+49 631 6800-2131

Daniel.Espen@xxxxxxxxxxxxxxxxxx

www.iese.fraunhofer.de

 

 

 

Von: basyx-dev <basyx-dev-bounces@xxxxxxxxxxx> Im Auftrag von adwait churi
Gesendet: Dienstag, 1.
Februar 2022 07:19
An: basyx developer discussions <
basyx-dev@xxxxxxxxxxx>
Betreff: [basyx-dev] Enabling persistence for BaSyx AAS data over AKS using Azure Cosmos DB API for MongoDB

 

Hi Basyx community,

 

Good Day!

 

With reference to "Aasx_PackEx_Tutorial_-_EN_-_51_Connect_AASX_Server_Repository" earlier email, we have requirement of persisting the BaSyx AAS data in AKS [Azure Kubernetes services].

 

Our Understanding - To enable data persistence, AAS server image should be imported along configurations shown below [attached for reference]

1] aas.properties - aas.backend=MongoDB

2] mongodb.properties

 

Question

1] Is there a possibility to upload these configurations in a yml file while uploading eclipsebasyx/aas-server:latest image over AKS?

2] If configuration in yml file is possible, then please provide guiding steps to achieve this. The yml configuration should align to Question 4] , to have data persisted in Azure Cosmos DB API for MongoDB.

3] If configuration in yml file is not possible, then please suggest alternate way where DockerHub / Azure Container Service / Azure Container Instance or Java Codebase customization is not required.

4] Can we use Azure Cosmos DB API for MongoDB to store data from BaSyx AAS image deployed over AKS? 

 

Best Regards,

Adwait

_______________________________________________
basyx-dev mailing list
basyx-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/basyx-dev


Back to the top