FinDer setup#
Containerization#
This requires docker and ssh
to be installed and enabled. You need to ask access to the finder package for your github account and accept the invitation.
First make sure that you complete
docker login ghcr.io/sed-eew/finder
(authenticating to the container registry). You need to generate a new Token (classic) from your github account with theread:packages
option enabled.Download the finder docker image (only once):
docker pull ghcr.io/sed-eew/finder:master
Start the docker (only once or when updating docker image. For old docker versions: replace
host-gateway
by$(ip addr show docker0 | grep -Po 'inet \K[\d.]+')
):docker stop finder && docker rm finder # That is in case you update an existing one docker run -d \ --add-host=host.docker.internal:host-gateway \ -p 9878:22 \ -v finder:/home/sysop \ --name finder \ ghcr.io/sed-eew/finder:master
Setup
ssh
authentification key (seessh-keygen
) and define a shortcut function to manage scfinder (and SeisComP) inside the docker container (once per host session, or add to your.profile
or.bashrc
to make it permanent):ssh-copy-id -p 9878 sysop@localhost seiscomp-finder () { ssh -X -p 9878 sysop@localhost -C "/opt/seiscomp/bin/seiscomp $@"; }
Configuration#
Configure Finite-Fault Rupture Detector based on the example in
/usr/local/src/FinDer/config/finder.config
. e.g.:# Basic docker configuration mkdir myconf docker cp finder:/usr/local/src/FinDer/config/finder.config myconf/ # Edit myconf/finder.config with paths related to container # Copy your FinDer config to container docker cp myconf/finder.config finder:/home/sysop/.seiscomp/
Configure scfinder (and SeisComP) with the
seiscomp-finder
shortcut, e.g.:# Basic scfinder container configuration mkdir myconf echo 'connection.server = host.docker.internal/production database = host.docker.internal/seiscomp finder.config = /home/sysop/.seiscomp/finder.config ' > myconf/scfinder.cfg ## In case the db setup is more complex you might need to adjust the following and add it to the above: #database.inventory = mysql://host.docker.internal/seiscomp #database.config = mysql://host.docker.internal/seiscomp # Copy your scfinder config to container docker cp myconf/scfinder.cfg finder:/home/sysop/.seiscomp/ # Review and adjust configuration seiscomp-finder exec scconfig
Backup your configuration, e.g.,:
docker cp finder:/home/sysop/.seiscomp/finder.config myconf/ docker cp finder:/home/sysop/.seiscomp/scfinder.cfg myconf/
Note
host.docker.internal
is defined as a alias to the docker host that can be used in scfinder
configuration (scfinder.cfg
) in the docker container with parameter connection.server
to connect to SeisComP host system. If the host scmaster does not forward database parameters,
database
, database.config
, and database.inventory
parameters using the
host.docker.internal
docker host alias might also be needed.
Alternatively scimex could be configured to push origins and magnitudes from scfinder from within the docker to another SeisComP system.
Operation#
Manage scfinder (and SeisComP) with the
seiscomp-finder
shortcut, e.g.:# debug and test: seiscomp-finder exec scfinder --debug # enable modules seiscomp-finder enable scfinder # restart modules seiscomp-finder restart
Eventually, after restarting docker or the host system, once the
seiscomp-finder
alias is permanent, restart the finder container and its seiscomp as follows:# restart docker container docker start finder docker exec -u 0 -it finder /etc/init.d/ssh start seiscomp-finder restart
Note
You may also use FinDer without SeisComP with /usr/local/src/FinDer/finder_file
and related
utilities in /usr/local/src/FinDer/
.
Offline testing#
To test finder offline on a given earthquake, copy the corresponding mseed data and inventory in the container, starting at least 1 min before the origin time (OT) and ending at least 2 min after the OT. Then run:
seiscomp-finder exec scfinder --offline --playback --inventory-db inventory.xml -I data.mseed
The xml output should include FinDer solutions every seconds with rupture line parameters and their PDF.
Common warnings and errors#
scmaster is not running [warning] (in the running finder container): ignore if scfinder is setup to connect to a messaging system outside of the finder container.
NET.STA.LOC.CODE: max delay exceeded: XXXXs (in scfinder log): see the parameter debug.maxDelay.
Unit error (in scfinder log): check your station metadata and/or remove the problematic channel(s) using the streams.blacklist parameter in the
scfinder.cfg
configuration file.