Skip to content
Snippets Groups Projects

web: Add init-container to manage django db migration

Merged Antoine R. Dumont requested to merge web-deal-with-django-migration into production
  1. Oct 10, 2023
    • Antoine R. Dumont's avatar
      web: Add init-container to manage django db migration · 56bed896
      Antoine R. Dumont authored
      It's on by default and deactivated for the swh-next-version cassandra pod (to avoid
      migrating too soon the db).
      
      The real command within the init-container has been tested on our staging pod. And it's
      running fine (doing the migration if needed, doing nothing after the first passing
      migration passed).
      
      It seems to be enough to have this init-container doing this simple migrate command as
      the rolling upgrade triggers the installation of the new version of a pod one at a time.
      So the next version pods (once the first is done and passed the migration) will start
      and do noop migrations.
      
      Refs. swh/infra/sysadm-environment#4780
      Verified
      56bed896
Loading