mozmeao / infra

Mozilla Marketing Engineering and Operations Infrastructure
https://mozilla.github.io/meao/
Mozilla Public License 2.0
59 stars 12 forks source link

Have bedrock use a single image for all deployments #1306

Closed pmac closed 4 years ago

pmac commented 4 years ago

Currently we build the database and translation files into the docker image. The data within the database and the .lang files are different for dev, stage, and prod since they can and do have different sources for data. We'd like to move to a system where we pull the data on bedrock start so that we can have a single image that we can promote from dev to prod instead of having to build it for every deployment.

pmac commented 4 years ago

Actually I think what I'm going to do is have it always bake the prod data into the image, and then updated it on startup. This way it's always right in the running containers, but it's also runable immediately locally even if you don't have access to the external data for whatever reason.

pmac commented 4 years ago

New plan. After some team discussion we've decided that we're going to do the following:

1 Use a daemon set to have a process updating a volume with the database and l10n files on every k8s node 2 Use a volume in the bedrock pods to access the DB and l10n files from the volume from 1

This means no need to update data at startup. We just have to change the config in bedrock to look for these files in the volume and no longer run the DB download process.