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: Wed, 23 Feb 2022 12:09:45 +0000
  • Accept-language: de-DE, en-US
  • Delivered-to: basyx-dev@xxxxxxxxxxx
  • Ironport-data: A9a23:Qjo6s6NlntslrDfvrR0SkMFynXyQoLVcMsEvi/4bfWQNrUpxhTIEm zNLDDyOPf+INDChKdp+YYW38UtT6JHdzYM2TXM5pCpnJ55oRWUpJjg5wmPYZX76whjrFRo/h ykmQoCbap1yEhcwnz/1WlTbhSAUOZqgG/ysWIYoBggrHVU+EH170ko68wIEqtcAbeaRU1vlV eza/pW31G+Ng1aY5UpNtspvADs21BjDkGtwUm4WPJinj3eC/5UhN6/zEInqR5fOrim4KcbhL wrL5OnREmo0ZH7BAPv9+lrwWhVirrI/oWFih1IOM5VOjCSuqQQN1aMEF6YZYH15gheCkOBe1 +pNt52ZHFJB0q3kwIzxUjFbCGR4MLAA+bLcLD6xq8WOyU3BfXb2hfljZK00FdRFoaAmXycXr qdecljhbTjb7w6y6J6yTOhhgoION9HmOqset2ptiz/DBOsgQZfNTr+M6dIwMDIY1psURayCP pBxhTxHTj3NZQZtZnorNL0zn7aloWDQbDJzgQfAzUYwyzKKl1UqgOmF3MDuUtaDXtRF20qVu ErL9GD4GgoXctuFxlK4HmmEgPSJnC7gVcQcDrSl8P5tjlCJgGAeYPELabelica+j3GdB9dWE WId2CEhnYcty0ypT/CoCnVUv0W4lhIbXtNRFcgz5weM1rfY7m6lO4QUctJSQIB36JRqG1TGw nfWwIy3WFSDpZXIERqgGqGoQSSaFQV9wYUqRiYFVgYf+N3qvZ0+lBSnoj1LTvHr0Iad9d3Y+ TCHrS46jrMfyPYF3qGplW0rbhqqvd7IQxU4oAvNV3+j7gR3aZTja4HABbnnARRocNbxorqp5 iRsdy2iAA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dMINVUOhpnRgOhZGo0pVc+cMDENFUZZOSV/1KzrKhlvwft3ENgRVftIWffmqrx+K Mm8R8VETBRcQ==
  • Ironport-sdr: hKEiI67rL2074M5kPp7FbhB59dLXLoib945SMthsQCZmQdGUPPrd1dSnwLSeQ0s5UYqoUKB+a9 ef8AoBhYdwurkB5NtD005z4+SnormkhXJYopXIH2Lkj28Unhei9kFClFT4va9STOCr8p3ZD3AP NTWfIFVDOx8CqhrWgVrnVhPoKPC1HlB6ZtDceIRXPGqgQ91dFQBy0V87SUaEVA9xKHw04r7p1H g4u01MJgv/wI+NHdkGhGQ+kb2wyJSY0qAcmYgrwChTRPqS+Wz0yRuwfU9oDl6gMrnDxF9OKeyM +vUpGlVXRdbkNxUkHDbSxMYa
  • 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/6YIAAQ8mAgA7q+gCABROv8A==
  • Thread-topic: [basyx-dev] Enabling persistence for BaSyx AAS data over AKS using Azure Cosmos DB API for MongoDB

Hello Adwait,

 

BaSyxAAS_aas.backend is the correct name for this environment variable.

 

Within a docker-compose.yml, it is possible to embed a .env-File in the with:

    env_file:

      - aas.env

And have the following content included (in addition to the remaining variables of course):

BaSyxAAS_aas.backend=MongoDB

 

According to the documentation, it should also be possible to also include env-files for kubernetes or by reading the environment variables from a ConfigMap:

https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/

Does one of these ways work for you?

 

There only exist two ways to embed the configuration into the container: by embedding the .property file or by setting the environment variable in some way. If both possibilities do not work, you can only change the variable’s name by modifying the source code and building the modified version of the image.

 

Greetings

Daniel Espen

 

Von: basyx-dev <basyx-dev-bounces@xxxxxxxxxxx> Im Auftrag von adwait churi
Gesendet: Sonntag, 20.
Februar 2022 07:57
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 Support Team,

 

Good Day,

 

I would like to have updates on,

 

BaSyxAAS_aas.backend is failing due to inappropriate / unacceptable format in AKS. When deployed, the container errored out.

        - name: BaSyxAAS_aas.backend
          value: "MongoDB"

I also tried the following, but it has the same effect.

        - name: "BaSyxAAS_aas.backend"
          value: "MongoDB"

 

What is the alternative / quick fix for this?

 

Best Regards,

Adwait

On Fri, Feb 11, 2022, 12:38 AM adwait churi <adwaitchuri@xxxxxxxxx> wrote:

Hi Basyx community,

 

Thank you for replying swiftly.

 

I can configure all other properties as mentioned in respective configuration files.

But BaSyxAAS_aas.backend is failing due to inappropriate / unacceptable format in AKS. When deployed, the container errored out.

        - name: BaSyxAAS_aas.backend
          value: "MongoDB"

I also tried the following, but it has the same effect.

        - name: "BaSyxAAS_aas.backend"
          value: "MongoDB"

 

What is the alternative / quick fix for this?

 

Best Regards,

Adwait

 

On Thu, 10 Feb 2022 at 19:58, <Daniel.Espen@xxxxxxxxxxxxxxxxxx> wrote:

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

_______________________________________________
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