Architecture
Components
- SimAtlas Data Manager: GoogleDoc Spreadsheet ( https://bit.ly/2YAmBap ) that keeps all the info related to the faults shown in SimAtlas
- SimAtlas Webserver: Based on Flask+Leaflet. Code is hosted on AWS EC2. (https://atlas.seistech.nz) Source code (https://github.com/ucgmsim/sim_atlas)
- Youtube: Hosting GMSimViz animations https://bit.ly/2E2mJ9d
- RCC: Virtual Linux host used for producing GMSimViz videos. (ssh rccuser 10.195.0.37)
Workflow
Data Management
One can add/edit the data at GoogleDoc spreadsheet directoy
GMSimViz
Each day, a few GMSimViz animations (1~5) are produced at RCC. (Jonney's background task)
Auto-Update
RCC has a cronjob installed that is triggered 8am daily, which fully-automatically executes all the 5 actions illustrated above.
Notes
Cronjobs are tricky to install if Python script is executed. Note that it will be "root" that runs the command. Be careful about PYTHONPATH. The following Cronjob entry was tested ok.
0 8 * * * cd /data/sim_atlas/upload && PYTHONPATH=/home/rccuser/.local/lib/python3.6/site-packages /usr/bin/python add_video.py
Logs: The output from add_videos.py is
simatlas_manager.log
(in the same directory as add_videos.py)2019-12-11 13:08:18,458: DEBUG: Uploading Pahaua 2019-12-11 13:08:35,069: DEBUG: out:Uploading file... Success: https://www.youtube.com/watch?v=VOHSx8tqovo 2019-12-11 13:08:35,069: DEBUG: err: 2019-12-11 13:08:35,070: DEBUG: Pahaua: ['Success: https://www.youtube.com/watch?v=VOHSx8tqovo', ''] 2019-12-11 13:08:35,070: DEBUG: Success: Pahaua uploaded: https://www.youtube.com/watch?v=VOHSx8tqovo ... 2019-12-11 13:08:36,342: DEBUG: Updated: faultname=Pahaua video=https://www.youtube.com/watch?v=VOHSx8tqovo(G313) version=1(H313) 2019-12-11 13:09:06,868: DEBUG: Remotely updated SimAtlas DB: DB update success