I'm trying to deploy a Piwik site onto Kubernetes, and I am struggling to figure out how to do a hot-database-upgrade without loosing stats. So the process is as follows(upgrading from Piwik 3.0 to 3.1):
Can I script this inside Kubernetes, or is my best approach going to be running a script inside my master. My aim is to be able to do repeatedly and reliably(so failures prior to step 5 are rolled back, and failures afterwards rely on human intervention).
I have tried to do some research around the best approach but I cannot find much information regarding this sort of upgrade process. Most guides just recommend taking the service off-line for a few seconds/minutes to do the migration which in this application isn't acceptable.
If your instance of Piwik was created as a Deployment, you're in luck. The details are here. What you need to do is a RollingUpdate.
The process will look like this. The syntax is "Action: Result".