In this blog post , We will learn how to setup Redash Dashboard on Ubuntu servers.
What is Redash?
- Redash is an opensource tool built for teams to query and visualize and collaborate.
- It’s easy to setup and works with any data source and can query data from it.
- Redash is a data visualization dashboard which is used to access millions of records from multiple data sources.
Supported Databases and Integrations.
Redash can retrieve data from multiple supported databases as follows.
- Amazon Athena , Amazon Aurora , Amazon Redshift , Amazon DYnamoDB
- Cassandra , Elasticsearch , MySQL , PostgreSQL , InfluxDB and much more.
Redash can be intergrated with the following ,
- Google analytics , JIRA , JSON , Google Spreadsheets , Python , Salesforce and Yandex.
Redash can be used for the following requirements.
VISUALIZATION & DASHBOARD:
Redash can fetch data from different data sources and using which we can create visualizations and then we can create centralised dashboard from the Visualizations.
Redash can be used as query editor .We can create or edit queries using redash’s query editor.
Features of Redash
User management – It supports SSO , access control and many other features for enterprise-friendly workflow.
Alerts – Setup alerts and get notified on the certain events on the data.
API – We can access redash via API and ccan extend its functionality.
- A running Ubuntu server 18.04
- Docker engine
- Docker compose
Lets start by installing docker packages.
Installing Docker packages.
Lets us install the stable version of docker using the below commands.
Update the apt index.
sudo apt-get -qqy update
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common wget pwgen
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Adding the stable version of docker respository.
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
installing the docker engine from the added repo.
sudo apt-get update && sudo apt-get -y install docker-ce
Start the docker service and check the status of Docker engine.
sudo systemctl start docker
sudo systemctl status docker
We can check the version of docker engine installed.
sudo docker --version
Lets install the docker compose on the ubuntu server.
sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
Making the docker-compose binary file executable.
sudo chmod +x /usr/local/bin/docker-compose
You can check the version of docker-compose using the below command.
sudo docker-compose --version docker-compose version 1.22.0, build f46880fe
We have installed the required packages for the Redash setup.
we have installed the dependent packages such as docker and docker-compose to setup Redash containers.
Redash can be installed using the script , also we can do manual installation.
Automated Installation (Using script):
You can download the below attached script to setup Redash.
Create a script named redash-installation.sh and Copy the contents of the downloaded file and paste in .sh file , Save and close the file.
Make the script executable.
chmod +x redash-installation.sh
The script starts to install docker and docker compose.
Creating redash network using default drivers.
Then pulling postgres image and creating postgresql database and redash networking.
Then pulls the redash image.
It also pulls and installs nginx.
Once the installation is completed , We can see the following containers are created for Redash.
Nginx , Redash Scheduler , Redash Scheduled_Worker , Redash Server , Redis , PostgreSQL and Redash Adhoc_Worker.
To verify the installation , Run the below command and we can see that all the Redash containers are UP and Running.
sudo docker ps
Once the installation is completed , Now Its time to access Redash dashboard.
Before Accessing the dashboard , Make sure ports : 80 and 443 are allowed in the firewall or the Security groups.
Accessing Redash Dashboard
To access the redash dashboard, You can directly access using server’s Public IP address or the DNS name.
You will get the following screen. We need to setup Admin credentials for the redash dashboard.
After the required details are filled , Click Setup.
You will be taken to the Admin dashboard of Redash.
using this dashboard , We can add data sources , create visualizations , dashboards and alerts.
On the topic right corner , Under username , You can find options to create and manage Users , Data sources and much more.
We can create alert destinations , Configure admin account , Create and manage users , configure data sources etc.
We have implemented a multi purpose tool , Redash for querying SQL queries , plotting visualization and dashboards from the data sources.
Hope you find it helpful.Please do check out my other publications.