About HavNett#

HavNett is set up such that changes to the source code in an internal NPI gitlab repository are automatically propagated to the website https://havnett.org/. The setup, detailed below, has so far proved to be fairly robust.

Details of the technical architecture and workflow#

Simplified schematic of the HavNett technical architecture and workflow

Note

Note that the automatic workflow takes some time to execute. It typically takes a few minutes from a commit to Havnett source until you see the content of havnett.org change. You can track the progress of the various jobs in Gitlab (Build -> Jobs).

  • Havnett source - repository for the source code on the internal NPI GitLab instance gitlab.npolar.no.

    Source code (.md and .rst files in a directory structure) that compile to .html using Sphinx configured as configured in the file conf.py.

    This is where we modify the contents of HavNett!

    Access requires NPI credentials (to log into gitlab.npolar.no) and membership in the NPIOcean group.

    On each commit to the main branch of Havnett source, a Gitlab Job (view job here) does the following:

    1. Compiles the source code to HTML.

    2. Pushes the HTML content to the external Havnett deploy repository on gitlab.com.

  • Havnett deploy - repository (private) for the compiled html pages on gitlab.com.

    This repository automatically receives the compiled HTML from the internal Havnett source repository on each new commit.

    Havnett deploy should therefore contain the most recent HTML version of the website, reflecting the most recent commit to the source code on Havnett source.

    The contents of Havnett deploy are tracked by Cloudflare to ensure havnett.org stays updated.

    On each commit, a zipped version of the html content is also pushed to the Havnett zip repo so we can download the html content directly.

  • Cloudflare - content delivery and publishing service for the Havnett webpage.

    The HTML content from the external Havnett deploy repository is monitored by Cloudflare.

    Cloudflare handles the DNS (Domain Name System) for havnett.org and ensures the website is accessible.

    It also provides services like caching, security (e.g., SSL certificates), and performance optimization to improve the site’s speed and resilience (we have set this up without fiddling much with any advanced functionality, and that seems to work well).

    Our cloudflare user is havdata.npi@gmail.com.

  • Octauthent - authentication services for managing secure access (password protection) to havnett.org.

    Octauthent ensures that only authorized users with the correct credentials can access the internal Havnett source repository on the NPI GitLab instance.

    Integrates easily with Cloudflare.

    Form out user on octauthent.com, we can control the authentication (allowed user-password pairs etc).

    Our Octauthent user is havdata.npi@gmail.com.

  • Havnett zip - repository (public) hosting the html page as a .zip file gitlab.com.

    Contains only the file havnett_html.zip, which is produced and pushed automatically on each commit to Havnett deploy.

    On the Havnett page, there is a download link (see the bottom of the left sidebar) - this leads to the file in this repo.