簡體   English   中英

使用固件獵戶座 azure cosmos db mongo api

[英]using fiware orion with azure cosmos db mongo api

We are currently using fiware Orion with Mongo DB on a docker container in a Kubernetes cluster and everything works fine, however as soon as I am trying to use it with Azure CosmosDB mongo API things fall apart.

下面是 yaml

apiVersion: v1
kind: Namespace
metadata:
  name: fiware
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: orion
  namespace: fiware
spec:
  replicas: 1
  selector:
    matchLabels:
      app: orion
  template:
    metadata:
      labels:
        app: orion
    spec:
      containers:
      - name: orion
        image: fiware/orion:2.5.2
        ports:
        - containerPort: 1026
          name: http
          protocol: TCP
        args: ["-dbhost", "<<HOST HERE>>:<<PORT>>", "-db", "<<DB>>", "-dbuser", "<<USER>>", "-dbpwd","<<PWD>>", "-dbSSL", "-rplSet","globaldb","-dbAuthDb","admin", "-httpTimeout","15000", "-logLevel", "INFO"]
---
apiVersion: v1
kind: Service
metadata:
  name: orion
  namespace: fiware
spec:
  selector:
    app: orion
  type: LoadBalancer
  ports:
    - port: 1026
      protocol: TCP
      targetPort: 1026
      nodePort: 30000

錯誤:

time=2021-03-05T04:05:45.784Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=safeMongo.cpp[360]:getField | msg=Runtime Error (field '_id' is missing in BSONObj <{ cursor: { id: 0, ns: "orion.csubs", firstBatch: [] }, ok: 1.0 }> from caller mongoSubCacheItemInsert:83)
time=2021-03-05T04:05:45.784Z | lvl=ERROR | corr=N/A | trans=N/A | from=N/A | srv=N/A | subsrv=N/A | comp=Orion | op=AlarmManager.cpp[211]:dbError | msg=Raising alarm DatabaseError: error retrieving _id field in doc: '{ cursor: { id: 0, ns: "orion.csubs", firstBatch: [] }, ok: 1.0 }'

從 3.0.0 版本開始,Orion 能夠連接到 Azure Cosmos DB。 詳細信息可以在這里找到。 請特別注意以下注意事項:

  • 您需要使用-dbDisableRetryWrites啟動 Orion
  • 如果您在 NGSIv2 查詢中使用orderBy參數,您需要在creDate創建和索引(例如db.entities.createIndex({creDate:1}) )甚至更多。 更多細節在這里
  • 由於 Azure Cosmos DB 限制,Orion 中的瞬態實體功能不可用。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM