Installing HMI#

This page contains instructions for building/installing the HMI from a docker image.

This will complete the installation of the HMI, you can then use the Windows Virtual Machine to host your NSV’s.

Pre-requisites#

  • Access to Tekniker software

  • The mtmount dockerfile

Dockerfile Setup#

The dockerfile will install most of the dependencies needed to run the HMI as well as for building the Operations Manager. It sets up the XML as well as the SAl package.

Note

If you want to run different versions, you’ll need to adjust the versions that are checked out in the dockerfile.

HMI Installation#

Install LabVIEW and dependencies#

  1. Install the following libraries using the VIPM.

    Note

    An observation while downloading the libraries. For a reason that is not apparent to me the download may sometimes fail. The following are some tricks that worked for me. - right click, install - Install the rest of the libraries and come back to it - Manually find the download online

    Note

    if it is your first time running labVIEW you will need to make sure the port on Labview 2018 is configured and has localhost. Activating the remote port on Labview is under the tool menu

Package Name

OpenG Toolkit

Gpower All Toolsets

Gpower Timing

Hidden Gems

NI GOOP Development Suite

NI Event Logger Library

NI GXML

NI LogRotate

NI Syslog Library

  1. OpenG Toolkit, as of writing this has all but two dependencies installed.

    The uninstalled dependencies are OpenG Port IO and OpenG Toolkit. We only need the OpenG Toolkit.

  2. Copy LabVIEW libraries created by Tekniker into the LabVIEW installation directory.

    1. Copy TeknikerLabVIEWLibraries.zip from the Tekniker Software folder onto your local computer.

    2. cd /usr/local/natinst/LabVIEW-2018-64

    3. sudo rsync -ra /path/to/TeknikerLabVIEWLibraries/* .

    4. sudo chmod -R 777 ./*

Setup Maria DB image#

  1. Install database
    1. Clone the repository here: /home/lsst/LSST

      cd /home/lsst/LSST
      git clone https://gitlab.tekniker.es/aut/projects/3151-LSST/mariadb-docker.git
      
    2. Update repository:

      cd /home/lsst/LSST/mariadb-docker
      git pull
      
    3. Start the docker service:

      docker-compose up -d
      
    4. Get the last backup database available and copy it to: ./backup

      cp lsst_AppData-*.sql.gz lsst_events-*.sql.gz lsst_settings-*.sql.gz ./backup
      
    5. Create database

      sudo ./createdatabases.pl
      
    6. Restore last backup database. The script will choose the most recent backup.

      sudo ./restoredatabases.pl
      
    7. Edit contrab file to execute the python code that generates the backups:

      sudo crontab -e
      
    8. Add the following lines (Note: that the paths may change for each specific installation.):

      5 12 * * * /home/lsst/Documents/Docker/mariadb-docker/createbackup.pl
      5 13 * * * docker run --rm -v /home/lsst/Documents/Docker/mariadb-docker/python:/script -v /home/lsst/Documents/Docker/mariadb-docker/backup:/backup python:3.7 python /script/main.py
      
    9. Save and exit crontab editor: :wq