Installation - nthallen/monarch GitHub Wiki

Installation

Installation of Monarch is usually accompanied by installation of instrument-specific source code. Custom installation scripts can be generated to install both Monarch and the instrument source code using the mk_installers tool. The generated scripts will be placed in the setup directory in the instrument's source tree.

Two scripts are generated:

  • cygwin-monarch-${INST}-install.ps1
  • monarch-${INST}-install.sh

These scripts are text only and can be downloaded directly from the instrument's GitHub source. The latter is entirely contained within the former, so you only need to download one.

cygwin-monarch-${INST}-install.ps1

This is for installation on Windows using PowerShell:

  • Checks to make sure flight group exists and current user is a member. May require a reboot and rerunning the script.
  • Checks whether Cygwin is installed and, if not, invokes the Cygwin installer
  • Invokes monarch-${INST}-install.sh

monarch-${INST}-install.sh

This is common to all installations:

  • Checks whether monarch is installed. If not
    • clones the monarch repo, builds and installs
  • Checks whether the instrument code is installed. If not
    • Creates the instrument directory
    • Clones the instrument github repo into src
    • Runs appgen to create a Makefile in src/TM
    • As of now, does not attempt to actually build the instrument code
  • If setup/getrun.ini exists, updates the getrun configuration under ~/.monarch
  • If MATLAB is installed, invokes it to set the PATH for engineering scripts and the location of data

Configuration files

There are three configuration files that can be created in the src/setup directory:

setup.cfg

setup.cfg provides input to mk_installers to identify operating system packages that are required beyond those already specified by Monarch. Currently, only settings are:

  • exp_cygwin_pkgs = pkg1,pkg2
    • comma-delimited list of cygwin packages to be installed when running on Windows
  • exp_debian_pkgs = pkg1 pkg2
    • space-delimited list of debian packages to be installed on Debian-based Linux distributions, including Ubuntu and Raspian.

This approach can be expanded to include other distributions and operating systems as needed.

mk_installers must be run after creating or updating setup.cfg in order to include the experiment-specific package lists in the setup scripts.

ssh_config_insert

getrun.ini