📦
OpenHIM Platform
  • OpenHIM Platform
  • Getting Started
  • 📜Recipes
    • Central Data Repository with Data Warehousing
    • Central Data repository (no reporting)
    • Master Patient Index
  • 📦Packages
    • Interoperability Layer Openhim
      • Local Development
      • Environment Variables
    • Monitoring
      • Environment Variables
    • Kafka Mapper Consumer
      • Local Development
      • Environment Variables
    • Data Mapper Logstash
      • Local Development
      • Environment Variables
    • Job Scheduler Ofelia
      • Local Development
      • Environment Variables
    • Analytics Datastore - Clickhouse
      • Local Development
      • Environment Variables
    • Analytics Datastore - Elasticsearch
      • Local Development
      • Running in Clustered Mode
      • Environment Variables
    • Client Registry - SanteMPI
      • Environment Variables
    • Dashboard Visualiser - Jsreport
      • Local Development
      • Environment Variables
    • Dashboard Visualiser - Kibana
      • Local Development
      • Environment Variables
    • Dashboard Visualiser - Superset
      • Local Development
      • Environment Variables
    • Message Bus - Kafka
      • Local Development
      • Environment Variables
    • FHIR Datastore HAPI FHIR
      • Local Development
      • Environment Variables
    • Kafka Unbundler Consumer
      • Environment Variables
    • Message Bus Helper Hapi Proxy
      • Environment Variables
    • Reverse Proxy Nginx
      • Local Development
      • Environment Variables
    • OpenFn
      • Environment Variables
    • Reverse Proxy Traefik
      • Environment Variables
  • 🗒️Cheat sheet
  • Architecture
  • Guides
    • Provisioning remote servers
      • Ansible
      • Terraform
    • Resource Allocations
    • Disaster Recovery Process
      • Elasticsearch
      • HAPI FHIR Data
      • OpenHIM Data
    • Development
      • Config Importing
    • Performance Testing
  • Community
Powered by GitBook
On this page
  • Version upgrade process (with rollback capability)
  • Rolling back upgrade

Was this helpful?

Edit on GitHub
Export as PDF
  1. Packages

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.

  1. Exec into the postgres container as the root user (otherwise you will get write permission issues)

docker exec -u root -it superset_postgres-metastore-1.container-id-here bash
  1. Run the pg_dump command on the superset database. The database name is stored in SUPERSET_POSTGRESQL_DATABASE and defaults to superset

pg_dump superset -c -U admin > superset_backup.sql
  1. Copy that dumpped sql script outside the container

docker cp superset_postgres-metastore-1.container-id-here:/superset_backup.sql /path/to/save/to/superset_backup.sql
  1. 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

  1. Copy the superset_backup.sql script into the container

docker cp /path/to/save/to/superset_backup.sql superset_postgres-metastore-1.container-id-here:/superset_backup.sql 
  1. Exec into the postgres container

docker exec -it superset_postgres-metastore-1.container-id-here bash
  1. Run the sql script (where -d superset is the database name stored in SUPERSET_POSTGRESQL_DATABASE)

cat superset_backup.sql | psql -U admin -d superset
PreviousEnvironment VariablesNextLocal Development

Last updated 1 year ago

Was this helpful?

📦