Dashboard Visualiser - Superset
Superset is a visualisation tool meant for querying data from a SQL-type database.
Version upgrade process (with rollback capability)
By default if you simply update the image that the superset service uses to a later version, when the container is scheduled it will automatically run a database migration and the version of superset will be upgraded. The problem, however, is that if there is an issue with this newer version you cannot rollback the upgrade since the database migration that ran will cause the older version to throw an error and the container will no longer start. As such it is recommended to first create a postgres dump of the superset postgres database before attempting to upgrade superset's version.
Exec into the postgres container as the root user (otherwise you will get write permission issues)
Run the pg_dump command on the superset database. The database name is stored in
SUPERSET_POSTGRESQL_DATABASE
and defaults tosuperset
Copy that dumpped sql script outside the container
Update the superset version (either through a platform deploy or with a docker command on the server directly --
docker service update superset_dashboard-visualiser-superset --image apache/superset:tag
)
Rolling back upgrade
In the event that something goes wrong you'll need to rollback the database changes too, i.e.: run the superset_backup.sql script we created before upgrading the superset version
Copy the superset_backup.sql script into the container
Exec into the postgres container
Run the sql script (where -d superset is the database name stored in
SUPERSET_POSTGRESQL_DATABASE
)
Last updated