Getting started with Hue in 1 minute with Docker

Getting started with Hue in 1 minute with Docker

The current way to play with Hue is often to go on demo.gethue.com or download a Virtual Machine. However, these have some limitations. Using Docker instead provides a much better experience as it:

  • is lighter and more robust than a VM
  • gives admin permissions
  • has much faster execution

Docker makes it perfect for quick starting on Hue development or pointing Hue to your current cluster and giving it a try. This is for this that we now provide a Docker image of Hue!

Hue Running in Kitematic

Hue Running in Kitematic

 

Please find below a video showing how to start Hue with Docker on a Mac and instructions for Linux users.

 

DockerPulls DockerStars

Get the docker image

They are two ways: just pull the latest from the Internet or build it yourself from the Hue repository.

Pull the image from Docker Hub

sudo docker pull gethue/hue:latest

Build the image

cd tools/docker/hue-base
sudo docker build --rm -t gethue/hue:latest .

Running the image

docker run -it -p 8888:8888 gethue/hue:latest bash

This opens a bash to the root of the project. From there you can run the development version of Hue with the command

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

Hue should then be up and running on your default Docker IP on the port 8888, so usually http://192.168.99.100:8888.

Note If 192.168.99.100 does not work, get the IP of the docker container with:

sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                            NAMES
b7950388c1db        gethue/hue:latest   "bash"              10 minutes ago      Up 10 minutes       22/tcp, 0.0.0.0:8888->8888/tcp   agitated_mccarthy

Then get inet addr, so in our case http://172.17.0.1:8888:

sudo docker exec -it b7950388c1db /sbin/ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 02:42:ac:11:00:01
          inet addr:172.17.0.1  Bcast:0.0.0.0  Mask:255.255.0.0
          inet6 addr: fe80::42:acff:fe11:1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:67 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:10626 (10.6 KB)  TX bytes:648 (648.0 B)

alt text

Next

You can then configure Hue and start using it!

Read more about how to configure Hue. The development version uses the configuration file desktop/conf/pseudo-distributed.ini.

12 Comments

  1. Guy Arye 2 years ago

    There is a typo in this document:

    gives dmin permissions

    should be
    gives admin permissions

    • Hue Team 2 years ago

      thanks! fixed 🙂

  2. adrien 2 years ago

    Hi all,
    I’ve followed your tutorial but when Hue starts I’ve got lot of errors. (.cf below)
    I’ve tried to follow “http://gethue.com/how-to-configure-hue-in-your-hadoop-cluster/” but it’s not easy and does’t seem to apply to docker setup.

    I’ve try to edit “pseudo-distributed.ini” but I still have the same errors.

    Do you have another tutorial to configure the Hue in a docker environment?
    It would be great if you could create a new docker container with everything already setup in localhost so none expert could start to play with Hue without spending lot of time figure out how to configure it.
    Do you have any documentation to configure Hue on docker?

    Thanks a lot for your help,

    Adrien

    Error message when I log in:

    – hadoop.hdfs_clusters.default.webhdfs_url Current value: http://localhost:50070/webhdfs/v1
    Failed to access filesystem root
    -Resource Manager Failed to contact an active Resource Manager: (‘Connection aborted.’, error(111, ‘Connection refused’))
    -desktop.secret_key Current value:
    Secret key should be configured as a random string. All sessions will be lost on restart
    -SQLITE_NOT_FOR_PRODUCTION_USE SQLite is only recommended for small development environments with a few users.
    -Hive Editor Failed to access Hive warehouse: /user/hive/warehouse
    -HBase Browser The application won’t work without a running HBase Thrift Server v1.
    -Impala Editor No available Impalad to send queries to.
    -Oozie Editor/Dashboard The app won’t work without a running Oozie server
    -Pig Editor The app won’t work without a running Oozie server
    -Spark The app won’t work without a running Livy Spark Server

    • Hue Team 2 years ago

      On top of the /desktop/dump_config, you should see the full path to the ini file that it actually being picked up. Could you make sure you are editing this one?

      • BulletYuan 1 year ago

        I meet same problem…
        but i can’t find any about dump_config this file
        and what ‘Failed to access filesystem root’ mean is?
        is that means i edit something in hue.ini?

  3. Ivan 2 years ago

    Hi all,

    I just deployed HUE on a docker container and have issues to connect to the container from my laptop.
    More context
    I have a Linux Centos VM which acts as a docker host on which I ran the hue docker container. I successfully start the hue container and I can make request to http://172.17.0.2:8888 successfully.
    I now want to query HUE from my laptop through the network and I got 400 bad request instead. It means that the query reaches the hue server but the server responds with error 400.

    Anyone could help ?

    Thanks
    Ivan

    • Author
      Hue Team 10 months ago

      If you are getting a “Bad Request (400)” error, you will need to enter in the hue.ini or CM safety valve:

      [desktop]
      allowed_hosts=*

  4. Brian Weissler 1 year ago

    I’m using Docker Version 1.12.0-beta21 for Mac. So far this has worked (haven’t followed Hue configuration steps yet), but I had to get to Hue using http://localhost:8888/. It took a minute to resolve the first time, but after that it’s pretty quick.

    Using the IP of the container did not work, and was not reachable from my Mac. I’m guessing this is expected and understood by someone more familiar and experienced with Docker than I am. I just thought I’d post this in case someone runs into the same thing.

  5. Tanishq 12 months ago

    After Pulling the image from Docker Hub sudo docker pull gethue/hue:latest
    when i run cd tools/docker/hue-base it give me that file doesn’t exits why ?
    bash: cd: tools/docker/hue-base: No such file or directory

  6. Fahim 6 months ago

    If you are running Docker on Mac, you won’t be able to reach the Docker private IP at 172.17.0.2.
    Rather what you need to do is access hue on http://localhost:8888. While starting Docker this command “docker run -it -p 8888:8888 gethue/hue:latest bash” is actually opening forwarding port 8888 from the container to the local Host. So you should be able to access hue locally on that port

  7. Ary 4 months ago

    hi
    I configued hue and oozie with my hadoop in yarn mode conrrectly.
    Now i want to do data persistent for hue in my k8s cluster.
    Like user info and job info.
    So which directory in hue image do i need to mount by “docker run -v {dir}:{dir} hue”?
    So that when the hue runs error,i restart it but the info still there because it read the dir’s files above.

Leave a reply

Your email address will not be published. Required fields are marked *

*