Quick Start a Hue development environment in 3 minutes with Docker

Published on 24 July 2019 in Administration / Version 4 - 1 minute read - Last modified on 22 July 2020

Looking at simplifying the usage of Databases and Datawarehouses or learning how to build Cloud webapps? Hue would be a great candidate for you!

Typically the development is made natively but here is a new way to quickly get started with Docker:

git clone https://github.com/cloudera/hue.git

cd hue

cp desktop/conf/pseudo-distributed.ini.tmpl desktop/conf/pseudo-distributed.ini

Then edit the [[database]] section to specify a proper database, here MySql:

host=127.0.0.1 # Not localhost if Docker
engine=mysql
user=hue
password=hue
name=huedb

Then map the local Hue source code into the running container (so that local edits are seen in the running Hue):

sudo docker run -it -v $PWD/apps:/usr/share/hue/apps -v $PWD/desktop:/usr/share/hue/desktop -v $PWD/desktop/conf/pseudo-distributed.ini:/usr/share/hue/desktop/conf/z-hue.ini --network="host" gethue/hue

And open-up http://127.0.0.1:8888!

Note: code updates won’t be seen after the Docker container runs. For this Hue would need to be started in dev server mode by replacing the line by

./build/env/bin/hue runserver 0.0.0.0:8888

and it will auto-restart on Python code changes. For JavaScript, those would need to be compiled.

 


comments powered by Disqus

More recent stories

02 February 2021
Hue 4.9 and its new SQL dialects and components are out!
Read More
10 January 2021
SQL Querying a log stream and outputting Calculations to another stream
Read More
31 December 2020
A Spark SQL Editor via Hue and the Spark SQL Server
Read More