Introduction
Apache Superset (Superset) is a powerful open-source BI tool created by Maxime Beauchemin while working at Airbnb. Superset is now part of Apache Software Foundation Projects and is widely used for data exploration and visualization.
There are several methods to run Superset on your local computer, but in this tutorial, we’re going to focus on running Superset on our computer by building the docker image and running locally with Docker Compose.
The YouTube Channels in both English (En) and French (Fr) are now accessible, feel free to subscribe by clicking here.
Dependencies
To get started, you need to have the following dependencies installed on your computer:
Docker
Docker lets you run applications as containers (isolated environments that contain everything an application needs to run) on your computer. Since we’re going to use Docker Compose, a tool that lets you run and manage multiple Docker containers as a single application, you need to ensure you have a Docker setup on your computer.
Run the following command to verify you have docker installed on your local computer:
docker --version
If you get a command not found
or similar error, that implies we do not have docker installed. Follow the instructions here to have docker up and running.
Docker Compose
As previously mentioned, Docker Compose lets us run multiple docker containers as a single application through a docker-compose.yml file. Since we’ll be running superset using Docker Compose, we need to have it installed on our computer, here’s a guide for that.
We can verify if Docker Compose exists by running the following command:docker-compose --version
NodeJS
Node.js will be needed to build Superset frontend assets using the node package manager(npm
). The current version of Apache Superset supports version 16.20 of Nodejs. You can confirm you have this version installed by running the command: node — version
If it is not installed on your computer, check the instructions here to install Node.js.
Clone Superset GitHub Repository
To Install Superset from scratch on your local computer using Docker Compose, head over to https://github.com/apache/superset and clone the repository using the following command:
git clone https://github.com/apache/superset.git
Check out the stable branch, as the master branch tends to be unstable most of the time. You can find the most stable version in the Superset repository release section here: https://github.com/apache/superset/releases
Once you identify the most stable version of Superset, that is usually just a decimal number (Example: 3.0.1
). Go ahead and look up the branch name on the Superset GitHub repository. For the example above, the branch name is 3.0
From the cloned repository, run: git checkout 3.0
Building Frontend Assets
Move to the superset-frontend folder to build frontend assets by running the following commands:
Enter the superset-frontend foldercd superset-frontend
Install Dependencies and Build Assetsnpm ci && npm run build-dev
Add the following values to the docker/.env
fileSUPERSET_SECRET_KEY=’somerandomstrongandlongstring’
Building and Running Superset Docker Containers
Next, move back to the root directory you just cloned and replaceimage: *superset-image
in it with build: .
in docker-compose.yml file.
The reason for this change is to build your custom docker image or Superset from the local Dockerfile, run the following command:docker-compose up — build
Take a coffee break while the build process is ongoing since this can take about 10 minutes for the application to be ready on your first build depending on your internet speed.
Note: For a faster load time, disable loading example datasets by changing the following environment variable in
docker/.env
file
SUPERSET_LOAD_EXAMPLES=no
Explore Superset Application
Once the build is finished, you should be able to access the Superset app on http://localhost:8088
Log in with the default credentials:
- username:
admin
- password:
admin
Here are some screenshots of how Superset should look like on the browser.
Apache Superset Features
Start exploring the amazing features of Superset, such as:
- Database table visualization
- Interactive dashboards
- Interactive maps
- Alerts and reporting
- Visualization plugin support
- Enterprise authentication (LDAP, OpenID, OAuth), etc…
References:
- Official Documentation: https://superset.apache.org/docs/installation/installing-superset-using-docker-compose
- GitHub Issue about SECRET_KEY: https://github.com/apache/superset/pull/25646#issuecomment-1766734941
———————
We have just started our journey to build a network of professionals to grow even more our free knowledge-sharing community that will give you a chance to learn interesting things about topics like cloud computing, software development, and software architectures while keeping the door open to more opportunities.
Does this speak to you? If YES, feel free to Join our Discord Server to stay in touch with the community and be part of independently organized events.
———————
Conclusion
To sum up, we went through the steps to install Apache Superset locally by using Docker Compose we hope to come out next with more content around this interesting tool, subscribe to the newsletter so you won’t miss anything.
Thanks for reading this article. Like, recommend, and share if you enjoyed it. Follow us on Facebook, Twitter, and LinkedIn for more content.