Fundraising/techops/procedures/services-metabase upgrade
Appearance
< Fundraising | techops
Prep
Backup the database
On the metabase primary database host (currently frdb1007) back up the metabase db:
mariadb-dump metabase > /tmp/metabase_backup-$(date +%Y%m%d).sql
Upgrade
Update the metabase package using package_getter/ build_package
On the frpm host:
- run
build_package metabaseand input the version number. push the package to the repo
Install the software on the host
On the analytics host (currently fran1002):
sudo risky_package_updater -ap
OR
apt updateapt upgrade metabasesystemctl restart metabase
Then, restart metabase
Post upgrade
Downgrade / Recovery
On the puppetserver:
- Ensure the previous known good version is present in the repo
- Purge the package from the repo
On the analytics host (currently fran1002)
- Stop metabase -
systemctl stop metabase - Migrate down (commands still to be verified
export MB_DB_TYPE=mariadb
export MB_DB_DBNAME=metabase
export MB_DB_PORT=3006
export MB_DB_USER=username
export MB_DB_PASS=password
export MB_DB_HOST=frdb1007.frack.eqiad.wmnet
java --add-opens java.base/java.nio=ALL-UNNAMED -jar metabase.jar migrate down
- Remove the package locally:
apt remove metabase - Purge the package:
apt purge metabase - Update the apt repo:
apt update - Install the previous version:
apt install metabase