

Installing Redash Data Visualization Dashboard on CentOS 7 / Fedora
source link: https://computingforgeeks.com/installing-redash-data-visualization-dashboard-on-centos-7-fedora/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

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:
- Query Editor: This is your editor for SQL queries. You can browse schema and import with a click of a button.
- 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 7 / 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:
How to install Docker on Fedora 29 / Fedora 28
How to install Docker CE on Ubuntu / Debian / Fedora / Arch / CentOS
After the Docker engine is installed, ensure Docker Compose is installed as well.
export VER="1.23.1" sudo curl -L https://github.com/docker/compose/releases/download/${VER}/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose
Allow the current logged in user to run Docker commands without sudo.
sudo usermod -aG docker $USER newgrp docker
Step 2: Prepare environment and install Redash
Install pwgen
, wget
and perl-JSON-PP
on CentOS 7.
sudo yum -y install epel-release sudo yum -y install wget pwgen perl-JSON-PP
Install pwgen
, wget
and perl-JSON-PP
on Fedora.
sudo dnf -y install wget pwgen perl-JSON-PP
Create Project directory
REDASH_BASE_PATH=/opt/redash sudo mkdir -p $REDASH_BASE_PATH sudo chown $USER:$USER $REDASH_BASE_PATH
Create PostgreSQL data directory
sudo mkdir $REDASH_BASE_PATH/postgres-data
Create the env
file to store variables
rm $REDASH_BASE_PATH/env 2>/dev/null touch $REDASH_BASE_PATH/env
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}'` cd $REDASH_BASE_PATH REDASH_BRANCH="${REDASH_BRANCH:-master}" # Default branch/version to master if not specified in REDASH_BRANCH env var wget https://raw.githubusercontent.com/getredash/redash/${REDASH_BRANCH}/setup/docker-compose.yml sed -ri "s/image: redash\/redash:([A-Za-z0-9.-]*)/image: redash\/redash:$LATEST_VERSION/" docker-compose.yml echo "export COMPOSE_PROJECT_NAME=redash" >> ~/.profile echo "export COMPOSE_FILE=/opt/redash/docker-compose.yml" >> ~/.profile source ~/.profile docker-compose run --rm server create_db
Start Redash docker containers:
docker-compose up -d
The setup may take a couple of minutes to finish. When done, you should have a number of containers running. View them using the docker ps
command:
$ docker ps
Step 3: Access Redash Dashboard
Once Redash is installed, the service will be available on your server IP or DNS name assigned. Point your browser to the server address to access it.
The first thing you’re asked to do is create your admin account, fill the information required then click the “Setup” button. It will finish the setup and greet you with the admin dashboard
You can now start using Redash to create Dashboards, Queries, and Alerts. For more reading on administration, visit Redash Admin page. If you need SSL, follow Redash SSL setup guide for Nginx.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK