Introduction
The internal calendar system is a web-based calendar system that is used to reserve the Pacific Forum, track general events that are happening at MBARI, and display the schedule of the various ships and platforms that we have at MBARI. The system is built using a variety of software running on the MBARI network. The main components are:
- Internal Calendar - The internal web calendar system that is used to track events and reservations.
- External Calendar - The external web calendar system - does not show internal events.
- Microsoft 365 Calendar - Used to enter long term (months into the future) ship schedules
- Expedition Database - Used to file precruises with details about the expedition
Much of the software requiring occasional maintenance by the Information Engineering group runs on host pismo.shore.mbari.org. The following sections describe the various components of the system.
-
The
calendar.cgiscript is located in/var/www/html/internal/events. The script is written in Perl and uses flat file databases to store the events. The files located in/var/www/html/internal/eventsareevents.list,pf.list, andship.list. Theevents.listfile contains all the events that are entered into the Microsoft 365 holiday and off friday calendars. Thepf.listfile contains all the Pacific Forum reservations. Theship.listfile contains all the ship schedules that are imported from Microsoft 365. Theevents.listandpf.listfiles are updated by thecalendar.cgiscript. Theship.listfile is updated by Microsoft 365 synchronization script as described below. -
The Microsoft 365 synchronization software is located on pismo at /opt/calendar/merge-m365 and is managed using the Git repo located at https://bitbucket.org/mbari/merge-m365/src/main/. It is written in Python and is run by cron under the kgomes account every hour:
-sh-4.2$ crontab -l
# Keep MBARI Web Calendar in sync with Microsoft 365 ship schedules, Expd pre-cruise links, holidays and off fridays
0 * * * * docker rm -f mbari-merge-m365 || true && docker run -v /opt/calendar/merge-m365/merge-m365-config.json:/usr/src/app/merge-m365-config.json -v /var/www/html/internal/events/events.list:/data/events.list -v /var/www/html/internal/events/ship.list:/data/ship.list --name mbari-merge-m365 mbari/merge-m365 >> /opt/calendar/merge-m365/logs/mbari-merge-m365.log 2>&1
Note
If you can login to pismo and IS has assigned you to the docker group, you should be able to run the docker container from the /opt/merge-m365 directory, but to turn off the cron job, you will have to reach out to Kevin Gomes (kgomes@mbari.org) so he can disable the cron job running under his account.
Typical maintenance tasks include:
- Contacts for the Pacific Forum reservation process - edit calendar.cgi directly
- Adding/Removing ships from the calendar - edit /opt/calendar/merge-m365/merge-m365-config.json file and calendar.cgi script directly
Refer to the relevant README files and --help options for more information.
Also, look at this example of how to replace R/V Western Flyer with R/V David Packard in the calendar system.