Skip to content

setup cloudera docker container

Majeed edited this page Aug 4, 2016 · 2 revisions

Setup Cloudera Quick Start Docker Cotainer

These instructions will help you get started with cloudera's hadoop dockerized container, it helps you configure all the ports and start/configure other services so you can get started working on it right away...

Build image

sudo docker pull <image-repo-url>:<port>/cloudera-quickstart

you can as well do --> docker pull cloudera/quickstart:lates

Build cloudera container

sudo docker run -d --name sambos-cluster --privileged=true -p 80:80 -p 8888:8888 -p 8020:8020 -p 8032:8032 -p 8088:8088 -p 9090:9090 -p 10000:10000 -p 10020:10020 -p 11000:11000 -p 11001:11001 -p 11443:11443 -p 19888:19888 -p 50010:50010 -t -i -v /var/opt/dockershared/sam/hdfs:/var/lib/hadoop-hdfs/cache/hdfs -v /var/opt/dockershared/sam/scripts:/scripts <image-repo-url>:<port>/cloudera-quickstart

restart

sudo docker restart sambos-cluster

Log into docker bash:

sudo docker exec -it sambos-cluster bash

Check status of services

service --status-all

Additional steps for setting/configuring cloudera docker container (oozie /hbase/zookeeper)

run following commands :

  • /usr/lib/hadoop/libexec/init-hdfs.sh
  • cp /etc/hadoop/conf.pseudo/*.* /etc/oozie/conf.dist/hadoop-conf/
  • sudo -u oozie /usr/lib/oozie/bin/oozie-setup.sh sharelib create -fs hdfs://localhost:8020 -locallib /usr/lib/oozie/oozie-sharelib-yarn
  • sudo -u oozie oozie  admin -shareliblist -oozie http://localhost:11000/oozie
  • export JAVA_HOME=/usr/lib/jvm/java-7-oracle/
  • export PATH=$JAVA_HOME/bin:$PATH
  • chmod 777 /etc/hbase/conf.dist/hbase-env.sh /etc/hbase/conf.dist/hbase-env.sh
  • /usr/lib/zookeeper/bin/zkServer.sh start

That's it !!!

Access Hue URL

http://localhost:8888/

Configure HBASE

Note:- default configuration uses standalone mode which will use local file system. To enable to use hdfs, you will need distributed mode, set hbase.cluster.distributed=true

edit /etc/hbase/conf/hbase-site.xml with :

<configuration>
  <property>
    <name>hbase.cluster.distributed</name>
    <value>true</value>
  </property>
  <property>
    <name>hbase.zookeeper.quorum</name>
    <value>localhost</value>
  </property>

  <property>
    <name>hbase.zookeeper.property.clientPort</name>
    <value>2181</value>
  </property>

  <property>
    <name>hbase.rootdir</name>
    <value>hdfs://localhost:8020/hbase</value>
  </property>

  <property>
    <name>zookeeper.znode.parent</name>
    <value>/hbase</value>
  </property>
</configuration>

export your JAVA_HOME if not done yet.. export JAVA_HOME=/usr/lib/jvm/java-7-oracle/

Change permissions on /hbase
sudo -u hdfs hadoop fs -chown hbase:hbase /hbase

su - hdfs
hdfs dfs -chown -R root:hdfs /hbase

Start Zookeeper
/usr/lib/zookeeper/bin/zkServer.sh start

Start Region Server
/usr/lib/hbase/bin/hbase regionserver start &

Start Master
/usr/lib/hbase/bin/hbase master start &

Test with HBase Commands

list
create 'ns:t1','f1'
disable 't1'
drop 't1'
user_permission 't1'
Clone this wiki locally