Terraform Module

SevOne Data Insight Terraform module deploys the application stack on a Kubernetes cluster using Terraform. Please go to Terraform for details.

The Terraform module is configured with a base set of configuration options that can be overridden as needed.

CONFIGURE GraphQL

➤   Configure Session Idle Timeout

To allow users to remain logged into SevOne Data Insight for more than an hour, execute the steps below.

  1. Using a text editor of your choice, edit /opt/SevOne/terraform/data-insight.tfvars file to set the following environment variable and then, save it.
    Important: If /opt/SevOne/terraform/data-insight.tfvars file does not exist, please create one and add the following to it.
    graphql = {
      env = {
        "AUTH_TIMEOUT" = "3600"
      }
    }
  2. Apply the change made to /opt/SevOne/terraform/data-insight.tfvars file.
    sevone-cli playbook up --tags apps

➤   Enable GraphiQL

To enable GraphiQL, execute the steps below. GraphiQL is an in-browser tool for writing, validating, and testing GraphQL queries.

  1. Using a text editor of your choice, edit /opt/SevOne/terraform/data-insight.tfvars file to set the following environment variable and then, save it.
    Important: If /opt/SevOne/terraform/data-insight.tfvars file does not exist, please create one and add the following to it.
    
    graphql = {
      enable_graphiql = true
      content_security_policy = ""
      env = {
        "ALLOW_UNAUTHENTICATED_INTROSPECTION" = "true"
      }
    }
    
  2. Apply the change made to /opt/SevOne/terraform/data-insight.tfvars file.
    sevone-cli playbook up --tags apps

BYPASS REPORT MIGRATION CHECKS

  1. Using a text editor of your choice, edit /opt/SevOne/terraform/data-insight.tfvars file to set the following environment variable and then, save it.
    Important: If /opt/SevOne/terraform/data-insight.tfvars file does not exist, please create one and add the following to it.
    graphql = {
      env = {
        "SKIP_REPORT_MIGRATION_DRY_RUN" = "true"
      }
    }
  2. Apply the change made to /opt/SevOne/terraform/data-insight.tfvars file.
    sevone-cli playbook up --tags apps

ENABLE SHORTCUTS

Shortcuts are available by default from SevOne Data Insight > under Configure in left navigation bar.

Enable Shortcuts to allow you to save resource selection as shortcuts to be reused across widgets in SevOne Data Insight without having to create groups in SevOne NMS.

  1. Using a text editor of your choice, edit /opt/SevOne/terraform/data-insight.tfvars file to set the following environment variable and then, save it.
    Important: If /opt/SevOne/terraform/data-insight.tfvars file does not exist, please create one and add the following to it.
    ui = {
      env = {
        "FF_ALIASES": "true"
      }
    }
  2. Apply the change made to /opt/SevOne/terraform/data-insight.tfvars file.
    sevone-cli playbook up --tags apps

ENABLE REPORT VERSIONING

Enable report versioning to allow user to view saved versions of a report.

  1. Using a text editor of your choice, edit /opt/SevOne/terraform/data-insight.tfvars file to set the following environment variable and then, save it.
    Important: If /opt/SevOne/terraform/data-insight.tfvars file does not exist, please create one and add the following to it.
    report_versions_enabled: "true"
  2. Apply the change made to /opt/SevOne/terraform/data-insight.tfvars file.
    sevone-cli playbook up --tags apps

DISABLE DATASOURCE OPERATOR

In SevOne Data Insight 3.12 and above, requests to SOA are going to round robin to any peer in SevOne NMS clusters that SevOne Data Insight is connected to. This feature can be disabled in SevOne Data Insight to stop providing HA communicating with SevOne NMS and instead, sent requests to the specifically configured NMS peer.

  1. Using a text editor of your choice, edit /opt/SevOne/terraform/data-insight.tfvars file to set the following environment variable and then, save it.
    Important: If /opt/SevOne/terraform/data-insight.tfvars file does not exist, please create one and add the following to it.
  2. Disable datasource operator.
    
    operator = {
      datasource = {
        enabled = false
      }
    }
    
  3. Apply the change made to /opt/SevOne/terraform/data-insight.tfvars file.
    sevone-cli playbook up --tags apps

DISABLE MySQL METRICS SERVER

MySQL ships with a metrics server that fails to start up if your environment has IPv6 enabled.

