Skip to content

idealista/superset_role

Repository files navigation

Apache Superset Ansible role

GitHub release (latest by date) Build Status Ansible Galaxy

Logo

This ansible role installs Superset in a Debian environment. It has been tested for Debian buster.

This role has been generated using the cookiecutter tool, you can generate a similar role that fits your needs using the this cookiecutter template.

Getting Started

These instructions will get you a copy of the role for your Ansible playbook. Once launched, it will install Apache Superset in a Debian system.

Prerequisites ☑️

Ansible 2.9.x.x version installed. Inventory destination should be a Debian (preferable Debian 10 Buster ) or Ubuntu environment.

ℹ️ By default this role use the predefined installation of Python that comes with the distro.

For testing purposes, Molecule with Docker as driver and Goss as verifier.

Installing 📥

Create or add to your roles dependency file (e.g requirements.yml):

- src: idealista.superset_role
  scm: git
  version: 1.1.0
  name: superset_role

Install the role with ansible-galaxy command:

ansible-galaxy install -p roles -r requirements.yml -f

Use in a playbook:

---
- hosts: someserver
  roles:
    - role: superset_role

Usage 🏃

Look to the defaults properties files to see the possible configuration properties, take a look for them:

👉 Don't forget :

  • 🦸 To set your Admin user.
  • 🔑 To set Secret key.
  • 🔑 To set webserver secret key.
  • 📝 To set your SUPERSET_HOME and SUPERSET_CONFIG_PATH at your own discretion.
  • 📝 To set your installation and config skelton paths at your own discretion.
    • 👉 See superset_skeleton_paths in main.yml
  • ⚙️ To customize your app service and superset running config.
  • ⚙️ To customize your feature flags.
  • ⚙️ To choose your preferred webdriver version in case of use alerts & reports for example.
  • 🐍 Python and pip version, and install before if necessary.
  • 🚙 Custom db drivers In addition, superset requires additional drivers to connect to different databases Supported Databases and Dependecies.
  • 📦 Additional Python packages with version specific like like python-ldap for example to use LDAP login

🚙 Custom db drivers

Choose yours editing the superset_db_drivers variable, you can see all the default db drivers ready to use (uncomment) in main-yml. It should be a list like this:

superset_db_drivers:
  - name: ClickHouse
    package:
      - name: clickhouse-driver
        version: 0.2.0
      - name: clickhouse-sqlalchemy
        version: 0.1.6
  - name: MySQL
    package:
        - name: mysqlclient
    required_libs:
      - default-libmysqlclient-dev
      - python-mysqldb
  - name: PostgreSQL
    package:
      - name: psycopg2-binary

📦 Additional Python packages

superset_additional_python_packages should be a list following this format:

superset_additional_python_packages:
  # [ LDAP ]
  - name: python-ldap

Testing 🧪

Install dependencies

pipenv install -r test-requirements.txt

For more information read the pipenv docs.

Run test

pipenv run molecule test

Built With 🏗️

Ansible Molecule Goss

Versioning 🗃️

For the versions available, see the tags on this repository.

Additionaly you can see what change in each version in the CHANGELOG.md file.

Authors 🦸

See also the list of contributors who participated in this project.

License 🗒️

Apache 2.0 License

This project is licensed under the Apache 2.0 license - see the LICENSE file for details.

Contributing 👷

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.