Skip to content

WWIV in Containers

granitepenguin edited this page Aug 30, 2018 · 4 revisions

To run WWIV in containers, we'll want to sort out a few things.

What do we have today?

  1. What's persistent data. This is usually the following:
    1. data/
    2. dloads/
    3. gfiles/
    4. msgs/
    5. scripts/
    6. *.log files in the root.
    7. config.dat/config.ovr in the root.
    8. config.ovr in the root
    9. INI files
    10. WWIVnet directories (p/nets/)
    11. DOORS directory (p/doors/)
  2. What is ephemeral
    1. The binaries
    2. readfile files, documentation
    3. attach/
    4. batch/%n
    5. temp/%n
    6. upgrade.{bat,ps1,sh}

What's the goal

Goal: To make it easy to run wwiv natively in a container. To do so we need to clearly separate persistent from ephemeral and decide what will go in to the ephemeral container and what will go into the data volume and allow that to work seamlessly with upgrade and rollbacks.

Approach

  • Add a level of indirection between persistent and ephemeral directories in wwiv by having a top level directory of p or e and the existing wwiv directories will live under that. i.e. data becomes p/data
  • Move all binaries to /e/bin and introduce an environment variable WWIV_BIN_DIR that points to ${WWIV_DIR}/e/bin by default.
  • Move the source of truth for configuration to p/data/config.json and have it pointed to by a 2nd environment variable WWIV_CONFIG_FILE. wwiv and wwivconfig will also write out a legacy config.dat if it doesn't exist in WWIV_DIR as needed.
  • WWIV INI files will also move to data (or we can make new directory called config to hold that and the wwiv.json file
  • Final environment variable of WWIV_LOG_DIR is used, defaulting to WWIV_DIR/p/logs for the log file location.
  • Now the WWIV_DIR is also ephemeral