Page MenuHomePhabricator

Scap backport change_url: copy files for legacy deployment
Closed, InvalidPublic3 Estimated Story Points

Description

After the successful image build, the backport command should copy the files from the newly build image into /srv/mediawiki on the deployment server.

During the transition period where we have mw-on-k8s as well as bare-metal mediawiki servers, use the container image as the source for /srv/mediawiki on the deploy server. This is simple to do using

docker run --rm \
         -v /srv/mediawiki:/host \
         --user $(id -u mwdeploy):$(id -g mwdeploy) \
         --entrypoint=rsync \
         $IMAGE \
         -a --delete \
         --exclude '**/cache/l10n/*.cdb' \
         /srv/mediawiki/ /host/

Note: The container image does not contain /srv/mediawiki/php-<vers>/cache/l10n/upstream/ JSON files since they're not needed when running the container. I hope to avoid having to deal with those files at all anymore by way of T295304: Improve efficiency of scap l10n operations.

Event Timeline

dancy changed the task status from Open to In Progress.Nov 10 2021, 8:19 PM

Now using the deployment server as the source of truth for the container rather than the other way around.