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

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