Install superset on Windows with WSL and docker

Apache Superset installation with wsl and docker updated

Apache Superset on a Windows with WSL & Docker

`Apache Superset` is an **open-source** platform for **_data visualization_** and exploration, offering an intuitive web interface for creating **_interactive dashboards and charts_**.

It connects to various data sources, supporting real-time data analysis. Superset is efficient with large data sets, provides advanced SQL querying capabilities, and facilitates collaboration by allowing users to share insights easily.

It's designed for data professionals seeking a customizable and comprehensive visualization tool.

Unfortunately, Superset doesn't support Windows directly. In this article, I'll show you how we can install and use Superset on a Windows machine.

  1. Go to Control Panel > Programs and Features > Turn Windows Features on or off. WSL on control panel

    Activate the Windows Subsystem for Linux.

    WSL feature on control panel

  2. Visit the Microsoft Store and install the latest version of Ubuntu.

    windows store install ubuntu

  3. Upon installation, the command prompt will open, prompting you for a UNIX username and password

    ubuntu user and password

  4. Set Password for root user

    sudo su
    

    This will ask for the current user password & switch to root user

    passwd
    

    This will ask you to set password for root user

  5. Let's explore the Ubuntu file system we've just installed. In Windows Explorer, paste \\wsl$ into the address bar and press Enter. access ubuntu file system from windows

    This might take a moment, depending on your system.

    wsl on windows explorer

    By default, this directory appears in the terminal when you launch Ubuntu.

    wsl on explorer

  6. Install Docker Desktop, then navigate to Docker settings. Enable integration with my default WSL distro and Enable integration with additional distros, where your Ubuntu version will appear.

    docker wsl integration

  7. Launch Ubuntu from the Start menu.

    ubuntu on windows

  8. Execute docker -v

    check docker version

    If all steps were followed correctly, you should see the expected output.

  9. If there's an error, revisit step 5 docker not found

  10. To check your current location in Ubuntu, run ls -a check current directory on ubuntu

  11. Clone Apache Superset with

    git clone --depth=1  https://github.com/apache/superset.git
    
    • The --depth=1 argument insures a shallow clone meaning only the most recent commit will be cloned, hence it will be faster.
    • You can remove it if you want to clone the entire repository

    git clone superset

  12. After cloning, enter the Superset directory using

    cd superset
    

    cd into superset

  13. Start Docker and launch Apache Superset by running

    • Option #1 - for an interactive development environment

      docker compose up --build
      

      The --build argument insures all the layers are up-to-date

    • Option #2 - build a set of immutable images from the local branch

      sudo docker compose -f docker-compose-non-dev.yml up -d
      

    run superset on docker

    This process may take some time.

  14. Once completed, you can access the interface at http://localhost:8088/ The default username and password are both admin. You should also see a new container in Docker Desktop.

    access superset on localhost

    Follow the instructions of this image to open superset in your browser Run Superset from Docker

  15. The default username and password are both admin. Superset Default User and Password

  16. For further documentation, refer to Apache Superset Documentation

  17. To edit code, open another Ubuntu terminal and execute

    code .
    

    opening code on vscode

    This will download the necessary packages and open the codebase in VS Code.

    superset on vscode editor

  18. To stop the container, run

    docker compose down
    

    Docker Compose Down

    Now, if you check your Docker Desktop, you should see the container stopped.

    Docker Compose Down all container

Related posts