Installing Profound.js onto an Offline System

Installing Profound.js onto an Offline System

Before starting the installation, please be sure to review the installation prerequisites.

Overview

Profound.js is distributed as an npm package, so a normal installation downloads the product and its dependencies from the public npm registry. This page describes how to install Profound.js onto an IBM i that is disconnected from the Internet, by running a local npm proxy on a machine that does have Internet access and pointing the IBM i at it.

What You Need

  • A connected machine - A system (Windows, Mac, or Linux) on the same network as the IBM i that is connected to the Internet. This can be your own workstation;

  • Node.js and npm on that machine - Node.js includes npm, so installing Node.js installs both;

  • Node.js and npm on the IBM i - See Installing Node.js for IBM i;

  • Profound UI, if it is being used - The Profound.js installer prompts for the Profound UI /htdocs directory. If the directory given does not exist, the installation hangs while it tries to reach the Internet to download a copy (see Install Profound UI on IBM i).

Setting Up the Proxy

On the connected machine, install Sinopia with npm. Sinopia can act as a local npm cache, a proxy for the npm registry, or a private registry; here it is used as a proxy so that the IBM i can reach the npm registry indirectly.

  1. To install Sinopia, run npm install -g sinopia;

  2. To launch Sinopia, run sinopia. This creates the default configuration file and prints its location:

Shell

C:\Users\profoundlogic> sinopia warn --- config file - C:\Users\profoundlogic\AppData\Roaming\sinopia\config.yaml warn --- http address - http://0.0.0.0:4873/

By default Sinopia only listens on the loopback address. So that it can be reached from the local network, add the following to the config.yaml that Sinopia generated:

listen: - 0.0.0.0:4873

Restart Sinopia after changing config.yaml. For the next steps you will need the connected machine’s internal IP address or hostname so that the IBM i can reach it.

Connecting to the Proxy and Installing

On the IBM i, change the registry that npm uses before installing Profound.js.

  1. From SSH (or QP2TERM), run npm set registry <URL>, where <URL> is http://localmachine:4873 without quote marks, and localmachine is the internal IP address or hostname of the system running Sinopia;

  2. Continue with the normal Installation Process. The npm install profoundjs command now pulls the product and all of its dependencies through the proxy;

  3. After the installation completes, reset the registry:

    npm set registry https://registry.npmjs.org/

The registry setting is per user. If the installation and later upgrades are run under different user profiles, the registry has to be set for each of them.