利用 Docker 搭建单机的 Cloudera CDH 以及使用实践

教程地址

https://www.cloudera.com/documentation/enterprise/5-13-x/topics/cloudera_quickstart_vm.html

 

docker安装cdh

https://www.cloudera.com/documentation/enterprise/5-13-x/topics/quickstart_docker_container.html#importing_quickstart_image

 

下载地址

https://downloads.cloudera.com/demo_vm/docker/cloudera-quickstart-vm-5.13.0-0-beta-docker.tar.gz

 

Importing the Cloudera QuickStart Image

To download and import the image:

  1. Download the latest docker image from Download QuickStart VMS by choosing "Docker Image" in the platform list.
  2. Expand the downloaded tar.gz file.
  3. Navigate into the resulting folder.
  4. Import the docker image:
     

Running a Cloudera QuickStart Container

To run a container using the image, you must know the name or hash of the image. If you followed the import instructions above, the name is cloudera/quickstart:latest. The hash is also printed in the terminal when you import, or you can look up the hashes of all imported images with:

 

Once you know the name or hash of the image, you can run it:

 

The required flags and other options are described in the following table:

Required Flags and Options
Option Description
--hostname=quickstart.cloudera
Required: Pseudo-distributed configuration assumes this hostname.
--privileged=true
Required: For HBase, MySQL-backed Hive metastore, Hue, Oozie, Sentry, and Cloudera Manager.
-t
Required: Allocate a pseudoterminal. Once services are started, a Bash shell takes over. This switch starts a terminal emulator to run the services.
-i
Required: If you want to use the terminal, either immediately or connect to the terminal later.
-p 8888
Recommended: Map the Hue port in the guest to another port on the host.
-p [PORT]
Optional: Map any other ports (for example, 7180 for Cloudera Manager, 80 for a guided tutorial).
-d
Optional: Run the container in the background.

The default Docker settings for memory and CPU are used when running the image. Check to make sure they are appropriate for the Cloudera QuickStart, including at least 2 CPUs per node and enough memory available for the container to support the QuickStart services.

Use /usr/bin/docker-quickstart to start all CDH services, and then run a Bash shell. You can directly run /bin/bash instead, if you want to start services manually.

See Networking for details about port mapping.

 

你可能感兴趣的:(Docker入门到精通)