Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dominijk/4590c3e782c7c5bcbe61dd6b11816481 to your computer and use it in GitHub Desktop.
Save dominijk/4590c3e782c7c5bcbe61dd6b11816481 to your computer and use it in GitHub Desktop.
Getting Started With Superset: Airbnb’s data exploration platform

Getting Started With Superset: Airbnb’s data exploration platform

Update Python and PIP versions on EC2 (Amazon AMI)

At the time of writing, Python v3.6 and PIP v19.0.3 were available on AWS EC2.

sudo yum update -y
sudo yum install python36 -y

Adjust PATH

Add below lines to ~/.bashrc

export PATH=/usr/local/bin:$PATH
alias python=python36
source ~/.bashrc

Update PIP & other OS dependencies for Superset

sudo yum install python36-pip  -y
sudo /usr/bin/pip3.6 install --upgrade setuptools pip
sudo yum upgrade python-setuptools -y
sudo yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel -y
sudo yum install python36-devel -y

sudo cp /usr/local/bin/pip /usr/sbin/

Validate Python and PIP

Check Python and PIP

$ python -V
Python 3.6.6

$ pip -V
pip 19.0.3 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)

Setup Superset

Install superset

sudo pip install superset

As noted here you need to run the below to fix an error relating to most recent version of Pandas.

sudo pip uninstall pandas
pip install pandas==0.23.4

Create an admin user (you will be prompted to set username, first and last name before setting a password)

fabmanager create-admin --app superset

Also need to fix SQL version as here; apache/superset#6977

sudo pip install sqlalchemy==1.2.18

Initialize the database

superset db upgrade

Load some data to play with

superset load_examples

Create default roles and permissions

superset init

For postgres you'll also need the correct db connector

sudo pip install psycopg2-binary

Start the web server on port 8088, use -p to bind to another port

superset runserver -p 8088

Adjust security group to allow http port

http://<EC2 Public DNS>:8088/

Using this install method the superset assets and at

/usr/local/lib/python3.6/site-packages/superset/static/assets

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment