2023-09-13, Wednesday, Cloudy

新工上遇上了挫折。寫好的東西達不到標準需要別人執手尾了。雖然同事說沒關係,但反應了自己的不足。有時反省自己為何做事總是不好,為何別人有留意或想到的事情自己總是忽略。現在覺得是自己天生的思考模式問題,可能看多少書都沒用。或者自己應該更適合做地盤呢類工作,而唔係IT。

Install Apache Superset on Ubuntu 18.04




  1. Open terminal.
  2. In terminal, run:
    (base) cbxdev@cbxdev-VirtualBox:~$ sudo apt-get install build-essential libssl-dev libffi-dev python3.6-dev python-pip libsasl2-dev libldap2-dev
  3. Create virtual environment
    (base) cbxdev@cbxdev-VirtualBox:~$ python3 -m venv venv
    (base) cbxdev@cbxdev-VirtualBox:~$ . venv/bin/activate
  4. Upgrade pip and setuptools to latest version.
    (venv) (base) cbxdev@cbxdev-VirtualBox:~$ pip install --upgrade setuptools pip
  5. Install Superset
    
    # Install Superset
    (venv) (base) cbxdev@cbxdev-VirtualBox:~/docker$ pip install superset
    # Initialize the database
    (venv) (base) cbxdev@cbxdev-VirtualBox:~/docker$ superset db upgrade
    # Create an admin user (you will be prompted to set a username, first and last name before setting a password)
    (venv) (base) cbxdev@cbxdev-VirtualBox:~/docker$ export FLASK_APP=superset
    (venv) (base) cbxdev@cbxdev-VirtualBox:~/docker$ flask fab create-admin
    Username [admin]:
    User first name [admin]:
    User last name [user]:
    Email [admin@fab.org]: whelan.chan@cbxsoftware.com
    Password:
    Repeat for confirmation:
    2019-09-26 15:59:20,949:INFO:root:Configured event logger of type 
    Recognized Database Authentications.
    Admin User admin created.
    # Load some data to play with
    (venv) (base) cbxdev@cbxdev-VirtualBox:~/docker$ superset load_examples
    # To start a development web server on port 8088, use -p to bind to another port
    (venv) (base) cbxdev@cbxdev-VirtualBox:~/docker$ superset run -p 8080 --with-threads --reload --debugger
     
    # Run this command to start development server, so the server will listen to all interface
    (venv) (base) cbxdev@cbxdev-VirtualBox:~/docker$ superset run -h 0.0.0.0 -p 8080 --with-threads --reload --debugger
    
    
  6. Then on your local machine, open a browser and access http://localhost:8080, you should see a page below, please login with the username and password you've set up before and you should see a list of dashboard.
  7. After the above standard steps, if you cannot see a list of dashboard after sign-on, it is probably permission issue. Run below commands:
    # The step by step installation guide is missing this. This is required to load test users for testing/development.
    (venv) (base) cbxdev@cbxdev-VirtualBox:~/docker$ superset load_test_users
    # And you need to init superset again
    (venv) (base) cbxdev@cbxdev-VirtualBox:~/docker$ superset init
    # Run this command to start development server, so the server will listen to all interface
    (venv) (base) cbxdev@cbxdev-VirtualBox:~/docker$ superset run -h 0.0.0.0 -p 8080 --with-threads --reload --debugger
    

    Comments

    Popular posts from this blog

    生的感覺、死的感覺

    2023-03-18, Saturday, Sunny