Apache SuperSet: docker Configuration Inspections
Apache Superset: docker configuration walkthrough
NOTE: THIS GUIDE WILL NOT BUILD A WORKING PRODUCTION SUPERSET GO HERE FOR A WORKING GUIDE:
Apache Superset is one of the defacto opensource method of presenting data, and this guide will look at it via a docker instance setup. Some basics when messing with Apache Superset:
- It is very easy once it works to make dashboards - you can make them in minutes.
- Documentation on the internet and 'going-off-the-beaten-track' has sparse documentation.
- Typically one will end up going with 'what they can get working.'
- There are some real configuration gotcha's so pay attention.
Once you have your docker basics mastered from a couple references
And one may need to double-check their installation as in:
You can now pull your apache superset as we will be following this guide:
Pull the git repository:
git clone https://github.com/apache/superset.git
Inside the directory you will have a file structure as:
There are two docker-compose files:
- docker-compose.yml (non-production)
- docker-compose-non-dev.yml (production)
Starting off with the non-production variant we will simply build the associate images:
- Note in some installations substitute 'docker compose' with 'docker-compose' and vice-versa.
docker compose -f docker-compose.yml build
-f (file to compose) = docker-compose.yml
It will start doing a LOT of stuff namely:
Next we can take it temporarily up with:
docker compose -f docker-compose.yml up
Apache superset is a large build and will generate a screen as:
You can access the login screen from http://<ip>:8088 or http://localhost:8088. Note it is a non-encrypted link the default access is 'admin' / 'admin'
Ironically it has no password adjustment feature so it is simply easiest to create a second user and then delete the admin or give it a diminished role:
Now this was running in development mode and stopping it shows quite a few number of containers created:
One can remove each container one at a time or simply issue the command:
docker-compose down
Which will delete all the containers in one shot:
Setting The Environment For Production is Critical:
- These env variables must be set BEFORE you docker-compose up your production .yml
It is imperative to set the enviroment variables correctly the simplest way is to make a bash.sh file. In this case we are not using the internal sqlite course - but setting it to run it's own database settings to a database. To accomplish this make your bash.sh as:
env DATABASE_DIALECT=mysql
env DATABASE_USER=root
env DATABASE_PASSWORD=mysqlmain7----------!
env DATABASE_HOST=107.152.35.20
env DATABASE_PORT=3306
env SUPERSET_SECRET_KEY='ASD8Fasdfasdf888888'
cd superset
docker-compose -f docker-compose-non-dev.yml up -d
You can see if these are setup correctly by:
docker inspect superset_worker_beat
We can see in this instance we ran the docker setup before setting these environment variables and now it's pretty broken. At this point we wipe the entire server and start over.
One may recycle the creation process simply by navigating to the .yml / .yaml file and:
docker-compose down
docker-compose -f docker-compose-non-dev.yml up -d
The local configuration file will be found at:
/app/docker/pythonpath_dev/superset_config.py
Next : Apache SuperSet Basics: