See: https://gitlab.com/aqms-swg/aqms-shakemap instead
ShakeMap modules supporting the AQMS system.
These modules replace queue, eq2xml, and db2xml from ShakeMap V3.5.
NOTICE: I do not intend to support these modules. Hopefully, a conscientious AQMS user will fork this repo and take over maintenance of these modules. If that's you, contact me and let me know, and I'll freeze this repo and point our documentation to your repo.
-
Install ShakeMap V4 and its dependencies. See https://github.com/usgs/shakemap for details.
-
Use pip or conda to install the python library cx_Oracle. See http://cx-oracle.readthedocs.io/en/latest/installation.html# for detailed instructions.
-
If they are not already on your system, install the appropriate Oracle client libraries. This topic is covered in the cx_Oracle install instructions mentioned above.
-
Do
pip install git+git://github.com/cbworden/shakemap-aqms.git. As an alternative, you can clone the repo and usepip installon the local directory where you cloned the repo. -
Configure your shake.conf file so that
coremodsincludesshakemap_aqms.coremods. -
Copy the file aqms.conf from the shakemap_aqms/config directory into your <INSTALL_DIR>/config directory and edit it following the instructions therein. You must configure at least one database but you may configure multiple databases. The databases will be used in the lexicographic order of the names of their subsections.
-
You should then be able to add
aqms_eq2xmlandaqms_db2xmlto yourshakecommand line. -
The old 'queue' process has been replaced with two processes:
aqms_queueandsm_queue. To use them, copyaqms_queue.conffrom the shakemap_aqms/config directory into your <INSTALL_DIR>/config directory and edit it to receive messages on the same port (and from the same servers that your current (SM 3.5)queueprocess does. You may then runaqms_queueand it will receive the notifications from the oldshake_alarmandshake_cancelscripts that your AQMS systems are running. There are new python versions ofshake_alarmandshake_cancelthat may be used if desired. (Don't forget to edit those scripts to set the remote host and port number according to your installation andaqms_queue.conf.) The next step is to getqueue.conffrom shakemap/data in the shakemap repository and put it in your <INSTALL_DIR>/config, and edit according to your preferences. You can then runsm_queue.The way this setup works is that your database will use
shake_alarm(orshake_cancel) (either the old Perl or new Python versions -- they do the same thing) to notifyaqms_queueof an event.aqms_queuewill then retrieve the event information and pass it tosm_queue.sm_queuewill make a decision on processing the event based on its configuration. If the event is to be processed,sm_queuewill create the event directory and writeevent.xmlinto it, and then runshake --autorun <eventid>(which uses theautorun_modulessettings inshake.confto decide which modules to run). Note that in this case you do not need to includeaqms_eq2xmlin the modules becauseevent.xmlwill have already been written to the event's current directory bysm_queue.
These modules are provided as-is, with no guarantee of anything. See the license file.