projectbuendia / buendia

Main project repository (see the Wiki for details)
Apache License 2.0
117 stars 36 forks source link

Staging should always be able to update from the latest build #205

Closed schuyler closed 4 years ago

schuyler commented 5 years ago

<@zestyping> I think it's more important to keep staging updated than to preserve the data on staging, so I think the script that does this should wipe the database when an inability to migrate would block the update.

  1. first upgrade buendia-db-migrate to the latest
  2. explicitly run buendia-db-migrate to attempt a migration to the new version
  3. if the migration succeeds, go ahead and install all the new packages
  4. otherwise: 4a. run buendia-openmrs-dump to save a backup somewhere 4b. apt-get purge -y buendia-server, buendia-db, and buendia-db-init and any other packages that transitively depend on them 4c. delete /etc/buendia-db-init-installed 4d. install the new buendia-db-init, thus wiping and reinitializing the database 4e. install the rest of the new packages 4f. run buendia-openmrs-account-setup buendia buendia to create the OpenMRS account 4g. run buendia-openmrs-location-setup 4h. run buendia-profile-apply profile.csv where profile.csv is a recent profile, e.g. take the enfr-03.csv profile from ping.buendia.org
  5. finally, restart tomcat7

(copied from Slack)

schuyler commented 5 years ago

216 addresses this issue