Skip to content

Space rendering

It would seem to make sense to have a master copy of any Uptick space directory on a workstation. Close to the author of the documentation, allowing them to locally edit Markdown files with basic editors like Kate and Notepad.

For rendering to take place, the full weight of the [Material for] MkDocs infrastructure, including the elevate wrapper script that is specific for Uptick, needs to be run against the space directory.

Containerized rendering

A container could be put together that contains all of the Uptick rendering logic. To traverse a rendering run, the container would be started up with the space directory mapped into the container. This would allow the scripting within the container to read source and cache content and update the online, offline and cache directories.

For this approach to be feasible, two obstacles need to be overcome:

  1. A container version of the server-side rendering logic will need to be produced.
  2. The documentation author must have the ability to run containers on their workstation – a Linux container no less. For unprivileged and underinformed authors, this will likely become challenging.

Remote rendering

The alternative to containerized rendering involves transferring [part of] the master space directory to a remote server, having the Uptick elevation script run on that server, and transferring parts of the space directory’s remote copy back into the master copy.

The transfers back and forth could principally be done using rsync, running over SSH. Helper calls, also executed over SSH, may be needed to ensure both the transferring rsync and the remote scripting have what they need to work with.

Rendering is initiated by an author-local script, possibly located within the master copy of the space directory itself. The script contains common logic but requires infrastructure details that are specific to the local situation:

  • the ‘hostname’ (potentially a fully qualified DNS name) or IP address of the rendering server
  • the remote user as whom the rendering script will be logging in to the remote server
  • the server-remote path to the Uptick space directory that the server-side logic is expected to operate on

It is expected that SSH logins, as the specified user to the specified server, are ‘silent’, backed by key-based and agent-facilitated authentication.

Remote space creation

There will be a remote equivalent to the author-local space directory. This remote space directory may be volatile, in the sense that it only exists during the end-to-end rendering process.

It is however also possible that the remote copy of the space directory remains on the server, in order to speed up future runs. (The presence of earlier versions of the cache and source subdirectories could reduce the time needed for transfer of content to and back from the server.)

An initial SSH call, carrying a subscript to be executed on the remote server, verifies that the necessary filesystem directories exists and creates them otherwise. The existence check includes verification of type; only existence as a directory (rather than a file or anything else) is acceptable.

Remote space clearance

Outbound content transfer

Remote space removal

When the documentation to be produced is particularly sensitve, it may make sense to remove the server-remote copy of the space directory.