Configure SystemLink Enterprise to access a remote MongoDB database to enhance scalability and enhance fault tolerance.

You must migrate your existing MongoDB data under the following conditions.
  • You are upgrading from a SystemLink Enterprise version before 2023-10.
  • You set globals.mongodb.install to true.
Refer to the release notes for more information.
  1. If you are installing SystemLink Enterprise for the first time, provision the databases listed in the following table.
  2. Open systemlink-secrets.yaml.
  3. Set the password for each database.
    Note To use one set of credentials for all databases, you can leave the password field blank for each database.
    Table 13. Configuration Parameters for a MongoDB Instance
    Service Database User Password
    alarmservice nialarm nialarm alarmservice.secrets.mongodb.servicePassword
    assetservice niapm niapm assetservice.secrets.mongodb.servicePassword
    comments comments nicomments comments.secrets.mongodb.servicePassword
    dataframeservice nidataframe nidataframe dataframeservice.secrets.mongodb.servicePassword
    fileingestion files files fileingestion.secrets.mongodb.servicePassword
    nbexecservice ninbexec ninbexec nbexecservice.secrets.mongodb.servicePassword
    notification ninotification ninotification notification.secrets.mongodb.servicePassword
    repository nirepo nirepo repository.secrets.mongodb.servicePassword
    routinescheduletrigger niroutinescheduletrigger niroutinescheduletrigger routinescheduletrigger.secrets.mongodb.servicePassword
    routineservice niroutines niroutines routineservice.secrets.mongodb.servicePassword
    saltmaster minions minions saltmaster.secrets.mongodb.minionsPassword
    saltmaster pillars pillars saltmaster.secrets.mongodb.pillarsPassword
    specificationmanagement (optional) specifications nispecificationmanagement specificationmanagement.secrets.mongodb.servicePassword
    sysmgmtevent nisysmgmtevent nisysmgmtevent sysmgmtevent.secrets.mongodb.servicePassword
    systems nisystemsmanagement nisystems systems.secrets.mongodb.servicePassword
    tags tags tags tags.secrets.mongodb.servicePassword
    taghistorian taghistorian taghistorian taghistorian.secrets.mongodb.servicePassword
    userdata niuserdata niuserdata userdata.secrets.mongodb.servicePassword
    userservices keyservices keyservice userservices.secrets.mongodb.keyServicePassword
    userservices users userservice userservices.secrets.mongodb.userServicePassword
    webappservices webapps webapps webappservices.secrets.mongodb.servicePassword
    workorder (optional) workorders niworkorder workorder.secrets.mongodb.servicePassword
  4. Configure globals.secrets.mongodb.connection_string with the appropriate string for your instance.
    Note SystemLink replaces the placeholders in angle brackets such as <username>, <password>, and <database> dynamically when you deploy. You do not have to replace these placeholders manually. Type the string exactly as it appears unless noted otherwise.
    OptionDescription
    MongoDB Atlas mongodb+srv://<username>:<password>@my-atlas-cluster.mongodb.net/<database>
    MongoDB Community mongodb://<username>:<password>@my-mongodb-cluster-0,my-mongodb-cluster-1,my-mongodb-cluster-2/<database>?replicaSet=rs0
    MongoDB Community with one set of credentials mongodb://myusername:mypassword@my-mongodb-cluster-0,my-mongodb-cluster-1,my-mongodb-cluster-2/<database>?replicaSet=rs0

    Where

    • myusername is the username for your MongoDB instance.
    • mypassword is the password for your MongoDB instance.
  5. Open systemlink-values.yaml.
  6. Configure globals.mongodb.install to false.

Choosing a MongoDB Deployment

Most of the SystemLink services use MongoDB as the primary database. You can use a MongoDB instance in the same Kubernetes cluster as your SystemLink Enterprise installation or an external instance. As of SystemLink Enterprise version 2023-10 services support the use of a single stand-along MongoDB instance.

Use the following table to choose the MongoDB deployment that best suits your use case.
Deployment When to Use Details
MongoDB Atlas You want to simplify database provisioning, operation, backup, and restore operations. NI recommends using the following guidelines for you deployment.
  • Use a dedicated cluster.
  • Ensure each replica has 4 CPU cores and 32 GB of memory.
  • Ensure you have 512 GB of storage for the instance.
  • Deploy the instance in the same cloud provider region if your Kubernetes cluster is running in the cloud.
Note You can use Atlas features to initialize a smaller instance and auto-scale as needed. Set limits to prevent the cost from scaling beyond your budget.
Standalone MongoDB instance such as MongoDB Enterprise Advanced You need to control your database but require additional enterprise-level control.
MongoDB in a Helm chart such as the Bitnami MongoDB chart
  • You need your database in the same Kubernetes cluster as your SystemLink Enterprise installation.
  • Your organization is comfortable managing a MongoDB instance.

You can run this instance on existing Kubernetes worker nodes or dedicated worker nodes using taints and tolerations.

NI recommends using the following custom settings when deploying. You can adjust the requests and limits to fit with other pods on the Kubernetes worker node.
resources:
  requests:
    cpu: 4
    memory: 32Gi
  limits:
    memory: 32Gi

persistence:
  enabled: true
  accessModes:
    - ReadWriteOnce
  size: 512Gi
  annotations: {}