# Installation This manual describes the installation of the gempa software manager (GSM). GSM is a packet manager which supports to install SeisComP as well as gempa packages from a configured remote package repository. Database migration is **not supported** yet. However gsm informs the user about required migrations. ## Requirements * Python 3 * pip3 ## Install 1. Install required python packages for Python 3 2. Get the latest gsm package with ``` wget https://data.gempa.de/gsm/gempa-gsm.tar.gz ``` 3. Extract the package with ``` tar xf gempa-gsm.tar.gz ``` The tar file contains a folder named *gsm* containing the complete gsm bundle. ## File structure ``` gsm │ README │ CHANGELOG │ gsm.conf # Stores the configuration e.g. username and password └───local # Local package storage. Stores information about installed | | # packages. │ │ gsm │ │ ... │ └───sync # Remote package cache. Stores information about all | # available packages. | gaps │ gsm │ scanloc | ... ``` ## Setup To setup the installation environment run ``` ./gsm setup ``` Configuration settings stored in gsm.conf | Variable | Description | |---|---| |os| Distribution name e.g. rhel or ubuntu| |os_version| Major distribution version e.g 7 or 20.04| |arch| System architecture e.g. x86_64 or armv7l| |base_url| gempa customer repo base URL e.g. https://data.gempa.de/packages/foo| |user| Username provided in the Wiki section of the gempa customer portal| |password| Password provided in the Wiki section of the gempa customer portal| |release| Name of the SeisComP release. e.g 5 or nightly| |download_dir| Directory where downloaded files are stored| |install_path| User defined root path e.g. /home/sysop/seiscomp| |data_dir| Base directory for data packages like maps or greensfunctions| |verify| Enable/disable SSL certificate check e.g. True| |debug| Enable verbose logging. Default: False| |sync_dir| Remote package cache, contains information about available packages| |local_dir| Local package storage, contains information about installed packages| ## Proxy Settings Normally no user interaction is required but some systems require to specify additional proxy settings for the current shell in order that **gsm** can establish a connection to the gempa package server. For this **gsm** uses the Python requests module to transfer data and there are several ways to define the proxy server. Here an example: ``` export HTTP_PROXY="http://10.10.1.10:3128" export HTTPS_PROXY="http://10.10.1.10:1080" ``` Then **gsm** can be used as usual. ## Deploy To update the package cache run ``` ./gsm update ``` To install a package run ``` ./gsm install app ``` To install all configured packages run ``` ./gsm install ``` To install spefific version of a package run ``` ./gsm install app=2019.101 ``` To reinstall a package run ``` ./gsm reinstall app ``` To override the configured package selection run e.g. ``` ./gsm install seiscomp licenses ``` To show all installed packages with version ``` ./gsm info ``` To show installed package with all infomation ``` ./gsm info app ``` ## Offline workflow In case a user has the requirement that downloaded packages be clean sourced (virus checked) before installation, and that the actual installation be done on a machine without internet access, we here describe an offline workflow using the gempa software manager (gsm). ### On *online* machine 1. Create and change into install directory, e.g.: `cd ~` `mkdir install` `cd install` 2. Download gsm tarfile: `wget https://data.gempa.de/gsm/gempa-gsm.tar.gz` 3. Unpack gsm: `tar xf gempa-gsm.tar.gz` `cd gsm` 4. Perform setup: `gsm setup` 5. Perform update via gempa repository: `gsm update` 6. Install required packages in **download-only mode**, e.g.: `gsm install -d seiscomp toast` 7. Clean source gsm directory ### On *offline* machine #### First time 8. Create install directory, e.g.: `cd ~` `mkdir install` `cd install` 9. Copy gsm directory from online machine: `scp -r user1@online-machine:~/install/gsm user2@offline-machine:~/install` `cd ~/install/gsm` (or copy with memory stick) 10. Install required packages in **offline mode**: `gsm install -o seiscomp toast` #### Subsequent times After performing steps 5.-7. again on the *online* machine, do on the *offline* machine: 9. Copy directories `gsm/sync` and `gsm/packages` from online machine (scp or memory stick) 10. Install new versions of all previously installed packages: `gsm install -o`