Using Managed MongoDB
When using managed or external MongoDB deployed out of the EFCX solution, the following parameters are required to be updated before the EFCX deployment.
variable | URI | placement | used by |
---|---|---|---|
MONGO_HOST | mongo-mongodb.ef-external.svc.cluster.local:27017 | cim/Deployments/ef-routing-engine-deployment.yaml | file-engine |
MONGO_HOST | mongo-mongodb.ef-external.svc.cluster.local:27017 | cim/Deployments/ef-conversation-controller-deployment.yaml | conversation-controller |
MONGODB_HOST | mongodb://mongo-mongodb.ef-external.svc.cluster.local | cim/ConfigMaps/ef-connection-env-configmap.yaml | connections |
mongo_host1 up to 6 | mongo-mongodb.ef-external.svc | pre-deployment/reportingConnector/reporting-connector.conf | reporting-connector |
Important Note when using Managed MongoDB in HA using replicaSet:
For Connections configmap:
Edit the helm-values/ef-cx-custom-values.yaml
and change parameters related to mongo.
efConnectionVars:
MONGODB_AUTHENTICATION_DATABASE: admin
MONGODB_CERTIFICATE_PATH: https_things/cert.pem
MONGODB_ENABLE_SSL: "true"
MONGODB_HOST: "mongo-mongodb.ef-external.svc.cluster.local:27017"
MONGODB_READ_PREFERENCE: "secondaryPreferred"
MONGODB_REPLICASET: "expertflow"
MONGODB_REPLICASET_ENABLED: "false"
#MONGODB_HOST: mongo-mongodb-0.mongo-mongodb-headless.ef-external.svc.cluster.local:27017,mongo-mongodb-1.mongo-mongodb-headless.ef-external.svc.cluster.local:27017
MONGODB_KEEP_ALIVE_TIME: "3000"
MONGODB_PASSWORD: "Expertflow123"
MONGODB_RECONNECT_INTERVAL: "500"
MONGODB_USERNAME: root
MONGODB_CLIENT_CERT: /mongo/client-pem
MONGODB_CA_CERT: /mongo/mongodb-ca-cert
In case the managed MongoDB is running in a replica-set configuration, please enable the relevant parameters for the replica-set. The above URI should reflect the full list of all the replica-set members in mongodb://mongo-mongodb-0.mongo-mongodb-headless.ef-external.svc.cluster.local:27017,mongo-mongodb-1.mongo-mongodb-headless.ef-external.svc.cluster.local:27017,mongo-mongodb-2.mongo-mongodb-headless.ef-external.svc.cluster.local:27017/?replicaSet=expertflow&tls=false&ssl=false&retrywrites=true
format. This connection string is for reference only; change as per the actual value.
For Reporting-Connector
When using single-node MongoDB, please use the same URI for all the variables.
However, in the case of the replica-set deployment model of MongoDB, place each replica-set member starting with the initial primary assigned to mongo_host1
and then remaining in sequential order to the other variables. For example, for above given replica-set configuration, it will be
mongo_host1=mongodb-0.mongo-mongodb-headless.ef-external.svc.cluster.local
mongo_host2=mongodb-1.mongo-mongodb-headless.ef-external.svc.cluster.local
mongo_host3=mongodb-2.mongo-mongodb-headless.ef-external.svc.cluster.local
mongo_host4=mongodb-3.mongo-mongodb-headless.ef-external.svc.cluster.local
mongo_host5=mongodb-4.mongo-mongodb-headless.ef-external.svc.cluster.local
mongo_host6=<empty>