Install Superset
Three methods of installing Superset are provided here:
- Direct installation: Directly download the Superset Python modules into an operating system.
- Docker based installation: Use Docker containers to provide Superset, whether as stand alone containers or part of the Kubernetes environment.
- Managed installation: Use managed services to provide Superset, and connect it to your ClickHouse® clusters.
Direct Installation
The following instructions are based an Ubuntu 20.04 environment. For information on how to install Superset on other operating systems or platforms like Docker or Kubernetes, see the Superset Introduction for links to different ways to install Superset.
Direct Installation Prerequisites
Before installing Superset on Ubuntu 20.04, the following packages must be installed, and will require administrative access on the machine.
Note that Superset requires Python, specifically Python 3.7.9 and above as of this document. These instructions are modified from the original to include installing python3-venv
as part of the other prerequisites.
sudo apt-get install build-essential libssl-dev libffi-dev python3-dev python3-pip libsasl2-dev libldap2-dev python3-venv
Direct Installation Instructions
To install Superset directly into the Ubuntu 20.04 operating system:
-
A virtual environment is highly recommended to keep all of the Superset python requirements contained. Use the following commands to create your Superset virtual environment, activate it, then upgrade
pip
:python3 -m venv clickhouse-sqlalchemy . clickhouse-sqlalchemy/bin/activate pip install --upgrade pip
-
Install Superset with the following in your virtual environment. The command
superset fab create-admin
sets theadmin
user password, which will be used to login and update administrative level Superset settings:export FLASK_APP=superset pip install apache-superset superset db upgrade superset fab create-admin superset load_examples superset init
-
Install the ClickHouse SQLAlchemy - this allows Superset to communicate with ClickHouse. There are two drivers currently in development. As of this time, we recommend the clickhouse-sqlalchemy driver. To install
clickhouse-sqlalchemy
, use thepip
command:pip install clickhouse-sqlalchemy
-
For those who want to enable TLS communications with services like Altinity.Cloud, verify the versions:
-
The
clickhouse-driver
version should be greater than0.2.0
. -
The
clickhouse-sqlalchemy
driver should be0.1.6
or greater.pip freeze | grep clickhouse clickhouse-driver==0.2.0 clickhouse-sqlalchemy==0.1.6
-
Starting Superset From Direct Install
Once Superset is installed, start it with the following command:
superset run -p 8088 --with-threads --reload --debugger
Access the Superset web interface with a browser at the host name, port 8088. For example: http://localhost:8088
. The default administrative account will be admin
, with the password set from the command superset fab create-admin
as listed above.
Installation References
- Details of the most common ways to install and run Superset are available on the Superset Introduction page.
Docker Based Installation
For organizations that prefer Docker based installations, or want to add Superset to a Kubernetes environment along with ClickHouse on Kubernetes, Superset can be installed with a few Docker commands.
The following instructions use the existing Apache Superset docker-compose
file from the Github repository.
Docker Prerequisites
docker
19 and above, with either docker-compose
version 1.29 and above, or the built in docker compose
command that’s part of Docker 20.10 and above.
Docker Based Installation Instructions
To install Superset with a Docker Container:
-
Download the Superset configuration files from the GitHub repository:
git clone https://github.com/apache/superset
-
Enter the
superset
directory and set theclickhouse-driver
and theclickhouse-sqlalchemy
version requirements:cd superset touch ./docker/requirements-local.txt echo "clickhouse-driver>=0.2.0" >> ./docker/requirements-local.txt echo "clickhouse-sqlalchemy>=0.1.6" >> ./docker/requirements-local.txt
-
Run either
docker-compose
ordocker compose
to download the required images and start the Superset Docker containers:docker-compose -f docker-compose-non-dev.yml up
Starting Superset From Docker
Installing and starting Superset from Docker is the same docker-compose
or docker compose
installation command:
docker-compose -f docker-compose-non-dev.yml up
Access the Superset web interface with a browser at the server’s host name or IP address on port 8088. For example: http://localhost:8088
. The default administrative account will be admin
, with the password admin
.
Preset Cloud
For organizations that prefer managed services, Preset Cloud offers Superset with with clickhouse-sqlalchemy
. This can then be connected to an Altinity.Cloud account.
Production Installation Tips
The examples provided above are useful for development and testing environments. For full production environments installation and deployments, refer to the Superset Documentation site.
Some recommendations for organizations that want to install Superset in a production environment:
- Replace the default SQLite database used to store the Superset settings with something more robust like PostgreSQL or MySQL. For an example of the process, see the article Migrating Superset to Postgres.
- Superset can be run in Kubernetes, which allows it to be run in a defined cluster. For more information, see the Superset documentation site on Running on Kubernetes.