Important: Until SevOne Data Insight supports IPv4 / IPv6 dual stack environments, MySQL metrics server must be disabled.
  1. Using a text editor of your choice, edit /opt/SevOne/terraform/data-insight.tfvars file to set the following environment variable and then, save it.
    Important: If /opt/SevOne/terraform/data-insight.tfvars file does not exist, please create one and add the following to it.
  2. Disable MySQL Metrics Server.
    
    mysql = {
      values = {
        metrics = {
          enabled = false
        }
      }
    }
  3. Apply the change made to /opt/SevOne/terraform/data-insight.tfvars file.
    sevone-cli playbook up --tags apps

CHANGE PROMETHEUS PASSWORD

To change the password for prometheus, execute the steps below.

  1. Using a text editor of your choice, edit /opt/SevOne/terraform/data-insight.tfvars file to change the password using the following environment variable and then, save it.
    Important: If /opt/SevOne/terraform/data-insight.tfvars file does not exist, please create one and add the following to it.
    
    prometheus = {
      values = {
        auth = {
          username = "datainsight"
          password = "datainsight"
        }
      }
    }
  2. Apply the change made to /opt/SevOne/terraform/data-insight.tfvars file.
    sevone-cli playbook up --tags apps

CRON SCHEDULES

SevOne Data Insight has a number of cron jobs to perform tasks such as API key rotation, syncing users from SevOne NMS to SevOne Data Insight, and sweeping temporary assets from the object store.

The following table contains the default schedules for each job.

Job Cron Schedule Description
apikey-rotation 0 5 10 * * At 05:00 on every 10th day-of-every-month.
asset-sweeper */5 * * * * At every 5th minute.
report-tombstone-sweeper 0 20 * * * At 8:00 PM every day.
report-version-sweeper 0 10 * * * At 10:00AM every day.
user-sync */5 * * * * At every 5th minute.

Custom schedule can be set via /opt/SevOne/terraform/data-insight.tfvars file.


Example

cron = {
    crontab = {
      "apikey-rotation" = {
        schedule = "0 5 */30 * *"
      }
      "asset-sweeper" = {
        schedule = "*/5 * * * *"
      }
      "report-tombstone-sweeper" = {
        schedule = "0 20 * * *"
      }
      "report-version-sweeper" = {
        schedule=  "0 10 * * *"
      }
      "user-sync" = {
        schedule = "*/5 * * * *"
      }
    }
  }

RESOURCE REQUESTS & LIMITS

Warning: for Advanced Users Only
Please refer to Kubernetes Resource Requests & Limits for additional information on configuring resource requests and limits.

Many of the deployments within SevOne Data Insight have resource requests and limits configured by default. Please refer to the example below containing the defaults for each deployment.

These have been generally configured with wide enough parameters to accommodate heavy usage of SevOne Data Insight.

However, should your usage be atypical and you find that a deployment lacks sufficient resources, or perhaps if you find that a deployment's usage is not very high and would like to scale it back to leave more room for other deployments/processes, you can apply custom requests and limits for a deployment in /opt/SevOne/terraform/data-insight.tfvars file.

Example: Custom Requests & Limits

      # /opt/SevOne/terraform/data-insight.tfvars
      graphql = {
        resources = {
          requests = {
            cpu = "500m"
            memory = "400Mi"
          }
          limits   = {
            cpu = 2000m
            memory = 4000Mi
          }
        }
      }

      cron = {
        resources = {
          requests = {
            cpu = "2000m"
            memory = "400Mi"
          }
          limits   = {
            cpu = 3500m
            memory = 4000Mi
          }
        }
      }

      djinn = {
        resources = {
          requests = {
            cpu = "500m"
            memory = "400Mi"
          }
          limits   = {
            cpu = 2000m
            memory = 4000Mi
          }
        }
      }

      assetserver = {
        resources = {
          requests = {
            cpu = "500m"
            memory = "400Mi"
          }
          limits   = {
            cpu = 2000m
            memory = 4000Mi
          }
        }
      }

      migrator = {
        resources = {
          requests = {
            cpu = "500m"
            memory = "400Mi"
          }
          limits   = {
            cpu = 2000m
            memory = 4000Mi
          }
        }
      }

      printer = {
        chromium = {
          resources = {
            requests = {
              cpu    = "1000m"
              memory = "1500Mi"
            }
            limits   = {
              cpu    = "2000m"
              memory = "3000Mi"
            }
          }
        }
        resources = {
          requests = {
            cpu    = "200m"
            memory = "100Mi"
          }
          limits   = {
            cpu    = "400m"
            memory = "200Mi"
          }
        }
      }

      scheduler = {
        resources = {
          requests = {
            cpu: 50m
            memory: 100Mi
          }
          limits   = {
            cpu: 200m
            memory: 250Mi
          }
        }
      }

      ui = {
        resources = {
          requests = {
            cpu: "50m"
            memory: "100Mi"
          }
          limits   = {
            cpu: "100m"
            memory: "200Mi"
          }
        }
      }

      wdkserver = {
        resources = {
          requests = {
            "cpu: 50m"
            "memory: 1000Mi"
          }
          limits   = {
            cpu: "100m"
            memory: "2000Mi"
          }
        }
      }

      mysql = {
        values = {
          primary = {
            resources = {
              requests = {
                cpu = "500m"
                memory = "400Mi"
              }
              limits   = {
                cpu = 2000m
                memory = 4000Mi
              }
            }
          }
        }
      }

      redis = {
        values = {
          sysctlImage = {
            enabled = false
          }
          master = {
            service = {
            resources = {
              requests = {
                cpu = "500m"
                memory = "400Mi"
              }
              limits   = {
                cpu = 2000m
                memory = 4000Mi
              }
            }
          }
        }
      }

      prometheus = {
        values = {
          server = {
            resources = {
              requests = {
                cpu = "500m"
                memory = "400Mi"
              }
              limits = {
                cpu = "2000m"
                memory = "4000Mi"
              }
            }
          }
        }
      }
    }

