Polarity v4 Admin Guide
Polarity v5 Admin Guide
  • Sever Requirements
    • Deployment Methods
      • Deploying Polarity Server on AWS with RDS and Elasticache
      • Deploying Polarity Server Virtual Machine on Azure
      • Deploying via OVA
      • Deploying via RPM
      • Polarity Server BYOL AMI
  • Guides
    • Installing License
    • Authentication
      • SAML
        • Azure ADFS
        • Okta
        • SAML Troublshooting
      • LDAP Troubleshooting
    • Installing Private Certificate Authority
    • Installing SSL Certificate
      • Installing LetsEncrypt SSL Certificate on Polarity Server
    • Configuring a Proxy
    • Migrating Polarity Servers
      • Upgrade PostgreSQL to v13
    • Enabling SMTP
    • Server Environment Variables
    • File System Layout
    • Configuring a FQDN
    • Enabling Source Analytics
      • Elasticsearch
        • Configuring Source Analytics on Elasticsearch
        • Source Analytics Integration with Elasticsearch
    • v5 Server Pre-Flight Upgrade Check
  • Integrations
    • Auto Subscribe CLI Tool
    • Installation
    • Install Multiple Copies of an Integration
    • Modifying Integration Name & Acronym
    • Add Custom Entity Types
Powered by GitBook
On this page
  • Usage
  • Installation
  • All Options
  • Troubleshooting
  1. Guides

v5 Server Pre-Flight Upgrade Check

The Polarity v5 Pre-Flight Check Tool will generate a report to help the Polarity Customer Success team plan your v5 upgrade. The tool will generate a report that includes:

  • Analyst Telemetry Check

  • Authentication Scheme Check

  • Auto-Updates Check

  • Config.js TLS Options Check

  • Global Proxy Check

  • Integrations Check

  • Elastic/Splunk RPM Agent Check

  • Node Extra CA Certs Check

  • Operating System Check

  • PostgreSQL SSL mode Check

  • Polarity Version Check

  • Redis Env Var Check

  • SMTP Check

  • RPM Requirements Check

  • SSL Certificate Check

  • Polarity User Creation Check

  • Polarity CLI Integration Search Tool Check

  • Polarity Integration Auto Subscribe Check

  • Polarity CSV Loader Check

  • Polarity Annotation Manager Check

The Polarity Annotation Manager Check, Polarity CSV Loader Check, Polarity Integration Auto Subscribe Check, Polarity User Creation Check, and Polarity CLI Integration Search Tool Check can take several minutes each to complete depending on the number of files on your system as these checks search for installs of these these various CLI tools.

When running the Integrations check you may see an error for certain integrations if they are not running properly. The tool will still record important information in this scenario about the integration despite the error being printed to the terminal.

Usage

Installation

This CLI tool is built on NodeJS and should be run on your Polarity Server. Once complete the script will generate an upgrade report called polarity-upgrade-report.txt. You will need a NodeJS runtime > v12.

To begin, download the tool, and untar it.

wget https://dl.polarity.io/C7BFBB1CF5A58C7DBA57CD0941F635BF1895366064713E88DAA7F05A5295B8B1/PROD/server/scripts/polarity-v5-preflight-check-tool-3.2.1.tgz

Check the SHA256:

sha256sum polarity-v5-preflight-check-tool-3.2.1.tgz
b4726b6be7cf120db48f77d8187630e177727c615fe93832529651f40c9ca427 polarity-v5-preflight-check-tool-3.2.0.tgz

Untar the tool and change into the directory:

tar -xvzf polarity-v5-preflight-check-tool-3.2.1.tgz
cd polarity-v5-preflight-check-tool

To run the CLI tool ensure the polarity-integration-auto-subscribe.sh script is executable.

chmod a+x polarity-v5-preflight-check-tool.sh

You can now run the CLI tool and pass in the required options. Here is an example with the minimum required options. As tool connects to your Polarity Server over the REST API, you will be prompted for a a valid local Polarity admin username and password. The tool will connect to localhost by default which requires the --rejectUnauthorized=false option to be set.

sudo ./polarity-v5-preflight-check-tool.sh  --rejectUnauthorized=false

Ensure the user credentials you provide are for an admin user so that the tool is able to gather the required upgrade information. The provided credentials must be for a local admin account and not an LDAP or SAML account.

This command will generate a report file called polarity-upgrade-report.txt. Please copy this file and provide it to your Polarity Customer Success representative.

All Options

Generate a v5 preflight upgrade report

Options:
  --help                Show help  [boolean]
  --version             Show version number  [boolean]
  --url                 Polarity server url to include schema  [string] [default: "https://localhost"]
  --config              Path to the Polarity Server's config file.  [string] [default: "/app/polarity-server/config/config.js"]
  --env                 Path to the Polarity Server's .env file.  [string] [default: "/app/polarity-server/.env"]
  --polarityPath        Path to the Polarity Server Directory  [string] [default: "/app/polarity-server"]
  --rejectUnauthorized  If provided, the loader will reject unauthorized SSL connections  [boolean] [default: true]
  --proxy               If provided, the connection to the Polarity server will use the provided proxy setting  [string] [default: ""]
  --logging             The logging level for the script.  [string] [choices: "simple", "error", "warn", "info", "debug", "trace"] [default: "simple"]

Troubleshooting

You may see a "self signed certificate" error right after providing your Polarity admin credentials like this:

Error running preflight check tool.  {
  detail: 'HTTP Request Error',
  err: {
    stack: 'Error: self signed certificate\n' +
      '    at TLSSocket.onConnectSecure (_tls_wrap.js:1502:34)\n' +
      '    at TLSSocket.emit (events.js:314:20)\n' +
      '    at TLSSocket._finishInit (_tls_wrap.js:937:8)\n' +
      '    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:711:12)',
    message: 'self signed certificate',
    code: 'DEPTH_ZERO_SELF_SIGNED_CERT'
  },
  response: undefined
}

This error means the SSL certificate was not trusted (this will happen if you use the default https://localhost url to connect locally, or if the SSL certificate on your Polarity Server is self signed). You can easily work around this issue by providing the --rejectUnauthorized=false option:

sudo ./polarity-v5-preflight-check-tool.sh  --rejectUnauthorized=false
PreviousSource Analytics Integration with ElasticsearchNextAuto Subscribe CLI Tool

Last updated 1 year ago