Feature: update persistent context to use local sqlite
Now that we have persistent storage available in k8s environments and imminently in docker, we can think about options to retire the file server component. It is still used by our persistent context plugin - and will be for some time as any migration will require users to update their stacks.
The purpose of this issue is to scope and plan updating our context plugin to use a local sqlite instance on the persistent file system. Using sqlite should work for our HA mode as it already provides safe access to multiple processes - although this needs verifying.
The updated context plugin needs to handle:
- migration from file server
- fall back if persistent filesystem is not configured (ie status quo)
Migration
The context plugin already does an initial population of its in-memory cache on startup. That phase can be used to also populate the local sqlite store. Obvs that should only happen if the local store doesn't exist.
Fall back
If running without persistent storage, the plugin will need to continue using the filesystem as it does today.