Operations
SMDB Operations
The GitHub instructions have minimal instructions for deploying SMDB in production.
At MBARI SMDB is deployed on the Ubuntu VM smdb.shore.mbari.org. Use your
regular MBARI network account to ssh into smdb.shore.mbari.org and then
sudo -u docker_user -i to have the proper permissions. An IS Help ticket
may be required for your user account to have this permssion.
A cron job has been configured to update the locate database with changes
to /mbari/SeafloorMapping each night at 10 pm local:
0 22 * * * time docker-compose -f /opt/SeafloorMappingDB/smdb/production.yml run --rm -u 11834 -v /mbari/SeafloorMapping:/mbari/SeafloorMapping django updatedb -l 0 -o /etc/smdb/SeafloorMapping.db -U /mbari/SeafloorMapping -e /mbari/SeafloorMapping/.snapshots > /tmp/updatedb.out 2>&1
The scripts/load.py program uses the /etc/smdb/SeafloorMapping.db file to find .grd
files so make sure it's up to date before running a load.
A complete database load as of October 2021 takes about 6 hours to complete. After sufficient testing on a local development system a load can be run in production with a command like this:
docker-compose run --rm django scripts/load.py -v --clobber | tee load_thursday.out
The .out file then can be grepped for WARNINGs, etc. so that problems can be fixed.