Example: Disable Limits

# /opt/SevOne/terraform/data-insight.tfvars
      graphql = {
        resources = {
          requests = {}
          limits   = {}
        }
      }

      cron = {
        resources = {
          requests = {}
          limits   = {}
        }
      }

      djinn = {
        resources = {
          requests = {}
          limits   = {}
        }
      }

      assetserver = {
        resources = {
          requests = {}
          limits   = {}
        }
      }

      migrator = {
        resources = {
          requests = {}
          limits   = {}
        }
      }

      printer = {
        chromium = {
          resources = {
            requests = {}
            limits   = {}
          }
        }
        resources = {
          requests = {}
          limits   = {}
        }
      }

      scheduler = {
        resources = {
          requests = {}
          limits   = {}
        }
      }

      ui = {
        resources = {
          requests = {}
          limits   = {}
        }
      }

      wdk = {
        resources = {
          requests = {}
          limits   = {}
        }
      }

      wdkserver = {
        resources = {
          requests = {}
          limits   = {}
        }
      }

      mysql = {
        values = {
          primary = {
            resources = {
              requests = {}
              limits = {}
            }
          }
        }
      }

      redis = {
        values = {
          sysctlImage = {
            enabled = false
          }
          master = {
            service = {
            resources = {
              requests = {}
              limits = {}
            }
          }
        }
      }

      prometheus = {
        values = {
          server = {
            resources = {
              requests = {}
              limits = {}
            }
          }
        }
      }
    }

CONFIGURE JAEGER

Important:
This feature is intended for IBM SevOne Support use only. When enabled, traces from customer's environment can be gathered (when required) to investigate potential issues.

  1. Using a text editor of your choice, edit /opt/SevOne/terraform/data-insight.tfvars file to set the following environment variable and then, save it.
    Important: If /opt/SevOne/terraform/data-insight.tfvars file does not exist, please create one and add the following to it.
    
    jaeger = {
      auth = {
        username = "datainsight"
        password = "datainsight"
      }
      enabled = true
      max_traces = 1000
    }
    
    Note: Jaeger-query is protected by basic authentication where default username / password are datainsight / datainsight. However, the username / password can be changed in /opt/SevOne/terraform/data-insight.tfvars.
  2. Any time a change is made to /opt/SevOne/terraform/data-insight.tfvars file, you must run the following command to apply the changes.
    
    sevone-cli playbook up --tags apps
    

When jaeger is enabled, the dashboard can be accessed from https://<DI_HOST_NAME>/jaeger and is protected via the configured username and password.

The jaeger call to API can be made as follows.
Note: Currently, the only service being traced is di_djinn.

curl -u <enter jaeger username>:<enter jaeger password> https://<DI_HOSTNAME>/jaeger/api/traces?service=di-djinn --insecure

For example,

curl -u datainsight:datainsight https://<DI_HOSTNAME>/jaeger/api/traces?service=di-djinn --insecure

CONFIGURE MAPS

