Installing EVA ICS without the Internet connection

Installing EVA ICS on a production machine without the Internet connection is tricky is pretty easy, but Python virtual environment should be manually prepared. Another option is to mirror pypi.org repository, but it requires about 120GB of disk space and isn’t recommended, unless used for another company needs.

In this article we will explain how to install EVA ICS on Debian / Ubuntu machine in the offline mode.

Step 1. Preparing the system

Let’s prepare the machine (let’s call it “production”). Consider apt-get works and configured to use either a local CD or a local Linux repository.

First execute a command on any machine with the Internet connection to obtain list of required system packages:

curl geteva.cc -s|grep "apt-get install"|grep -v "mosquitto"

You’ll get something like (don’t copy from here, here is just an example output):

  apt-get update || exit 10
      env DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y tzdata || exit 10
    apt-get install -y --no-install-recommends bash jq curl procps ca-certificates python3 python3-dev gcc g++ libow-dev || exit 10
    apt-get install -y --no-install-recommends python3-distutils || exit 10
    apt-get install -y --no-install-recommends python3-setuptools || exit 10
    apt-get install -y --no-install-recommends python3-venv # no dedicated deb in some distros
    apt-get install -y --no-install-recommends libjpeg-dev || exit 10
    apt-get install -y --no-install-recommends libz-dev || exit 10
    apt-get install -y --no-install-recommends libssl-dev || exit 10
    apt-get install -y --no-install-recommends libffi-dev || exit 10
    [ ! $LOCAL_PANDAS ] && apt-get install -y --no-install-recommends python3-pandas

View Post

Copy the commands as-is and run on the production machine. After, install extra packages:

apt-get install -y --no-install-recommends python3-cairocffi python3-pandas python3-wheel python3-setuptools python3-venv python3-pip

Don’t forget to configure the system locale, host name and time zone.

Step 2. Downloading EVA ICS distribution

Download EVA ICS distrubution archive from https://www.eva-ics.com/download (Manual installation -> Latest builds), extract it on the production machine to /opt and rename “eva-X.X.X directory” to “eva”

Step 3. Downloading Python packages

For this step, another machine (let’s call it “helper”) with the Internet connection and the same CPU architecture is required.

Create new directory on the helper machine, copy there /opt/eva/install/mods.list from the production machine.

Remove pandas (takes too long to build and requires lots of deps) and cairocffi (if present, can’t be installed offline) from the module listing file and run the following commands on the helper:

pip3 download -r mods.list
# remove mods.list after downloading
rm -f mods.list
# remove cairocffi if downloaded, use system instead
rm -f cairocffi*

Copy all downloaded files from the helper to the production machine, e.g. to /opt/dist directory.

Step 4. Preparing Python virtual environment

Go to the production machine and create venv configuration file (/opt/eva/etc/venv) with the following content:

USE_SYSTEM_PIP=1
SYSTEM_SITE_PACKAGES=1
PIP_EXTRA_OPTIONS=-v
SKIP="pandas cairocffi"

Build the virtual environment

cd /opt/eva
# create Python VENV
python3 -m venv --system-site-packages ./python3
# install the downloaded packages
./python3/bin/pip install /opt/dist/*
# check what we've got. if everything's correct, the script should run
# without any attempts connecting to the Internet
./install/build-venv

Step 5. Setting up EVA ICS

Everything is prepared, install EVA ICS with easy-setup, e.g.:

./easy-setup --auto --link -p all

Updating

The most correct and easiest way is to mirror get.eva-ics.com website locally (required files: https://get.eva-ics.com/update_info.json and VERSION/nightly/*). Before applying updates, manually stop all EVA ICS components and compare old mods.list with the new one.

Another way is applying update from a pre-downloaded tarball (read EVA ICS installation docs for more info).

If mods.list files differ, perform the steps 3-4 (don’t create new Python VENV, install / update new packages only).