Tuesday, January 4, 2022

[SOLVED] Apache Superset installation problems

Issue

We are trying to install Apache Superset. So far, we have been able to run it in standalone mode without any config file but we haven't been able to find any complete documentation, providing information on the pre-installation and configuration phases, such as:

you have to create a linux user 'superset' and install gunicorn & superset virtual environment in it.

The configuration we are trying to achieve is a production environment to be used in company LAN,running Apache-Superset as a service, that has a self-signed certificate on Centos 7 that can be viewed via Chrome browser by granted users.

Cloud providers are not considered as an option for now.


Solution

Yes you do want to create a non-root user. "superset" or some other name is fine. I'm running V1.3 (upgraded from V1.2) on CentOS 8 as user root because I'm only running in development mode right now. I have another test server using docker-compose and a non-root user. In any case, Superset runs fine either way.

As for the installation process, you should start at this URL: https://superset.apache.org/docs/installation/installing-superset-from-scratch There's a section for RHEL/Fedora and CentOS platforms. Follow that page all the way down to the superset run command.

As for running superset as a service, you'll need to create and enable a service file. Here's how I have my 1st test server setup/configured:

  1. Created a service file name venv_superset in /etc/systemd/system. The name of the file can be whatever you want, just as long as systemctl can find it.

  2. Contents of the service file I use:

    [Unit]
    Description=Python Venv Apache Superset service
    After=network.target
    
    [Service]
    User=root
    Group=root
    ExecStart=/usr/bin/ksh /usr/local/start_superset.sh
    Restart=always
    
    [Install]
    WantedBy=multi-user.target
    

The important setting is the After=network.target setting. The ExecStart setting is variable according to your preferred shell and script info.

As for the script I use, it's just 3 lines:

. /usr/local/venv/bin/activate
export FLASK_APP=superset
superset run -h 192.168.199.128 -p 8089 --with-threads --reload --debugger

Of course, the location of activate, and the host name/IP number and port number are up to you.

As for gunicorn, I never installed it explicitly, however it is installed. I don't use a self-signed cert in my test environment.



Answered By - Kevin Struckhoff