We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Learn how to – Installing Redash Data Visualization Dashboard on CentOS/Fedora

Learn how to – Installing Redash Data Visualization Dashboard on CentOS/Fedora.

This article I will take you through the steps of Installing Redash Data Visualization Dashboard on CentOS 7 / Fedora. Redash is a data visualization tool that gives you quick and easy access to billions of records collected from various data sources.

Redash supported Data sources

Redash has support for querying multiple databases, including PostgreSQL, Redshift, Graphite, MySQL, Google BigQuery, Presto, Hive, Google Spreadsheets, Cloudera Impala, and custom scripts. The dashboards supported are charts, pivot table, cohorts and many more.

Components of Redash

Redash consists of two parts:

  1. Query Editor: This is your editor for SQL queries. You can browse schema and import with a click of a button.
  2. Visualizations and Dashboards: create different visualizations from your dataset, and then combine several visualizations into a single dashboard.

Features of Redash

  • It gives you a powerful query editor with collaboration capabilities
  • Rich API – You get an API for accessing Redash and extend its functionality.
  • User Management: Redash support SSO, access control and many other great features for enterprise-friendly workflow.
  • Alerts: Set up alerts and get notified on certain events on your data.
  • Support for many Data Sources: Redash supports SQL, NoSQL, Big Data and API data sources – query your data from different sources to answer complex questions. Redash supports more than 25 data sources.

Installing Redash Data Visualization Dashboard on CentOS / Fedora

In this section, we kick off the installation of Redash Data Visualization Dashboard on CentOS 7 / Fedora. This installation of Redash on CentOS 7 / Fedora has the following dependencies

  • Docker Engine
  • Docker compose

Redash developer provides a script to automate the installation.

Step 1: Install Docker and Docker Compose

Install Docker Engine on CentOS / Fedora using one of the following guides:

After the Docker engine is installed, ensure Docker Compose is installed as well.

sudo yum -y install wget curl
curl -s https://api.github.com/repos/docker/compose/releases/latest | grep browser_download_url  | grep docker-compose-linux-x86_64 | cut -d '"' -f 4 | wget -qi -
chmod +x docker-compose-linux-x86_64
sudo mv docker-compose-linux-x86_64 /usr/local/bin/docker-compose

Allow the current logged in user to run Docker commands without sudo.

sudo usermod -aG docker $USER
newgrp docker

Confirm both Docker and Compose are installed:

$ docker-compose version
Docker Compose version v2.11.2

$ docker version
Client: Docker Engine - Community
 Version:           20.10.19
 API version:       1.41
 Go version:        go1.18.7
 Git commit:        d85ef84
 Built:             Thu Oct 13 16:48:38 2022
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Step 2: Prepare environment and install Redash

Install pwgenwget and perl-JSON-PP on CentOS 7.

sudo yum -y install epel-release
sudo yum -y install vim wget pwgen perl-JSON-PP

Install pwgenwget and perl-JSON-PP on Fedora.

sudo dnf -y install vim wget pwgen perl-JSON-PP

Create Project directory

sudo su -
REDASH_BASE_PATH=/opt/redash
mkdir -p $REDASH_BASE_PATH
chown $USER:$USER $REDASH_BASE_PATH

Create PostgreSQL data directory

mkdir $REDASH_BASE_PATH/postgres-data

Create the envfile to store variables

rm $REDASH_BASE_PATH/env 2>/dev/null
touch $REDASH_BASE_PATH/env

Modify and add the contents.

COOKIE_SECRET=$(pwgen -1s 32)
POSTGRES_PASSWORD=$(pwgen -1s 32)
REDASH_DATABASE_URL="postgresql://postgres:${POSTGRES_PASSWORD}@postgres/postgres"
echo "PYTHONUNBUFFERED=0" >> $REDASH_BASE_PATH/env
echo "REDASH_LOG_LEVEL=INFO" >> $REDASH_BASE_PATH/env
echo "REDASH_REDIS_URL=redis://redis:6379/0" >> $REDASH_BASE_PATH/env
echo "POSTGRES_PASSWORD=$POSTGRES_PASSWORD" >> $REDASH_BASE_PATH/env
echo "REDASH_COOKIE_SECRET=$COOKIE_SECRET" >> $REDASH_BASE_PATH/env
echo "REDASH_DATABASE_URL=$REDASH_DATABASE_URL" >> $REDASH_BASE_PATH/env

You can view the values set on the variables file using cat command:

# cat $REDASH_BASE_PATH/env
PYTHONUNBUFFERED=0
REDASH_LOG_LEVEL=INFO
REDASH_REDIS_URL=redis://redis:6379/0
POSTGRES_PASSWORD=X1Tqgc8RSj8lqFAhh46kbjLIQ92JvShu
REDASH_COOKIE_SECRET=sERgxHgyn6iwxqNh9ZiiS9e2YCipFXpk
REDASH_DATABASE_URL=postgresql://postgres:X1Tqgc8RSj8lqFAhh46kbjLIQ92JvShu@postgres/postgres

Setup Docker Compose

REQUESTED_CHANNEL=stable
LATEST_VERSION=`curl -s "https://version.redash.io/api/releases?channel=$REQUESTED_CHANNEL" | json_pp | grep "docker_image" | head -n 1 | awk 'BEGIN{FS=":"}{print $3}' | awk 'BEGIN{FS="""}{print $1}'`

Cart

Your Cart is Empty

Back To Shop