Having static configuration built into the mediawiki container means that it would have to be rebuilt every time configuration changed. The container image shouldn't be tied to a specific configuration or envrionment. We need to move the configuration out of the build step so that we have dynamic configuration and a configuration change only requires a re-deploy.
There has been some discussion here: https://www.mediawiki.org/wiki/Talk:Wikimedia_Release_Engineering_Team/MW-in-Containers_thoughts
and Joe has already written up a good starting point here: https://docs.google.com/document/d/1nGv5N1_PYM5Wl5TTPlkFI8TZTSokuJcmdIZD-dKZdEA
This will likely involve some combination of moving configuration to a data store, inserting some as environment variables, and (maybe) attaching a config volume to the container.
Joe has proposed the following in his document:
- State and wiki-specific configuration will live in a configuration datastore, and will be fetched periodically by MediaWiki. Right now we’re using etcd for state, but this decision might be revisited if we need to store more stuff into this system.
- Production code and global, “immutable” configuration should be part of the code release
- Miscellanea should be managed separately, possibly as another repository again. This needs to be better defined.
- Every MediaWiki branch will be bundled with production code and Miscellanea and built into a container. It probably makes sense to have a layered approach to such containers so that we can exploit copy on write as much as possible (given production code will be the same across all containers).