Onboarding to Apache components

You can create an Operational Database Docker Container to experiment with a simplified setup similar to COD, built using Apache HBase, Apache Zookeeper, Apache Omid, and Apache Phoenix.

Please know that the setup provided in the Docker image is:

  • a highly simplified and single node setup, and not comparable to an actual COD cluster in performance or management.
  • not using the same builds used in COD. Docker only contains the freely available upstream builds of some of the components.
  • to provide an easy to use and setup environment for learning the basics and experimenting with the technology and not for testing with any load.
  1. Launch Docker container and add opdb-docker as localhost in the host file. Run the following command.
    $ sudo vim /etc/hosts

    Add the following entry to the host file.

    127.0.0.1 localhost opdb-docker
  2. The opdb-docker runs many services in the same container so it is recommended to increase the Docker resource configurations under Preferences > Resources to the following:
    • CPUs: 6
    • Memory: 10 GB
    • Swap: 1.5 GB
    • Disk image size: 64 GB
  1. Pull the docker image from Docker Hub.
    $ docker pull cloudera/opdb-docker
  2. Run the opdb-docker container.
    $ docker run -p 8765:8765 -p 8080:8080 -p 8085:8085 -p 9090:9090 \
        -p 9095:9095 -p 2181:2181 -p 16010:16010 -p 16020:16020 -p 16000:16000 \
        -p 16030:16030 -d -h "opdb-docker"  --name opdb-docker opdb-docker
  3. Log in to the Docker and run Apache Phoenix or Apache HBase.
    $ docker exec -it opdb-docker /bin/bash
    $ phoenix-sqlline
    $ hbase shell
  4. Run the following commands to start the HBase Thrift and HBase REST servers as they are not started automatically.
    $ docker exec opdb-docker /opt/hbase/bin/hbase-daemon.sh start thrift
    $ docker exec opdb-docker /opt/hbase/bin/hbase-daemon.sh start rest
  5. Run the following commands to stop the HBase Thrift and HBase REST servers.
    $ docker exec opdb-docker /opt/hbase/bin/hbase-daemon.sh stop thrift
    $ docker exec opdb-docker /opt/hbase/bin/hbase-daemon.sh stop rest