Important: IMPORTANT: Missing / misconfigured tile server for Map mode
The tile server for Map (geospatial) mode is missing or misconfigured in SevOne Data Insight 3.13.0 - 3.13.9, 6.5.0 - 6.5.4, and 6.6.0. To resolve this or if you are installing SevOne Data Insight 6.8.0 or above, you are required to perform additional configuration to obtain the proper tiles for the maps.
  • if using Command Line Interface,
    • you are required to execute the commands below to configure variables tileserver and attribution under maps and apply the changes.
    • you must perform an upgrade to SevOne Data Insight 6.7.0 or above. For details on how to upgrade using the command line interface, please refer to SevOne Data Insight Upgrade Process Guide > section using Command Line Interface.
  • if using Graphical User Interface,
    • you must perform an upgrade to SevOne Data Insight 6.7.0 or above. Please refer to SevOne Data Insight Upgrade Process Guide > section using Graphical User Interface > at step Configure, configure variables Tileserver and Attribution under Maps and successfully complete the upgrade.
Important: NOTICE
Failure to set variable maps.tileserver while performing an upgrade from SevOne Data Insight 3.13.0 - 3.13.9, 6.5.0 - 6.5.4, and 6.6.0 to 6.7.0 or above, will convert your current map in Maps mode to Canvas mode without the ability to switch back to Map mode until the tile server is provided.

If the owner of the selected tile server requires to be given credit for the tiles being used, set variable maps.attribution. Text entered in variable maps.attribution will appear in the bottom right corner of each map.

For further assistance, please contact SevOne Support Team or your Technical Account Manager to configure this properly.

  1. Using a text editor of your choice, edit /opt/SevOne/terraform/data-insight.tfvars file to set the following environment variable and then, save it.
    Important: If /opt/SevOne/terraform/data-insight.tfvars file does not exist, please create one and add the following to it.
  2. Configure the maps variable.
    Note: To create the tile server URL with the Access Token, please refer to section Create Tile Server URL below.
    maps = {
      tileserver = "https://api.mapbox.com/styles/v1/sevone/cllfjv99c01mp01ql9neoau07/tiles/256/{z}/{x}/{y}@2x?access_token=<ACCESS_TOKEN>"
      attribution = "Some attribution; props to stament for providing tiles, etc."
    }

    Example: Dark mode

    maps = {
      tileserver = "https://api.mapbox.com/styles/v1/sevone/cllfjv99c01mp01ql9neoau07/tiles/256/{z}/{x}/{y}@2x?access_token=<ACCESS_TOKEN>"
      attribution = "Some attribution; props to stament for providing tiles, etc."
    }

    Example: Light mode

    maps = {
      tileserver = "https://api.mapbox.com/styles/v1/sevone/cllfl73f101qb01qnc7wh22i5/tiles/256/{z}/{x}/{y}@2x?access_token=<ACCESS_TOKEN>"
      attribution = "Some attribution; props to stament for providing tiles, etc."
    }
  3. Apply the change made to /opt/SevOne/terraform/data-insight.tfvars file.
    sevone-cli playbook up --tags apps

➤   Create Tile Server URL

To create the Access Token, use may use mapbox (recommended) or any other tool of your preference. The steps below show how to create the Access Token using mapbox - this is only an example.

  1. Create a mapbox account. Enter the following URL in a web browser of your choice.
    https://mapbox.com
    Important: You only need to create your mapbox account once. Please save your username / email address and password for future use.
  2. Once the mapbox account is created, sign in.
  3. Click Create token button.
  4. In Create an access token page, enter the token name in field Name. For example, IBM Sevone Data Insight.
    Mapbox Create Access Token
  5. Click Create mapbox token button to create the mapbox Access Token.
    Important:
    • You will be prompted to confirm your password. Enter your mapbox account password.
      Confirm mapbox password
    • Click Submit.
  6. Your Access Token for token name IBM SevOne Data Insight is created. For security reasons, the token has been obscured in the screenshot below.
    Mapbox Access Token List
  7. For SevOne Data Insight, you have dark and light modes. Based on the mode, your tile server URL is created.

    for Dark mode,
    In the URL, replace <ACCESS_TOKEN> with the Access Token generated above for your token name, IBM SevOne Data Insight.
    Tile Server URL for Dark mode
    
    https://api.mapbox.com/styles/v1/sevone/cllfjv99c01mp01ql9neoau07/tiles/256/{z}/{x}/{y}@2x?access_token=<ACCESS_TOKEN>
    

    Tile Server Darkmode
    for Light mode, in the URL, replace <ACCESS_TOKEN> with the Access Token generated above for your token name, IBM SevOne Data Insight. Tile Server URL for Light mode
    
    https://api.mapbox.com/styles/v1/sevone/cllfl73f101qb01qnc7wh22i5/tiles/256/{z}/{x}/{y}@2x?access_token=<ACCESS_TOKEN>
    

    Tile Server Dark mode