Skip to content

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:

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.

  1. The calendar.cgi script 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/events are events.list, pf.list, and ship.list. The events.list file contains all the events that are entered into the Microsoft 365 holiday and off friday calendars. The pf.list file contains all the Pacific Forum reservations. The ship.list file contains all the ship schedules that are imported from Microsoft 365. The events.list and pf.list files are updated by the calendar.cgi script. The ship.list file is updated by Microsoft 365 synchronization script as described below.

  2. 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.